UNPKG

netlify-identity-widget

Version:

Netlify Identity widget for easy integration

1 lines 179 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).netlifyIdentity=t()}(this,function(){"use strict";var e,t,n,i,r,o,a,s,l,u,_,c,d={},g=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,M=Array.isArray;function m(e,t){for(var n in t)e[n]=t[n];return e}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function h(e,i,r,o,a){var s={type:e,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(s),s}function v(e){return e.children}function y(e,t){this.props=e,this.context=t}function N(e,t){if(null==t)return e.__?N(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?N(e):null}function w(e){if(e.__P&&e.__d){var n=e.__v,i=n.__e,r=[],o=[],a=m({},n);a.__v=n.__v+1,t.vnode&&t.vnode(a),O(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,null==i?N(n):i,!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,S(r,a,o),n.__e=n.__=null,a.__e!=i&&b(a)}}function b(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),b(e)}function j(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!D.__r++||r!=t.debounceRendering)&&((r=t.debounceRendering)||o)(D)}function D(){for(var e,t=1;i.length;)i.length>t&&i.sort(a),e=i.shift(),t=i.length,w(e);D.__r=0}function z(e,t,n,i,r,o,a,s,l,u,_){var c,p,m,f,y,w,b,j=i&&i.__k||g,D=t.length;for(l=function(e,t,n,i,r){var o,a,s,l,u,_=n.length,c=_,d=0;for(e.__k=new Array(r),o=0;o<r;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[o]=h(null,a,null,null,null):M(a)?a=e.__k[o]=h(v,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[o]=h(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,l=o+d,a.__=e,a.__b=e.__b+1,s=null,-1!=(u=a.__i=k(a,n,l,c))&&(c--,(s=n[u])&&(s.__u|=2)),null==s||null==s.__v?(-1==u&&(r>_?d--:r<_&&d++),"function"!=typeof a.type&&(a.__u|=4)):u!=l&&(u==l-1?d--:u==l+1?d++:(u>l?d--:d++,a.__u|=4))):e.__k[o]=null;if(c)for(o=0;o<_;o++)null!=(s=n[o])&&!(2&s.__u)&&(s.__e==i&&(i=N(s)),C(s,s));return i}(n,t,j,l,D),c=0;c<D;c++)null!=(m=n.__k[c])&&(p=-1!=m.__i&&j[m.__i]||d,m.__i=c,w=O(e,m,p,r,o,a,s,l,u,_),f=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&U(p.ref,null,m),_.push(m.ref,m.__c||f,m)),null==y&&null!=f&&(y=f),(b=!!(4&m.__u))||p.__k===m.__k?l=T(m,l,e,b):"function"==typeof m.type&&void 0!==w?l=w:f&&(l=f.nextSibling),m.__u&=-7);return n.__e=y,l}function T(e,t,n,i){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=T(r[o],t,n,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=N(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function k(e,t,n,i){var r,o,a,s=e.key,l=e.type,u=t[n],_=null!=u&&!(2&u.__u);if(null===u&&null==s||_&&s==u.key&&l==u.type)return n;if(i>(_?1:0))for(r=n-1,o=n+1;r>=0||o<t.length;)if(null!=(u=t[a=r>=0?r--:o++])&&!(2&u.__u)&&s==u.key&&l==u.type)return a;return-1}function x(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||p.test(t)?n:n+"px"}function I(e,t,n,i,r){var o,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||x(e.style,t,"");if(n)for(t in n)i&&n[t]==i[t]||x(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(s,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=l,e.addEventListener(t,o?_:u,o)):e.removeEventListener(t,o?_:u,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(c){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function L(e){return function(n){if(this.l){var i=this.l[n.type+e];if(null==n.t)n.t=l++;else if(n.t<i.u)return;return i(t.event?t.event(n):n)}}}function O(n,i,r,o,a,s,l,u,_,c){var p,h,w,b,j,D,T,k,x,L,O,S,U,C,P,Y=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(_=!!(32&r.__u),s=[u=i.__e=r.__e]),(p=t.__b)&&p(i);e:if("function"==typeof Y)try{if(k=i.props,x="prototype"in Y&&Y.prototype.render,L=(p=Y.contextType)&&o[p.__c],O=p?L?L.props.value:p.__:o,r.__c?T=(h=i.__c=r.__c).__=h.__E:(x?i.__c=h=new Y(k,O):(i.__c=h=new y(k,O),h.constructor=Y,h.render=Q),L&&L.sub(h),h.state||(h.state={}),h.__n=o,w=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=Y.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,Y.getDerivedStateFromProps(k,h.__s))),b=h.props,j=h.state,h.__v=i,w)x&&null==Y.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==Y.getDerivedStateFromProps&&k!==b&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,O),i.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,O)){i.__v!=r.__v&&(h.props=k,h.state=h.__s,h.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.some(function(e){e&&(e.__=i)}),g.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&l.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,O),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(b,j,D)})}if(h.context=O,h.props=k,h.__P=n,h.__e=!1,S=t.__r,U=0,x)h.state=h.__s,h.__d=!1,S&&S(i),p=h.render(h.props,h.state,h.context),g.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,S&&S(i),p=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++U<25);h.state=h.__s,null!=h.getChildContext&&(o=m(m({},o),h.getChildContext())),x&&!w&&null!=h.getSnapshotBeforeUpdate&&(D=h.getSnapshotBeforeUpdate(b,j)),C=null!=p&&p.type===v&&null==p.key?A(p.props.children):p,u=z(n,M(C)?C:[C],i,r,o,a,s,l,u,_,c),h.base=i.__e,i.__u&=-161,h.__h.length&&l.push(h),T&&(h.__E=h.__=null)}catch(R){if(i.__v=null,_||null!=s)if(R.then){for(i.__u|=_?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;s[s.indexOf(u)]=null,i.__e=u}else{for(P=s.length;P--;)f(s[P]);E(i)}else i.__e=r.__e,i.__k=r.__k,R.then||E(i);t.__e(R,i,r)}else null==s&&i.__v==r.__v?(i.__k=r.__k,i.__e=r.__e):u=i.__e=function(n,i,r,o,a,s,l,u,_){var c,g,p,m,h,v,y,w=r.props||d,b=i.props,j=i.type;if("svg"==j?a="http://www.w3.org/2000/svg":"math"==j?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=s)for(c=0;c<s.length;c++)if((h=s[c])&&"setAttribute"in h==!!j&&(j?h.localName==j:3==h.nodeType)){n=h,s[c]=null;break}if(null==n){if(null==j)return document.createTextNode(b);n=document.createElementNS(a,j,b.is&&b),u&&(t.__m&&t.__m(i,s),u=!1),s=null}if(null==j)w===b||u&&n.data==b||(n.data=b);else{if(s=s&&e.call(n.childNodes),!u&&null!=s)for(w={},c=0;c<n.attributes.length;c++)w[(h=n.attributes[c]).name]=h.value;for(c in w)h=w[c],"dangerouslySetInnerHTML"==c?p=h:"children"==c||c in b||"value"==c&&"defaultValue"in b||"checked"==c&&"defaultChecked"in b||I(n,c,null,h,a);for(c in b)h=b[c],"children"==c?m=h:"dangerouslySetInnerHTML"==c?g=h:"value"==c?v=h:"checked"==c?y=h:u&&"function"!=typeof h||w[c]===h||I(n,c,h,w[c],a);if(g)u||p&&(g.__html==p.__html||g.__html==n.innerHTML)||(n.innerHTML=g.__html),i.__k=[];else if(p&&(n.innerHTML=""),z("template"==i.type?n.content:n,M(m)?m:[m],i,r,o,"foreignObject"==j?"http://www.w3.org/1999/xhtml":a,s,l,s?s[0]:r.__k&&N(r,0),u,_),null!=s)for(c=s.length;c--;)f(s[c]);u||(c="value","progress"==j&&null==v?n.removeAttribute("value"):null!=v&&(v!==n[c]||"progress"==j&&!v||"option"==j&&v!=w[c])&&I(n,c,v,w[c],a),c="checked",null!=y&&y!=n[c]&&I(n,c,y,w[c],a))}return n}(r.__e,i,r,o,a,s,l,_,c);return(p=t.diffed)&&p(i),128&i.__u?void 0:u}function E(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(E))}function S(e,n,i){for(var r=0;r<i.length;r++)U(i[r],i[++r],i[++r]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(i){t.__e(i,n.__v)}})}function A(e){return"object"!=typeof e||null==e||e.__b>0?e:M(e)?e.map(A):m({},e)}function U(e,n,i){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==n||(e.__u=e(n))}else e.current=n}catch(o){t.__e(o,i)}}function C(e,n,i){var r,o;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||U(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){t.__e(a,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&C(r[o],n,i||"function"!=typeof e.type);i||f(e.__e),e.__c=e.__=e.__e=void 0}function Q(e,t,n){return this.constructor(e,n)}function P(n,i,r){var o,a,s;i==document&&(i=document.documentElement),t.__&&t.__(n,i),o=!1?null:i.__k,a=[],s=[],O(i,n=i.__k=function(t,n,i){var r,o,a,s={};for(a in n)"key"==a?r=n[a]:"ref"==a?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return h(t,s,r,o,null)}(v,null,[n]),o||d,d,i.namespaceURI,o?null:i.firstChild?e.call(i.childNodes):null,a,o?o.__e:i.firstChild,false,s),S(a,n,s)}e=g.slice,t={__e:function(e,t,n,i){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),a=r.__d),a)return r.__E=r}catch(s){e=s}throw e}},n=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},n),this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),j(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),j(this))},y.prototype.render=v,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,a=function(e,t){return e.__v.__b-t.__v.__b},D.__r=0,s=/(PointerCapture)$|Capture$/i,l=0,u=L(!1),_=L(!0),c=0;var Y=0;function R(e,n,i,r,o,a){n||(n={});var s,l,u=n;if("ref"in u)for(l in u={},n)"ref"==l?s=n[l]:u[l]=n[l];var _={type:e,props:u,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Y,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(s=e.defaultProps))for(l in s)void 0===u[l]&&(u[l]=s[l]);return t.vnode&&t.vnode(_),_}function B(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var G={};function V(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:G}var H=Object.assign,Z=Object.getOwnPropertyDescriptor,W=Object.defineProperty,F=Object.prototype,J=[];Object.freeze(J);var q={};Object.freeze(q);var K="undefined"!=typeof Proxy,X=Object.toString();function $(){K||B("Proxy not available")}function ee(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var te=function(){};function ne(e){return"function"==typeof e}function ie(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function re(e){return null!==e&&"object"==typeof e}function oe(e){if(!re(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===X}function ae(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function se(e,t,n){W(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function le(e,t,n){W(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ue(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return re(e)&&!0===e[n]}}function _e(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function ce(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var de=void 0!==Object.getOwnPropertySymbols;var ge="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:de?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function pe(e){return null===e?null:"object"==typeof e?""+e:e}function Me(e,t){return F.hasOwnProperty.call(e,t)}var me=Object.getOwnPropertyDescriptors||function(e){var t={};return ge(e).forEach(function(n){t[n]=Z(e,n)}),t};function fe(e,t){return!!(e&t)}function he(e,t,n){return n?e|=t:e&=~t,e}function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ye(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,De(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ne(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ve(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ve(e,t):void 0}}(e))||t){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},we.apply(null,arguments)}function be(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,je(e,t)}function je(e,t){return(je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var ze=Symbol("mobx-stored-annotations");function Te(e){return Object.assign(function(t,n){if(xe(n))return e.decorate_20223_(t,n);ke(t,n,e)},e)}function ke(e,t,n){Me(e,ze)||se(e,ze,we({},e[ze])),function(e){return e.annotationType_===Ce}(n)||(e[ze][t]=n)}function xe(e){return"object"==typeof e&&"string"==typeof e.kind}var Ie=Symbol("mobx administration"),Le=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Et.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return on(this)},t.reportChanged=function(){nn(),an(this),rn()},t.toString=function(){return this.name_},ye(e,[{key:"isBeingObserved",get:function(){return fe(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=he(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return fe(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=he(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return fe(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=he(this.flags_,e.diffValueMask_,1===t)}}])}();Le.isBeingObservedMask_=1,Le.isPendingUnobservationMask_=2,Le.diffValueMask_=4;var Oe=ue("Atom",Le);function Ee(e,t,n){void 0===t&&(t=te),void 0===n&&(n=te);var i,r=new Le(e);return t!==te&&xn(zn,r,t,i),n!==te&&kn(r,n),r}var Se={structural:function(e,t){return Yi(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}};function Ae(e,t,n){return Qn(e)?e:Array.isArray(e)?vt.array(e,{name:n}):oe(e)?vt.object(e,void 0,{name:n}):_e(e)?vt.map(e,{name:n}):ce(e)?vt.set(e,{name:n}):"function"!=typeof e||wn(e)||Cn(e)?e:ae(e)?An(e):Nn(n,e)}function Ue(e){return e}var Ce="override";function Qe(e,t){return{annotationType_:e,options_:t,make_:Pe,extend_:Ye,decorate_20223_:Re}}function Pe(e,t,n,i){var r;if(null!=(r=this.options_)&&r.bound)return null===this.extend_(e,t,n,!1)?0:1;if(i===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(wn(n.value))return 1;var o=Be(e,this,t,n,!1);return W(i,t,o),2}function Ye(e,t,n,i){var r=Be(e,this,t,n);return e.defineProperty_(t,r,i)}function Re(e,t){var n,i=t.kind,r=t.name,o=t.addInitializer,a=this,s=function(e){var t,n,i,o;return kt(null!=(t=null==(n=a.options_)?void 0:n.name)?t:r.toString(),e,null!=(i=null==(o=a.options_)?void 0:o.autoAction)&&i)};return"field"==i?function(e){var t,n=e;return wn(n)||(n=s(n)),null!=(t=a.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==i?(wn(e)||(e=s(e)),null!=(n=this.options_)&&n.bound&&o(function(){var e=this,t=e[r].bind(e);t.isMobxAction=!0,e[r]=t}),e):void B("Cannot apply '"+a.annotationType_+"' to '"+String(r)+"' (kind: "+i+"):\n'"+a.annotationType_+"' can only be used on properties with a function value.")}function Be(e,t,n,i,r){var o,a,s,l,u,_,c,d;void 0===r&&(r=Xt.safeDescriptors),d=i,t.annotationType_,d.value;var g,p=i.value;null!=(o=t.options_)&&o.bound&&(p=p.bind(null!=(g=e.proxy_)?g:e.target_));return{value:kt(null!=(a=null==(s=t.options_)?void 0:s.name)?a:n.toString(),p,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(_=t.options_)&&_.bound?null!=(c=e.proxy_)?c:e.target_:void 0),configurable:!r||e.isPlainObject_,enumerable:!1,writable:!r}}function Ge(e,t){return{annotationType_:e,options_:t,make_:Ve,extend_:He,decorate_20223_:Ze}}function Ve(e,t,n,i){var r;if(i===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(r=this.options_)&&r.bound&&(!Me(e.target_,t)||!Cn(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Cn(n.value))return 1;var o=We(e,this,t,n,!1,!1);return W(i,t,o),2}function He(e,t,n,i){var r,o=We(e,this,t,n,null==(r=this.options_)?void 0:r.bound);return e.defineProperty_(t,o,i)}function Ze(e,t){var n,i=t.name,r=t.addInitializer;return Cn(e)||(e=An(e)),null!=(n=this.options_)&&n.bound&&r(function(){var e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),e}function We(e,t,n,i,r,o){var a;void 0===o&&(o=Xt.safeDescriptors),a=i,t.annotationType_,a.value;var s,l=i.value;(Cn(l)||(l=An(l)),r)&&((l=l.bind(null!=(s=e.proxy_)?s:e.target_)).isMobXFlow=!0);return{value:l,configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function Fe(e,t){return{annotationType_:e,options_:t,make_:Je,extend_:qe,decorate_20223_:Ke}}function Je(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function qe(e,t,n,i){var r;return r=n,this.annotationType_,r.get,e.defineComputedProperty_(t,we({},this.options_,{get:n.get,set:n.set}),i)}function Ke(e,t){var n=this,i=t.name;return(0,t.addInitializer)(function(){var t=vi(this)[Ie],r=we({},n.options_,{get:e,context:this});r.name||(r.name="ObservableObject."+i.toString()),t.values_.set(i,new Ot(r))}),function(){return this[Ie].getObservablePropValue_(i)}}function Xe(e,t){return{annotationType_:e,options_:t,make_:$e,extend_:et,decorate_20223_:tt}}function $e(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function et(e,t,n,i){var r,o;return this.annotationType_,e.defineObservableProperty_(t,n.value,null!=(r=null==(o=this.options_)?void 0:o.enhancer)?r:Ae,i)}function tt(e,t){var n=this,i=t.kind,r=t.name,o=new WeakSet;function a(e,t){var i,a,s=vi(e)[Ie],l=new Lt(t,null!=(i=null==(a=n.options_)?void 0:a.enhancer)?i:Ae,"ObservableObject."+r.toString(),!1);s.values_.set(r,l),o.add(e)}if("accessor"==i)return{get:function(){return o.has(this)||a(this,e.get.call(this)),this[Ie].getObservablePropValue_(r)},set:function(e){return o.has(this)||a(this,e),this[Ie].setObservablePropValue_(r,e)},init:function(e){return o.has(this)||a(this,e),e}}}var nt="true",it=rt();function rt(e){return{annotationType_:nt,options_:e,make_:ot,extend_:at,decorate_20223_:st}}function ot(e,t,n,i){var r,o,a,s;if(n.get)return bt.make_(e,t,n,i);if(n.set){var l=wn(n.set)?n.set:kt(t.toString(),n.set);return i===e.target_?null===e.defineProperty_(t,{configurable:!Xt.safeDescriptors||e.isPlainObject_,set:l})?0:2:(W(i,t,{configurable:!0,set:l}),2)}if(i!==e.target_&&"function"==typeof n.value)return ae(n.value)?(null!=(s=this.options_)&&s.autoBind?An.bound:An).make_(e,t,n,i):(null!=(a=this.options_)&&a.autoBind?Nn.bound:Nn).make_(e,t,n,i);var u,_=!1===(null==(r=this.options_)?void 0:r.deep)?vt.ref:vt;"function"==typeof n.value&&null!=(o=this.options_)&&o.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return _.make_(e,t,n,i)}function at(e,t,n,i){var r,o,a;if(n.get)return bt.extend_(e,t,n,i);if(n.set)return e.defineProperty_(t,{configurable:!Xt.safeDescriptors||e.isPlainObject_,set:kt(t.toString(),n.set)},i);"function"==typeof n.value&&null!=(r=this.options_)&&r.autoBind&&(n.value=n.value.bind(null!=(a=e.proxy_)?a:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?vt.ref:vt).extend_(e,t,n,i)}function st(e,t){B("'"+this.annotationType_+"' cannot be used as a decorator")}var lt={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function ut(e){return e||lt}Object.freeze(lt);var _t=Xe("observable"),ct=Xe("observable.ref",{enhancer:Ue}),dt=Xe("observable.shallow",{enhancer:function(e,t,n){return null==e||wi(e)||oi(e)||_i(e)||pi(e)?e:Array.isArray(e)?vt.array(e,{name:n,deep:!1}):oe(e)?vt.object(e,void 0,{name:n,deep:!1}):_e(e)?vt.map(e,{name:n,deep:!1}):ce(e)?vt.set(e,{name:n,deep:!1}):void 0}}),gt=Xe("observable.struct",{enhancer:function(e,t){return Yi(e,t)?t:e}}),pt=Te(_t);function Mt(e){return!0===e.deep?Ae:!1===e.deep?Ue:(t=e.defaultDecorator)&&null!=(n=null==(i=t.options_)?void 0:i.enhancer)?n:Ae;var t,n,i}function mt(e,t,n){return xe(t)?_t.decorate_20223_(e,t):ie(t)?void ke(e,t,_t):Qn(e)?e:oe(e)?vt.object(e,t,n):Array.isArray(e)?vt.array(e,t):_e(e)?vt.map(e,t):ce(e)?vt.set(e,t):"object"==typeof e&&null!==e?e:vt.box(e,t)}H(mt,pt);var ft,ht,vt=H(mt,{box:function(e,t){var n=ut(t);return new Lt(e,Mt(n),n.name,!0,n.equals)},array:function(e,t){var n=ut(t);return(!1===Xt.useProxies||!1===n.proxy?Si:Xn)(e,Mt(n),n.name)},map:function(e,t){var n=ut(t);return new ui(e,Mt(n),n.name)},set:function(e,t){var n=ut(t);return new gi(e,Mt(n),n.name)},object:function(e,t,n){return Ci(function(){return function(e,t,n,i){var r=me(t);return Ci(function(){var t=vi(e,i)[Ie];ge(r).forEach(function(e){t.extend_(e,r[e],!n||(!(e in n)||n[e]))})}),e}(!1===Xt.useProxies||!1===(null==n?void 0:n.proxy)?vi({},n):function(e,t){var n,i;return $(),e=vi(e,t),null!=(i=(n=e[Ie]).proxy_)?i:n.proxy_=new Proxy(e,Rn)}({},n),e,t)})},ref:Te(ct),shallow:Te(dt),deep:pt,struct:Te(gt)}),yt="computed",Nt=Fe(yt),wt=Fe("computed.struct",{equals:Se.structural}),bt=function(e,t){if(xe(t))return Nt.decorate_20223_(e,t);if(ie(t))return ke(e,t,Nt);if(oe(e))return Te(Fe(yt,e));var n=oe(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Ot(n)};Object.assign(bt,Nt),bt.struct=Te(wt);var jt=0,Dt=1,zt=null!=(ft=null==(ht=Z(function(){},"name"))?void 0:ht.configurable)&&ft,Tt={value:"action",configurable:!0,writable:!1,enumerable:!1};function kt(e,t,n,i){function r(){return function(e,t,n,i,r){var o=function(e,t){var n=!1,i=0,r=Xt.trackingDerivation,o=!t||!r;nn();var a=Xt.allowStateChanges;o&&(Vt(),a=xt(!0));var s=Zt(!0),l={runAsAction_:o,prevDerivation_:r,prevAllowStateChanges_:a,prevAllowStateReads_:s,notifySpy_:n,startTime_:i,actionId_:Dt++,parentActionId_:jt};return jt=l.actionId_,l}(0,t);try{return n.apply(i,r)}catch(a){throw o.error_=a,a}finally{!function(e){jt!==e.actionId_&&B(30);jt=e.parentActionId_,void 0!==e.error_&&(Xt.suppressReactionErrors=!0);It(e.prevAllowStateChanges_),Wt(e.prevAllowStateReads_),rn(),e.runAsAction_&&Ht(e.prevDerivation_);Xt.suppressReactionErrors=!1}(o)}}(0,n,t,i||this,arguments)}return void 0===n&&(n=!1),r.isMobxAction=!0,r.toString=function(){return t.toString()},zt&&(Tt.value=e,W(r,"name",Tt)),r}function xt(e){var t=Xt.allowStateChanges;return Xt.allowStateChanges=e,t}function It(e){Xt.allowStateChanges=e}var Lt=function(e){function t(t,n,i,r,o){var a;return void 0===i&&(i="ObservableValue"),void 0===o&&(o=Se.default),(a=e.call(this,i)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=i,a.equals=o,a.value_=n(t,void 0,i),a}be(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){this.value_,(e=this.prepareNewValue_(e))!==Xt.UNCHANGED&&this.setNewValue_(e)},n.prepareNewValue_=function(e){if(Bn(this)){var t=Vn(this,{object:this,type:Jn,newValue:e});if(!t)return Xt.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?Xt.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Hn(this)&&Wn(this,{type:Jn,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Gn(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:Jn,newValue:this.value_,oldValue:void 0}),Zn(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return pe(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Le),Ot=function(){function e(e){this.dependenciesState_=Et.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Et.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Qt(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=At.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||B(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=kt("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Se.structural:Se.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Et.UP_TO_DATE_)return;e.lowestObserverState_=Et.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===Et.UP_TO_DATE_&&(e.dependenciesState_=Et.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&B(32,this.name_,this.derivation),0!==Xt.inBatch||0!==this.observers_.size||this.keepAlive_){if(on(this),Yt(this)){var e=Xt.trackingContext;this.keepAlive_&&!e&&(Xt.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Et.STALE_)return;e.lowestObserverState_=Et.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Et.POSSIBLY_STALE_?t.dependenciesState_=Et.STALE_:t.dependenciesState_===Et.UP_TO_DATE_&&(e.lowestObserverState_=Et.UP_TO_DATE_)})}(this),Xt.trackingContext=e}}else Yt(this)&&(this.warnAboutUntrackedRead_(),nn(),this.value_=this.computeValue_(!1),rn());var t=this.value_;if(Pt(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&B(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else B(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Et.NOT_TRACKING_,n=this.computeValue_(!0),i=t||Pt(e)||Pt(n)||!this.equals_(e,n);return i&&(this.value_=n),i},t.computeValue_=function(e){this.isComputing=!0;var t,n=xt(!1);if(e)t=Rt(this,this.derivation,this.scope_);else if(!0===Xt.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(i){t=new Qt(i)}return It(n),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(Bt(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,i=!0,r=void 0;return function(e,t){var n,i,r,o;void 0===t&&(t=q);var a,s=null!=(n=null==(i=t)?void 0:i.name)?n:"Autorun";if(t.scheduler||t.delay){var l=jn(t),u=!1;a=new sn(s,function(){u||(u=!0,l(function(){u=!1,a.isDisposed||a.track(_)}))},t.onError,t.requiresObservable)}else a=new sn(s,function(){this.track(_)},t.onError,t.requiresObservable);function _(){e(a)}null!=(r=t)&&null!=(r=r.signal)&&r.aborted||a.schedule_();return a.getDisposer_(null==(o=t)?void 0:o.signal)}(function(){var o=n.get();if(!i||t){var a=Vt();e({observableKind:"computed",debugObjectName:n.name_,type:Jn,object:n,newValue:o,oldValue:r}),Ht(a)}i=!1,r=o})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return pe(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},ye(e,[{key:"isComputing",get:function(){return fe(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=he(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return fe(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=he(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return fe(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=he(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return fe(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=he(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return fe(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=he(this.flags_,e.diffValueMask_,1===t)}}])}();Ot.isComputingMask_=1,Ot.isRunningSetterMask_=2,Ot.isBeingObservedMask_=4,Ot.isPendingUnobservationMask_=8,Ot.diffValueMask_=16;var Et,St,At,Ut,Ct=ue("ComputedValue",Ot);(St=Et||(Et={}))[St.NOT_TRACKING_=-1]="NOT_TRACKING_",St[St.UP_TO_DATE_=0]="UP_TO_DATE_",St[St.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",St[St.STALE_=2]="STALE_",(Ut=At||(At={}))[Ut.NONE=0]="NONE",Ut[Ut.LOG=1]="LOG",Ut[Ut.BREAK=2]="BREAK";var Qt=function(e){this.cause=void 0,this.cause=e};function Pt(e){return e instanceof Qt}function Yt(e){switch(e.dependenciesState_){case Et.UP_TO_DATE_:return!1;case Et.NOT_TRACKING_:case Et.STALE_:return!0;case Et.POSSIBLY_STALE_:for(var t=Zt(!0),n=Vt(),i=e.observing_,r=i.length,o=0;o<r;o++){var a=i[o];if(Ct(a)){if(Xt.disableErrorBoundaries)a.get();else try{a.get()}catch(s){return Ht(n),Wt(t),!0}if(e.dependenciesState_===Et.STALE_)return Ht(n),Wt(t),!0}}return Ft(e),Ht(n),Wt(t),!1}}function Rt(e,t,n){var i=Zt(!0);Ft(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Xt.runId;var r,o=Xt.trackingDerivation;if(Xt.trackingDerivation=e,Xt.inBatch++,!0===Xt.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(a){r=new Qt(a)}return Xt.inBatch--,Xt.trackingDerivation=o,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,i=Et.UP_TO_DATE_,r=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=n[a];0===s.diffValue&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState_>i&&(i=s.dependenciesState_)}n.length=r,e.newObserving_=null,o=t.length;for(;o--;){var l=t[o];0===l.diffValue&&en(l,e),l.diffValue=0}for(;r--;){var u=n[r];1===u.diffValue&&(u.diffValue=0,$t(u,e))}i!==Et.UP_TO_DATE_&&(e.dependenciesState_=i,e.onBecomeStale_())}(e),Wt(i),r}function Bt(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)en(t[n],e);e.dependenciesState_=Et.NOT_TRACKING_}function Gt(e){var t=Vt();try{return e()}finally{Ht(t)}}function Vt(){var e=Xt.trackingDerivation;return Xt.trackingDerivation=null,e}function Ht(e){Xt.trackingDerivation=e}function Zt(e){var t=Xt.allowStateReads;return Xt.allowStateReads=e,t}function Wt(e){Xt.allowStateReads=e}function Ft(e){if(e.dependenciesState_!==Et.UP_TO_DATE_){e.dependenciesState_=Et.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Et.UP_TO_DATE_}}var Jt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},qt=!0,Kt=!1,Xt=function(){var e=V();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(qt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Jt).version&&(qt=!1),qt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Jt):(setTimeout(function(){Kt||B(35)},1),new Jt)}();function $t(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function en(e,t){e.observers_.delete(t),0===e.observers_.size&&tn(e)}function tn(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Xt.pendingUnobservations.push(e))}function nn(){Xt.inBatch++}function rn(){if(0===--Xt.inBatch){_n();for(var e=Xt.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Ot&&n.suspend_())}Xt.pendingUnobservations=[]}}function on(e){var t=Xt.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&Xt.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&Xt.inBatch>0&&tn(e),!1)}function an(e){e.lowestObserverState_!==Et.STALE_&&(e.lowestObserverState_=Et.STALE_,e.observers_.forEach(function(e){e.dependenciesState_===Et.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Et.STALE_}))}var sn=function(){function e(e,t,n,i){void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Et.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=At.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Xt.pendingReactions.push(this),_n())},t.runReaction_=function(){if(!this.isDisposed){nn(),this.isScheduled=!1;var e=Xt.trackingContext;if(Xt.trackingContext=this,Yt(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}Xt.trackingContext=e,rn()}},t.track=function(e){if(!this.isDisposed){nn(),this.isRunning=!0;var t=Xt.trackingContext;Xt.trackingContext=this;var n=Rt(this,e,void 0);Xt.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Bt(this),Pt(n)&&this.reportExceptionInDerivation_(n.cause),rn()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(Xt.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";Xt.suppressReactionErrors||console.error(n,e),Xt.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(nn(),Bt(this),rn()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[Ie]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){},ye(e,[{key:"isDisposed",get:function(){return fe(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=he(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return fe(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=he(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return fe(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=he(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return fe(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=he(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return fe(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=he(this.flags_,e.diffValueMask_,1===t)}}])}();sn.isDisposedMask_=1,sn.isScheduledMask_=2,sn.isTrackPendingMask_=4,sn.isRunningMask_=8,sn.diffValueMask_=16;var ln=100,un=function(e){return e()};function _n(){Xt.inBatch>0||Xt.isRunningReactions||un(cn)}function cn(){Xt.isRunningReactions=!0;for(var e=Xt.pendingReactions,t=0;e.length>0;){++t===ln&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}Xt.isRunningReactions=!1}var dn=ue("Reaction",sn);var gn="action",pn="autoAction",Mn=Qe(gn),mn=Qe("action.bound",{bound:!0}),fn=Qe(pn,{autoAction:!0}),hn=Qe("autoAction.bound",{autoAction:!0,bound:!0});function vn(e){return function(t,n){return ne(t)?kt(t.name||"<unnamed action>",t,e):ne(n)?kt(t,n,e):xe(n)?(e?fn:Mn).decorate_20223_(t,n):ie(n)?ke(t,n,e?fn:Mn):ie(t)?Te(Qe(e?pn:gn,{name:t,autoAction:e})):void 0}}var yn=vn(!1);Object.assign(yn,Mn);var Nn=vn(!0);function wn(e){return ne(e)&&!0===e.isMobxAction}Object.assign(Nn,fn),yn.bound=Te(mn),Nn.bound=Te(hn);var bn=function(e){return e()};function jn(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:bn}function Dn(e,t,n){var i,r,o;void 0===n&&(n=q);var a,s,l,u=null!=(i=n.name)?i:"Reaction",_=yn(u,n.onError?(a=n.onError,s=t,function(){try{return s.apply(this,arguments)}catch(e){a.call(this,e)}}):t),c=!n.scheduler&&!n.delay,d=jn(n),g=!0,p=!1,M=n.compareStructural?Se.structural:n.equals||Se.default,m=new sn(u,function(){g||c?f():p||(p=!0,d(f))},n.onError,n.requiresObservable);function f(){if(p=!1,!m.isDisposed){var t=!1,i=l;m.track(function(){var n=function(e,t){var n=xt(e);try{return t()}finally{It(n)}}(!1,function(){return e(m)});t=g||!M(l,n),l=n}),(g&&n.fireImmediately||!g&&t)&&_(l,i,m),g=!1}}return null!=(r=n)&&null!=(r=r.signal)&&r.aborted||m.schedule_(),m.getDisposer_(null==(o=n)?void 0:o.signal)}var zn="onBO",Tn="onBUO";function kn(e,t,n){return xn(Tn,e,t,n)}function xn(e,t,n,i){var r=Ai(t),o=ne(i)?i:n,a=e+"L";return r[a]?r[a].add(o):r[a]=new Set([o]),function(){var e=r[a];e&&(e.delete(o),0===e.size&&delete r[a])}}var In="always";var Ln=0;function On(){this.message="FLOW_CANCELLED"}On.prototype=Object.create(Error.prototype);var En=Ge("flow"),Sn=Ge("flow.bound",{bound:!0}),An=Object.assign(function(e,t){if(xe(t))return En.decorate_20223_(e,t);if(ie(t))return ke(e,t,En);var n=e,i=n.name||"<unnamed flow>",r=function(){var e,t=arguments,r=++Ln,o=yn(i+" - runid: "+r+" - init",n).apply(this,t),a=void 0,s=new Promise(function(t,n){var s=0;function l(e){var t;a=void 0;try{t=yn(i+" - runid: "+r+" - yield "+s++,o.next).call(o,e)}catch(l){return n(l)}_(t)}function u(e){var t;a=void 0;try{t=yn(i+" - runid: "+r+" - yield "+s++,o.throw).call(o,e)}catch(l){return n(l)}_(t)}function _(e){if(!ne(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(l,u);e.then(_,n)}e=n,l(void 0)});return s.cancel=yn(i+" - runid: "+r+" - cancel",function(){try{a&&Un(a);var t=o.return(void 0),n=Promise.resolve(t.value);n.then(te,te),Un(n),e(new On)}catch(i){e(i)}}),s};return r.isMobXFlow=!0,r},En);function Un(e){ne(e.cancel)&&e.cancel()}function Cn(e){return!0===(null==e?void 0:e.isMobXFlow)}function Qn(e){return function(e){return!!e&&(wi(e)||!!e[Ie]||Oe(e)||dn(e)||Ct(e))}(e)}function Pn(e,t){void 0===t&&(t=void 0),nn();try{return e.apply(t)}finally{rn()}}function Yn(e){return e[Ie]}An.bound=Te(Sn);var Rn={has:function(e,t){return Yn(e).has_(t)},get:function(e,t){return Yn(e).get_(t)},set:function(e,t,n){var i;return!!ie(t)&&(null==(i=Yn(e).set_(t,n,!0))||i)},deleteProperty:function(e,t){var n;return!!ie(t)&&(null==(n=Yn(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var i;return null==(i=Yn(e).defineProperty_(t,n))||i},ownKeys:function(e){return Yn(e).ownKeys_()},preventExtensions:function(e){B(13)}};function Bn(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Gn(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),ee(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Vn(e,t){var n=Vt();try{for(var i=[].concat(e.interceptors_||[]),r=0,o=i.length;r<o&&((t=i[r](t))&&!t.type&&B(14),t);r++);return t}finally{Ht(n)}}function Hn(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function Zn(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),ee(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Wn(e,t){var n=Vt(),i=e.changeListeners_;if(i){for(var r=0,o=(i=i.slice()).length;r<o;r++)i[r](t);Ht(n)}}var Fn="splice",Jn="update",qn={get:function(e,t){var n=e[Ie];return t===Ie?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?Me($n,t)?$n[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var i=e[Ie];return"length"===t&&i.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:i.set_(parseInt(t),n),!0},preventExtensions:function(){B(15)}},Kn=function(){function e(e,t,n,i){void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=i,this.atom_=new Le(e),this.enhancer_=function(e,n){return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Gn(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Zn(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&B("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i<e-t;i++)n[i]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&B(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Ei(e+t+1)},t.spliceWithArray_=function(e,t,n){var i=this;this.atom_;var r=this.values_.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:null==t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=J),Bn(this)){var o=Vn(this,{object:this.proxy_,type:Fn,index:e,removedCount:t,added:n});if(!o)return J;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map(function(e){return i.enhancer_(e,void 0)}),this.legacyMode_){var a=n.length-t;this.updateArrayLength_(r,a)}var s=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){var i;if(n.length<1e4)return(i=this.values_).splice.apply(i,[e,t].concat(n));var r=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var a=0;a<n.length;a++)this.values_[e+a]=n[a];for(var s=0;s<o.length;s++)this.values_[e+n.length+s]=o[s];return r},t.notifyArrayChildUpdate_=function(e,t,n){var i=!this.owned_&&!1,r=Hn(this),o=r||i?{observableKind:"array",object:this.proxy_,type:Jn,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),r&&Wn(this,o)},t.notifyArraySplice_=function(e,t,n){var i=!this.owned_&&!1,r=Hn(this),o=r||i?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Fn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),r&&Wn(this,o)},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&B(17,e,n.length),e<n.length){this.atom_;var i=n[e];if(Bn(this)){var r=Vn(this,{type:Jn,object:this.proxy_,index:e,newValue:t});if(!r)return;t=r.newValue}(t=this.enhancer_(t,i))!==i&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var o=new Array(e+1-n.length),a=0;a<o.length-1;a++)o[a]=void 0;o[o.length-1]=t,this.spliceWithArray_(n.length,0,o)}},e}();function Xn(e,t,n,i){return void 0===n&&(n="ObservableArray"),void 0===i&&(i=!1),$(),Ci(function(){var r=new Kn(n,t,i,!1);le(r.values_,Ie,r);var o=new Proxy(r.values_,qn);return r.proxy_=o,e&&e.length&&r.spliceWithArray_(0,0,e),o})}var $n={clear:function(){return this.splice(0)},replace:function(e){var t=this[Ie];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var o=this[Ie];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,i)},spliceWithArray:function(e,t,n){return this[Ie].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Ie],t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Ie].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Ie],t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return Xt.trackingDerivation&&B(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Xt.trackingDerivation&&B(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Ie],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function ei(e,t){"function"==typeof Array.prototype[e]&&($n[e]=t(e))}function ti(e){return function(){var t=this[Ie];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ni(e){return function(t,n){var i=this,r=this[Ie];return r.atom_.reportObserved(),r.dehanceValues_(r.values_)[e](function(e,r){return t.call(n,e,r,i)})}}function ii(e){return function(){var t=this,n=this[Ie];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(e,n,i){return r(e,n,i,t)},i[e].apply(i,arguments)}}ei("at",ti),ei("concat",ti),ei("flat",ti),ei("includes",ti),ei("indexOf",ti),ei("join",ti),ei("lastIndexOf",ti),ei("slice",ti),ei("toString",ti),ei("toLocaleString",ti),ei("toSorted",ti),ei("toSpliced",ti),ei("with",ti),ei("every",ni),ei("filter",ni),ei("find",ni),ei("findIndex",ni),ei("findLast",ni),ei("findLastIndex",ni),ei("flatMap",ni),ei("forEach",ni),ei("map",ni),ei("some",ni),ei("toReversed",ni),ei("reduce",ii),ei("reduceRight",ii);var ri=ue("ObservableArrayAdministration",Kn);function oi(e){return re(e)&&ri(e[Ie])}var ai={},si="add",li="delete",ui=function(){function e(e,t,n){var i=this;void 0===t&&(t=Ae),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ie]=ai,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,ne(Map)||B(18),Ci(function(){i.keysAtom_=Ee("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!Xt.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var i=n=new Lt(this.has_(e),Ue,"ObservableMap.key?",!1);this.hasMap_.set(e,i),kn(i,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Bn(this)){var i=Vn(this,{type:n?Jn:si,object:this,newValue:t,name:e});if(!i)return this;t=i.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((this.keysAtom_,Bn(this))&&!Vn(this,{type:li,object:this,name:e}))return!1;if(this.has_(e)){var n=Hn(this),i=n?{observableKind:"map",debugObjectName:this.name_,type:li,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Pn(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),n&&Wn(this,i),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==Xt.UNCHANGED){var i=Hn(this),r=i?{observableKi