@loftyshaky/shared 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,12 +2,12 @@ import{n as e,r as t,t as r}from"./chunk.mjs";import{i,n as a,o,s as c,x as l}fr
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ot.apply(null,arguments)}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function ct(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dt(e,t)}function lt(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ut=function(){return!!e})()}function dt(e,t){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dt(e,t)}function ft(e,t){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function pt(e){var t=ft(e,`string`);return typeof t==`symbol`?t:t+``}function mt(e,t){if(e){if(typeof e==`string`)return tt(e,t);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tt(e,t):void 0}}function ht(e){var t=typeof Map==`function`?new Map:void 0;return ht=function(e){if(e===null||!lt(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return nt(e,arguments,st(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),dt(r,e)},ht(e)}var E=Symbol(`mobx-stored-annotations`);function gt(e){function t(t,r){if(bt(r))return e.decorate_20223_(t,r);_t(t,r,e)}return Object.assign(t,e)}function _t(e,t,r){C(e,E)||Ue(e,E,ot({},e[E])),process.env.NODE_ENV!==`production`&&Ft(r)&&!C(e[E],t)&&b(`'`+(e.constructor.name+`.prototype.`+t.toString())+`' is decorated with 'override', but no such decorated member was found on prototype.`),vt(e,r,t),Ft(r)||(e[E][t]=r)}function vt(e,t,r){if(process.env.NODE_ENV!==`production`&&!Ft(t)&&C(e[E],r)){var i=e.constructor.name+`.prototype.`+r.toString(),a=e[E][r].annotationType_,o=t.annotationType_;b(`Cannot apply '@`+o+`' to '`+i+`':`+(`
3
3
  The field is already decorated with '@`+a+`'.`)+`
4
4
  Re-decorating fields is not allowed.
5
- Use '@override' decorator for methods overridden by subclass.`)}}function yt(e){return C(e,E)||Ue(e,E,ot({},e[E])),e[E]}function bt(e){return typeof e==`object`&&typeof e.kind==`string`}function xt(e,t){process.env.NODE_ENV!==`production`&&!t.includes(e.kind)&&b(`The decorator applied to '`+String(e.name)+`' cannot be used on a `+e.kind+` element`)}var D=Symbol(`mobx administration`),St=function(){function e(e){e===void 0&&(e=process.env.NODE_ENV===`production`?`Atom`:`Atom@`+Ie()),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=A.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 yr(this)},t.reportChanged=function(){vr(),br(this),M()},t.toString=function(){return this.name_},it(e,[{key:`isBeingObserved`,get:function(){return w(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=T(this.flags_,e.isBeingObservedMask_,t)}},{key:`isPendingUnobservation`,get:function(){return w(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=T(this.flags_,e.isPendingUnobservationMask_,t)}},{key:`diffValue`,get:function(){return+!!w(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=T(this.flags_,e.diffValueMask_,t===1)}}])}();St.isBeingObservedMask_=1,St.isPendingUnobservationMask_=2,St.diffValueMask_=4;var Ct=Ge(`Atom`,St);function wt(e,t,r){t===void 0&&(t=Re),r===void 0&&(r=Re);var i=new St(e);return t!==Re&&ei(i,t),r!==Re&&ti(i,r),i}function Tt(e,t){return e===t}function Et(e,t){return Na(e,t)}function Dt(e,t){return Na(e,t,1)}function Ot(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e==1/t:e!==e&&t!==t}var kt={identity:Tt,structural:Et,default:Ot,shallow:Dt};function At(e,t,r){return Si(e)?e:Array.isArray(e)?O.array(e,{name:r}):Ve(e)?O.object(e,void 0,{name:r}):Ke(e)?O.map(e,{name:r}):Je(e)?O.set(e,{name:r}):typeof e==`function`&&!Kr(e)&&!_i(e)?He(e)?hi(e):Gr(r,e):e}function jt(e,t,r){if(e==null||ha(e)||Zi(e)||U(e)||oa(e))return e;if(Array.isArray(e))return O.array(e,{name:r,deep:!1});if(Ve(e))return O.object(e,void 0,{name:r,deep:!1});if(Ke(e))return O.map(e,{name:r,deep:!1});if(Je(e))return O.set(e,{name:r,deep:!1});process.env.NODE_ENV!==`production`&&b(`The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets`)}function Mt(e){return e}function Nt(e,t){return process.env.NODE_ENV!==`production`&&Si(e)&&b(`observable.struct should not be used with observable values`),Na(e,t)?t:e}var Pt=`override`;function Ft(e){return e.annotationType_===Pt}function It(e,t){return{annotationType_:e,options_:t,make_:Lt,extend_:Rt,decorate_20223_:zt}}function Lt(e,t,r,i){var a;return(a=this.options_)!=null&&a.bound?this.extend_(e,t,r,!1)===null?0:1:i===e.target_?this.extend_(e,t,r,!1)===null?0:2:Kr(r.value)?1:(Oe(i,t,Vt(e,this,t,r,!1)),2)}function Rt(e,t,r,i){var a=Vt(e,this,t,r);return e.defineProperty_(t,a,i)}function zt(e,t){process.env.NODE_ENV!==`production`&&xt(t,[`method`,`field`]);var r=t.kind,i=t.name,a=t.addInitializer,o=this,c=function(e){return In(o.options_?.name??i.toString(),e,o.options_?.autoAction??!1)};if(r==`field`)return function(e){var t,r=e;return Kr(r)||(r=c(r)),(t=o.options_)!=null&&t.bound&&(r=r.bind(this),r.isMobxAction=!0),r};if(r==`method`){var l;return Kr(e)||(e=c(e)),(l=this.options_)!=null&&l.bound&&a(function(){var e=this,t=e[i].bind(e);t.isMobxAction=!0,e[i]=t}),e}b(`Cannot apply '`+o.annotationType_+`' to '`+String(i)+`' (kind: `+r+`):`+(`
5
+ Use '@override' decorator for methods overridden by subclass.`)}}function yt(e){return C(e,E)||Ue(e,E,ot({},e[E])),e[E]}function bt(e){return typeof e==`object`&&typeof e.kind==`string`}function xt(e,t){process.env.NODE_ENV!==`production`&&!t.includes(e.kind)&&b(`The decorator applied to '`+String(e.name)+`' cannot be used on a `+e.kind+` element`)}var D=Symbol(`mobx administration`),St=function(){function e(e){e===void 0&&(e=process.env.NODE_ENV===`production`?`Atom`:`Atom@`+Ie()),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=A.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 yr(this)},t.reportChanged=function(){vr(),br(this),M()},t.toString=function(){return this.name_},it(e,[{key:`isBeingObserved`,get:function(){return w(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=T(this.flags_,e.isBeingObservedMask_,t)}},{key:`isPendingUnobservation`,get:function(){return w(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=T(this.flags_,e.isPendingUnobservationMask_,t)}},{key:`diffValue`,get:function(){return+!!w(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=T(this.flags_,e.diffValueMask_,t===1)}}])}();St.isBeingObservedMask_=1,St.isPendingUnobservationMask_=2,St.diffValueMask_=4;var Ct=Ge(`Atom`,St);function wt(e,t,r){t===void 0&&(t=Re),r===void 0&&(r=Re);var i=new St(e);return t!==Re&&ei(i,t),r!==Re&&ti(i,r),i}function Tt(e,t){return e===t}function Et(e,t){return Pa(e,t)}function Dt(e,t){return Pa(e,t,1)}function Ot(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e==1/t:e!==e&&t!==t}var kt={identity:Tt,structural:Et,default:Ot,shallow:Dt};function At(e,t,r){return Si(e)?e:Array.isArray(e)?O.array(e,{name:r}):Ve(e)?O.object(e,void 0,{name:r}):Ke(e)?O.map(e,{name:r}):Je(e)?O.set(e,{name:r}):typeof e==`function`&&!Kr(e)&&!_i(e)?He(e)?hi(e):Gr(r,e):e}function jt(e,t,r){if(e==null||ga(e)||Zi(e)||na(e)||ca(e))return e;if(Array.isArray(e))return O.array(e,{name:r,deep:!1});if(Ve(e))return O.object(e,void 0,{name:r,deep:!1});if(Ke(e))return O.map(e,{name:r,deep:!1});if(Je(e))return O.set(e,{name:r,deep:!1});process.env.NODE_ENV!==`production`&&b(`The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets`)}function Mt(e){return e}function Nt(e,t){return process.env.NODE_ENV!==`production`&&Si(e)&&b(`observable.struct should not be used with observable values`),Pa(e,t)?t:e}var Pt=`override`;function Ft(e){return e.annotationType_===Pt}function It(e,t){return{annotationType_:e,options_:t,make_:Lt,extend_:Rt,decorate_20223_:zt}}function Lt(e,t,r,i){var a;return(a=this.options_)!=null&&a.bound?this.extend_(e,t,r,!1)===null?0:1:i===e.target_?this.extend_(e,t,r,!1)===null?0:2:Kr(r.value)?1:(Oe(i,t,Vt(e,this,t,r,!1)),2)}function Rt(e,t,r,i){var a=Vt(e,this,t,r);return e.defineProperty_(t,a,i)}function zt(e,t){process.env.NODE_ENV!==`production`&&xt(t,[`method`,`field`]);var r=t.kind,i=t.name,a=t.addInitializer,o=this,c=function(e){return In(o.options_?.name??i.toString(),e,o.options_?.autoAction??!1)};if(r==`field`)return function(e){var t,r=e;return Kr(r)||(r=c(r)),(t=o.options_)!=null&&t.bound&&(r=r.bind(this),r.isMobxAction=!0),r};if(r==`method`){var l;return Kr(e)||(e=c(e)),(l=this.options_)!=null&&l.bound&&a(function(){var e=this,t=e[i].bind(e);t.isMobxAction=!0,e[i]=t}),e}b(`Cannot apply '`+o.annotationType_+`' to '`+String(i)+`' (kind: `+r+`):`+(`
6
6
  '`+o.annotationType_+`' can only be used on properties with a function value.`))}function Bt(e,t,r,i){var a=t.annotationType_,o=i.value;process.env.NODE_ENV!==`production`&&!S(o)&&b(`Cannot apply '`+a+`' to '`+e.name_+`.`+r.toString()+`':`+(`
7
7
  '`+a+`' can only be used on properties with a function value.`))}function Vt(e,t,r,i,a){var o,c;a===void 0&&(a=j.safeDescriptors),Bt(e,t,r,i);var l=i.value;return(o=t.options_)!=null&&o.bound&&(l=l.bind(e.proxy_??e.target_)),{value:In(t.options_?.name??r.toString(),l,t.options_?.autoAction??!1,(c=t.options_)!=null&&c.bound?e.proxy_??e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function Ht(e,t){return{annotationType_:e,options_:t,make_:Ut,extend_:Wt,decorate_20223_:Gt}}function Ut(e,t,r,i){var a;return i===e.target_?this.extend_(e,t,r,!1)===null?0:2:(a=this.options_)!=null&&a.bound&&(!C(e.target_,t)||!_i(e.target_[t]))&&this.extend_(e,t,r,!1)===null?0:_i(r.value)?1:(Oe(i,t,qt(e,this,t,r,!1,!1)),2)}function Wt(e,t,r,i){var a=qt(e,this,t,r,this.options_?.bound);return e.defineProperty_(t,a,i)}function Gt(e,t){var r;process.env.NODE_ENV!==`production`&&xt(t,[`method`]);var i=t.name,a=t.addInitializer;return _i(e)||(e=hi(e)),(r=this.options_)!=null&&r.bound&&a(function(){var e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),e}function Kt(e,t,r,i){var a=t.annotationType_,o=i.value;process.env.NODE_ENV!==`production`&&!S(o)&&b(`Cannot apply '`+a+`' to '`+e.name_+`.`+r.toString()+`':`+(`
8
- '`+a+`' can only be used on properties with a generator function value.`))}function qt(e,t,r,i,a,o){o===void 0&&(o=j.safeDescriptors),Kt(e,t,r,i);var c=i.value;return _i(c)||(c=hi(c)),a&&(c=c.bind(e.proxy_??e.target_),c.isMobXFlow=!0),{value:c,configurable:o?e.isPlainObject_:!0,enumerable:!1,writable:!o}}function Jt(e,t){return{annotationType_:e,options_:t,make_:Yt,extend_:Xt,decorate_20223_:Zt}}function Yt(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function Xt(e,t,r,i){return Qt(e,this,t,r),e.defineComputedProperty_(t,ot({},this.options_,{get:r.get,set:r.set}),i)}function Zt(e,t){process.env.NODE_ENV!==`production`&&xt(t,[`getter`]);var r=this,i=t.name,a=t.addInitializer;return a(function(){var t=fa(this)[D],a=this;(t.lazyComputedKeys_??=new Map).set(i,function(){var o=ot({},r.options_,{get:e,context:a});return o.name||=process.env.NODE_ENV===`production`?`ObservableObject.`+i.toString():t.name_+`.`+i.toString(),new k(o)})}),function(){return this[D].getObservablePropValue_(i)}}function Qt(e,t,r,i){var a=t.annotationType_,o=i.get;process.env.NODE_ENV!==`production`&&!o&&b(`Cannot apply '`+a+`' to '`+e.name_+`.`+r.toString()+`':`+(`
9
- '`+a+`' can only be used on getter(+setter) properties.`))}function $t(e,t){return{annotationType_:e,options_:t,make_:en,extend_:tn,decorate_20223_:nn}}function en(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function tn(e,t,r,i){return an(e,this,t,r),e.defineObservableProperty_(t,r.value,this.options_?.enhancer??At,i)}function nn(e,t){if(process.env.NODE_ENV!==`production`){if(t.kind===`field`)throw b("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");xt(t,[`accessor`])}var r=this,i=t.kind,a=t.name;if(i!==`accessor`)return;function o(e,t){var i=fa(e)[D];return(i.lazyObservableKeys_??=new Map).set(a,function(){return new Wn(t,r.options_?.enhancer??At,process.env.NODE_ENV===`production`?`ObservableObject.`+a.toString():i.name_+`.`+a.toString(),!1)}),i}return{get:function(){return(this[D]??o(this,e.get.call(this))).getObservablePropValue_(a)},set:function(e){return(this[D]??o(this,e)).setObservablePropValue_(a,e)},init:function(e){return o(this,e),e}}}function an(e,t,r,i){var a=t.annotationType_;process.env.NODE_ENV!==`production`&&!(`value`in i)&&b(`Cannot apply '`+a+`' to '`+e.name_+`.`+r.toString()+`':`+(`
10
- '`+a+`' cannot be used on getter/setter properties`))}var on=`true`,sn=cn();function cn(e){return{annotationType_:on,options_:e,make_:ln,extend_:un,decorate_20223_:dn}}function ln(e,t,r,i){var a;if(r.get)return jn.make_(e,t,r,i);if(r.set){var o=Kr(r.set)?r.set:In(t.toString(),r.set);return i===e.target_?e.defineProperty_(t,{configurable:j.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(Oe(i,t,{configurable:!0,set:o}),2)}if(i!==e.target_&&typeof r.value==`function`){var c;if(He(r.value)){var l;return((l=this.options_)!=null&&l.autoBind?hi.bound:hi).make_(e,t,r,i)}return((c=this.options_)!=null&&c.autoBind?Gr.bound:Gr).make_(e,t,r,i)}var u=this.options_?.deep===!1?O.ref:O;return typeof r.value==`function`&&(a=this.options_)!=null&&a.autoBind&&(r.value=r.value.bind(e.proxy_??e.target_)),u.make_(e,t,r,i)}function un(e,t,r,i){var a;return r.get?jn.extend_(e,t,r,i):r.set?e.defineProperty_(t,{configurable:j.safeDescriptors?e.isPlainObject_:!0,set:In(t.toString(),r.set)},i):(typeof r.value==`function`&&(a=this.options_)!=null&&a.autoBind&&(r.value=r.value.bind(e.proxy_??e.target_)),(this.options_?.deep===!1?O.ref:O).extend_(e,t,r,i))}function dn(e,t){b(`'`+this.annotationType_+`' cannot be used as a decorator`)}var fn=`observable`,pn=`observable.ref`,mn=`observable.shallow`,hn=`observable.struct`,gn={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(gn);function _n(e){return e||gn}var vn=$t(fn),yn=$t(pn,{enhancer:Mt}),bn=$t(mn,{enhancer:jt}),xn=$t(hn,{enhancer:Nt}),Sn=gt(vn);function Cn(e){return e.deep===!0?At:e.deep===!1?Mt:Tn(e.defaultDecorator)}function wn(e){return e?e.defaultDecorator??cn(e):void 0}function Tn(e){return e?e.options_?.enhancer??At:At}function En(e,t,r){if(bt(t))return vn.decorate_20223_(e,t);if(ze(t)){_t(e,t,vn);return}return Si(e)?e:Ve(e)?O.object(e,t,r):Array.isArray(e)?O.array(e,t):Ke(e)?O.map(e,t):Je(e)?O.set(e,t):typeof e==`object`&&e?e:O.box(e,t)}Ee(En,Sn);var O=Ee(En,{box:function(e,t){var r=_n(t);return new Wn(e,Cn(r),r.name,!0,r.equals)},array:function(e,t){var r=_n(t);return(j.useProxies===!1||r.proxy===!1?Da:Ki)(e,Cn(r),r.name)},map:function(e,t){var r=_n(t);return new ta(e,Cn(r),r.name)},set:function(e,t){var r=_n(t);return new aa(e,Cn(r),r.name)},object:function(e,t,r){return ja(function(){return si(j.useProxies===!1||r?.proxy===!1?fa({},r):Ii({},r),e,t)})},ref:gt(yn),shallow:gt(bn),deep:Sn,struct:gt(xn)}),Dn=`computed`,On=`computed.struct`,kn=Jt(Dn),An=Jt(On,{equals:kt.structural}),jn=function(e,t){if(bt(t))return kn.decorate_20223_(e,t);if(ze(t))return _t(e,t,kn);if(Ve(e))return gt(Jt(Dn,e));process.env.NODE_ENV!==`production`&&(S(e)||b("First argument to `computed` should be an expression."),S(t)&&b("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var r=Ve(t)?t:{};return r.get=e,r.name||=e.name||``,new k(r)};Object.assign(jn,kn),jn.struct=gt(An);var Mn=0,Nn=1,Pn=De(function(){},`name`)?.configurable??!1,Fn={value:`action`,configurable:!0,writable:!1,enumerable:!1};function In(e,t,r,i){r===void 0&&(r=!1),process.env.NODE_ENV!==`production`&&(S(t)||b("`action` can only be invoked on functions"),(typeof e!=`string`||!e)&&b(`actions should have valid names, got: '`+e+`'`));function a(){return Ln(e,r,t,i||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return t.toString()},Pn&&(Fn.value=e,Oe(a,`name`,Fn)),a}function Ln(e,t,r,i,a){var o=Rn(e,t,i,a);try{return r.apply(i,a)}catch(e){throw o.error_=e,e}finally{zn(o)}}function Rn(e,t,r,i){var a=process.env.NODE_ENV!==`production`&&N()&&!!e,o=0;process.env.NODE_ENV!==`production`&&a&&(o=Date.now(),P({type:Fr,name:e,object:r,arguments:i?Array.from(i):Ae}));var c=j.trackingDerivation,l=!t||!c;vr();var u=j.allowStateChanges;l&&(ar(),u=Vn(!0));var d=sr(!0),f={runAsAction_:l,prevDerivation_:c,prevAllowStateChanges_:u,prevAllowStateReads_:d,notifySpy_:a,startTime_:o,actionId_:Nn++,parentActionId_:Mn};return Mn=f.actionId_,f}function zn(e){Mn!==e.actionId_&&b(30),Mn=e.parentActionId_,e.error_!==void 0&&(j.suppressReactionErrors=!0),Hn(e.prevAllowStateChanges_),cr(e.prevAllowStateReads_),M(),e.runAsAction_&&or(e.prevDerivation_),process.env.NODE_ENV!==`production`&&e.notifySpy_&&F({time:Date.now()-e.startTime_}),j.suppressReactionErrors=!1}function Bn(e,t){var r=Vn(e);try{return t()}finally{Hn(r)}}function Vn(e){var t=j.allowStateChanges;return j.allowStateChanges=e,t}function Hn(e){j.allowStateChanges=e}var Un=`create`,Wn=function(e){function t(t,r,i,a,o){var c;return i===void 0&&(i=process.env.NODE_ENV===`production`?`ObservableValue`:`ObservableValue@`+Ie()),a===void 0&&(a=!0),o===void 0&&(o=kt.default),c=e.call(this,i)||this,c.enhancer=void 0,c.name_=void 0,c.equals=void 0,c.hasUnreportedChange_=!1,c.interceptors_=void 0,c.changeListeners_=void 0,c.value_=void 0,c.dehancer=void 0,c.enhancer=r,c.name_=i,c.equals=o,c.value_=r(t,void 0,i),process.env.NODE_ENV!==`production`&&a&&N()&&Mr({type:Un,object:c,observableKind:`value`,debugObjectName:c.name_,newValue:``+c.value_?.toString()}),c}ct(t,e);var r=t.prototype;return r.dehanceValue=function(e){return this.dehancer===void 0?e:this.dehancer(e)},r.set=function(e){var t=this.value_;if(e=this.prepareNewValue_(e),e!==j.UNCHANGED){var r=N();process.env.NODE_ENV!==`production`&&r&&P({type:Hi,object:this,observableKind:`value`,debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),process.env.NODE_ENV!==`production`&&r&&F()}},r.prepareNewValue_=function(e){if(Qn(this),R(this)){var t=z(this,{object:this,type:Hi,newValue:e});if(!t)return j.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?j.UNCHANGED:e},r.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Ri(this)&&Bi(this,{type:Hi,object:this,newValue:e,oldValue:t})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(e){return Li(this,e)},r.observe_=function(e,t){return t&&e({observableKind:`value`,debugObjectName:this.name_,object:this,type:Hi,newValue:this.value_,oldValue:void 0}),zi(this,e)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+`[`+this.value_+`]`},r.valueOf=function(){return $e(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},t}(St),Gn=Ge(`ObservableValue`,Wn),k=function(){function e(e){this.dependenciesState_=A.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=A.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Jn(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=qn.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||(process.env.NODE_ENV===`production`?`ComputedValue`:`ComputedValue@`+Ie()),e.set&&(this.setter_=In(process.env.NODE_ENV===`production`?`ComputedValue-setter`:this.name_+`-setter`,e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?kt.structural:kt.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){Sr(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),j.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Xn(this)&&(this.warnAboutUntrackedRead_(),vr(),this.value_=this.computeValue_(!1),M());else if(yr(this),Xn(this)){var e=j.trackingContext;this.keepAlive_&&!e&&(j.trackingContext=this),this.trackAndCompute()&&xr(this),j.trackingContext=e}var t=this.value_;if(Yn(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_===A.NOT_TRACKING_,r=this.computeValue_(!0),i=t||Yn(e)||Yn(r)||!this.equals_(e,r);return i&&(this.value_=r,process.env.NODE_ENV!==`production`&&N()&&Mr({observableKind:`computed`,debugObjectName:this.name_,object:this.scope_,type:`update`,oldValue:e,newValue:r})),i},t.computeValue_=function(e){this.isComputing=!0;var t=Vn(!1),r;if(e)r=er(this,this.derivation,this.scope_);else if(j.disableErrorBoundaries===!0)r=this.derivation.call(this.scope_);else try{r=this.derivation.call(this.scope_)}catch(e){r=new Jn(e)}return Hn(t),this.isComputing=!1,r},t.suspend_=function(){this.keepAlive_||(rr(this),this.value_=void 0,process.env.NODE_ENV!==`production`&&this.isTracing_!==qn.NONE&&console.log(`[mobx.trace] Computed value '`+this.name_+`' was suspended and it will recompute on the next access.`))},t.observe_=function(e,t){var r=this,i=!0,a=void 0;return qr(function(){var o=r.get();if(!i||t){var c=ar();e({observableKind:`computed`,debugObjectName:r.name_,type:Hi,object:r,newValue:o,oldValue:a}),or(c)}i=!1,a=o})},t.warnAboutUntrackedRead_=function(){process.env.NODE_ENV!==`production`&&(this.isTracing_!==qn.NONE&&console.log(`[mobx.trace] Computed value '`+this.name_+`' is being read outside a reactive context. Doing a full recompute.`),(typeof this.requiresReaction_==`boolean`?this.requiresReaction_:j.computedRequiresReaction)&&console.warn(`[mobx] Computed value '`+this.name_+`' is being read outside a reactive context. Doing a full recompute.`))},t.toString=function(){return this.name_+`[`+this.derivation.toString()+`]`},t.valueOf=function(){return $e(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},it(e,[{key:`isComputing`,get:function(){return w(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=T(this.flags_,e.isComputingMask_,t)}},{key:`isRunningSetter`,get:function(){return w(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=T(this.flags_,e.isRunningSetterMask_,t)}},{key:`isBeingObserved`,get:function(){return w(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=T(this.flags_,e.isBeingObservedMask_,t)}},{key:`isPendingUnobservation`,get:function(){return w(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=T(this.flags_,e.isPendingUnobservationMask_,t)}},{key:`diffValue`,get:function(){return+!!w(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=T(this.flags_,e.diffValueMask_,t===1)}}])}();k.isComputingMask_=1,k.isRunningSetterMask_=2,k.isBeingObservedMask_=4,k.isPendingUnobservationMask_=8,k.diffValueMask_=16;var Kn=Ge(`ComputedValue`,k),A;(function(e){e[e.NOT_TRACKING_=-1]=`NOT_TRACKING_`,e[e.UP_TO_DATE_=0]=`UP_TO_DATE_`,e[e.POSSIBLY_STALE_=1]=`POSSIBLY_STALE_`,e[e.STALE_=2]=`STALE_`})(A||={});var qn;(function(e){e[e.NONE=0]=`NONE`,e[e.LOG=1]=`LOG`,e[e.BREAK=2]=`BREAK`})(qn||={});var Jn=function(e){this.cause=void 0,this.cause=e};function Yn(e){return e instanceof Jn}function Xn(e){switch(e.dependenciesState_){case A.UP_TO_DATE_:return!1;case A.NOT_TRACKING_:case A.STALE_:return!0;case A.POSSIBLY_STALE_:for(var t=sr(!0),r=ar(),i=e.observing_,a=i.length,o=0;o<a;o++){var c=i[o];if(Kn(c)){if(j.disableErrorBoundaries)c.get();else try{c.get()}catch{return or(r),cr(t),!0}if(e.dependenciesState_===A.STALE_)return or(r),cr(t),!0}}return lr(e),or(r),cr(t),!1}}function Zn(){return j.trackingDerivation!==null}function Qn(e){if(process.env.NODE_ENV!==`production`){var t=e.observers_.size>0;!j.allowStateChanges&&(t||j.enforceActions===`always`)&&console.warn(`[MobX] `+(j.enforceActions?`Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: `:`Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: `)+e.name_)}}function $n(e){process.env.NODE_ENV!==`production`&&!j.allowStateReads&&j.observableRequiresReaction&&console.warn(`[mobx] Observable '`+e.name_+`' being read outside a reactive context.`)}function er(e,t,r){var i=sr(!0);lr(e),e.newObserving_=Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++j.runId;var a=j.trackingDerivation;j.trackingDerivation=e,j.inBatch++;var o;if(j.disableErrorBoundaries===!0)o=t.call(r);else try{o=t.call(r)}catch(e){o=new Jn(e)}return j.inBatch--,j.trackingDerivation=a,nr(e),tr(e),cr(i),o}function tr(e){process.env.NODE_ENV!==`production`&&e.observing_.length===0&&(typeof e.requiresObservable_==`boolean`?e.requiresObservable_:j.reactionRequiresObservable)&&console.warn(`[mobx] Derivation '`+e.name_+`' is created/updated without reading any observable value.`)}function nr(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,i=A.UP_TO_DATE_,a=0,o=e.unboundDepsCount_,c=0;c<o;c++){var l=r[c];l.diffValue===0&&(l.diffValue=1,a!==c&&(r[a]=l),a++),l.dependenciesState_>i&&(i=l.dependenciesState_)}for(r.length=a,e.newObserving_=null,o=t.length;o--;){var u=t[o];u.diffValue===0&&gr(u,e),u.diffValue=0}for(;a--;){var d=r[a];d.diffValue===1&&(d.diffValue=0,hr(d,e))}i!==A.UP_TO_DATE_&&(e.dependenciesState_=i,e.onBecomeStale_())}function rr(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)gr(t[r],e);e.dependenciesState_=A.NOT_TRACKING_}function ir(e){var t=ar();try{return e()}finally{or(t)}}function ar(){var e=j.trackingDerivation;return j.trackingDerivation=null,e}function or(e){j.trackingDerivation=e}function sr(e){var t=j.allowStateReads;return j.allowStateReads=e,t}function cr(e){j.allowStateReads=e}function lr(e){if(e.dependenciesState_!==A.UP_TO_DATE_){e.dependenciesState_=A.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=A.UP_TO_DATE_}}var ur=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},dr=!0,fr=!1,j=function(){var e=Te();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(dr=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new ur().version&&(dr=!1),dr?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ur):(setTimeout(function(){fr||b(35)},1),new ur)}();function pr(){if((j.pendingReactions.length||j.inBatch||j.isRunningReactions)&&b(36),fr=!0,dr){var e=Te();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),j=new ur}}function mr(){return j}function hr(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function gr(e,t){e.observers_.delete(t),e.observers_.size===0&&_r(e)}function _r(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,j.pendingUnobservations.push(e))}function vr(){j.inBatch++}function M(){if(--j.inBatch===0){Or();for(var e=j.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,r.observers_.size===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBUO()),r instanceof k&&r.suspend_())}j.pendingUnobservations=[]}}function yr(e){$n(e);var t=j.trackingDerivation;return t===null?(e.observers_.size===0&&j.inBatch>0&&_r(e),!1):(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&j.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function br(e){e.lowestObserverState_!==A.STALE_&&(e.lowestObserverState_=A.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===A.UP_TO_DATE_&&(process.env.NODE_ENV!==`production`&&t.isTracing_!==qn.NONE&&Cr(t,e),t.onBecomeStale_()),t.dependenciesState_=A.STALE_}))}function xr(e){e.lowestObserverState_!==A.STALE_&&(e.lowestObserverState_=A.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===A.POSSIBLY_STALE_?(t.dependenciesState_=A.STALE_,process.env.NODE_ENV!==`production`&&t.isTracing_!==qn.NONE&&Cr(t,e)):t.dependenciesState_===A.UP_TO_DATE_&&(e.lowestObserverState_=A.UP_TO_DATE_)}))}function Sr(e){e.lowestObserverState_===A.UP_TO_DATE_&&(e.lowestObserverState_=A.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===A.UP_TO_DATE_&&(e.dependenciesState_=A.POSSIBLY_STALE_,e.onBecomeStale_())}))}function Cr(e,t){if(console.log(`[mobx.trace] '`+e.name_+`' is invalidated due to a change in: '`+t.name_+`'`),e.isTracing_===qn.BREAK){var r=[];wr(ci(e),r,1),Function(`debugger;
8
+ '`+a+`' can only be used on properties with a generator function value.`))}function qt(e,t,r,i,a,o){o===void 0&&(o=j.safeDescriptors),Kt(e,t,r,i);var c=i.value;return _i(c)||(c=hi(c)),a&&(c=c.bind(e.proxy_??e.target_),c.isMobXFlow=!0),{value:c,configurable:o?e.isPlainObject_:!0,enumerable:!1,writable:!o}}function Jt(e,t){return{annotationType_:e,options_:t,make_:Yt,extend_:Xt,decorate_20223_:Zt}}function Yt(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function Xt(e,t,r,i){return Qt(e,this,t,r),e.defineComputedProperty_(t,ot({},this.options_,{get:r.get,set:r.set}),i)}function Zt(e,t){process.env.NODE_ENV!==`production`&&xt(t,[`getter`]);var r=this,i=t.name,a=t.addInitializer;return a(function(){var t=pa(this)[D],a=this;(t.lazyComputedKeys_??=new Map).set(i,function(){var o=ot({},r.options_,{get:e,context:a});return o.name||=process.env.NODE_ENV===`production`?`ObservableObject.`+i.toString():t.name_+`.`+i.toString(),new k(o)})}),function(){return this[D].getObservablePropValue_(i)}}function Qt(e,t,r,i){var a=t.annotationType_,o=i.get;process.env.NODE_ENV!==`production`&&!o&&b(`Cannot apply '`+a+`' to '`+e.name_+`.`+r.toString()+`':`+(`
9
+ '`+a+`' can only be used on getter(+setter) properties.`))}function $t(e,t){return{annotationType_:e,options_:t,make_:en,extend_:tn,decorate_20223_:nn}}function en(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function tn(e,t,r,i){return an(e,this,t,r),e.defineObservableProperty_(t,r.value,this.options_?.enhancer??At,i)}function nn(e,t){if(process.env.NODE_ENV!==`production`){if(t.kind===`field`)throw b("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");xt(t,[`accessor`])}var r=this,i=t.kind,a=t.name;if(i!==`accessor`)return;function o(e,t){var i=pa(e)[D];return(i.lazyObservableKeys_??=new Map).set(a,function(){return new Wn(t,r.options_?.enhancer??At,process.env.NODE_ENV===`production`?`ObservableObject.`+a.toString():i.name_+`.`+a.toString(),!1)}),i}return{get:function(){return(this[D]??o(this,e.get.call(this))).getObservablePropValue_(a)},set:function(e){return(this[D]??o(this,e)).setObservablePropValue_(a,e)},init:function(e){return o(this,e),e}}}function an(e,t,r,i){var a=t.annotationType_;process.env.NODE_ENV!==`production`&&!(`value`in i)&&b(`Cannot apply '`+a+`' to '`+e.name_+`.`+r.toString()+`':`+(`
10
+ '`+a+`' cannot be used on getter/setter properties`))}var on=`true`,sn=cn();function cn(e){return{annotationType_:on,options_:e,make_:ln,extend_:un,decorate_20223_:dn}}function ln(e,t,r,i){var a;if(r.get)return jn.make_(e,t,r,i);if(r.set){var o=Kr(r.set)?r.set:In(t.toString(),r.set);return i===e.target_?e.defineProperty_(t,{configurable:j.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(Oe(i,t,{configurable:!0,set:o}),2)}if(i!==e.target_&&typeof r.value==`function`){var c;if(He(r.value)){var l;return((l=this.options_)!=null&&l.autoBind?hi.bound:hi).make_(e,t,r,i)}return((c=this.options_)!=null&&c.autoBind?Gr.bound:Gr).make_(e,t,r,i)}var u=this.options_?.deep===!1?O.ref:O;return typeof r.value==`function`&&(a=this.options_)!=null&&a.autoBind&&(r.value=r.value.bind(e.proxy_??e.target_)),u.make_(e,t,r,i)}function un(e,t,r,i){var a;return r.get?jn.extend_(e,t,r,i):r.set?e.defineProperty_(t,{configurable:j.safeDescriptors?e.isPlainObject_:!0,set:In(t.toString(),r.set)},i):(typeof r.value==`function`&&(a=this.options_)!=null&&a.autoBind&&(r.value=r.value.bind(e.proxy_??e.target_)),(this.options_?.deep===!1?O.ref:O).extend_(e,t,r,i))}function dn(e,t){b(`'`+this.annotationType_+`' cannot be used as a decorator`)}var fn=`observable`,pn=`observable.ref`,mn=`observable.shallow`,hn=`observable.struct`,gn={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(gn);function _n(e){return e||gn}var vn=$t(fn),yn=$t(pn,{enhancer:Mt}),bn=$t(mn,{enhancer:jt}),xn=$t(hn,{enhancer:Nt}),Sn=gt(vn);function Cn(e){return e.deep===!0?At:e.deep===!1?Mt:Tn(e.defaultDecorator)}function wn(e){return e?e.defaultDecorator??cn(e):void 0}function Tn(e){return e?e.options_?.enhancer??At:At}function En(e,t,r){if(bt(t))return vn.decorate_20223_(e,t);if(ze(t)){_t(e,t,vn);return}return Si(e)?e:Ve(e)?O.object(e,t,r):Array.isArray(e)?O.array(e,t):Ke(e)?O.map(e,t):Je(e)?O.set(e,t):typeof e==`object`&&e?e:O.box(e,t)}Ee(En,Sn);var O=Ee(En,{box:function(e,t){var r=_n(t);return new Wn(e,Cn(r),r.name,!0,r.equals)},array:function(e,t){var r=_n(t);return(j.useProxies===!1||r.proxy===!1?Oa:Ki)(e,Cn(r),r.name)},map:function(e,t){var r=_n(t);return new ta(e,Cn(r),r.name)},set:function(e,t){var r=_n(t);return new oa(e,Cn(r),r.name)},object:function(e,t,r){return Ma(function(){return si(j.useProxies===!1||r?.proxy===!1?pa({},r):Ii({},r),e,t)})},ref:gt(yn),shallow:gt(bn),deep:Sn,struct:gt(xn)}),Dn=`computed`,On=`computed.struct`,kn=Jt(Dn),An=Jt(On,{equals:kt.structural}),jn=function(e,t){if(bt(t))return kn.decorate_20223_(e,t);if(ze(t))return _t(e,t,kn);if(Ve(e))return gt(Jt(Dn,e));process.env.NODE_ENV!==`production`&&(S(e)||b("First argument to `computed` should be an expression."),S(t)&&b("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var r=Ve(t)?t:{};return r.get=e,r.name||=e.name||``,new k(r)};Object.assign(jn,kn),jn.struct=gt(An);var Mn=0,Nn=1,Pn=De(function(){},`name`)?.configurable??!1,Fn={value:`action`,configurable:!0,writable:!1,enumerable:!1};function In(e,t,r,i){r===void 0&&(r=!1),process.env.NODE_ENV!==`production`&&(S(t)||b("`action` can only be invoked on functions"),(typeof e!=`string`||!e)&&b(`actions should have valid names, got: '`+e+`'`));function a(){return Ln(e,r,t,i||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return t.toString()},Pn&&(Fn.value=e,Oe(a,`name`,Fn)),a}function Ln(e,t,r,i,a){var o=Rn(e,t,i,a);try{return r.apply(i,a)}catch(e){throw o.error_=e,e}finally{zn(o)}}function Rn(e,t,r,i){var a=process.env.NODE_ENV!==`production`&&N()&&!!e,o=0;process.env.NODE_ENV!==`production`&&a&&(o=Date.now(),P({type:Fr,name:e,object:r,arguments:i?Array.from(i):Ae}));var c=j.trackingDerivation,l=!t||!c;vr();var u=j.allowStateChanges;l&&(ar(),u=Vn(!0));var d=sr(!0),f={runAsAction_:l,prevDerivation_:c,prevAllowStateChanges_:u,prevAllowStateReads_:d,notifySpy_:a,startTime_:o,actionId_:Nn++,parentActionId_:Mn};return Mn=f.actionId_,f}function zn(e){Mn!==e.actionId_&&b(30),Mn=e.parentActionId_,e.error_!==void 0&&(j.suppressReactionErrors=!0),Hn(e.prevAllowStateChanges_),cr(e.prevAllowStateReads_),M(),e.runAsAction_&&or(e.prevDerivation_),process.env.NODE_ENV!==`production`&&e.notifySpy_&&F({time:Date.now()-e.startTime_}),j.suppressReactionErrors=!1}function Bn(e,t){var r=Vn(e);try{return t()}finally{Hn(r)}}function Vn(e){var t=j.allowStateChanges;return j.allowStateChanges=e,t}function Hn(e){j.allowStateChanges=e}var Un=`create`,Wn=function(e){function t(t,r,i,a,o){var c;return i===void 0&&(i=process.env.NODE_ENV===`production`?`ObservableValue`:`ObservableValue@`+Ie()),a===void 0&&(a=!0),o===void 0&&(o=kt.default),c=e.call(this,i)||this,c.enhancer=void 0,c.name_=void 0,c.equals=void 0,c.hasUnreportedChange_=!1,c.interceptors_=void 0,c.changeListeners_=void 0,c.value_=void 0,c.dehancer=void 0,c.enhancer=r,c.name_=i,c.equals=o,c.value_=r(t,void 0,i),process.env.NODE_ENV!==`production`&&a&&N()&&Mr({type:Un,object:c,observableKind:`value`,debugObjectName:c.name_,newValue:``+c.value_?.toString()}),c}ct(t,e);var r=t.prototype;return r.dehanceValue=function(e){return this.dehancer===void 0?e:this.dehancer(e)},r.set=function(e){var t=this.value_;if(e=this.prepareNewValue_(e),e!==j.UNCHANGED){var r=N();process.env.NODE_ENV!==`production`&&r&&P({type:Hi,object:this,observableKind:`value`,debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),process.env.NODE_ENV!==`production`&&r&&F()}},r.prepareNewValue_=function(e){if(Qn(this),R(this)){var t=z(this,{object:this,type:Hi,newValue:e});if(!t)return j.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?j.UNCHANGED:e},r.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Ri(this)&&Bi(this,{type:Hi,object:this,newValue:e,oldValue:t})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(e){return Li(this,e)},r.observe_=function(e,t){return t&&e({observableKind:`value`,debugObjectName:this.name_,object:this,type:Hi,newValue:this.value_,oldValue:void 0}),zi(this,e)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+`[`+this.value_+`]`},r.valueOf=function(){return $e(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},t}(St),Gn=Ge(`ObservableValue`,Wn),k=function(){function e(e){this.dependenciesState_=A.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=A.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Jn(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=qn.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||(process.env.NODE_ENV===`production`?`ComputedValue`:`ComputedValue@`+Ie()),e.set&&(this.setter_=In(process.env.NODE_ENV===`production`?`ComputedValue-setter`:this.name_+`-setter`,e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?kt.structural:kt.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){Sr(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),j.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Xn(this)&&(this.warnAboutUntrackedRead_(),vr(),this.value_=this.computeValue_(!1),M());else if(yr(this),Xn(this)){var e=j.trackingContext;this.keepAlive_&&!e&&(j.trackingContext=this),this.trackAndCompute()&&xr(this),j.trackingContext=e}var t=this.value_;if(Yn(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_===A.NOT_TRACKING_,r=this.computeValue_(!0),i=t||Yn(e)||Yn(r)||!this.equals_(e,r);return i&&(this.value_=r,process.env.NODE_ENV!==`production`&&N()&&Mr({observableKind:`computed`,debugObjectName:this.name_,object:this.scope_,type:`update`,oldValue:e,newValue:r})),i},t.computeValue_=function(e){this.isComputing=!0;var t=Vn(!1),r;if(e)r=er(this,this.derivation,this.scope_);else if(j.disableErrorBoundaries===!0)r=this.derivation.call(this.scope_);else try{r=this.derivation.call(this.scope_)}catch(e){r=new Jn(e)}return Hn(t),this.isComputing=!1,r},t.suspend_=function(){this.keepAlive_||(rr(this),this.value_=void 0,process.env.NODE_ENV!==`production`&&this.isTracing_!==qn.NONE&&console.log(`[mobx.trace] Computed value '`+this.name_+`' was suspended and it will recompute on the next access.`))},t.observe_=function(e,t){var r=this,i=!0,a=void 0;return qr(function(){var o=r.get();if(!i||t){var c=ar();e({observableKind:`computed`,debugObjectName:r.name_,type:Hi,object:r,newValue:o,oldValue:a}),or(c)}i=!1,a=o})},t.warnAboutUntrackedRead_=function(){process.env.NODE_ENV!==`production`&&(this.isTracing_!==qn.NONE&&console.log(`[mobx.trace] Computed value '`+this.name_+`' is being read outside a reactive context. Doing a full recompute.`),(typeof this.requiresReaction_==`boolean`?this.requiresReaction_:j.computedRequiresReaction)&&console.warn(`[mobx] Computed value '`+this.name_+`' is being read outside a reactive context. Doing a full recompute.`))},t.toString=function(){return this.name_+`[`+this.derivation.toString()+`]`},t.valueOf=function(){return $e(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},it(e,[{key:`isComputing`,get:function(){return w(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=T(this.flags_,e.isComputingMask_,t)}},{key:`isRunningSetter`,get:function(){return w(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=T(this.flags_,e.isRunningSetterMask_,t)}},{key:`isBeingObserved`,get:function(){return w(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=T(this.flags_,e.isBeingObservedMask_,t)}},{key:`isPendingUnobservation`,get:function(){return w(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=T(this.flags_,e.isPendingUnobservationMask_,t)}},{key:`diffValue`,get:function(){return+!!w(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=T(this.flags_,e.diffValueMask_,t===1)}}])}();k.isComputingMask_=1,k.isRunningSetterMask_=2,k.isBeingObservedMask_=4,k.isPendingUnobservationMask_=8,k.diffValueMask_=16;var Kn=Ge(`ComputedValue`,k),A;(function(e){e[e.NOT_TRACKING_=-1]=`NOT_TRACKING_`,e[e.UP_TO_DATE_=0]=`UP_TO_DATE_`,e[e.POSSIBLY_STALE_=1]=`POSSIBLY_STALE_`,e[e.STALE_=2]=`STALE_`})(A||={});var qn;(function(e){e[e.NONE=0]=`NONE`,e[e.LOG=1]=`LOG`,e[e.BREAK=2]=`BREAK`})(qn||={});var Jn=function(e){this.cause=void 0,this.cause=e};function Yn(e){return e instanceof Jn}function Xn(e){switch(e.dependenciesState_){case A.UP_TO_DATE_:return!1;case A.NOT_TRACKING_:case A.STALE_:return!0;case A.POSSIBLY_STALE_:for(var t=sr(!0),r=ar(),i=e.observing_,a=i.length,o=0;o<a;o++){var c=i[o];if(Kn(c)){if(j.disableErrorBoundaries)c.get();else try{c.get()}catch{return or(r),cr(t),!0}if(e.dependenciesState_===A.STALE_)return or(r),cr(t),!0}}return lr(e),or(r),cr(t),!1}}function Zn(){return j.trackingDerivation!==null}function Qn(e){if(process.env.NODE_ENV!==`production`){var t=e.observers_.size>0;!j.allowStateChanges&&(t||j.enforceActions===`always`)&&console.warn(`[MobX] `+(j.enforceActions?`Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: `:`Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: `)+e.name_)}}function $n(e){process.env.NODE_ENV!==`production`&&!j.allowStateReads&&j.observableRequiresReaction&&console.warn(`[mobx] Observable '`+e.name_+`' being read outside a reactive context.`)}function er(e,t,r){var i=sr(!0);lr(e),e.newObserving_=Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++j.runId;var a=j.trackingDerivation;j.trackingDerivation=e,j.inBatch++;var o;if(j.disableErrorBoundaries===!0)o=t.call(r);else try{o=t.call(r)}catch(e){o=new Jn(e)}return j.inBatch--,j.trackingDerivation=a,nr(e),tr(e),cr(i),o}function tr(e){process.env.NODE_ENV!==`production`&&e.observing_.length===0&&(typeof e.requiresObservable_==`boolean`?e.requiresObservable_:j.reactionRequiresObservable)&&console.warn(`[mobx] Derivation '`+e.name_+`' is created/updated without reading any observable value.`)}function nr(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,i=A.UP_TO_DATE_,a=0,o=e.unboundDepsCount_,c=0;c<o;c++){var l=r[c];l.diffValue===0&&(l.diffValue=1,a!==c&&(r[a]=l),a++),l.dependenciesState_>i&&(i=l.dependenciesState_)}for(r.length=a,e.newObserving_=null,o=t.length;o--;){var u=t[o];u.diffValue===0&&gr(u,e),u.diffValue=0}for(;a--;){var d=r[a];d.diffValue===1&&(d.diffValue=0,hr(d,e))}i!==A.UP_TO_DATE_&&(e.dependenciesState_=i,e.onBecomeStale_())}function rr(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)gr(t[r],e);e.dependenciesState_=A.NOT_TRACKING_}function ir(e){var t=ar();try{return e()}finally{or(t)}}function ar(){var e=j.trackingDerivation;return j.trackingDerivation=null,e}function or(e){j.trackingDerivation=e}function sr(e){var t=j.allowStateReads;return j.allowStateReads=e,t}function cr(e){j.allowStateReads=e}function lr(e){if(e.dependenciesState_!==A.UP_TO_DATE_){e.dependenciesState_=A.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=A.UP_TO_DATE_}}var ur=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},dr=!0,fr=!1,j=function(){var e=Te();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(dr=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new ur().version&&(dr=!1),dr?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ur):(setTimeout(function(){fr||b(35)},1),new ur)}();function pr(){if((j.pendingReactions.length||j.inBatch||j.isRunningReactions)&&b(36),fr=!0,dr){var e=Te();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),j=new ur}}function mr(){return j}function hr(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function gr(e,t){e.observers_.delete(t),e.observers_.size===0&&_r(e)}function _r(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,j.pendingUnobservations.push(e))}function vr(){j.inBatch++}function M(){if(--j.inBatch===0){Or();for(var e=j.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,r.observers_.size===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBUO()),r instanceof k&&r.suspend_())}j.pendingUnobservations=[]}}function yr(e){$n(e);var t=j.trackingDerivation;return t===null?(e.observers_.size===0&&j.inBatch>0&&_r(e),!1):(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&j.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved)}function br(e){e.lowestObserverState_!==A.STALE_&&(e.lowestObserverState_=A.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===A.UP_TO_DATE_&&(process.env.NODE_ENV!==`production`&&t.isTracing_!==qn.NONE&&Cr(t,e),t.onBecomeStale_()),t.dependenciesState_=A.STALE_}))}function xr(e){e.lowestObserverState_!==A.STALE_&&(e.lowestObserverState_=A.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===A.POSSIBLY_STALE_?(t.dependenciesState_=A.STALE_,process.env.NODE_ENV!==`production`&&t.isTracing_!==qn.NONE&&Cr(t,e)):t.dependenciesState_===A.UP_TO_DATE_&&(e.lowestObserverState_=A.UP_TO_DATE_)}))}function Sr(e){e.lowestObserverState_===A.UP_TO_DATE_&&(e.lowestObserverState_=A.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===A.UP_TO_DATE_&&(e.dependenciesState_=A.POSSIBLY_STALE_,e.onBecomeStale_())}))}function Cr(e,t){if(console.log(`[mobx.trace] '`+e.name_+`' is invalidated due to a change in: '`+t.name_+`'`),e.isTracing_===qn.BREAK){var r=[];wr(ci(e),r,1),Function(`debugger;
11
11
  /*
12
12
  Tracing '`+e.name_+`'
13
13
 
@@ -22,14 +22,14 @@ The dependencies for this derivation are:
22
22
  `+r.join(`
23
23
  `)+`
24
24
  */
25
- `)()}}function wr(e,t,r){if(t.length>=1e3){t.push(`(and many more)`);return}t.push(``+` `.repeat(r-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return wr(e,t,r+1)})}var Tr=function(){function e(e,t,r,i){e===void 0&&(e=process.env.NODE_ENV===`production`?`Reaction`:`Reaction@`+Ie()),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=A.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=qn.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=r,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,j.pendingReactions.push(this),Or())},t.runReaction_=function(){if(!this.isDisposed){vr(),this.isScheduled=!1;var e=j.trackingContext;if(j.trackingContext=this,Xn(this)){this.isTrackPending=!0;try{this.onInvalidate_(),process.env.NODE_ENV!==`production`&&this.isTrackPending&&N()&&Mr({name:this.name_,type:`scheduled-reaction`})}catch(e){this.reportExceptionInDerivation_(e)}}j.trackingContext=e,M()}},t.track=function(e){if(!this.isDisposed){vr();var t=N(),r;process.env.NODE_ENV!==`production`&&t&&(r=Date.now(),P({name:this.name_,type:`reaction`})),this.isRunning=!0;var i=j.trackingContext;j.trackingContext=this;var a=er(this,e,void 0);j.trackingContext=i,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&rr(this),Yn(a)&&this.reportExceptionInDerivation_(a.cause),process.env.NODE_ENV!==`production`&&t&&F({time:Date.now()-r}),M()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_){this.errorHandler_(e,this);return}if(j.disableErrorBoundaries)throw e;var r=process.env.NODE_ENV===`production`?`[mobx] uncaught error in '`+this+`'`:`[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '`+this+`'`;j.suppressReactionErrors?process.env.NODE_ENV!==`production`&&console.warn(`[mobx] (error in reaction '`+this.name_+`' suppressed, fix error of causing action below)`):console.error(r,e),process.env.NODE_ENV!==`production`&&N()&&Mr({type:`error`,name:this.name_,message:r,error:``+e}),j.globalReactionErrorHandlers.forEach(function(r){return r(e,t)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(vr(),rr(this),M()))},t.getDisposer_=function(e){var t=this,r=function r(){t.dispose(),e==null||e.removeEventListener==null||e.removeEventListener(`abort`,r)};return e==null||e.addEventListener==null||e.addEventListener(`abort`,r),r[D]=this,`dispose`in Symbol&&typeof Symbol.dispose==`symbol`&&(r[Symbol.dispose]=r),r},t.toString=function(){return`Reaction[`+this.name_+`]`},t.trace=function(e){e===void 0&&(e=!1),ji(this,e)},it(e,[{key:`isDisposed`,get:function(){return w(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=T(this.flags_,e.isDisposedMask_,t)}},{key:`isScheduled`,get:function(){return w(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=T(this.flags_,e.isScheduledMask_,t)}},{key:`isTrackPending`,get:function(){return w(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=T(this.flags_,e.isTrackPendingMask_,t)}},{key:`isRunning`,get:function(){return w(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=T(this.flags_,e.isRunningMask_,t)}},{key:`diffValue`,get:function(){return+!!w(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=T(this.flags_,e.diffValueMask_,t===1)}}])}();Tr.isDisposedMask_=1,Tr.isScheduledMask_=2,Tr.isTrackPendingMask_=4,Tr.isRunningMask_=8,Tr.diffValueMask_=16;var Er=100,Dr=function(e){return e()};function Or(){j.inBatch>0||j.isRunningReactions||Dr(kr)}function kr(){j.isRunningReactions=!0;for(var e=j.pendingReactions,t=0;e.length>0;){++t===Er&&(console.error(process.env.NODE_ENV===`production`?`[mobx] cycle in reaction: `+e[0]:`Reaction doesn't converge to a stable state after `+Er+` iterations.`+(` Probably there is a cycle in the reactive function: `+e[0])),e.splice(0));for(var r=e.splice(0),i=0,a=r.length;i<a;i++)r[i].runReaction_()}j.isRunningReactions=!1}var Ar=Ge(`Reaction`,Tr);function jr(e){var t=Dr;Dr=function(r){return e(function(){return t(r)})}}function N(){return process.env.NODE_ENV!==`production`&&!!j.spyListeners.length}function Mr(e){if(process.env.NODE_ENV!==`production`&&j.spyListeners.length)for(var t=j.spyListeners,r=0,i=t.length;r<i;r++)t[r](e)}function P(e){process.env.NODE_ENV!==`production`&&Mr(ot({},e,{spyReportStart:!0}))}var Nr={type:`report-end`,spyReportEnd:!0};function F(e){process.env.NODE_ENV!==`production`&&Mr(e?ot({},e,{type:`report-end`,spyReportEnd:!0}):Nr)}function Pr(e){return process.env.NODE_ENV===`production`?(console.warn(`[mobx.spy] Is a no-op in production builds`),function(){}):(j.spyListeners.push(e),Le(function(){j.spyListeners=j.spyListeners.filter(function(t){return t!==e})}))}var Fr=`action`,Ir=`action.bound`,Lr=`autoAction`,Rr=`autoAction.bound`,zr=`<unnamed action>`,Br=It(Fr),Vr=It(Ir,{bound:!0}),Hr=It(Lr,{autoAction:!0}),Ur=It(Rr,{autoAction:!0,bound:!0});function Wr(e){return function(t,r){if(S(t))return In(t.name||zr,t,e);if(S(r))return In(t,r,e);if(bt(r))return(e?Hr:Br).decorate_20223_(t,r);if(ze(r))return _t(t,r,e?Hr:Br);if(ze(t))return gt(It(e?Lr:Fr,{name:t,autoAction:e}));process.env.NODE_ENV!==`production`&&b("Invalid arguments for `action`")}}var I=Wr(!1);Object.assign(I,Br);var Gr=Wr(!0);Object.assign(Gr,Hr),I.bound=gt(Vr),Gr.bound=gt(Ur);function L(e){return Ln(e.name||zr,!1,e,this,void 0)}function Kr(e){return S(e)&&e.isMobxAction===!0}function qr(e,t){var r;t===void 0&&(t=je),process.env.NODE_ENV!==`production`&&(S(e)||b(`Autorun expects a function as first argument`),Kr(e)&&b(`Autorun does not accept actions since actions are untrackable`));var i=t?.name??(process.env.NODE_ENV===`production`?`Autorun`:e.name||`Autorun@`+Ie()),a=!t.scheduler&&!t.delay,o;if(a)o=new Tr(i,function(){this.track(u)},t.onError,t.requiresObservable);else{var c=Yr(t),l=!1;o=new Tr(i,function(){l||(l=!0,c(function(){l=!1,o.isDisposed||o.track(u)}))},t.onError,t.requiresObservable)}function u(){e(o)}return(r=t)!=null&&(r=r.signal)!=null&&r.aborted||o.schedule_(),o.getDisposer_(t?.signal)}var Jr=function(e){return e()};function Yr(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Jr}function Xr(e,t,r){var i;r===void 0&&(r=je),process.env.NODE_ENV!==`production`&&((!S(e)||!S(t))&&b(`First and second argument to reaction should be functions`),Ve(r)||b(`Third argument of reactions should be an object`));var a=r.name??(process.env.NODE_ENV===`production`?`Reaction`:`Reaction@`+Ie()),o=I(a,r.onError?Zr(r.onError,t):t),c=!r.scheduler&&!r.delay,l=Yr(r),u=!0,d=!1,f,p=r.compareStructural?kt.structural:r.equals||kt.default,m=new Tr(a,function(){u||c?h():d||(d=!0,l(h))},r.onError,r.requiresObservable);function h(){if(d=!1,!m.isDisposed){var t=!1,i=f;m.track(function(){var r=Bn(!1,function(){return e(m)});t=u||!p(f,r),f=r}),(u&&r.fireImmediately||!u&&t)&&o(f,i,m),u=!1}}return(i=r)!=null&&(i=i.signal)!=null&&i.aborted||m.schedule_(),m.getDisposer_(r?.signal)}function Zr(e,t){return function(){try{return t.apply(this,arguments)}catch(t){e.call(this,t)}}}var Qr=`onBO`,$r=`onBUO`;function ei(e,t,r){return ni(Qr,e,t,r)}function ti(e,t,r){return ni($r,e,t,r)}function ni(e,t,r,i){var a=typeof i==`function`?Oa(t,r):Oa(t),o=S(i)?i:r,c=e+`L`;return a[c]?a[c].add(o):a[c]=new Set([o]),function(){var e=a[c];e&&(e.delete(o),e.size===0&&delete a[c])}}var ri=`never`,ii=`always`,ai=`observed`;function oi(e){e.isolateGlobalState===!0&&pr();var t=e.useProxies,r=e.enforceActions;if(t!==void 0&&(j.useProxies=t===ii?!0:t===ri?!1:typeof Proxy<`u`),t===`ifavailable`&&(j.verifyProxies=!0),r!==void 0){var i=r===ii?ii:r===ai;j.enforceActions=i,j.allowStateChanges=!(i===!0||i===ii)}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(function(t){t in e&&(j[t]=!!e[t])}),j.allowStateReads=!j.observableRequiresReaction,process.env.NODE_ENV!==`production`&&j.disableErrorBoundaries===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&jr(e.reactionScheduler)}function si(e,t,r,i){process.env.NODE_ENV!==`production`&&(arguments.length>4&&b(`'extendObservable' expected 2-4 arguments`),typeof e!=`object`&&b(`'extendObservable' expects an object as first argument`),U(e)&&b(`'extendObservable' should not be used on maps, use map.merge instead`),Ve(t)||b(`'extendObservable' only accepts plain objects as second argument`),(Si(t)||Si(r))&&b(`Extending an object with another observable (object) is not supported`));var a=et(t);return ja(function(){var t=fa(e,i)[D];Ze(a).forEach(function(e){t.extend_(e,a[e],r&&e in r?r[e]:!0)})}),e}function ci(e,t){return li(Oa(e,t))}function li(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=ui(e.observing_).map(li)),t}function ui(e){return Array.from(new Set(e))}var di=0,fi=function(e){function t(){var r=e.call(this,`FLOW_CANCELLED`)||this;return Object.setPrototypeOf(r,(this instanceof t?this.constructor:void 0).prototype),r.name=`FlowCancellationError`,r}ct(t,e);var r=t.prototype;return r.toString=function(){return`Error: `+this.message},t}(ht(Error)),pi=Ht(`flow`),mi=Ht(`flow.bound`,{bound:!0}),hi=Object.assign(function(e,t){if(bt(t))return pi.decorate_20223_(e,t);if(ze(t))return _t(e,t,pi);process.env.NODE_ENV!==`production`&&arguments.length!==1&&b(`Flow expects single argument with generator function`);var r=e,i=r.name||`<unnamed flow>`,a=function(){var e=this,t=arguments,a=++di,o=I(i+` - runid: `+a+` - init`,r).apply(e,t),c,l=void 0,u=new Promise(function(e,t){var r=0;c=t;function u(e){l=void 0;var c;try{c=I(i+` - runid: `+a+` - yield `+ r++,o.next).call(o,e)}catch(e){return t(e)}f(c)}function d(e){l=void 0;var c;try{c=I(i+` - runid: `+a+` - yield `+ r++,o.throw).call(o,e)}catch(e){return t(e)}f(c)}function f(r){if(S(r?.then)){r.then(f,t);return}return r.done?e(r.value):(l=Promise.resolve(r.value),l.then(u,d))}u(void 0)});return u.cancel=I(i+` - runid: `+a+` - cancel`,function(){try{l&&gi(l);var e=o.return(void 0),t=Promise.resolve(e.value);t.then(Re,Re),gi(t),c(new fi)}catch(e){c(e)}}),u};return a.isMobXFlow=!0,a},pi);hi.bound=gt(mi);function gi(e){S(e.cancel)&&e.cancel()}function _i(e){return e?.isMobXFlow===!0}function vi(e,t){var r;if(t===void 0)return Kn(e);if(ha(e)===!1)return!1;var i=e[D];return(r=i.lazyComputedKeys_)!=null&&r.has(t)?!0:i.values_.has(t)?Kn(Oa(e,t)):!1}function yi(e){return process.env.NODE_ENV!==`production`&&arguments.length>1?b(`isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property`):vi(e)}function bi(e,t){return process.env.NODE_ENV!==`production`&&!ze(t)?b(`isComputed expected a property name as second argument`):vi(e,t)}function xi(e,t){if(!e)return!1;if(t!==void 0){if(process.env.NODE_ENV!==`production`&&(U(e)||Zi(e)))return b(`isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.`);if(ha(e)){var r,i,a=e[D];return a.values_.has(t)||!!((r=a.lazyComputedKeys_)!=null&&r.has(t))||!!((i=a.lazyObservableKeys_)!=null&&i.has(t))}return!1}return ha(e)||!!e[D]||Ct(e)||Ar(e)||Kn(e)}function Si(e){return process.env.NODE_ENV!==`production`&&arguments.length!==1&&b(`isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property`),xi(e)}function Ci(e){if(ha(e))return e[D].keys_();if(U(e)||oa(e))return Array.from(e.keys());if(Zi(e))return e.map(function(e,t){return t});b(5)}function wi(e){if(ha(e))return e[D].ownKeys_();b(38)}function Ti(e,t,r,i){return S(r)?Di(e,t,r,i):Ei(e,t,r)}function Ei(e,t,r){return ka(e).observe_(t,r)}function Di(e,t,r,i){return ka(e,t).observe_(r,i)}function Oi(e,t,r){return e.set(t,r),r}function ki(e,t){if(typeof e!=`object`||!e||e instanceof Date||!Si(e))return e;if(Gn(e)||Kn(e))return ki(e.get(),t);if(t.has(e))return t.get(e);if(Zi(e)){var r=Oi(t,e,Array(e.length));return e.forEach(function(e,i){r[i]=ki(e,t)}),r}if(oa(e)){var i=Oi(t,e,new Set);return e.forEach(function(e){i.add(ki(e,t))}),i}if(U(e)){var a=Oi(t,e,new Map);return e.forEach(function(e,r){a.set(r,ki(e,t))}),a}else{var o=Oi(t,e,{});return wi(e).forEach(function(r){ke.propertyIsEnumerable.call(e,r)&&(o[r]=ki(e[r],t))}),o}}function Ai(e,t){return process.env.NODE_ENV!==`production`&&t&&b(`toJS no longer supports options`),ki(e,new Map)}function ji(){if(process.env.NODE_ENV!==`production`){var e=!1,t=[...arguments];typeof t[t.length-1]==`boolean`&&(e=t.pop());var r=Mi(t);if(!r)return b(`'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly`);r.isTracing_===qn.NONE&&console.log(`[mobx.trace] '`+r.name_+`' tracing enabled`),r.isTracing_=e?qn.BREAK:qn.LOG}}function Mi(e){switch(e.length){case 0:return j.trackingDerivation;case 1:return Oa(e[0]);case 2:return Oa(e[0],e[1])}}function Ni(e,t){t===void 0&&(t=void 0),vr();try{return e.apply(t)}finally{M()}}function Pi(e){return e[D]}var Fi={has:function(e,t){return process.env.NODE_ENV!==`production`&&j.trackingDerivation&&Fe(`detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.`),Pi(e).has_(t)},get:function(e,t){return Pi(e).get_(t)},set:function(e,t,r){return ze(t)?(process.env.NODE_ENV!==`production`&&!Pi(e).values_.has(t)&&Fe(`add a new observable property through direct assignment. Use 'set' from 'mobx' instead.`),Pi(e).set_(t,r,!0)??!0):!1},deleteProperty:function(e,t){return process.env.NODE_ENV!==`production`&&Fe(`delete properties from an observable object. Use 'remove' from 'mobx' instead.`),ze(t)?Pi(e).delete_(t,!0)??!0:!1},defineProperty:function(e,t,r){return process.env.NODE_ENV!==`production`&&Fe(`define property on an observable object. Use 'defineProperty' from 'mobx' instead.`),Pi(e).defineProperty_(t,r)??!0},ownKeys:function(e){return process.env.NODE_ENV!==`production`&&j.trackingDerivation&&Fe(`iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead.`),Pi(e).ownKeys_()},preventExtensions:function(e){b(13)}};function Ii(e,t){var r;return Pe(),e=fa(e,t),(r=e[D]).proxy_??(r.proxy_=new Proxy(e,Fi))}function R(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Li(e,t){var r=e.interceptors_||=[];return r.push(t),Le(function(){var e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function z(e,t){var r=ar();try{for(var i=[].concat(e.interceptors_||[]),a=0,o=i.length;a<o&&(t=i[a](t),t&&!t.type&&b(14),t);a++);return t}finally{or(r)}}function Ri(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function zi(e,t){var r=e.changeListeners_||=[];return r.push(t),Le(function(){var e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function Bi(e,t){var r=ar(),i=e.changeListeners_;if(i){i=i.slice();for(var a=0,o=i.length;a<o;a++)i[a](t);or(r)}}function B(e,t,r){return ja(function(){var i=fa(e,r)[D];process.env.NODE_ENV!==`production`&&t&&e[E]&&b(`makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported.`),t??=yt(e),Ze(t).forEach(function(e){return i.make_(e,t[e])})}),e}var Vi=`splice`,Hi=`update`,Ui=1e4,Wi={get:function(e,t){var r=e[D];return t===D?r:t===`length`?r.getArrayLength_():typeof t==`string`&&!isNaN(t)?r.get_(parseInt(t)):C(qi,t)?qi[t]:e[t]},set:function(e,t,r){var i=e[D];return t===`length`&&i.setArrayLength_(r),typeof t==`symbol`||isNaN(t)?e[t]=r:i.set_(parseInt(t),r),!0},preventExtensions:function(){b(15)}},Gi=function(){function e(e,t,r,i){e===void 0&&(e=process.env.NODE_ENV===`production`?`ObservableArray`:`ObservableArray@`+Ie()),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_=r,this.legacyMode_=i,this.atom_=new St(e),this.enhancer_=function(r,i){return t(r,i,process.env.NODE_ENV===`production`?`ObservableArray[..]`:e+`[..]`)}}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.dehanceValues_=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Li(this,e)},t.observe_=function(e,t){return t===void 0&&(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}),zi(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){(typeof e!=`number`||isNaN(e)||e<0)&&b(`Out of range: `+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=Array(e-t),i=0;i<e-t;i++)r[i]=void 0;this.spliceWithArray_(t,0,r)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&b(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Ea(e+t+1)},t.spliceWithArray_=function(e,t,r){var i=this;Qn(this.atom_);var a=this.values_.length;if(e===void 0?e=0:e>a?e=a:e<0&&(e=Math.max(0,a+e)),t=arguments.length===1?a-e:t==null?0:Math.max(0,Math.min(t,a-e)),r===void 0&&(r=Ae),R(this)){var o=z(this,{object:this.proxy_,type:Vi,index:e,removedCount:t,added:r});if(!o)return Ae;t=o.removedCount,r=o.added}if(r=r.length===0?r:r.map(function(e){return i.enhancer_(e,void 0)}),this.legacyMode_||process.env.NODE_ENV!==`production`){var c=r.length-t;this.updateArrayLength_(a,c)}var l=this.spliceItemsIntoValues_(e,t,r);return(t!==0||r.length!==0)&&this.notifyArraySplice_(e,r,l),this.dehanceValues_(l)},t.spliceItemsIntoValues_=function(e,t,r){if(r.length<Ui){var i;return(i=this.values_).splice.apply(i,[e,t].concat(r))}else{var a=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=r.length-t;for(var c=0;c<r.length;c++)this.values_[e+c]=r[c];for(var l=0;l<o.length;l++)this.values_[e+r.length+l]=o[l];return a}},t.notifyArrayChildUpdate_=function(e,t,r){var i=!this.owned_&&N(),a=Ri(this),o=a||i?{observableKind:`array`,object:this.proxy_,type:Hi,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:r}:null;process.env.NODE_ENV!==`production`&&i&&P(o),this.atom_.reportChanged(),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()},t.notifyArraySplice_=function(e,t,r){var i=!this.owned_&&N(),a=Ri(this),o=a||i?{observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:Vi,index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;process.env.NODE_ENV!==`production`&&i&&P(o),this.atom_.reportChanged(),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()},t.get_=function(e){if(this.legacyMode_&&e>=this.values_.length){console.warn(process.env.NODE_ENV===`production`?`[mobx] Out of bounds read: `+e:`[mobx.array] Attempt to read an array index (`+e+`) that is out of bounds (`+this.values_.length+`). Please check length first. Out of bound indices will not be tracked by MobX`);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e])},t.set_=function(e,t){var r=this.values_;if(this.legacyMode_&&e>r.length&&b(17,e,r.length),e<r.length){Qn(this.atom_);var i=r[e];if(R(this)){var a=z(this,{type:Hi,object:this.proxy_,index:e,newValue:t});if(!a)return;t=a.newValue}t=this.enhancer_(t,i),t!==i&&(r[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var o=Array(e+1-r.length),c=0;c<o.length-1;c++)o[c]=void 0;o[o.length-1]=t,this.spliceWithArray_(r.length,0,o)}},e}();function Ki(e,t,r,i){return r===void 0&&(r=process.env.NODE_ENV===`production`?`ObservableArray`:`ObservableArray@`+Ie()),i===void 0&&(i=!1),Pe(),ja(function(){var a=new Gi(r,t,i,!1);We(a.values_,D,a);var o=new Proxy(a.values_,Wi);return a.proxy_=o,e&&e.length&&a.spliceWithArray_(0,0,e),o})}var qi={clear:function(){return this.splice(0)},replace:function(e){var t=this[D];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){var r=[...arguments].slice(2),i=this[D];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(e);case 2:return i.spliceWithArray_(e,t)}return i.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,r){return this[D].spliceWithArray_(e,t,r)},push:function(){var e=this[D],t=[...arguments];return e.spliceWithArray_(e.values_.length,0,t),e.values_.length},pop:function(){return this.splice(Math.max(this[D].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){var e=this[D],t=[...arguments];return e.spliceWithArray_(0,0,t),e.values_.length},reverse:function(){return j.trackingDerivation&&b(37,`reverse`),this.replace(this.slice().reverse()),this},sort:function(){j.trackingDerivation&&b(37,`sort`);var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[D],r=t.dehanceValues_(t.values_).indexOf(e);return r>-1?(this.splice(r,1),!0):!1}};V(`at`,H),V(`concat`,H),V(`flat`,H),V(`includes`,H),V(`indexOf`,H),V(`join`,H),V(`lastIndexOf`,H),V(`slice`,H),V(`toString`,H),V(`toLocaleString`,H),V(`toSorted`,H),V(`toSpliced`,H),V(`with`,H),V(`every`,Ji),V(`filter`,Ji),V(`find`,Ji),V(`findIndex`,Ji),V(`findLast`,Ji),V(`findLastIndex`,Ji),V(`flatMap`,Ji),V(`forEach`,Ji),V(`map`,Ji),V(`some`,Ji),V(`toReversed`,Ji),V(`reduce`,Yi),V(`reduceRight`,Yi);function V(e,t){typeof Array.prototype[e]==`function`&&(qi[e]=t(e))}function H(e){return function(){var t=this[D];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function Ji(e){return function(t,r){var i=this,a=this[D];return a.atom_.reportObserved(),a.dehanceValues_(a.values_)[e](function(e,a){return t.call(r,e,a,i)})}}function Yi(e){return function(){var t=this,r=this[D];r.atom_.reportObserved();var i=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(e,r,i){return a(e,r,i,t)},i[e].apply(i,arguments)}}var Xi=Ge(`ObservableArrayAdministration`,Gi);function Zi(e){return Be(e)&&Xi(e[D])}var Qi={},$i=`add`,ea=`delete`,ta=function(){function e(e,t,r){var i=this;t===void 0&&(t=At),r===void 0&&(r=process.env.NODE_ENV===`production`?`ObservableMap`:`ObservableMap@`+Ie()),this.enhancer_=void 0,this.name_=void 0,this[D]=Qi,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_=r,S(Map)||b(18),ja(function(){i.keysAtom_=wt(process.env.NODE_ENV===`production`?`ObservableMap.keys()`:i.name_+`.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(!j.trackingDerivation)return this.has_(e);var r=this.hasMap_.get(e);if(!r){var i=r=new Wn(this.has_(e),Mt,process.env.NODE_ENV===`production`?`ObservableMap.key?`:this.name_+`.`+Qe(e)+`?`,!1);this.hasMap_.set(e,i),ti(i,function(){return t.hasMap_.delete(e)})}return r.get()},t.set=function(e,t){var r=this.has_(e);if(R(this)){var i=z(this,{type:r?Hi:$i,object:this,newValue:t,name:e});if(!i)return this;t=i.newValue}return r?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if(Qn(this.keysAtom_),R(this)&&!z(this,{type:ea,object:this,name:e}))return!1;if(this.has_(e)){var r=N(),i=Ri(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:ea,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return process.env.NODE_ENV!==`production`&&r&&P(a),Ni(function(){var r;t.keysAtom_.reportChanged(),(r=t.hasMap_.get(e))==null||r.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),i&&Bi(this,a),process.env.NODE_ENV!==`production`&&r&&F(),!0}return!1},t.updateValue_=function(e,t){var r=this.data_.get(e);if(t=r.prepareNewValue_(t),t!==j.UNCHANGED){var i=N(),a=Ri(this),o=a||i?{observableKind:`map`,debugObjectName:this.name_,type:Hi,object:this,oldValue:r.value_,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&i&&P(o),r.setNewValue_(t),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()}},t.addValue_=function(e,t){var r=this;Qn(this.keysAtom_),Ni(function(){var i,a=new Wn(t,r.enhancer_,process.env.NODE_ENV===`production`?`ObservableMap.key`:r.name_+`.`+Qe(e),!1);r.data_.set(e,a),t=a.value_,(i=r.hasMap_.get(e))==null||i.setNewValue_(!0),r.keysAtom_.reportChanged()});var i=N(),a=Ri(this),o=a||i?{observableKind:`map`,debugObjectName:this.name_,type:$i,object:this,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&i&&P(o),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.getOrInsert=function(e,t){return this.has(e)||this.set(e,t),this.get(e)},t.getOrInsertComputed=function(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)},t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return na({next:function(){var r=t.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:e.get(a)}}})},t.entries=function(){var e=this,t=this.keys();return na({next:function(){var r=t.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:[a,e.get(a)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var r=at(this),i;!(i=r()).done;){var a=i.value,o=a[0],c=a[1];e.call(t,c,o,this)}},t.merge=function(e){var t=this;return U(e)&&(e=new Map(e)),Ni(function(){Ve(e)?Xe(e).forEach(function(r){return t.set(r,e[r])}):Array.isArray(e)?e.forEach(function(e){var r=e[0],i=e[1];return t.set(r,i)}):Ke(e)?(qe(e)||b(19,e),e.forEach(function(e,r){return t.set(r,e)})):e!=null&&b(20,e)}),this},t.clear=function(){var e=this;Ni(function(){ir(function(){for(var t=at(e.keys()),r;!(r=t()).done;){var i=r.value;e.delete(i)}})})},t.replace=function(e){var t=this;return Ni(function(){for(var r=ra(e),i=new Map,a=!1,o=at(t.data_.keys()),c;!(c=o()).done;){var l=c.value;if(!r.has(l))if(t.delete(l))a=!0;else{var u=t.data_.get(l);i.set(l,u)}}for(var d=at(r.entries()),f;!(f=d()).done;){var p=f.value,m=p[0],h=p[1],g=t.data_.has(m);if(t.set(m,h),t.data_.has(m)){var ee=t.data_.get(m);i.set(m,ee),g||(a=!0)}}if(!a)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var te=t.data_.keys(),ne=i.keys(),re=te.next(),ie=ne.next();!re.done;){if(re.value!==ie.value){t.keysAtom_.reportChanged();break}re=te.next(),ie=ne.next()}t.data_=i}),this},t.toString=function(){return`[object ObservableMap]`},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return process.env.NODE_ENV!==`production`&&t===!0&&b("`observe` doesn't support fireImmediately=true in combination with maps."),zi(this,e)},t.intercept_=function(e){return Li(this,e)},it(e,[{key:`size`,get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Map`}}])}(),U=Ge(`ObservableMap`,ta);function na(e){return e[Symbol.toStringTag]=`MapIterator`,La(e)}function ra(e){if(Ke(e)||U(e))return e;if(Array.isArray(e))return new Map(e);if(Ve(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return b(21,e)}var ia={},aa=function(){function e(e,t,r){var i=this;t===void 0&&(t=At),r===void 0&&(r=process.env.NODE_ENV===`production`?`ObservableSet`:`ObservableSet@`+Ie()),this.name_=void 0,this[D]=ia,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,S(Set)||b(22),this.enhancer_=function(e,i){return t(e,i,r)},ja(function(){i.atom_=wt(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.clear=function(){var e=this;Ni(function(){ir(function(){for(var t=at(e.data_.values()),r;!(r=t()).done;){var i=r.value;e.delete(i)}})})},t.forEach=function(e,t){for(var r=at(this),i;!(i=r()).done;){var a=i.value;e.call(t,a,a,this)}},t.add=function(e){var t=this;if(Qn(this.atom_),R(this)){var r=z(this,{type:$i,object:this,newValue:e});if(!r)return this;e=r.newValue}if(!this.has(e)){Ni(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var i=process.env.NODE_ENV!==`production`&&N(),a=Ri(this),o=a||i?{observableKind:`set`,debugObjectName:this.name_,type:$i,object:this,newValue:e}:null;i&&process.env.NODE_ENV!==`production`&&P(o),a&&Bi(this,o),i&&process.env.NODE_ENV!==`production`&&F()}return this},t.delete=function(e){var t=this;if(R(this)&&!z(this,{type:ea,object:this,oldValue:e}))return!1;if(this.has(e)){var r=process.env.NODE_ENV!==`production`&&N(),i=Ri(this),a=i||r?{observableKind:`set`,debugObjectName:this.name_,type:ea,object:this,oldValue:e}:null;return r&&process.env.NODE_ENV!==`production`&&P(a),Ni(function(){t.atom_.reportChanged(),t.data_.delete(e)}),i&&Bi(this,a),r&&process.env.NODE_ENV!==`production`&&F(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return ca({next:function(){var t=e.next(),r=t.value,i=t.done;return i?{value:void 0,done:i}:{value:[r,r],done:i}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return ca({next:function(){var r=t.next(),i=r.value,a=r.done;return a?{value:void 0,done:a}:{value:e.dehanceValue_(i),done:a}}})},t.intersection=function(e){return Je(e)&&!oa(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return Je(e)&&!oa(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return Je(e)&&!oa(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return Je(e)&&!oa(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return oa(e)&&(e=new Set(e)),Ni(function(){Array.isArray(e)||Je(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):e!=null&&b(`Cannot initialize set from `+e)}),this},t.observe_=function(e,t){return process.env.NODE_ENV!==`production`&&t===!0&&b("`observe` doesn't support fireImmediately=true in combination with sets."),zi(this,e)},t.intercept_=function(e){return Li(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return`[object ObservableSet]`},t[Symbol.iterator]=function(){return this.values()},it(e,[{key:`size`,get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Set`}}])}(),oa=Ge(`ObservableSet`,aa);function ca(e){return e[Symbol.toStringTag]=`SetIterator`,La(e)}var la=Object.create(null),ua=`remove`,da=function(){function e(e,t,r,i){t===void 0&&(t=new Map),i===void 0&&(i=sn),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.lazyComputedKeys_=void 0,this.lazyObservableKeys_=void 0,this.target_=e,this.values_=t,this.name_=r,this.defaultAnnotation_=i,this.keysAtom_=new St(process.env.NODE_ENV===`production`?`ObservableObject.keys`:this.name_+`.keys`),this.isPlainObject_=Ve(this.target_),process.env.NODE_ENV!==`production`&&!za(this.defaultAnnotation_)&&b(`defaultAnnotation must be valid annotation`),process.env.NODE_ENV!==`production`&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return(this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e)).get()},t.materializeLazyComputed_=function(e){var t=this.lazyComputedKeys_?.get(e);if(t){this.lazyComputedKeys_.delete(e),this.lazyComputedKeys_.size===0&&(this.lazyComputedKeys_=void 0);var r=t();return this.values_.set(e,r),r}},t.materializeLazyObservable_=function(e){var t=this.lazyObservableKeys_?.get(e);if(t){this.lazyObservableKeys_.delete(e),this.lazyObservableKeys_.size===0&&(this.lazyObservableKeys_=void 0);var r=t();return this.values_.set(e,r),r}},t.setObservablePropValue_=function(e,t){var r=this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e);if(r instanceof k)return r.set(t),!0;if(R(this)){var i=z(this,{type:Hi,object:this.proxy_||this.target_,name:e,newValue:t});if(!i)return null;t=i.newValue}if(t=r.prepareNewValue_(t),t!==j.UNCHANGED){var a=Ri(this),o=process.env.NODE_ENV!==`production`&&N(),c=a||o?{type:Hi,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&o&&P(c),r.setNewValue_(t),a&&Bi(this,c),process.env.NODE_ENV!==`production`&&o&&F()}return!0},t.get_=function(e){return j.trackingDerivation&&!C(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,r){return r===void 0&&(r=!1),C(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):r?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},t.has_=function(e){if(!j.trackingDerivation)return e in this.target_;this.pendingKeys_||=new Map;var t=this.pendingKeys_.get(e);return t||(t=new Wn(e in this.target_,Mt,process.env.NODE_ENV===`production`?`ObservableObject.key?`:this.name_+`.`+Qe(e)+`?`,!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(t===!0&&(t=this.defaultAnnotation_),t!==!1){if(_a(this,t,e),!(e in this.target_)){var r;if((r=this.target_[E])!=null&&r[e])return;b(1,t.annotationType_,this.name_+`.`+e.toString())}for(var i=this.target_;i&&i!==ke;){var a=De(i,e);if(a){var o=t.make_(this,e,a,i);if(o===0)return;if(o===1)break}i=Object.getPrototypeOf(i)}ga(this,t,e)}},t.extend_=function(e,t,r,i){if(i===void 0&&(i=!1),r===!0&&(r=this.defaultAnnotation_),r===!1)return this.defineProperty_(e,t,i);_a(this,r,e);var a=r.extend_(this,e,t,i);return a&&ga(this,r,e),a},t.defineProperty_=function(e,t,r){r===void 0&&(r=!1),Qn(this.keysAtom_);try{vr();var i=this.delete_(e);if(!i)return i;if(R(this)){var a=z(this,{object:this.proxy_||this.target_,name:e,type:$i,newValue:t.value});if(!a)return null;var o=a.newValue;t.value!==o&&(t=ot({},t,{value:o}))}if(r){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Oe(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{M()}return!0},t.defineObservableProperty_=function(e,t,r,i){i===void 0&&(i=!1),Qn(this.keysAtom_);try{vr();var a=this.delete_(e);if(!a)return a;if(R(this)){var o=z(this,{object:this.proxy_||this.target_,name:e,type:$i,newValue:t});if(!o)return null;t=o.newValue}var c=ma(e),l={configurable:j.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:c.get,set:c.set};if(i){if(!Reflect.defineProperty(this.target_,e,l))return!1}else Oe(this.target_,e,l);var u=new Wn(t,r,process.env.NODE_ENV===`production`?`ObservableObject.key`:this.name_+`.`+e.toString(),!1);this.values_.set(e,u),this.notifyPropertyAddition_(e,u.value_)}finally{M()}return!0},t.defineComputedProperty_=function(e,t,r){r===void 0&&(r=!1),Qn(this.keysAtom_);try{vr();var i=this.delete_(e);if(!i)return i;if(R(this)&&!z(this,{object:this.proxy_||this.target_,name:e,type:$i,newValue:void 0}))return null;t.name||=process.env.NODE_ENV===`production`?`ObservableObject.key`:this.name_+`.`+e.toString(),t.context=this.proxy_||this.target_;var a=ma(e),o={configurable:j.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,o))return!1}else Oe(this.target_,e,o);this.values_.set(e,new k(t)),this.notifyPropertyAddition_(e,void 0)}finally{M()}return!0},t.delete_=function(e,t){if(t===void 0&&(t=!1),Qn(this.keysAtom_),!C(this.target_,e))return!0;if(R(this)&&!z(this,{object:this.proxy_||this.target_,name:e,type:ua}))return null;try{var r;vr();var i=Ri(this),a=process.env.NODE_ENV!==`production`&&N(),o=this.values_.get(e),c=void 0;if(!o&&(i||a)&&(c=De(this.target_,e)?.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(process.env.NODE_ENV!==`production`&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof Wn&&(c=o.value_),br(o)),this.keysAtom_.reportChanged(),(r=this.pendingKeys_)==null||(r=r.get(e))==null||r.set(e in this.target_),i||a){var l={type:ua,observableKind:`object`,object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:e};process.env.NODE_ENV!==`production`&&a&&P(l),i&&Bi(this,l),process.env.NODE_ENV!==`production`&&a&&F()}}finally{M()}return!0},t.observe_=function(e,t){return process.env.NODE_ENV!==`production`&&t===!0&&b("`observe` doesn't support the fire immediately property for observable objects."),zi(this,e)},t.intercept_=function(e){return Li(this,e)},t.notifyPropertyAddition_=function(e,t){var r,i=Ri(this),a=process.env.NODE_ENV!==`production`&&N();if(i||a){var o=i||a?{type:$i,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&a&&P(o),i&&Bi(this,o),process.env.NODE_ENV!==`production`&&a&&F()}(r=this.pendingKeys_)==null||(r=r.get(e))==null||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),Ze(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function fa(e,t){if(process.env.NODE_ENV!==`production`&&t&&ha(e)&&b(`Options can't be provided for already observable objects.`),C(e,D))return process.env.NODE_ENV!==`production`&&!(ka(e)instanceof da)&&b(`Cannot convert '`+Aa(e)+`' into observable object:
25
+ `)()}}function wr(e,t,r){if(t.length>=1e3){t.push(`(and many more)`);return}t.push(``+` `.repeat(r-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return wr(e,t,r+1)})}var Tr=function(){function e(e,t,r,i){e===void 0&&(e=process.env.NODE_ENV===`production`?`Reaction`:`Reaction@`+Ie()),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=A.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=qn.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=r,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,j.pendingReactions.push(this),Or())},t.runReaction_=function(){if(!this.isDisposed){vr(),this.isScheduled=!1;var e=j.trackingContext;if(j.trackingContext=this,Xn(this)){this.isTrackPending=!0;try{this.onInvalidate_(),process.env.NODE_ENV!==`production`&&this.isTrackPending&&N()&&Mr({name:this.name_,type:`scheduled-reaction`})}catch(e){this.reportExceptionInDerivation_(e)}}j.trackingContext=e,M()}},t.track=function(e){if(!this.isDisposed){vr();var t=N(),r;process.env.NODE_ENV!==`production`&&t&&(r=Date.now(),P({name:this.name_,type:`reaction`})),this.isRunning=!0;var i=j.trackingContext;j.trackingContext=this;var a=er(this,e,void 0);j.trackingContext=i,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&rr(this),Yn(a)&&this.reportExceptionInDerivation_(a.cause),process.env.NODE_ENV!==`production`&&t&&F({time:Date.now()-r}),M()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_){this.errorHandler_(e,this);return}if(j.disableErrorBoundaries)throw e;var r=process.env.NODE_ENV===`production`?`[mobx] uncaught error in '`+this+`'`:`[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '`+this+`'`;j.suppressReactionErrors?process.env.NODE_ENV!==`production`&&console.warn(`[mobx] (error in reaction '`+this.name_+`' suppressed, fix error of causing action below)`):console.error(r,e),process.env.NODE_ENV!==`production`&&N()&&Mr({type:`error`,name:this.name_,message:r,error:``+e}),j.globalReactionErrorHandlers.forEach(function(r){return r(e,t)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(vr(),rr(this),M()))},t.getDisposer_=function(e){var t=this,r=function r(){t.dispose(),e==null||e.removeEventListener==null||e.removeEventListener(`abort`,r)};return e==null||e.addEventListener==null||e.addEventListener(`abort`,r),r[D]=this,`dispose`in Symbol&&typeof Symbol.dispose==`symbol`&&(r[Symbol.dispose]=r),r},t.toString=function(){return`Reaction[`+this.name_+`]`},t.trace=function(e){e===void 0&&(e=!1),ji(this,e)},it(e,[{key:`isDisposed`,get:function(){return w(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=T(this.flags_,e.isDisposedMask_,t)}},{key:`isScheduled`,get:function(){return w(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=T(this.flags_,e.isScheduledMask_,t)}},{key:`isTrackPending`,get:function(){return w(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=T(this.flags_,e.isTrackPendingMask_,t)}},{key:`isRunning`,get:function(){return w(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=T(this.flags_,e.isRunningMask_,t)}},{key:`diffValue`,get:function(){return+!!w(this.flags_,e.diffValueMask_)},set:function(t){this.flags_=T(this.flags_,e.diffValueMask_,t===1)}}])}();Tr.isDisposedMask_=1,Tr.isScheduledMask_=2,Tr.isTrackPendingMask_=4,Tr.isRunningMask_=8,Tr.diffValueMask_=16;var Er=100,Dr=function(e){return e()};function Or(){j.inBatch>0||j.isRunningReactions||Dr(kr)}function kr(){j.isRunningReactions=!0;for(var e=j.pendingReactions,t=0;e.length>0;){++t===Er&&(console.error(process.env.NODE_ENV===`production`?`[mobx] cycle in reaction: `+e[0]:`Reaction doesn't converge to a stable state after `+Er+` iterations.`+(` Probably there is a cycle in the reactive function: `+e[0])),e.splice(0));for(var r=e.splice(0),i=0,a=r.length;i<a;i++)r[i].runReaction_()}j.isRunningReactions=!1}var Ar=Ge(`Reaction`,Tr);function jr(e){var t=Dr;Dr=function(r){return e(function(){return t(r)})}}function N(){return process.env.NODE_ENV!==`production`&&!!j.spyListeners.length}function Mr(e){if(process.env.NODE_ENV!==`production`&&j.spyListeners.length)for(var t=j.spyListeners,r=0,i=t.length;r<i;r++)t[r](e)}function P(e){process.env.NODE_ENV!==`production`&&Mr(ot({},e,{spyReportStart:!0}))}var Nr={type:`report-end`,spyReportEnd:!0};function F(e){process.env.NODE_ENV!==`production`&&Mr(e?ot({},e,{type:`report-end`,spyReportEnd:!0}):Nr)}function Pr(e){return process.env.NODE_ENV===`production`?(console.warn(`[mobx.spy] Is a no-op in production builds`),function(){}):(j.spyListeners.push(e),Le(function(){j.spyListeners=j.spyListeners.filter(function(t){return t!==e})}))}var Fr=`action`,Ir=`action.bound`,Lr=`autoAction`,Rr=`autoAction.bound`,zr=`<unnamed action>`,Br=It(Fr),Vr=It(Ir,{bound:!0}),Hr=It(Lr,{autoAction:!0}),Ur=It(Rr,{autoAction:!0,bound:!0});function Wr(e){return function(t,r){if(S(t))return In(t.name||zr,t,e);if(S(r))return In(t,r,e);if(bt(r))return(e?Hr:Br).decorate_20223_(t,r);if(ze(r))return _t(t,r,e?Hr:Br);if(ze(t))return gt(It(e?Lr:Fr,{name:t,autoAction:e}));process.env.NODE_ENV!==`production`&&b("Invalid arguments for `action`")}}var I=Wr(!1);Object.assign(I,Br);var Gr=Wr(!0);Object.assign(Gr,Hr),I.bound=gt(Vr),Gr.bound=gt(Ur);function L(e){return Ln(e.name||zr,!1,e,this,void 0)}function Kr(e){return S(e)&&e.isMobxAction===!0}function qr(e,t){var r;t===void 0&&(t=je),process.env.NODE_ENV!==`production`&&(S(e)||b(`Autorun expects a function as first argument`),Kr(e)&&b(`Autorun does not accept actions since actions are untrackable`));var i=t?.name??(process.env.NODE_ENV===`production`?`Autorun`:e.name||`Autorun@`+Ie()),a=!t.scheduler&&!t.delay,o;if(a)o=new Tr(i,function(){this.track(u)},t.onError,t.requiresObservable);else{var c=Yr(t),l=!1;o=new Tr(i,function(){l||(l=!0,c(function(){l=!1,o.isDisposed||o.track(u)}))},t.onError,t.requiresObservable)}function u(){e(o)}return(r=t)!=null&&(r=r.signal)!=null&&r.aborted||o.schedule_(),o.getDisposer_(t?.signal)}var Jr=function(e){return e()};function Yr(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Jr}function Xr(e,t,r){var i;r===void 0&&(r=je),process.env.NODE_ENV!==`production`&&((!S(e)||!S(t))&&b(`First and second argument to reaction should be functions`),Ve(r)||b(`Third argument of reactions should be an object`));var a=r.name??(process.env.NODE_ENV===`production`?`Reaction`:`Reaction@`+Ie()),o=I(a,r.onError?Zr(r.onError,t):t),c=!r.scheduler&&!r.delay,l=Yr(r),u=!0,d=!1,f,p=r.compareStructural?kt.structural:r.equals||kt.default,m=new Tr(a,function(){u||c?h():d||(d=!0,l(h))},r.onError,r.requiresObservable);function h(){if(d=!1,!m.isDisposed){var t=!1,i=f;m.track(function(){var r=Bn(!1,function(){return e(m)});t=u||!p(f,r),f=r}),(u&&r.fireImmediately||!u&&t)&&o(f,i,m),u=!1}}return(i=r)!=null&&(i=i.signal)!=null&&i.aborted||m.schedule_(),m.getDisposer_(r?.signal)}function Zr(e,t){return function(){try{return t.apply(this,arguments)}catch(t){e.call(this,t)}}}var Qr=`onBO`,$r=`onBUO`;function ei(e,t,r){return ni(Qr,e,t,r)}function ti(e,t,r){return ni($r,e,t,r)}function ni(e,t,r,i){var a=typeof i==`function`?ka(t,r):ka(t),o=S(i)?i:r,c=e+`L`;return a[c]?a[c].add(o):a[c]=new Set([o]),function(){var e=a[c];e&&(e.delete(o),e.size===0&&delete a[c])}}var ri=`never`,ii=`always`,ai=`observed`;function oi(e){e.isolateGlobalState===!0&&pr();var t=e.useProxies,r=e.enforceActions;if(t!==void 0&&(j.useProxies=t===ii?!0:t===ri?!1:typeof Proxy<`u`),t===`ifavailable`&&(j.verifyProxies=!0),r!==void 0){var i=r===ii?ii:r===ai;j.enforceActions=i,j.allowStateChanges=!(i===!0||i===ii)}[`computedRequiresReaction`,`reactionRequiresObservable`,`observableRequiresReaction`,`disableErrorBoundaries`,`safeDescriptors`].forEach(function(t){t in e&&(j[t]=!!e[t])}),j.allowStateReads=!j.observableRequiresReaction,process.env.NODE_ENV!==`production`&&j.disableErrorBoundaries===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&jr(e.reactionScheduler)}function si(e,t,r,i){process.env.NODE_ENV!==`production`&&(arguments.length>4&&b(`'extendObservable' expected 2-4 arguments`),typeof e!=`object`&&b(`'extendObservable' expects an object as first argument`),na(e)&&b(`'extendObservable' should not be used on maps, use map.merge instead`),Ve(t)||b(`'extendObservable' only accepts plain objects as second argument`),(Si(t)||Si(r))&&b(`Extending an object with another observable (object) is not supported`));var a=et(t);return Ma(function(){var t=pa(e,i)[D];Ze(a).forEach(function(e){t.extend_(e,a[e],r&&e in r?r[e]:!0)})}),e}function ci(e,t){return li(ka(e,t))}function li(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=ui(e.observing_).map(li)),t}function ui(e){return Array.from(new Set(e))}var di=0,fi=function(e){function t(){var r=e.call(this,`FLOW_CANCELLED`)||this;return Object.setPrototypeOf(r,(this instanceof t?this.constructor:void 0).prototype),r.name=`FlowCancellationError`,r}ct(t,e);var r=t.prototype;return r.toString=function(){return`Error: `+this.message},t}(ht(Error)),pi=Ht(`flow`),mi=Ht(`flow.bound`,{bound:!0}),hi=Object.assign(function(e,t){if(bt(t))return pi.decorate_20223_(e,t);if(ze(t))return _t(e,t,pi);process.env.NODE_ENV!==`production`&&arguments.length!==1&&b(`Flow expects single argument with generator function`);var r=e,i=r.name||`<unnamed flow>`,a=function(){var e=this,t=arguments,a=++di,o=I(i+` - runid: `+a+` - init`,r).apply(e,t),c,l=void 0,u=new Promise(function(e,t){var r=0;c=t;function u(e){l=void 0;var c;try{c=I(i+` - runid: `+a+` - yield `+ r++,o.next).call(o,e)}catch(e){return t(e)}f(c)}function d(e){l=void 0;var c;try{c=I(i+` - runid: `+a+` - yield `+ r++,o.throw).call(o,e)}catch(e){return t(e)}f(c)}function f(r){if(S(r?.then)){r.then(f,t);return}return r.done?e(r.value):(l=Promise.resolve(r.value),l.then(u,d))}u(void 0)});return u.cancel=I(i+` - runid: `+a+` - cancel`,function(){try{l&&gi(l);var e=o.return(void 0),t=Promise.resolve(e.value);t.then(Re,Re),gi(t),c(new fi)}catch(e){c(e)}}),u};return a.isMobXFlow=!0,a},pi);hi.bound=gt(mi);function gi(e){S(e.cancel)&&e.cancel()}function _i(e){return e?.isMobXFlow===!0}function vi(e,t){var r;if(t===void 0)return Kn(e);if(ga(e)===!1)return!1;var i=e[D];return(r=i.lazyComputedKeys_)!=null&&r.has(t)?!0:i.values_.has(t)?Kn(ka(e,t)):!1}function yi(e){return process.env.NODE_ENV!==`production`&&arguments.length>1?b(`isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property`):vi(e)}function bi(e,t){return process.env.NODE_ENV!==`production`&&!ze(t)?b(`isComputed expected a property name as second argument`):vi(e,t)}function xi(e,t){if(!e)return!1;if(t!==void 0){if(process.env.NODE_ENV!==`production`&&(na(e)||Zi(e)))return b(`isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.`);if(ga(e)){var r,i,a=e[D];return a.values_.has(t)||!!((r=a.lazyComputedKeys_)!=null&&r.has(t))||!!((i=a.lazyObservableKeys_)!=null&&i.has(t))}return!1}return ga(e)||!!e[D]||Ct(e)||Ar(e)||Kn(e)}function Si(e){return process.env.NODE_ENV!==`production`&&arguments.length!==1&&b(`isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property`),xi(e)}function Ci(e){if(ga(e))return e[D].keys_();if(na(e)||ca(e))return Array.from(e.keys());if(Zi(e))return e.map(function(e,t){return t});b(5)}function wi(e){if(ga(e))return e[D].ownKeys_();b(38)}function Ti(e,t,r,i){return S(r)?Di(e,t,r,i):Ei(e,t,r)}function Ei(e,t,r){return Aa(e).observe_(t,r)}function Di(e,t,r,i){return Aa(e,t).observe_(r,i)}function Oi(e,t,r){return e.set(t,r),r}function ki(e,t){if(typeof e!=`object`||!e||e instanceof Date||!Si(e))return e;if(Gn(e)||Kn(e))return ki(e.get(),t);if(t.has(e))return t.get(e);if(Zi(e)){var r=Oi(t,e,Array(e.length));return e.forEach(function(e,i){r[i]=ki(e,t)}),r}if(ca(e)){var i=Oi(t,e,new Set);return e.forEach(function(e){i.add(ki(e,t))}),i}if(na(e)){var a=Oi(t,e,new Map);return e.forEach(function(e,r){a.set(r,ki(e,t))}),a}else{var o=Oi(t,e,{});return wi(e).forEach(function(r){ke.propertyIsEnumerable.call(e,r)&&(o[r]=ki(e[r],t))}),o}}function Ai(e,t){return process.env.NODE_ENV!==`production`&&t&&b(`toJS no longer supports options`),ki(e,new Map)}function ji(){if(process.env.NODE_ENV!==`production`){var e=!1,t=[...arguments];typeof t[t.length-1]==`boolean`&&(e=t.pop());var r=Mi(t);if(!r)return b(`'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly`);r.isTracing_===qn.NONE&&console.log(`[mobx.trace] '`+r.name_+`' tracing enabled`),r.isTracing_=e?qn.BREAK:qn.LOG}}function Mi(e){switch(e.length){case 0:return j.trackingDerivation;case 1:return ka(e[0]);case 2:return ka(e[0],e[1])}}function Ni(e,t){t===void 0&&(t=void 0),vr();try{return e.apply(t)}finally{M()}}function Pi(e){return e[D]}var Fi={has:function(e,t){return process.env.NODE_ENV!==`production`&&j.trackingDerivation&&Fe(`detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.`),Pi(e).has_(t)},get:function(e,t){return Pi(e).get_(t)},set:function(e,t,r){return ze(t)?(process.env.NODE_ENV!==`production`&&!Pi(e).values_.has(t)&&Fe(`add a new observable property through direct assignment. Use 'set' from 'mobx' instead.`),Pi(e).set_(t,r,!0)??!0):!1},deleteProperty:function(e,t){return process.env.NODE_ENV!==`production`&&Fe(`delete properties from an observable object. Use 'remove' from 'mobx' instead.`),ze(t)?Pi(e).delete_(t,!0)??!0:!1},defineProperty:function(e,t,r){return process.env.NODE_ENV!==`production`&&Fe(`define property on an observable object. Use 'defineProperty' from 'mobx' instead.`),Pi(e).defineProperty_(t,r)??!0},ownKeys:function(e){return process.env.NODE_ENV!==`production`&&j.trackingDerivation&&Fe(`iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead.`),Pi(e).ownKeys_()},preventExtensions:function(e){b(13)}};function Ii(e,t){var r;return Pe(),e=pa(e,t),(r=e[D]).proxy_??(r.proxy_=new Proxy(e,Fi))}function R(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Li(e,t){var r=e.interceptors_||=[];return r.push(t),Le(function(){var e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function z(e,t){var r=ar();try{for(var i=[].concat(e.interceptors_||[]),a=0,o=i.length;a<o&&(t=i[a](t),t&&!t.type&&b(14),t);a++);return t}finally{or(r)}}function Ri(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function zi(e,t){var r=e.changeListeners_||=[];return r.push(t),Le(function(){var e=r.indexOf(t);e!==-1&&r.splice(e,1)})}function Bi(e,t){var r=ar(),i=e.changeListeners_;if(i){i=i.slice();for(var a=0,o=i.length;a<o;a++)i[a](t);or(r)}}function B(e,t,r){return Ma(function(){var i=pa(e,r)[D];process.env.NODE_ENV!==`production`&&t&&e[E]&&b(`makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported.`),t??=yt(e),Ze(t).forEach(function(e){return i.make_(e,t[e])})}),e}var Vi=`splice`,Hi=`update`,Ui=1e4,Wi={get:function(e,t){var r=e[D];return t===D?r:t===`length`?r.getArrayLength_():typeof t==`string`&&!isNaN(t)?r.get_(parseInt(t)):C(qi,t)?qi[t]:e[t]},set:function(e,t,r){var i=e[D];return t===`length`&&i.setArrayLength_(r),typeof t==`symbol`||isNaN(t)?e[t]=r:i.set_(parseInt(t),r),!0},preventExtensions:function(){b(15)}},Gi=function(){function e(e,t,r,i){e===void 0&&(e=process.env.NODE_ENV===`production`?`ObservableArray`:`ObservableArray@`+Ie()),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_=r,this.legacyMode_=i,this.atom_=new St(e),this.enhancer_=function(r,i){return t(r,i,process.env.NODE_ENV===`production`?`ObservableArray[..]`:e+`[..]`)}}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.dehanceValues_=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Li(this,e)},t.observe_=function(e,t){return t===void 0&&(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}),zi(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){(typeof e!=`number`||isNaN(e)||e<0)&&b(`Out of range: `+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=Array(e-t),i=0;i<e-t;i++)r[i]=void 0;this.spliceWithArray_(t,0,r)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&b(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Da(e+t+1)},t.spliceWithArray_=function(e,t,r){var i=this;Qn(this.atom_);var a=this.values_.length;if(e===void 0?e=0:e>a?e=a:e<0&&(e=Math.max(0,a+e)),t=arguments.length===1?a-e:t==null?0:Math.max(0,Math.min(t,a-e)),r===void 0&&(r=Ae),R(this)){var o=z(this,{object:this.proxy_,type:Vi,index:e,removedCount:t,added:r});if(!o)return Ae;t=o.removedCount,r=o.added}if(r=r.length===0?r:r.map(function(e){return i.enhancer_(e,void 0)}),this.legacyMode_||process.env.NODE_ENV!==`production`){var c=r.length-t;this.updateArrayLength_(a,c)}var l=this.spliceItemsIntoValues_(e,t,r);return(t!==0||r.length!==0)&&this.notifyArraySplice_(e,r,l),this.dehanceValues_(l)},t.spliceItemsIntoValues_=function(e,t,r){if(r.length<Ui){var i;return(i=this.values_).splice.apply(i,[e,t].concat(r))}else{var a=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=r.length-t;for(var c=0;c<r.length;c++)this.values_[e+c]=r[c];for(var l=0;l<o.length;l++)this.values_[e+r.length+l]=o[l];return a}},t.notifyArrayChildUpdate_=function(e,t,r){var i=!this.owned_&&N(),a=Ri(this),o=a||i?{observableKind:`array`,object:this.proxy_,type:Hi,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:r}:null;process.env.NODE_ENV!==`production`&&i&&P(o),this.atom_.reportChanged(),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()},t.notifyArraySplice_=function(e,t,r){var i=!this.owned_&&N(),a=Ri(this),o=a||i?{observableKind:`array`,object:this.proxy_,debugObjectName:this.atom_.name_,type:Vi,index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;process.env.NODE_ENV!==`production`&&i&&P(o),this.atom_.reportChanged(),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()},t.get_=function(e){if(this.legacyMode_&&e>=this.values_.length){console.warn(process.env.NODE_ENV===`production`?`[mobx] Out of bounds read: `+e:`[mobx.array] Attempt to read an array index (`+e+`) that is out of bounds (`+this.values_.length+`). Please check length first. Out of bound indices will not be tracked by MobX`);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e])},t.set_=function(e,t){var r=this.values_;if(this.legacyMode_&&e>r.length&&b(17,e,r.length),e<r.length){Qn(this.atom_);var i=r[e];if(R(this)){var a=z(this,{type:Hi,object:this.proxy_,index:e,newValue:t});if(!a)return;t=a.newValue}t=this.enhancer_(t,i),t!==i&&(r[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var o=Array(e+1-r.length),c=0;c<o.length-1;c++)o[c]=void 0;o[o.length-1]=t,this.spliceWithArray_(r.length,0,o)}},e}();function Ki(e,t,r,i){return r===void 0&&(r=process.env.NODE_ENV===`production`?`ObservableArray`:`ObservableArray@`+Ie()),i===void 0&&(i=!1),Pe(),Ma(function(){var a=new Gi(r,t,i,!1);We(a.values_,D,a);var o=new Proxy(a.values_,Wi);return a.proxy_=o,e&&e.length&&a.spliceWithArray_(0,0,e),o})}var qi={clear:function(){return this.splice(0)},replace:function(e){var t=this[D];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){var r=[...arguments].slice(2),i=this[D];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(e);case 2:return i.spliceWithArray_(e,t)}return i.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,r){return this[D].spliceWithArray_(e,t,r)},push:function(){var e=this[D],t=[...arguments];return e.spliceWithArray_(e.values_.length,0,t),e.values_.length},pop:function(){return this.splice(Math.max(this[D].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){var e=this[D],t=[...arguments];return e.spliceWithArray_(0,0,t),e.values_.length},reverse:function(){return j.trackingDerivation&&b(37,`reverse`),this.replace(this.slice().reverse()),this},sort:function(){j.trackingDerivation&&b(37,`sort`);var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[D],r=t.dehanceValues_(t.values_).indexOf(e);return r>-1?(this.splice(r,1),!0):!1}};V(`at`,H),V(`concat`,H),V(`flat`,H),V(`includes`,H),V(`indexOf`,H),V(`join`,H),V(`lastIndexOf`,H),V(`slice`,H),V(`toString`,H),V(`toLocaleString`,H),V(`toSorted`,H),V(`toSpliced`,H),V(`with`,H),V(`every`,Ji),V(`filter`,Ji),V(`find`,Ji),V(`findIndex`,Ji),V(`findLast`,Ji),V(`findLastIndex`,Ji),V(`flatMap`,Ji),V(`forEach`,Ji),V(`map`,Ji),V(`some`,Ji),V(`toReversed`,Ji),V(`reduce`,Yi),V(`reduceRight`,Yi);function V(e,t){typeof Array.prototype[e]==`function`&&(qi[e]=t(e))}function H(e){return function(){var t=this[D];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function Ji(e){return function(t,r){var i=this,a=this[D];return a.atom_.reportObserved(),a.dehanceValues_(a.values_)[e](function(e,a){return t.call(r,e,a,i)})}}function Yi(e){return function(){var t=this,r=this[D];r.atom_.reportObserved();var i=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(e,r,i){return a(e,r,i,t)},i[e].apply(i,arguments)}}var Xi=Ge(`ObservableArrayAdministration`,Gi);function Zi(e){return Be(e)&&Xi(e[D])}var Qi={},$i=`add`,ea=`delete`,ta=function(){function e(e,t,r){var i=this;t===void 0&&(t=At),r===void 0&&(r=process.env.NODE_ENV===`production`?`ObservableMap`:`ObservableMap@`+Ie()),this.enhancer_=void 0,this.name_=void 0,this[D]=Qi,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_=r,S(Map)||b(18),Ma(function(){i.keysAtom_=wt(process.env.NODE_ENV===`production`?`ObservableMap.keys()`:i.name_+`.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(!j.trackingDerivation)return this.has_(e);var r=this.hasMap_.get(e);if(!r){var i=r=new Wn(this.has_(e),Mt,process.env.NODE_ENV===`production`?`ObservableMap.key?`:this.name_+`.`+Qe(e)+`?`,!1);this.hasMap_.set(e,i),ti(i,function(){return t.hasMap_.delete(e)})}return r.get()},t.set=function(e,t){var r=this.has_(e);if(R(this)){var i=z(this,{type:r?Hi:$i,object:this,newValue:t,name:e});if(!i)return this;t=i.newValue}return r?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if(Qn(this.keysAtom_),R(this)&&!z(this,{type:ea,object:this,name:e}))return!1;if(this.has_(e)){var r=N(),i=Ri(this),a=i||r?{observableKind:`map`,debugObjectName:this.name_,type:ea,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return process.env.NODE_ENV!==`production`&&r&&P(a),Ni(function(){var r;t.keysAtom_.reportChanged(),(r=t.hasMap_.get(e))==null||r.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),i&&Bi(this,a),process.env.NODE_ENV!==`production`&&r&&F(),!0}return!1},t.updateValue_=function(e,t){var r=this.data_.get(e);if(t=r.prepareNewValue_(t),t!==j.UNCHANGED){var i=N(),a=Ri(this),o=a||i?{observableKind:`map`,debugObjectName:this.name_,type:Hi,object:this,oldValue:r.value_,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&i&&P(o),r.setNewValue_(t),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()}},t.addValue_=function(e,t){var r=this;Qn(this.keysAtom_),Ni(function(){var i,a=new Wn(t,r.enhancer_,process.env.NODE_ENV===`production`?`ObservableMap.key`:r.name_+`.`+Qe(e),!1);r.data_.set(e,a),t=a.value_,(i=r.hasMap_.get(e))==null||i.setNewValue_(!0),r.keysAtom_.reportChanged()});var i=N(),a=Ri(this),o=a||i?{observableKind:`map`,debugObjectName:this.name_,type:$i,object:this,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&i&&P(o),a&&Bi(this,o),process.env.NODE_ENV!==`production`&&i&&F()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.getOrInsert=function(e,t){return this.has(e)||this.set(e,t),this.get(e)},t.getOrInsertComputed=function(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)},t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return ra({next:function(){var r=t.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:e.get(a)}}})},t.entries=function(){var e=this,t=this.keys();return ra({next:function(){var r=t.next(),i=r.done,a=r.value;return{done:i,value:i?void 0:[a,e.get(a)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var r=at(this),i;!(i=r()).done;){var a=i.value,o=a[0],c=a[1];e.call(t,c,o,this)}},t.merge=function(e){var t=this;return na(e)&&(e=new Map(e)),Ni(function(){Ve(e)?Xe(e).forEach(function(r){return t.set(r,e[r])}):Array.isArray(e)?e.forEach(function(e){var r=e[0],i=e[1];return t.set(r,i)}):Ke(e)?(qe(e)||b(19,e),e.forEach(function(e,r){return t.set(r,e)})):e!=null&&b(20,e)}),this},t.clear=function(){var e=this;Ni(function(){ir(function(){for(var t=at(e.keys()),r;!(r=t()).done;){var i=r.value;e.delete(i)}})})},t.replace=function(e){var t=this;return Ni(function(){for(var r=ia(e),i=new Map,a=!1,o=at(t.data_.keys()),c;!(c=o()).done;){var l=c.value;if(!r.has(l))if(t.delete(l))a=!0;else{var u=t.data_.get(l);i.set(l,u)}}for(var d=at(r.entries()),f;!(f=d()).done;){var p=f.value,m=p[0],h=p[1],g=t.data_.has(m);if(t.set(m,h),t.data_.has(m)){var ee=t.data_.get(m);i.set(m,ee),g||(a=!0)}}if(!a)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var te=t.data_.keys(),ne=i.keys(),re=te.next(),ie=ne.next();!re.done;){if(re.value!==ie.value){t.keysAtom_.reportChanged();break}re=te.next(),ie=ne.next()}t.data_=i}),this},t.toString=function(){return`[object ObservableMap]`},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return process.env.NODE_ENV!==`production`&&t===!0&&b("`observe` doesn't support fireImmediately=true in combination with maps."),zi(this,e)},t.intercept_=function(e){return Li(this,e)},it(e,[{key:`size`,get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Map`}}])}(),na=Ge(`ObservableMap`,ta);function ra(e){return e[Symbol.toStringTag]=`MapIterator`,Ra(e)}function ia(e){if(Ke(e)||na(e))return e;if(Array.isArray(e))return new Map(e);if(Ve(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return b(21,e)}var aa={},oa=function(){function e(e,t,r){var i=this;t===void 0&&(t=At),r===void 0&&(r=process.env.NODE_ENV===`production`?`ObservableSet`:`ObservableSet@`+Ie()),this.name_=void 0,this[D]=aa,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,S(Set)||b(22),this.enhancer_=function(e,i){return t(e,i,r)},Ma(function(){i.atom_=wt(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return this.dehancer===void 0?e:this.dehancer(e)},t.clear=function(){var e=this;Ni(function(){ir(function(){for(var t=at(e.data_.values()),r;!(r=t()).done;){var i=r.value;e.delete(i)}})})},t.forEach=function(e,t){for(var r=at(this),i;!(i=r()).done;){var a=i.value;e.call(t,a,a,this)}},t.add=function(e){var t=this;if(Qn(this.atom_),R(this)){var r=z(this,{type:$i,object:this,newValue:e});if(!r)return this;e=r.newValue}if(!this.has(e)){Ni(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var i=process.env.NODE_ENV!==`production`&&N(),a=Ri(this),o=a||i?{observableKind:`set`,debugObjectName:this.name_,type:$i,object:this,newValue:e}:null;i&&process.env.NODE_ENV!==`production`&&P(o),a&&Bi(this,o),i&&process.env.NODE_ENV!==`production`&&F()}return this},t.delete=function(e){var t=this;if(R(this)&&!z(this,{type:ea,object:this,oldValue:e}))return!1;if(this.has(e)){var r=process.env.NODE_ENV!==`production`&&N(),i=Ri(this),a=i||r?{observableKind:`set`,debugObjectName:this.name_,type:ea,object:this,oldValue:e}:null;return r&&process.env.NODE_ENV!==`production`&&P(a),Ni(function(){t.atom_.reportChanged(),t.data_.delete(e)}),i&&Bi(this,a),r&&process.env.NODE_ENV!==`production`&&F(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return la({next:function(){var t=e.next(),r=t.value,i=t.done;return i?{value:void 0,done:i}:{value:[r,r],done:i}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return la({next:function(){var r=t.next(),i=r.value,a=r.done;return a?{value:void 0,done:a}:{value:e.dehanceValue_(i),done:a}}})},t.intersection=function(e){return Je(e)&&!ca(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return Je(e)&&!ca(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return Je(e)&&!ca(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return Je(e)&&!ca(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return ca(e)&&(e=new Set(e)),Ni(function(){Array.isArray(e)||Je(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):e!=null&&b(`Cannot initialize set from `+e)}),this},t.observe_=function(e,t){return process.env.NODE_ENV!==`production`&&t===!0&&b("`observe` doesn't support fireImmediately=true in combination with sets."),zi(this,e)},t.intercept_=function(e){return Li(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return`[object ObservableSet]`},t[Symbol.iterator]=function(){return this.values()},it(e,[{key:`size`,get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return`Set`}}])}(),ca=Ge(`ObservableSet`,oa);function la(e){return e[Symbol.toStringTag]=`SetIterator`,Ra(e)}var ua=Object.create(null),da=`remove`,fa=function(){function e(e,t,r,i){t===void 0&&(t=new Map),i===void 0&&(i=sn),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.lazyComputedKeys_=void 0,this.lazyObservableKeys_=void 0,this.target_=e,this.values_=t,this.name_=r,this.defaultAnnotation_=i,this.keysAtom_=new St(process.env.NODE_ENV===`production`?`ObservableObject.keys`:this.name_+`.keys`),this.isPlainObject_=Ve(this.target_),process.env.NODE_ENV!==`production`&&!Ba(this.defaultAnnotation_)&&b(`defaultAnnotation must be valid annotation`),process.env.NODE_ENV!==`production`&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return(this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e)).get()},t.materializeLazyComputed_=function(e){var t=this.lazyComputedKeys_?.get(e);if(t){this.lazyComputedKeys_.delete(e),this.lazyComputedKeys_.size===0&&(this.lazyComputedKeys_=void 0);var r=t();return this.values_.set(e,r),r}},t.materializeLazyObservable_=function(e){var t=this.lazyObservableKeys_?.get(e);if(t){this.lazyObservableKeys_.delete(e),this.lazyObservableKeys_.size===0&&(this.lazyObservableKeys_=void 0);var r=t();return this.values_.set(e,r),r}},t.setObservablePropValue_=function(e,t){var r=this.values_.get(e)??this.materializeLazyComputed_(e)??this.materializeLazyObservable_(e);if(r instanceof k)return r.set(t),!0;if(R(this)){var i=z(this,{type:Hi,object:this.proxy_||this.target_,name:e,newValue:t});if(!i)return null;t=i.newValue}if(t=r.prepareNewValue_(t),t!==j.UNCHANGED){var a=Ri(this),o=process.env.NODE_ENV!==`production`&&N(),c=a||o?{type:Hi,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&o&&P(c),r.setNewValue_(t),a&&Bi(this,c),process.env.NODE_ENV!==`production`&&o&&F()}return!0},t.get_=function(e){return j.trackingDerivation&&!C(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,r){return r===void 0&&(r=!1),C(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):r?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},t.has_=function(e){if(!j.trackingDerivation)return e in this.target_;this.pendingKeys_||=new Map;var t=this.pendingKeys_.get(e);return t||(t=new Wn(e in this.target_,Mt,process.env.NODE_ENV===`production`?`ObservableObject.key?`:this.name_+`.`+Qe(e)+`?`,!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(t===!0&&(t=this.defaultAnnotation_),t!==!1){if(va(this,t,e),!(e in this.target_)){var r;if((r=this.target_[E])!=null&&r[e])return;b(1,t.annotationType_,this.name_+`.`+e.toString())}for(var i=this.target_;i&&i!==ke;){var a=De(i,e);if(a){var o=t.make_(this,e,a,i);if(o===0)return;if(o===1)break}i=Object.getPrototypeOf(i)}_a(this,t,e)}},t.extend_=function(e,t,r,i){if(i===void 0&&(i=!1),r===!0&&(r=this.defaultAnnotation_),r===!1)return this.defineProperty_(e,t,i);va(this,r,e);var a=r.extend_(this,e,t,i);return a&&_a(this,r,e),a},t.defineProperty_=function(e,t,r){r===void 0&&(r=!1),Qn(this.keysAtom_);try{vr();var i=this.delete_(e);if(!i)return i;if(R(this)){var a=z(this,{object:this.proxy_||this.target_,name:e,type:$i,newValue:t.value});if(!a)return null;var o=a.newValue;t.value!==o&&(t=ot({},t,{value:o}))}if(r){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Oe(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{M()}return!0},t.defineObservableProperty_=function(e,t,r,i){i===void 0&&(i=!1),Qn(this.keysAtom_);try{vr();var a=this.delete_(e);if(!a)return a;if(R(this)){var o=z(this,{object:this.proxy_||this.target_,name:e,type:$i,newValue:t});if(!o)return null;t=o.newValue}var c=ha(e),l={configurable:j.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:c.get,set:c.set};if(i){if(!Reflect.defineProperty(this.target_,e,l))return!1}else Oe(this.target_,e,l);var u=new Wn(t,r,process.env.NODE_ENV===`production`?`ObservableObject.key`:this.name_+`.`+e.toString(),!1);this.values_.set(e,u),this.notifyPropertyAddition_(e,u.value_)}finally{M()}return!0},t.defineComputedProperty_=function(e,t,r){r===void 0&&(r=!1),Qn(this.keysAtom_);try{vr();var i=this.delete_(e);if(!i)return i;if(R(this)&&!z(this,{object:this.proxy_||this.target_,name:e,type:$i,newValue:void 0}))return null;t.name||=process.env.NODE_ENV===`production`?`ObservableObject.key`:this.name_+`.`+e.toString(),t.context=this.proxy_||this.target_;var a=ha(e),o={configurable:j.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,o))return!1}else Oe(this.target_,e,o);this.values_.set(e,new k(t)),this.notifyPropertyAddition_(e,void 0)}finally{M()}return!0},t.delete_=function(e,t){if(t===void 0&&(t=!1),Qn(this.keysAtom_),!C(this.target_,e))return!0;if(R(this)&&!z(this,{object:this.proxy_||this.target_,name:e,type:da}))return null;try{var r;vr();var i=Ri(this),a=process.env.NODE_ENV!==`production`&&N(),o=this.values_.get(e),c=void 0;if(!o&&(i||a)&&(c=De(this.target_,e)?.value),t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(process.env.NODE_ENV!==`production`&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof Wn&&(c=o.value_),br(o)),this.keysAtom_.reportChanged(),(r=this.pendingKeys_)==null||(r=r.get(e))==null||r.set(e in this.target_),i||a){var l={type:da,observableKind:`object`,object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:e};process.env.NODE_ENV!==`production`&&a&&P(l),i&&Bi(this,l),process.env.NODE_ENV!==`production`&&a&&F()}}finally{M()}return!0},t.observe_=function(e,t){return process.env.NODE_ENV!==`production`&&t===!0&&b("`observe` doesn't support the fire immediately property for observable objects."),zi(this,e)},t.intercept_=function(e){return Li(this,e)},t.notifyPropertyAddition_=function(e,t){var r,i=Ri(this),a=process.env.NODE_ENV!==`production`&&N();if(i||a){var o=i||a?{type:$i,observableKind:`object`,debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;process.env.NODE_ENV!==`production`&&a&&P(o),i&&Bi(this,o),process.env.NODE_ENV!==`production`&&a&&F()}(r=this.pendingKeys_)==null||(r=r.get(e))==null||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),Ze(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function pa(e,t){if(process.env.NODE_ENV!==`production`&&t&&ga(e)&&b(`Options can't be provided for already observable objects.`),C(e,D))return process.env.NODE_ENV!==`production`&&!(Aa(e)instanceof fa)&&b(`Cannot convert '`+ja(e)+`' into observable object:
26
26
  The target is already observable of different type.
27
- Extending builtins is not supported.`),e;process.env.NODE_ENV!==`production`&&!Object.isExtensible(e)&&b(`Cannot make the designated object observable; it is not extensible`);var r=t?.name??(process.env.NODE_ENV===`production`?`ObservableObject`:(Ve(e)?`ObservableObject`:e.constructor.name)+`@`+Ie());return Ue(e,D,new da(e,new Map,String(r),wn(t))),e}var pa=Ge(`ObservableObjectAdministration`,da);function ma(e){return la[e]||(la[e]={get:function(){return this[D].getObservablePropValue_(e)},set:function(t){return this[D].setObservablePropValue_(e,t)}})}function ha(e){return Be(e)?pa(e[D]):!1}function ga(e,t,r){var i;process.env.NODE_ENV!==`production`&&(e.appliedAnnotations_[r]=t),(i=e.target_[E])==null||delete i[r]}function _a(e,t,r){if(process.env.NODE_ENV!==`production`&&!za(t)&&b(`Cannot annotate '`+e.name_+`.`+r.toString()+`': Invalid annotation.`),process.env.NODE_ENV!==`production`&&!Ft(t)&&C(e.appliedAnnotations_,r)){var i=e.name_+`.`+r.toString(),a=e.appliedAnnotations_[r].annotationType_,o=t.annotationType_;b(`Cannot apply '`+o+`' to '`+i+`':`+(`
27
+ Extending builtins is not supported.`),e;process.env.NODE_ENV!==`production`&&!Object.isExtensible(e)&&b(`Cannot make the designated object observable; it is not extensible`);var r=t?.name??(process.env.NODE_ENV===`production`?`ObservableObject`:(Ve(e)?`ObservableObject`:e.constructor.name)+`@`+Ie());return Ue(e,D,new fa(e,new Map,String(r),wn(t))),e}var ma=Ge(`ObservableObjectAdministration`,fa);function ha(e){return ua[e]||(ua[e]={get:function(){return this[D].getObservablePropValue_(e)},set:function(t){return this[D].setObservablePropValue_(e,t)}})}function ga(e){return Be(e)?ma(e[D]):!1}function _a(e,t,r){var i;process.env.NODE_ENV!==`production`&&(e.appliedAnnotations_[r]=t),(i=e.target_[E])==null||delete i[r]}function va(e,t,r){if(process.env.NODE_ENV!==`production`&&!Ba(t)&&b(`Cannot annotate '`+e.name_+`.`+r.toString()+`': Invalid annotation.`),process.env.NODE_ENV!==`production`&&!Ft(t)&&C(e.appliedAnnotations_,r)){var i=e.name_+`.`+r.toString(),a=e.appliedAnnotations_[r].annotationType_,o=t.annotationType_;b(`Cannot apply '`+o+`' to '`+i+`':`+(`
28
28
  The field is already annotated with '`+a+`'.`)+`
29
29
  Re-annotating fields is not allowed.
30
- Use 'override' annotation for methods overridden by subclass.`)}}var va=wa(0),ya=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ba=0,xa=function(){};function Sa(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__===void 0?e.prototype=t:e.prototype.__proto__=t}Sa(xa,Array.prototype);var Ca=function(e){function t(t,r,i,a){var o;return i===void 0&&(i=process.env.NODE_ENV===`production`?`ObservableArray`:`ObservableArray@`+Ie()),a===void 0&&(a=!1),o=e.call(this)||this,ja(function(){var e=new Gi(i,r,a,!0);e.proxy_=o,We(o,D,e),t&&t.length&&o.spliceWithArray(0,0,t),ya&&Object.defineProperty(o,"0",va)}),o}ct(t,e);var r=t.prototype;return r.concat=function(){this[D].atom_.reportObserved();var e=[...arguments];return Array.prototype.concat.apply(this.slice(),e.map(function(e){return Zi(e)?e.slice():e}))},r[Symbol.iterator]=function(){var e=this,t=0;return La({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},it(t,[{key:`length`,get:function(){return this[D].getArrayLength_()},set:function(e){this[D].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return`Array`}}])}(xa);Object.entries(qi).forEach(function(e){var t=e[0],r=e[1];t!==`concat`&&Ue(Ca.prototype,t,r)});function wa(e){return{enumerable:!1,configurable:!0,get:function(){return this[D].get_(e)},set:function(t){this[D].set_(e,t)}}}function Ta(e){Oe(Ca.prototype,``+e,wa(e))}function Ea(e){if(e>ba){for(var t=ba;t<e+100;t++)Ta(t);ba=e}}Ea(1e3);function Da(e,t,r){return new Ca(e,t,r)}function Oa(e,t){if(typeof e==`object`&&e){if(Zi(e))return t!==void 0&&b(23),e[D].atom_;if(oa(e))return e.atom_;if(U(e)){if(t===void 0)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||b(25,t,Aa(e)),r}if(ha(e)){if(!t)return b(26);var i=e[D],a=i.values_.get(t)??i.materializeLazyComputed_(t)??i.materializeLazyObservable_(t);return a||b(27,t,Aa(e)),a}if(Ct(e)||Kn(e)||Ar(e))return e}else if(S(e)&&Ar(e[D]))return e[D];b(28)}function ka(e,t){if(e||b(29),t!==void 0)return ka(Oa(e,t));if(Ct(e)||Kn(e)||Ar(e)||U(e)||oa(e))return e;if(e[D])return e[D];b(24,e)}function Aa(e,t){var r;if(t!==void 0)r=Oa(e,t);else if(Kr(e))return e.name;else r=ha(e)||U(e)||oa(e)?ka(e):Oa(e);return r.name_}function ja(e){var t=ar(),r=Vn(!0);vr();try{return e()}finally{M(),Hn(r),or(t)}}var Ma=ke.toString;function Na(e,t,r){return r===void 0&&(r=-1),Pa(e,t,r)}function Pa(e,t,r,i,a){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var o=typeof e;if(o!==`function`&&o!==`object`&&typeof t!=`object`)return!1;var c=Ma.call(e);if(c!==Ma.call(t))return!1;switch(c){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:r>=0&&r++;break}e=Fa(e),t=Fa(t);var l=c===`[object Array]`;if(!l){if(typeof e!=`object`||typeof t!=`object`)return!1;var u=e.constructor,d=t.constructor;if(u!==d&&!(S(u)&&u instanceof u&&S(d)&&d instanceof d)&&`constructor`in e&&`constructor`in t)return!1}if(r===0)return!1;r<0&&(r=-1),i||=[],a||=[];for(var f=i.length;f--;)if(i[f]===e)return a[f]===t;if(i.push(e),a.push(t),l){if(f=e.length,f!==t.length)return!1;for(;f--;)if(!Pa(e[f],t[f],r-1,i,a))return!1}else{var p=Object.keys(e),m=p.length;if(Object.keys(t).length!==m)return!1;for(var h=0;h<m;h++){var g=p[h];if(!(C(t,g)&&Pa(e[g],t[g],r-1,i,a)))return!1}}return i.pop(),a.pop(),!0}function Fa(e){return Zi(e)?e.slice():Ke(e)||U(e)||Je(e)||oa(e)?Array.from(e.entries()):e}var Ia=Te().Iterator?.prototype||{};function La(e){return e[Symbol.iterator]=Ra,Object.assign(Object.create(Ia),e)}function Ra(){return this}function za(e){return e instanceof Object&&typeof e.annotationType_==`string`&&S(e.make_)&&S(e.extend_)}[`Symbol`,`Map`,`Set`].forEach(function(e){Te()[e]===void 0&&b(`MobX requires global '`+e+`' to be available or polyfilled`)}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__==`object`&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Pr,extras:{getDebugName:Aa},$mobx:D}),globalThis.data=O({settings:{}});var Ba=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set_data=()=>err_async(async()=>{await fe.set_data({run_in_action:L})},`shr_1246`);set_settings=({settings:e})=>err_async(async()=>{await fe.set_settings({settings:e,run_in_action:L})},`shr_1247`);set=({key:e,val:t})=>err(()=>{fe.set({key:e,val:t,run_in_action:L})},`shr_1251`)}.get_instance(),Va=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set=({settings:e})=>err_async(async()=>ie.set({settings:e,run_in_action:L}),`shr_1365`);set_from_storage=({settings:e}={})=>err_async(async()=>{if(n(e))await this.set({settings:e});else return ie.set_from_storage({to_js:Ai,run_in_action:L,set_data:Ba.set_data})},`shr_1235`)}.get_instance(),Ha=e({Cache:()=>Ba,Settings:()=>Va}),Ua=r((e=>{var t=Symbol.for(`react.transitional.element`),r=Symbol.for(`react.fragment`);function i(e,r,i){var a=null;if(i!==void 0&&(a=``+i),r.key!==void 0&&(a=``+r.key),`key`in r)for(var o in i={},r)o!==`key`&&(i[o]=r[o]);else i=r;return r=i.ref,{$$typeof:t,type:e,key:a,ref:r===void 0?null:r,props:i}}e.Fragment=r,e.jsx=i,e.jsxs=i})),Wa=r(((e,t)=>{t.exports={...me}})),Ga=r((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ne:return`Fragment`;case ie:return`Profiler`;case re:return`StrictMode`;case ce:return`Suspense`;case _:return`SuspenseList`;case de:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case te:return`Portal`;case oe:return e.displayName||`Context`;case ae:return(e._context.displayName||`Context`)+`.Consumer`;case se:var r=e.render;return e=e.displayName,e||=(e=r.displayName||r.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case le:return r=e.displayName||null,r===null?t(e.type)||`Memo`:r;case ue:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function r(e){return``+e}function i(e){try{r(e);var t=!1}catch{t=!0}if(t){t=console;var i=t.error,a=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return i.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,a),r(e)}}function a(e){if(e===ne)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===ue)return`<...>`;try{var r=t(e);return r?`<`+r+`>`:`<...>`}catch{return`<...>`}}function o(){var e=pe.A;return e===null?null:e.getOwner()}function c(){return Error(`react-stack-top-frame`)}function l(e){if(me.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function u(e,t){function r(){_e||(_e=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}function d(){var e=t(this.type);return ve[e]||(ve[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function f(e,t,r,i,a,o){var c=r.ref;return e={$$typeof:ee,type:e,key:t,props:r,_owner:i},(c===void 0?null:c)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:d}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function p(e,r,a,c,d,p){var h=r.children;if(h!==void 0)if(c)if(he(h)){for(c=0;c<h.length;c++)m(h[c]);Object.freeze&&Object.freeze(h)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else m(h);if(me.call(r,`key`)){h=t(e);var g=Object.keys(r).filter(function(e){return e!==`key`});c=0<g.length?`{key: someKey, `+g.join(`: ..., `)+`: ...}`:`{key: someKey}`,y[h+c]||(g=0<g.length?`{`+g.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
30
+ Use 'override' annotation for methods overridden by subclass.`)}}var ya=Ta(0),ba=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),xa=0,Sa=function(){};function Ca(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__===void 0?e.prototype=t:e.prototype.__proto__=t}Ca(Sa,Array.prototype);var wa=function(e){function t(t,r,i,a){var o;return i===void 0&&(i=process.env.NODE_ENV===`production`?`ObservableArray`:`ObservableArray@`+Ie()),a===void 0&&(a=!1),o=e.call(this)||this,Ma(function(){var e=new Gi(i,r,a,!0);e.proxy_=o,We(o,D,e),t&&t.length&&o.spliceWithArray(0,0,t),ba&&Object.defineProperty(o,"0",ya)}),o}ct(t,e);var r=t.prototype;return r.concat=function(){this[D].atom_.reportObserved();var e=[...arguments];return Array.prototype.concat.apply(this.slice(),e.map(function(e){return Zi(e)?e.slice():e}))},r[Symbol.iterator]=function(){var e=this,t=0;return Ra({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},it(t,[{key:`length`,get:function(){return this[D].getArrayLength_()},set:function(e){this[D].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return`Array`}}])}(Sa);Object.entries(qi).forEach(function(e){var t=e[0],r=e[1];t!==`concat`&&Ue(wa.prototype,t,r)});function Ta(e){return{enumerable:!1,configurable:!0,get:function(){return this[D].get_(e)},set:function(t){this[D].set_(e,t)}}}function Ea(e){Oe(wa.prototype,``+e,Ta(e))}function Da(e){if(e>xa){for(var t=xa;t<e+100;t++)Ea(t);xa=e}}Da(1e3);function Oa(e,t,r){return new wa(e,t,r)}function ka(e,t){if(typeof e==`object`&&e){if(Zi(e))return t!==void 0&&b(23),e[D].atom_;if(ca(e))return e.atom_;if(na(e)){if(t===void 0)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||b(25,t,ja(e)),r}if(ga(e)){if(!t)return b(26);var i=e[D],a=i.values_.get(t)??i.materializeLazyComputed_(t)??i.materializeLazyObservable_(t);return a||b(27,t,ja(e)),a}if(Ct(e)||Kn(e)||Ar(e))return e}else if(S(e)&&Ar(e[D]))return e[D];b(28)}function Aa(e,t){if(e||b(29),t!==void 0)return Aa(ka(e,t));if(Ct(e)||Kn(e)||Ar(e)||na(e)||ca(e))return e;if(e[D])return e[D];b(24,e)}function ja(e,t){var r;if(t!==void 0)r=ka(e,t);else if(Kr(e))return e.name;else r=ga(e)||na(e)||ca(e)?Aa(e):ka(e);return r.name_}function Ma(e){var t=ar(),r=Vn(!0);vr();try{return e()}finally{M(),Hn(r),or(t)}}var Na=ke.toString;function Pa(e,t,r){return r===void 0&&(r=-1),Fa(e,t,r)}function Fa(e,t,r,i,a){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var o=typeof e;if(o!==`function`&&o!==`object`&&typeof t!=`object`)return!1;var c=Na.call(e);if(c!==Na.call(t))return!1;switch(c){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t;case`[object Symbol]`:return typeof Symbol<`u`&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case`[object Map]`:case`[object Set]`:r>=0&&r++;break}e=Ia(e),t=Ia(t);var l=c===`[object Array]`;if(!l){if(typeof e!=`object`||typeof t!=`object`)return!1;var u=e.constructor,d=t.constructor;if(u!==d&&!(S(u)&&u instanceof u&&S(d)&&d instanceof d)&&`constructor`in e&&`constructor`in t)return!1}if(r===0)return!1;r<0&&(r=-1),i||=[],a||=[];for(var f=i.length;f--;)if(i[f]===e)return a[f]===t;if(i.push(e),a.push(t),l){if(f=e.length,f!==t.length)return!1;for(;f--;)if(!Fa(e[f],t[f],r-1,i,a))return!1}else{var p=Object.keys(e),m=p.length;if(Object.keys(t).length!==m)return!1;for(var h=0;h<m;h++){var g=p[h];if(!(C(t,g)&&Fa(e[g],t[g],r-1,i,a)))return!1}}return i.pop(),a.pop(),!0}function Ia(e){return Zi(e)?e.slice():Ke(e)||na(e)||Je(e)||ca(e)?Array.from(e.entries()):e}var La=Te().Iterator?.prototype||{};function Ra(e){return e[Symbol.iterator]=za,Object.assign(Object.create(La),e)}function za(){return this}function Ba(e){return e instanceof Object&&typeof e.annotationType_==`string`&&S(e.make_)&&S(e.extend_)}[`Symbol`,`Map`,`Set`].forEach(function(e){Te()[e]===void 0&&b(`MobX requires global '`+e+`' to be available or polyfilled`)}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__==`object`&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Pr,extras:{getDebugName:ja},$mobx:D}),globalThis.data=O({settings:{}});var Va=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set_data=()=>err_async(async()=>{await fe.set_data({run_in_action:L})},`shr_1246`);set_settings=({settings:e})=>err_async(async()=>{await fe.set_settings({settings:e,run_in_action:L})},`shr_1247`);set=({key:e,val:t})=>err(()=>{fe.set({key:e,val:t,run_in_action:L})},`shr_1251`)}.get_instance(),Ha=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set=({settings:e})=>err_async(async()=>ie.set({settings:e,run_in_action:L}),`shr_1365`);set_from_storage=({settings:e}={})=>err_async(async()=>{if(n(e))await this.set({settings:e});else return ie.set_from_storage({to_js:Ai,run_in_action:L,set_data:Va.set_data})},`shr_1235`)}.get_instance(),Ua=e({Cache:()=>Va,Settings:()=>Ha}),Wa=r((e=>{var t=Symbol.for(`react.transitional.element`),r=Symbol.for(`react.fragment`);function i(e,r,i){var a=null;if(i!==void 0&&(a=``+i),r.key!==void 0&&(a=``+r.key),`key`in r)for(var o in i={},r)o!==`key`&&(i[o]=r[o]);else i=r;return r=i.ref,{$$typeof:t,type:e,key:a,ref:r===void 0?null:r,props:i}}e.Fragment=r,e.jsx=i,e.jsxs=i})),Ga=r(((e,t)=>{t.exports={...me}})),Ka=r((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ne:return`Fragment`;case ie:return`Profiler`;case re:return`StrictMode`;case ce:return`Suspense`;case _:return`SuspenseList`;case de:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case te:return`Portal`;case oe:return e.displayName||`Context`;case ae:return(e._context.displayName||`Context`)+`.Consumer`;case se:var r=e.render;return e=e.displayName,e||=(e=r.displayName||r.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case le:return r=e.displayName||null,r===null?t(e.type)||`Memo`:r;case ue:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function r(e){return``+e}function i(e){try{r(e);var t=!1}catch{t=!0}if(t){t=console;var i=t.error,a=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return i.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,a),r(e)}}function a(e){if(e===ne)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===ue)return`<...>`;try{var r=t(e);return r?`<`+r+`>`:`<...>`}catch{return`<...>`}}function o(){var e=pe.A;return e===null?null:e.getOwner()}function c(){return Error(`react-stack-top-frame`)}function l(e){if(me.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function u(e,t){function r(){_e||(_e=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}function d(){var e=t(this.type);return ve[e]||(ve[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function f(e,t,r,i,a,o){var c=r.ref;return e={$$typeof:ee,type:e,key:t,props:r,_owner:i},(c===void 0?null:c)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:d}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function p(e,r,a,c,d,p){var h=r.children;if(h!==void 0)if(c)if(he(h)){for(c=0;c<h.length;c++)m(h[c]);Object.freeze&&Object.freeze(h)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else m(h);if(me.call(r,`key`)){h=t(e);var g=Object.keys(r).filter(function(e){return e!==`key`});c=0<g.length?`{key: someKey, `+g.join(`: ..., `)+`: ...}`:`{key: someKey}`,y[h+c]||(g=0<g.length?`{`+g.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
31
31
  let props = %s;
32
32
  <%s {...props} />
33
33
  React keys must be passed directly to JSX without using spread:
34
34
  let props = %s;
35
- <%s key={someKey} {...props} />`,c,h,g,h),y[h+c]=!0)}if(h=null,a!==void 0&&(i(a),h=``+a),l(r)&&(i(r.key),h=``+r.key),`key`in r)for(var ee in a={},r)ee!==`key`&&(a[ee]=r[ee]);else a=r;return h&&u(a,typeof e==`function`?e.displayName||e.name||`Unknown`:e),f(e,h,a,o(),d,p)}function m(e){h(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===ue&&(e._payload.status===`fulfilled`?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function h(e){return typeof e==`object`&&!!e&&e.$$typeof===ee}var g=Wa(),ee=Symbol.for(`react.transitional.element`),te=Symbol.for(`react.portal`),ne=Symbol.for(`react.fragment`),re=Symbol.for(`react.strict_mode`),ie=Symbol.for(`react.profiler`),ae=Symbol.for(`react.consumer`),oe=Symbol.for(`react.context`),se=Symbol.for(`react.forward_ref`),ce=Symbol.for(`react.suspense`),_=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),ue=Symbol.for(`react.lazy`),de=Symbol.for(`react.activity`),fe=Symbol.for(`react.client.reference`),pe=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=Object.prototype.hasOwnProperty,he=Array.isArray,ge=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(e){return e()}};var _e,ve={},ye=g.react_stack_bottom_frame.bind(g,c)(),v=ge(a(c)),y={};e.Fragment=ne,e.jsx=function(e,t,r){var i=1e4>pe.recentlyCreatedOwnerStacks++;return p(e,t,r,!1,i?Error(`react-stack-top-frame`):ye,i?ge(a(e)):v)},e.jsxs=function(e,t,r){var i=1e4>pe.recentlyCreatedOwnerStacks++;return p(e,t,r,!0,i?Error(`react-stack-top-frame`):ye,i?ge(a(e)):v)}})()})),Ka=r(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Ua():t.exports=Ga()})),W=Ka(),qa={Check:e=>(0,W.jsxs)(`svg`,{viewBox:`0 0 17.59 17.59`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,W.jsx)(`path`,{d:`m-3.41-1.41h24v24h-24z`,fill:`none`}),(0,W.jsx)(`path`,{d:`m5.59 12.67-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41z`})]}),Close:e=>(0,W.jsxs)(`svg`,{viewBox:`0 0 14 14`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,W.jsx)(`path`,{d:`m-5-5h24v24h-24z`,fill:`none`}),(0,W.jsx)(`path`,{d:`M 14,1.41 12.59,0 7,5.59 1.41,0 0,1.41 5.59,7 0,12.59 1.41,14 7,8.41 12.59,14 14,12.59 8.41,7 Z`})]}),Help:e=>(0,W.jsxs)(`svg`,{viewBox:`0 0 20 20`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,W.jsx)(`path`,{d:`m-2-2h24v24h-24z`,fill:`none`}),(0,W.jsx)(`path`,{d:`m10 0c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm1 17h-2v-2h2zm2.07-7.75-0.9 0.92c-0.72 0.73-1.17 1.33-1.17 2.83h-2v-0.5c0-1.1 0.45-2.1 1.17-2.83l1.24-1.26c0.37-0.36 0.59-0.86 0.59-1.41 0-1.1-0.9-2-2-2s-2 0.9-2 2h-2c0-2.21 1.79-4 4-4s4 1.79 4 4c0 0.88-0.36 1.68-0.93 2.25z`})]}),Hourglass:e=>(0,W.jsx)(`svg`,{enableBackground:`new 0 0 128 128`,viewBox:`0 0 104 104`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,W.jsxs)(`g`,{fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeMiterlimit:10,strokeWidth:4,children:[(0,W.jsx)(`path`,{d:`m45.999 49.555c-7.1595-1.5367-13.047-6.9284-15.068-14.202l-5.9314-21.353`}),(0,W.jsx)(`path`,{d:`m58 14h-36c-2.2091 0-4-1.7909-4-4v-4c0-2.2091 1.7909-4 4-4h60c2.2091 0 4 1.7909 4 4v4c0 1.8637-1.2746 3.4297-2.9996 3.8739l-4.0004 0.12612-5.9314 21.353c-1.9858 7.1489-7.7072 12.48-14.7 14.12`}),(0,W.jsx)(`line`,{x1:70,x2:67,y1:14,y2:14}),(0,W.jsx)(`path`,{d:`m59.008 54.689c6.7007 1.8073 12.136 7.0287 14.061 13.958l5.9314 21.353`}),(0,W.jsx)(`path`,{d:`m25 90 5.9314-21.353c2.0206-7.2742 7.9089-12.666 15.069-14.202`}),(0,W.jsx)(`path`,{d:`m22 90h60c2.2091 0 4 1.7909 4 4v4c0 2.2091-1.7909 4-4 4h-60c-2.2091 0-4-1.7909-4-4v-4c0-1.8637 1.2746-3.4297 2.9996-3.8739z`}),(0,W.jsx)(`line`,{x1:46,x2:46,y1:60,y2:46}),(0,W.jsx)(`line`,{x1:58,x2:58,y1:43,y2:56})]})}),NavigateBefore:e=>(0,W.jsxs)(`svg`,{fill:`#000000`,viewBox:`0 0 12.41 12.41`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,W.jsx)(`path`,{d:`m-8.2-6h24v24h-24z`,fill:`none`}),(0,W.jsx)(`path`,{d:`m9.91 1.615-1.41-1.41-6 6 6 6 1.41-1.41-4.58-4.59z`})]}),NavigateNext:e=>(0,W.jsxs)(`svg`,{fill:`#000000`,viewBox:`0 0 12.41 12.41`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,W.jsx)(`path`,{d:`m0 0h24v24h-24z`,fill:`none`}),(0,W.jsx)(`path`,{d:`m3.91 0.205-1.41 1.41 4.58 4.59-4.58 4.59 1.41 1.41 6-6z`})]})},Ja=()=>err(()=>{Sc.init_options(),$.set_offers()},`shr_1087`);if(!be)throw Error(`mobx-react-lite requires React with Hooks support`);if(!B)throw Error(`mobx-react-lite@3 requires mobx at least version 6 to be available`);function Ya(e){e()}function Xa(e){e||(e=Ya,process.env.NODE_ENV!==`production`&&console.warn(`[MobX] Failed to get unstable_batched updates from react-dom / react-native`)),oi({reactionScheduler:e})}function Za(e){return ci(e)}var Qa=!1;function $a(){return Qa}var eo=1e4,to=1e4,no=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){e===void 0&&(e=eo),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var r=Date.now();t.registrations.forEach(function(i,a){r-i.registeredAt>=e&&(t.finalize(i.value),t.registrations.delete(a))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,to))}}),e}(),ro=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:no)(function(e){var t;(t=e.reaction)==null||t.dispose(),e.reaction=null}),io=r((e=>{var t=Wa();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,c=t.useLayoutEffect,l=t.useDebugValue;function u(e,t){var r=t(),i=a({inst:{value:r,getSnapshot:t}}),u=i[0].inst,f=i[1];return c(function(){u.value=r,u.getSnapshot=t,d(u)&&f({inst:u})},[e,r,t]),o(function(){return d(u)&&f({inst:u}),e(function(){d(u)&&f({inst:u})})},[e]),l(r),r}function d(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch{return!0}}function f(e,t){return t()}var p=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?f:u;e.useSyncExternalStore=t.useSyncExternalStore===void 0?p:t.useSyncExternalStore})),ao=r((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function r(e,t){p||o.startTransition===void 0||(p=!0,console.error(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var r=t();if(!m){var a=t();c(r,a)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),m=!0)}a=l({inst:{value:r,getSnapshot:t}});var h=a[0].inst,g=a[1];return d(function(){h.value=r,h.getSnapshot=t,i(h)&&g({inst:h})},[e,r,t]),u(function(){return i(h)&&g({inst:h}),e(function(){i(h)&&g({inst:h})})},[e]),f(r),r}function i(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!c(e,r)}catch{return!0}}function a(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=Wa(),c=typeof Object.is==`function`?Object.is:t,l=o.useState,u=o.useEffect,d=o.useLayoutEffect,f=o.useDebugValue,p=!1,m=!1,h=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?a:r;e.useSyncExternalStore=o.useSyncExternalStore===void 0?h:o.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),oo=r(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=io():t.exports=ao()}))();function so(e){e.reaction=new Tr(`observer${e.name}`,function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)==null||t.call(e)})}function co(e,t){if(t===void 0&&(t=`observed`),$a())return e();var r=he.useRef(null);if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return ro.unregister(i),i.onStoreChange=e,i.reaction||(so(i),i.stateVersion=Symbol()),function(){var e;i.onStoreChange=null,(e=i.reaction)==null||e.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};r.current=i}var a=r.current;a.reaction||(so(a),ro.register(r,a,a)),he.useDebugValue(a.reaction,Za),(0,oo.useSyncExternalStore)(a.subscribe,a.getSnapshot,a.getSnapshot);var o,c;if(a.reaction.track(function(){try{o=e()}catch(e){c=e}}),c)throw c;return o}var lo=!0,uo=!0,fo=typeof Symbol==`function`&&Symbol.for,po=Object.getOwnPropertyDescriptor(function(){},`name`)?.configurable??!1,mo=fo?Symbol.for(`react.forward_ref`):typeof _e==`function`&&_e(function(e){return null}).$$typeof,ho=fo?Symbol.for(`react.memo`):typeof ve==`function`&&ve(function(e){return null}).$$typeof;function G(e,t){if(process.env.NODE_ENV!==`production`&&lo&&t&&(lo=!1,console.warn("[mobx-react-lite] `observer(fn, { forwardRef: true })` is deprecated, use `observer(React.forwardRef(fn))`")),ho&&e.$$typeof===ho)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if($a())return e;var r=t?.forwardRef??!1,i=e,a=e.displayName||e.name;if(mo&&e.$$typeof===mo&&(r=!0,i=e.render,typeof i!=`function`))throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(e,t){return co(function(){return i(e,t)},a)};return o.displayName=e.displayName,po&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes,process.env.NODE_ENV!==`production`&&uo&&(uo=!1,console.warn(`[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release.`))),r&&(o=_e(o)),o=ve(o),_o(e,o),process.env.NODE_ENV!==`production`&&Object.defineProperty(o,"contextTypes",{set:function(){throw Error(`[mobx-react-lite] \`${this.displayName||this.type?.displayName||this.type?.name||`Component`}.contextTypes\` must be set before applying \`observer\`.`)}}),o}var go={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function _o(e,t){Object.keys(e).forEach(function(r){go[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}function vo(e){var t=e.children,r=e.render;t&&r&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var i=t||r;return typeof i==`function`?co(i):null}process.env.NODE_ENV!==`production`&&(vo.propTypes={children:yo,render:yo}),vo.displayName=`Observer`;function yo(e,t,r,i,a){var o=t===`children`?`render`:`children`,c=typeof e[t]==`function`,l=typeof e[o]==`function`;return c&&l?Error("MobX Observer: Do not use children and render in the same time in`"+r):c||l?null:Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+r+"`, expected `function`.")}Xa(xe),ro.finalizeAllImmediately;var bo=G(e=>{let{input:t}=e;return(0,W.jsx)(Q,{tag:`span`,name:`fade`,cls:x.cls([`btn_w`,`text`,t.is_enabled_cls(),t.name]),state:t.cut_features_is_visible_computed(),attr:{tab_index:t.tab_index(),disabled:!t.is_enabled_final(),onClick:t.event_callback,onKeyDown:le},style:{marginLeft:x.px(t.offset)},children:(0,W.jsx)(`button`,{className:x.cls([`btn`,`text`]),type:`button`,children:t.btn_text()})})}),xo=G(e=>{let{input:t,id:r,calculate_width:i}=e,a=t.width_accessed(),o=y(null),[c,l]=be(`auto`);v(()=>{if(n(o.current)){let e=J.width_style({input:t,calculate_width:i,input_w:o.current});n(e)&&l(e)}},[t,i,a]);let u=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,W.jsxs)(`span`,{className:x.cls([`input_w`,`checkbox`,t.name,`calculate_width`]),style:{width:c},ref:o,children:[(0,W.jsxs)(`label`,{className:`wrap_label`,children:[(0,W.jsx)(`input`,{id:qs.id({input:t,id:r}),name:t.name,type:`checkbox`,checked:Y.access({input:t}),value:Y.access({input:t}).toString(),onChange:e=>{Y.change({input:t},e)}}),(0,W.jsx)(`span`,{className:`box`,role:`button`,tabIndex:t.tab_index(),"aria-label":`Checkbox`,onKeyDown:al.simulate_click_on_enter,children:(0,W.jsx)(qa.Check,{})})]}),(0,W.jsx)(ko,{input:t})]}),t.include_help?(0,W.jsx)(Co,{section_or_input:t}):void 0]}),t.include_help?(0,W.jsx)(wo,{section_or_input:t}):void 0]});return(0,W.jsx)(Oo,{input:t,input_w:u,include_label:!1})}),So=G(e=>{let{input:t}=e;return(0,W.jsx)(`input`,{className:x.cls([`file`,t.name]),name:t.name,type:`file`,accept:t.accept,multiple:t.multiple,value:``,onChange:e=>{t.event_callback({input:t},e)}})}),Co=G(e=>{let{section_or_input:t}=e;return(0,W.jsx)(`button`,{className:`help_btn`,type:`button`,title:globalThis[_.type()].msg(`help_btn_title`),tabIndex:Zs.tab_index({section_or_input:t}),"aria-label":`Help button`,onClick:()=>{Hs.change_visibility({section_or_input:t})},children:(0,W.jsx)(qa.Help,{})})}),wo=G(e=>{let{section_or_input:t}=e,r=Hs.msg({section_or_input:t});return(0,W.jsx)(Q,{tag:`p`,name:`fade`,cls:`help`,state:t.help_is_visible,style:{width:Hs.width_style({section_or_input:t})},tr_end_unactive:[e=>{Xs.set_side_btns_offset_bottom_val_help_tr_end({section_or_input:t},e)}],children:(0,W.jsx)(`span`,{dangerouslySetInnerHTML:{__html:Hs.help_msg({msg:r})}})})}),To=G(e=>{let{input:t}=e;return(0,W.jsx)(`hr`,{className:t.name})}),Eo=G(e=>{let{input:t,include_label:r}=e;return(0,W.jsxs)(Q,{tag:`span`,name:`fade`,cls:x.cls([`btn_w`,t.type,t.is_enabled_cls(),t.name]),attr:{title:t.icon_btn_title(),onClick:()=>{t.event_callback({input:t})},onKeyDown:le},state:t.cut_features_is_visible_computed(),style:{marginLeft:x.px(t.offset)},children:[(0,W.jsx)(`button`,{className:x.cls([`btn`]),type:`button`,"aria-label":t.name,tabIndex:t.tab_index(),children:(0,W.jsx)(t.Svg,{})}),r?(0,W.jsx)(ko,{input:t}):void 0]})}),Do=G(e=>{let{input:t}=e,r=y(null);return v(()=>{Xs.set_side_btns_offset_bottom_val({input:t,el:r.current})},[t.is_in_warn_state,t]),(0,W.jsx)(`p`,{className:x.cls([`input_error`,Us.input_error_visibility_cls({input:t})]),style:{width:Hs.width_style({section_or_input:t})},ref:r,children:Us.input_error({input:t})})}),Oo=G(e=>{let{input:t,input_w:r,include_label:i}=e;return v(()=>err(()=>{Js.calculate_offset({input:t})},`shr_1044`)),(0,W.jsxs)(Q,{tag:`div`,name:`fade`,cls:x.cls([`input_item`,t.type,t.name,t.is_enabled_cls(),t.is_column_layout_cond()]),state:t.cut_features_is_visible_computed(),style:{marginLeft:x.px(t.offset)},children:[t.type===`group`?void 0:(0,W.jsx)(Ho,{input:t}),(0,W.jsxs)(`div`,{className:`input_item_inner`,children:[i?(0,W.jsx)(ko,{input:t}):void 0,r]})]})}),ko=G(e=>{let{input:t}=e,r=t.type===`group`?new Fs({name:`${t.name}_edit_label_input`,section:t.section,val_accessor:t.val_accessor,event_callback:t.edit_label_val,keydown_callback:t.keydown_callback}):void 0;return(0,W.jsxs)(`div`,{className:x.cls([`label_in_input_item_w`,qs.content_is_visible_margin_cls({input:t})]),children:[t.type===`group`?(0,W.jsx)(Ho,{input:t}):void 0,t.type===`group`&&t.editing_label&&n(r)?(0,W.jsx)(Wo,{input:r,calculate_width:!0,include_label:!1,parent_input:t}):(0,W.jsx)(`label`,{className:`label_in_input_item`,htmlFor:t.id,children:qs.label_text_computed({input:t})})]})}),Ao=G(e=>{let{input:t}=e;return(0,W.jsx)(`div`,{className:x.cls([`label`,t.name]),children:globalThis[_.type()].msg(`${t.name}_label_text`)})}),jo=G(e=>{let{input:t}=e;return(0,W.jsx)(Mo,{input:t,type:`link`})}),Mo=G(e=>{let{input:t,type:r}=e;return(0,W.jsx)(Q,{tag:`span`,name:`fade`,cls:x.cls([`btn_w`,`${r}_btn_w`,t.is_enabled_cls(),t.name]),attr:{title:t.icon_btn_title(),onClick:()=>{t.event_callback({input:t})},onKeyDown:le},state:t.cut_features_is_visible_computed(),style:{marginLeft:x.px(t.offset)},children:(0,W.jsx)(`button`,{className:x.cls([`btn`,`${r}_btn`]),type:`button`,tabIndex:t.tab_index(),children:t instanceof Ts?(0,W.jsx)(t.Svg,{}):(0,W.jsx)(`span`,{children:t.icon_btn_text({input:t})})})})}),No=G(e=>{let{link:t}=e;return rb(t.show_link)?(0,W.jsx)(`a`,{className:x.cls([`link`,t.label_type,t.name]),title:t.link_title(),href:rs(t.href_final),target:t.target,rel:`noopener noreferrer`,children:t.label_type===`svg`&&n(t.Svg)?(0,W.jsx)(t.Svg,{}):t.link_text()}):null}),Po=G(e=>{let{input:t,id:r,calculate_width:i,include_label:a}=e,o=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`displayed_val_w`,children:[(0,W.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,W.jsxs)(`span`,{className:x.cls([`input_w`,`range`,t.name,J.calculate_width_cls({calculate_width:i})]),style:{width:J.width_style({input:t,calculate_width:i})},children:[(0,W.jsx)(`input`,{id:qs.id({input:t,id:r}),name:t.name,className:x.cls([`input`,Y.focus_state({input:t})]),type:`range`,value:Y.access({input:t}),autoComplete:`off`,min:t.min,max:t.max,step:t.step,tabIndex:t.tab_index(),onInput:e=>{Y.change({input:t},e)},onFocus:()=>{Y.set_focus_state({input:t,state:!0})},onBlur:()=>{Y.set_focus_state({input:t,state:!1})}}),(0,W.jsx)(`span`,{className:`lower_fill`,style:{width:t.lower_fill_width({input:t})}})]}),t.include_help?(0,W.jsx)(Co,{section_or_input:t}):void 0]}),(0,W.jsx)(`div`,{className:x.cls([`displayed_val`,t.help_is_present_cls({input:t})]),children:t.displayed_val({input:t})})]}),t.include_help?(0,W.jsx)(wo,{section_or_input:t}):void 0]});return(0,W.jsx)(Oo,{input:t,input_w:o,include_label:t.label_is_visible_computed({include_label:a})})}),Fo=G(e=>{let{section:t,change_section_callback:r,enable_developer_mode_save_callback:i}=e;return(0,W.jsx)(`button`,{className:x.cls([`section_btn`,t.name,Sc.selected_cls({section_name:t.name})]),type:`button`,tabIndex:Sc.tab_index({section_name:t.name}),onClick:()=>{Sc.change({section_name:t.name,callback:r}),n(i)&&vc.enable({save_callback:i})},children:Ys.msg({section:t})})}),Io=G(e=>{let{section:t,inputs:r}=e;v(()=>{n(t)&&n(t.set_content_is_visible)&&t.set_content_is_visible()},[t]);let i=()=>(0,W.jsxs)(W.Fragment,{children:[n(t)&&t.show_content_link_btn_is_visible()?(0,W.jsx)(jo,{input:new Es({name:`show_content`,event_callback:t.change_visibility_of_content})}):void 0,n(t)&&t.hide_content_link_btn_is_visible()?(0,W.jsx)(jo,{input:new Es({name:`hide_content`,event_callback:t.change_visibility_of_content})}):void 0]}),a=()=>n(t)&&t.include_offers?(0,W.jsx)(Fc,{is_visible:!0,offer_banner_type:t.offer_banner_type}):(0,W.jsx)(W.Fragment,{}),o=()=>r.length===0?(0,W.jsx)(a,{}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`inputs`,children:Object.values(r).map(e=>(0,W.jsx)(ge,{children:sc({input:e})},e.id))}),(0,W.jsx)(a,{})]});return n(t)&&t.content_is_hideable?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(i,{}),(0,W.jsx)(Q,{tag:`div`,name:`fade`,cls:`section_inner`,state:n(t.content_is_visible)&&t.content_is_visible,children:(0,W.jsx)(o,{})})]}):(0,W.jsx)(o,{})}),Lo=G(e=>{let{section:t}=e;return(0,W.jsx)(`div`,{className:x.cls([`section`,t.name,t.visibility_cls({section:t})]),children:t.available?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`section_help`,children:[t.include_help?(0,W.jsx)(Co,{section_or_input:t}):void 0,t.include_help?(0,W.jsx)(wo,{section_or_input:t}):void 0]}),(0,W.jsx)(Io,{section:t,inputs:t.inputs})]}):(0,W.jsx)(`div`,{children:t.section_unavailable_msg_text()})})}),Ro=G(e=>{let{input:t,id:r,calculate_width:i,include_label:a}=e,o=t.options[t.name],c=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,W.jsx)(`span`,{className:x.cls([`input_w`,`select`,t.name,`inset_border`,J.calculate_width_cls({calculate_width:i}),Y.focus_state({input:t})]),style:{width:J.width_style({input:t,calculate_width:i})},children:(0,W.jsx)(`select`,{id:qs.id({input:t,id:r}),name:t.name,className:`input`,value:Y.access({input:t}),tabIndex:t.tab_index(),onChange:e=>{Y.change({input:t},e)},onFocus:()=>{Y.set_focus_state({input:t,state:!0})},onBlur:()=>{Y.set_focus_state({input:t,state:!1})},children:o.map((e,r)=>(0,W.jsx)(`option`,{value:e.val,children:t.option_text({i:r})},e.name))})}),t.include_help?(0,W.jsx)(Co,{section_or_input:t}):void 0]}),t.include_help?(0,W.jsx)(wo,{section_or_input:t}):void 0]});return(0,W.jsx)(Oo,{input:t,input_w:c,include_label:t.label_is_visible_computed({include_label:a})})}),zo=G(e=>{let{input:t}=e;return n(t.inputs)?(0,W.jsx)(`form`,{className:`input_item_form`,action:t.action,method:`POST`,encType:`multipart/form-data`,children:Object.values(t.inputs).map(e=>(0,W.jsx)(ge,{children:sc({input:e})},e.name))}):(0,W.jsx)(W.Fragment,{})}),Bo=G(e=>{let{input:t}=e,r=n(t.inputs)?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,W.jsx)(`span`,{className:x.cls([`input_w`,`group`,t.name,t.content_is_visible_cls()]),style:{width:J.width_style({input:t})},children:Object.values(t.inputs).map(e=>(0,W.jsx)(ge,{children:sc({input:e,id:qs.id({input:t.get_input({child_input:e})}),calculate_width:t.is_column_layout,include_label:t.is_column_layout})},e.name))}),t.include_help?(0,W.jsx)(Co,{section_or_input:t}):void 0]}),t.include_help?(0,W.jsx)(wo,{section_or_input:t}):void 0]}):(0,W.jsx)(W.Fragment,{});return(0,W.jsx)(Oo,{input:t,input_w:r,include_label:t.label_is_visible_computed({include_label:!0})})}),Vo=G(e=>{let{input:t,name:r,alt_title:i,Svg:a,on_click:o}=e;return(0,W.jsx)(`button`,{className:x.cls([`btn`,`side_btn`,Xs.is_enabled_cls({name:r,input:t})]),type:`button`,title:t.side_btn_title({name:r,alt_title:i}),tabIndex:t.tab_index(),"aria-label":`Side button`,onClick:o,children:(0,W.jsx)(a,{})})}),Ho=G(e=>{let{input:t}=e,r=y(null);return v(()=>{t.help_is_visible&&Xs.set_side_btns_offset_bottom_val({input:t,el:r.current})},[t.help_is_visible,t]),n(t.side_btns)?(0,W.jsx)(`span`,{className:`side_btns`,ref:r,style:{bottom:t.side_btns_offset_bottom},children:t.side_btns.map(e=>(0,W.jsx)(Vo,{name:e.name,alt_title:e.alt_title,Svg:e.Svg,input:t,on_click:()=>{e.event_callback({input:t})}},e.name))}):null}),Uo=G(e=>{let{input:t,name:r,Svg:i,on_click:a}=e;return(0,W.jsx)(`button`,{className:x.cls([`btn`,`text_input`,Y.warn_state({input:t})]),type:`button`,title:t.text_btn_title({name:r}),tabIndex:t.tab_index(),"aria-label":`Text button`,onClick:a,children:(0,W.jsx)(i,{})})}),Wo=G(e=>{let t=y(null),{input:r,id:i,calculate_width:a,include_label:o,parent_input:c}=e;v(()=>{cc.focus_input({input:r,input_el:t.current})},[r]);let l=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,W.jsxs)(`span`,{className:x.cls([`input_w`,`text`,r.text_type,r.name,`inset_border`,J.calculate_width_cls({calculate_width:a}),Y.focus_state({input:r}),Y.warn_state({input:r})]),style:{width:J.width_style({input:r,calculate_width:a})},children:[(0,W.jsx)(`input`,{id:qs.id({input:r,id:i}),name:r.name,className:x.cls([`input`,r.text_type]),type:r.text_type,value:r.val_computed({input:r,parent_input:c}),placeholder:r.placeholder,autoComplete:r.autocomplete,spellCheck:`false`,tabIndex:r.tab_index(),ref:t,onInput:async e=>{await Y.text_and_textarea_on_input({input:r,parent_input:c},e)},onPaste:e=>{r.paste_callback({input:r},e)},onFocus:()=>{Y.set_focus_state({input:r,state:!0})},onBlur:()=>{Y.set_focus_state({input:r,state:!1})},onWheel:()=>{r.prevent_number_val_changeon_scroll({input:r})},onKeyDown:e=>{Y.on_keydown({input:r,parent_input:c},e)}}),n(r.text_btns)?r.text_btns.map(e=>n(e.visibility_cond)&&e.visibility_cond({input:r})?(0,W.jsx)(Uo,{name:e.name,Svg:e.Svg,input:r,on_click:()=>{cc.run_text_btn_action({input:r,text_btn:e,input_el:n(t.current)?t.current:void 0})}},e.name):(0,W.jsx)(ge,{},r.name)):void 0,r.remove_val_btn_is_visible({input:r})?(0,W.jsx)(Uo,{name:`remove_val`,Svg:qa.Close,input:r,on_click:()=>Y.remove_val({input:r,parent_input:c,input_el:t.current})}):void 0]}),r.include_help?(0,W.jsx)(Co,{section_or_input:r}):void 0]}),(0,W.jsx)(Do,{input:r}),r.include_help?(0,W.jsx)(wo,{section_or_input:r}):void 0]});return(0,W.jsx)(Oo,{input:r,input_w:l,include_label:r.label_is_visible_computed({include_label:o})})}),Go=G(e=>{let t=y(null),{input:r,id:i,calculate_width:a,include_label:o}=e,c=J.width_style({input:r,calculate_width:a});v(()=>{window.addEventListener(`resize`,()=>J.resize_textarea_with_resize_handle({input:r,textarea:t.current})),lc.set_up_resize_observer({input:r,input_el:t.current})},[r]);let l=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,W.jsx)(`span`,{className:x.cls([`input_w`,`textarea`,r.name,`inset_border`,J.calculate_width_cls({calculate_width:a}),Y.focus_state({input:r}),Y.warn_state({input:r})]),style:{minWidth:c,maxWidth:J.max_width_ob[r.name]},children:(0,W.jsx)(`textarea`,{id:qs.id({input:r,id:i}),name:r.name,className:`input`,value:Y.access({input:r}),spellCheck:`false`,tabIndex:r.tab_index(),ref:t,onInput:async e=>{await Y.text_and_textarea_on_input({input:r},e)},onFocus:()=>{Y.set_focus_state({input:r,state:!0})},onBlur:()=>{Y.set_focus_state({input:r,state:!1})}})}),r.include_help?(0,W.jsx)(Co,{section_or_input:r}):void 0]}),(0,W.jsx)(Do,{input:r}),r.include_help?(0,W.jsx)(wo,{section_or_input:r}):void 0]});return(0,W.jsx)(Oo,{input:r,input_w:l,include_label:r.label_is_visible_computed({include_label:o})})}),Ko=t(pe()),qo=G(e=>{let t=y(null),{input:r,id:i,calculate_width:a}=e;v(()=>{Y.access({input:r})});let o=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,W.jsx)(`span`,{className:x.cls([`input_w`,`upload_box`,r.name,J.calculate_width_cls({calculate_width:a}),Y.warn_state({input:r})]),style:{width:J.width_style({input:r,calculate_width:a})},children:(0,W.jsxs)(Q,{tag:`div`,name:`upload_box`,cls:x.cls([`background`,r.loading_cls()]),attr:{onDragOver:te,onDragEnter:()=>{ec.highlight({input:r})},onDragLeave:()=>{ec.unhighlight({input:r})},onDrop:e=>{ec.upload_files(e,{input:r})}},state:r.is_in_hover_state,children:[(0,W.jsx)(`input`,{id:qs.id({input:r,id:i}),name:r.name,className:`input`,type:`file`,accept:r.accept,multiple:r.multiple,ref:t,onChange:e=>{ec.upload_files(e,{input:r,file_input:t.current})}}),(0,W.jsx)(`div`,{title:r.filenames_final(),className:x.cls([`status_msg`,`filenames`]),children:r.filenames_final()}),(0,W.jsxs)(`div`,{className:`what_to_do_msg`,children:[(0,W.jsx)(jo,{input:(0,Ko.default)({},r,{name:`browse`,type:`link_btn`,event_callback:()=>uc.trigger_click_on_file_input({file_input:t.current})})}),(0,W.jsx)(`span`,{children:` ${globalThis[_.type()].msg(`drag_files_msg_text`)}`})]}),(0,W.jsx)(`div`,{className:x.cls([`status_msg`,`loading`,r.loading_msg_visibility_cls()]),children:globalThis[_.type()].msg(`loading_msg_text`)}),(0,W.jsx)(`div`,{className:x.cls([`status_msg`,`error`,r.error_msg_visibility_cls()]),children:globalThis[_.type()].msg(`an_error_occured_msg`)})]})}),r.include_help?(0,W.jsx)(Co,{section_or_input:r}):void 0]}),(0,W.jsx)(Do,{input:r}),r.include_help?(0,W.jsx)(wo,{section_or_input:r}):void 0]});return(0,W.jsx)(Oo,{input:r,input_w:o,include_label:r.label_is_visible_computed({include_label:!0})})}),Jo=e({Btn:()=>bo,Checkbox:()=>xo,File:()=>So,Form:()=>zo,Group:()=>Bo,Help:()=>wo,HelpBtn:()=>Co,Hr:()=>To,IconBtn:()=>Eo,InputError:()=>Do,InputItem:()=>Oo,Label:()=>Ao,LabelInInputItem:()=>ko,Link:()=>No,LinkBtn:()=>jo,LinkIconBtn:()=>Mo,Range:()=>Po,Section:()=>Lo,SectionBtn:()=>Fo,SectionContent:()=>Io,Select:()=>Ro,SideBtn:()=>Vo,SideBtns:()=>Ho,Text:()=>Wo,TextBtn:()=>Uo,Textarea:()=>Go,UploadBox:()=>qo}),Yo=G(e=>{let{input:t}=e,r=y(null);t.palette_is_visible,n(t.state)&&t.state.main,v(()=>err(()=>{L(()=>err(()=>{t.palette_is_visible&&n(r.current)&&(t.palette_width=r.current.offsetWidth.toString(),t.palette_height=r.current.offsetHeight.toString())},`shr_1001`))},`shr_1002`));let i=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`input_w_and_help_btn`,children:(0,W.jsxs)(`div`,{className:x.cls([`input_w`,`color`,t.name]),children:[(0,W.jsxs)(`span`,{className:`inner_w`,children:[(0,W.jsx)(Zo,{is_visible:t.palette_is_visible||!1,width:x.px(t.palette_width),height:x.px(t.palette_height)}),(0,W.jsx)(Q,{tag:`div`,name:`fade`,cls:`palette_w`,state:t.palette_w_is_visible(),tr_end_unactive:[()=>{Z.mark_palette_as_closed({input:t,is_closed:!0})}],children:(0,W.jsxs)(`div`,{className:x.cls([`palette`,t.palette_is_closed_visibility_cls()]),ref:r,children:[(0,W.jsxs)(Q,{tag:`div`,name:`fade`,cls:x.cls([`color_help_w`,t.color_help_visibility_cls()]),state:data.settings.prefs.color_help_is_visible,tr_end_unactive:[Z.hide_color_help_tr_end],children:[(0,W.jsx)(`p`,{className:`color_help`,children:globalThis[_.type()].msg(`color_help_text`)}),(0,W.jsx)(jo,{input:new Es({name:`hide`,event_callback:()=>{Z.hide_color_help({input:t})}})})]}),(0,W.jsxs)(`div`,{className:`palette_link_btns`,children:[t.include_remove_color_btn?(0,W.jsx)(jo,{input:new Es({name:`remove_color`,event_callback:()=>{X.remove_color({input:t})}})}):void 0,(0,W.jsx)(jo,{input:new Es({name:`restore_default_palette`,event_callback:()=>{X.restore_default_palette({input:t})}})})]}),(0,W.jsx)(`div`,{className:`palette_colors`,children:n(data.settings.prefs.colors)?data.settings.prefs.colors.map((e,r)=>(0,W.jsx)(Qo,{input:t,i:r,aria_label:`Open color picker`},r)):void 0}),t.include_ok_btn?(0,W.jsx)(bo,{input:new xs({name:`color_ok_btn`,alt_msg:`OK`,event_callback:()=>X.save({i:`main`,input:t,callback:()=>{t.event_callback({input:t,i:`main`})}})})}):void 0]})})]}),t.include_visualization?(0,W.jsx)(Qo,{input:t,i:`main`,aria_label:`Choose color`}):void 0]})}),t.include_help?(0,W.jsx)(wo,{section_or_input:t}):void 0]});return(0,W.jsx)(Oo,{input:t,input_w:i,include_label:rb(t.include_palette_label)})}),Xo=G(e=>{let t=y(null),r=y(null),i=y(!1);v(()=>err(()=>{let{input:o,i:c}=e;!i.current&&n(o.state)&&o.state[c].is_initialized&&(i.current=!0,a()),n(r.current)&&dc.update({pickr:t.current,color_picker:r.current,input:o,i:c})},`shr_1003`));let a=()=>err_async(async()=>{let{visualization_ref:i}=e;if(n(r.current)&&n(i.current)){let{input:a,i:o}=e;t.current=await dc.init({input:a,i:o,color_picker:r.current,visualization:i.current})}},`shr_1004`),{input:o,i:c}=e;return n(o.state)&&(o.state[c].is_initialized||o.state[c].is_visible)?(0,W.jsxs)(`span`,{className:`inner_w`,children:[(0,W.jsx)(Zo,{is_visible:o.state[c].is_visible,width:x.px(o.color_picker_width),height:x.px(o.color_picker_height)}),(0,W.jsx)(Q,{tag:`span`,name:`fade`,cls:`color_picker_w`,state:o.state[c].is_visible,tr_end_unactive:[()=>{Z.mark_color_picker_as_closed({input:o,i:c,is_closed:!0})}],children:(0,W.jsx)(`span`,{className:x.cls([`color_picker`,o.color_picker_is_closed_visibility_cls({i:c})]),onContextMenu:e=>{e.stopPropagation()},ref:r})})]}):null}),Zo=G(e=>{let{is_visible:t,width:r,height:i}=e;return v(()=>err(()=>{let{is_visible:t}=e;t&&fc.set()},`shr_1005`)),(0,W.jsx)(`span`,{className:`fill_shadow_w`,children:(0,W.jsx)(`span`,{className:`fill_shadow`,style:{width:r,height:i}})})}),Qo=G(e=>{let t=y(null),r=y(null),{input:i,i:a,aria_label:o}=e,c=i.visualization_cls({i:a}),l=i.palette_visualization_cls({i:a});return n(i.state)&&i.state.main,(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`span`,{className:x.cls([c&&`${i.visualization_cls({i:a})}_w`,l&&`${i.palette_visualization_cls({i:a})}_w`,`${a}_visualization_w`,`inset_border`,i.visualization_outline_opened({i:a}),i.visualization_outline_selected({i:a})]),ref:t,onContextMenu:te,children:[(0,W.jsx)(`button`,{className:x.cls([i.visualization_cls({i:a}),i.palette_visualization_cls({i:a}),`${a}_visualization`]),type:`button`,"aria-label":o,tabIndex:i.tab_index(),style:{backgroundColor:X.access({input:i,i:a})},ref:r,onClick:e=>{X.select_palette_color({input:i,i:a},e)},onMouseDown:e=>{Z.change_visibility({input:i,i:a,color_picker_state:`is_visible`},e)},onMouseEnter:e=>{Z.change_visibility({input:i,i:a,color_picker_state:`is_initialized`},e)},onFocus:e=>{Z.change_visibility({input:i,i:a,color_picker_state:`is_initialized`},e)},onKeyDown:e=>{al.simulate_color_visualization_click_on_enter({input:i,i:a},e)},children:globalThis[_.type()].msg(`${a}_color_btn_text`)}),(0,W.jsx)(Xo,{input:i,i:a,visualization_ref:r})]}),a===`main`?(0,W.jsx)(ko,{input:i}):void 0,a===`main`&&i.include_help?(0,W.jsx)(Co,{section_or_input:i}):void 0]})});function $o(e){throw Error(`[mobx-utils] `+e)}function es(e,t){t===void 0&&(t=`Illegal state`),e||$o(t)}var ts=function(e){return e&&e!==Object.prototype&&Object.getOwnPropertyNames(e).concat(ts(Object.getPrototypeOf(e))||[])},ns=function(e){var t=ts(e);return t.filter(function(e,r){return t.indexOf(e)===r})},is=function(e){return ns(e).filter(function(e){return e!==`constructor`&&!~e.indexOf(`__`)})},as=`pending`,os=`fulfilled`,ss=`rejected`;function cs(e){switch(this.state){case as:return e.pending&&e.pending(this.value);case ss:return e.rejected&&e.rejected(this.value);case os:return e.fulfilled?e.fulfilled(this.value):this.value}}function ls(e,t){if(es(arguments.length<=2,`fromPromise expects up to two arguments`),es(typeof e==`function`||typeof e==`object`&&e&&typeof e.then==`function`,`Please pass a promise or function to fromPromise`),e.isPromiseBasedObservable===!0)return e;typeof e==`function`&&(e=new Promise(e));var r=e;return e.then(I(`observableFromPromise-resolve`,function(e){r.value=e,r.state=os}),I(`observableFromPromise-reject`,function(e){r.value=e,r.state=ss})),r.isPromiseBasedObservable=!0,r.case=cs,si(r,{value:t&&(t.state===`fulfilled`||t.state===`pending`)?t.value:void 0,state:as},{},{deep:!1}),r}(function(e){e.reject=I(`fromPromise.reject`,function(t){var r=e(Promise.reject(t));return r.state=ss,r.value=t,r});function t(t){t===void 0&&(t=void 0);var r=e(Promise.resolve(t));return r.state=os,r.value=t,r}e.resolve=I(`fromPromise.resolve`,t)})(ls||={});var us=function(e,t,r,i){var a=arguments.length,o=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,c;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(o=(a<3?c(o):a>3?c(t,r,o):c(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o};(function(){function e(e,t){var r=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),B(this),L(function(){r.current=t,r.subscription=e.subscribe(r)})}return Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(e.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e}}),Object.defineProperty(e.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(e.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e,this.dispose()}}),us([O.ref],e.prototype,`current`,void 0),us([I.bound],e.prototype,`next`,null),us([I.bound],e.prototype,`complete`,null),us([I.bound],e.prototype,`error`,null),e})();var ds=function(){return ds=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},ds.apply(this,arguments)},fs=function(e,t,r,i){var a=arguments.length,o=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,c;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(o=(a<3?c(o):a>3?c(t,r,o):c(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},ps=[`model`,`reset`,`submit`,`isDirty`,`isPropertyDirty`,`resetProperty`];(function(){function e(e){var t=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:O.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:O.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return t.localValues.has(e)}}),B(this),es(ha(e),`createViewModel expects an observable object`);var r=is(this);is(e).forEach(function(i){if(!r.includes(i)&&!(i===D||i===`__mobxDidRunLazyInitializers`)){if(es(ps.indexOf(i)===-1,`The propertyname `+i+` is reserved and cannot be used with viewModels`),bi(e,i)){var a=ka(e,i),o=a.derivation.bind(t),c=a.setter_?.bind(t);t.localComputedValues.set(i,jn(o,{set:c}))}var l=Object.getOwnPropertyDescriptor(e,i),u=l?{enumerable:l.enumerable}:{};Object.defineProperty(t,i,ds(ds({},u),{configurable:!0,get:function(){return bi(e,i)?t.localComputedValues.get(i).get():t.isPropertyDirty(i)?t.localValues.get(i):t.model[i]},set:I(function(r){bi(e,i)?t.localComputedValues.get(i).set(r):r===t.model[i]?t.localValues.delete(i):t.localValues.set(i,r)})}))}})}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;Ci(this.localValues).forEach(function(t){var r=e.localValues.get(t),i=e.model[t];Zi(i)?i.replace(r):U(i)?(i.clear(),i.merge(r)):yi(r)||(e.model[t]=r)}),this.localValues.clear()}}),Object.defineProperty(e.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(e.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.localValues.delete(e)}}),fs([jn],e.prototype,`isDirty`,null),fs([jn],e.prototype,`changedValues`,null),fs([I.bound],e.prototype,`submit`,null),fs([I.bound],e.prototype,`reset`,null),fs([I.bound],e.prototype,`resetProperty`,null),e})();var ms=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})();(function(e){ms(t,e);function t(t,r,i){var a=i===void 0?{}:i,o=a.name,c=o===void 0?`ogm`+(Math.random()*1e3|0):o,l=a.keyToName,u=l===void 0?function(e){return``+e}:l,d=e.call(this)||this;Object.defineProperty(d,"_base",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_ogmInfoKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_groupBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_keyToName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_disposeBaseObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),d._keyToName=u,d._groupBy=r,d._ogmInfoKey=Symbol(`ogmInfo`+c),d._base=t;for(var f=0;f<t.length;f++)d._addItem(t[f]);return d._disposeBaseObserver=Ti(d._base,function(e){if(e.type===`splice`)Ni(function(){for(var t=0,r=e.removed;t<r.length;t++){var i=r[t];d._removeItem(i)}for(var a=0,o=e.added;a<o.length;a++){var c=o[a];d._addItem(c)}});else if(e.type===`update`)Ni(function(){d._removeItem(e.oldValue),d._addItem(e.newValue)});else throw Error(`illegal state`)}),d}return Object.defineProperty(t.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw Error(`not supported`)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw Error(`not supported`)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw Error(`not supported`)}}),Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._disposeBaseObserver();for(var e=0;e<this._base.length;e++){var t=this._base[e];t[this._ogmInfoKey].reaction(),delete t[this._ogmInfoKey]}}}),Object.defineProperty(t.prototype,"_getGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=e.prototype.get.call(this,t);return r===void 0&&(r=O([],{name:`GroupArray[`+this._keyToName(t)+`]`,deep:!1}),e.prototype.set.call(this,t,r)),r}}),Object.defineProperty(t.prototype,"_removeFromGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var i=e.prototype.get.call(this,t);i.length===1?e.prototype.delete.call(this,t):r===i.length-1?i.length--:(i[r]=i[i.length-1],i[r][this._ogmInfoKey].groupArrIndex=r,i.length--)}}),Object.defineProperty(t.prototype,"_addItem",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,r=this._groupBy(e),i=this._getGroupArr(r),a={groupByValue:r,groupArrIndex:i.length,reaction:Xr(function(){return t._groupBy(e)},function(r,i){var a=e[t._ogmInfoKey];t._removeFromGroupArr(a.groupByValue,a.groupArrIndex);var o=t._getGroupArr(r),c=o.length;o.push(e),a.groupByValue=r,a.groupArrIndex=c})};Object.defineProperty(e,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),i.push(e)}}),Object.defineProperty(t.prototype,"_removeItem",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e[this._ogmInfoKey];this._removeFromGroupArr(t.groupByValue,t.groupArrIndex),t.reaction(),delete e[this._ogmInfoKey]}}),t})(ta);var hs=function(){function e(e,t,r,i){Object.defineProperty(this,"base",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"versionChecker",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"closest",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"closestIdx",{enumerable:!0,configurable:!0,writable:!0,value:0});for(var a=this.closest=this.root=e,o=0;o<this.args.length-1&&(a=a.get(t[o]),a);o++)this.closest=a;this.closestIdx=o}return Object.defineProperty(e.prototype,"exists",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertCurrentVersion();var e=this.args.length;return this.closestIdx>=e-1&&this.closest.has(this.args[e-1])}}),Object.defineProperty(e.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.assertCurrentVersion(),!this.exists())throw Error(`Entry doesn't exist`);return this.closest.get(this.args[this.args.length-1])}}),Object.defineProperty(e.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertCurrentVersion();for(var t=this.args.length,r=this.closest,i=this.closestIdx;i<t-1;i++){var a=new Map;r.set(this.args[i],a),r=a}this.closestIdx=t-1,this.closest=r,r.set(this.args[t-1],e)}}),Object.defineProperty(e.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.assertCurrentVersion(),!this.exists())throw Error(`Entry doesn't exist`);var e=this.args.length;this.closest.delete(this.args[e-1]);for(var t=this.root,r=[t],i=0;i<e-1;i++)t=t.get(this.args[i]),r.push(t);for(var i=r.length-1;i>0;i--)r[i].size===0&&r[i-1].delete(this.args[i-1])}}),Object.defineProperty(e.prototype,"assertCurrentVersion",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.versionChecker(this.version))throw Error(`Concurrent modification exception`)}}),e}(),gs=function(){function e(){var e=this;Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"argsLength",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"currentVersion",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"checkVersion",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return e.currentVersion===t}})}return Object.defineProperty(e.prototype,"entry",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.argsLength===-1)this.argsLength=e.length;else if(this.argsLength!==e.length)throw Error(`DeepMap should be used with functions with a consistent length, expected: `+this.argsLength+`, got: `+e.length);return this.currentVersion>=2**53-1&&(this.currentVersion=0),this.currentVersion++,new hs(this.store,e,this.currentVersion,this.checkVersion)}}),e}(),_s=function(){return _s=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},_s.apply(this,arguments)},vs=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var i=Array(e),a=0,t=0;t<r;t++)for(var o=arguments[t],c=0,l=o.length;c<l;c++,a++)i[a]=o[c];return i};function K(e,t){if(t===void 0&&(t=!1),Kr(e))throw Error(`computedFn shouldn't be used on actions`);var r=!1,i=0,a=typeof t==`boolean`?{keepAlive:t}:t,o=new gs;return function(){for(var t=this,c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];var u=o.entry(c);if(u.exists())return u.get().get();if(!a.keepAlive&&!Zn()){!r&&(a.requiresReaction??mr().computedRequiresReaction)&&(console.warn(`Invoking a computedFn from outside a reactive context won't be memoized and is cleaned up immediately, unless keepAlive is set.`),r=!0);var d=e.apply(this,c);return a.onCleanup&&a.onCleanup.apply(a,vs([d],c)),d}var f,p=jn(function(){return f=e.apply(t,c)},_s(_s({},a),{name:`computedFn(`+(a.name||e.name)+`#`+ ++i+`)`}));return u.set(p),a.keepAlive||ti(p,function(){o.entry(c).delete(),a.onCleanup&&a.onCleanup.apply(a,vs([f],c)),f=void 0}),p.get()}}var ys=t(i(),1),bs=t(ne(),1),q=class{name;id=x.unique_id();is_cut=!1;is_visible_key;is_visible=!0;is_visible_conds=[];is_enabled=!0;is_enabled_conds=[];label_is_visible=void 0;parent_disabled=!1;is_in_focus_state=!1;is_in_warn_state=!1;input_errors=[];warn_state_allowed=!1;warn_state_allowed_forced=!0;val_accessor;default_val;is_column_layout=!1;alt_msg;alt_help_msg;alt_title;include_help=!1;help_is_visible=!1;label_val=void 0;side_btns=[];parent;offset=`0`;side_btns_offset_bottom=`0`;form;section;subsection;developer_mode_setting=!1;event_callback;keydown_callback;warn_state_checker;constructor(e){B(this,{is_cut:O,is_visible:O,is_visible_conds:O,is_enabled:O,is_enabled_conds:O,label_is_visible:O,parent_disabled:O,is_in_focus_state:O,is_in_warn_state:O,input_errors:O,warn_state_allowed:O,warn_state_allowed_forced:O,help_is_visible:O,label_val:O,offset:O,side_btns_offset_bottom:O,set_input_errors:I,edit_label_val:I}),Object.assign(this,e),this.name=e.name,this.event_callback=e.event_callback}label_is_visible_computed=K(function({include_label:e}){return n(this.label_is_visible)?this.label_is_visible:e});is_cut_computed=K(function(){return this.is_cut&&data.settings.prefs.enable_cut_features||!this.is_cut});is_visible_computed=K(function(){return this.check_state({state_type:`is_visible`})&&this.is_cut_computed()&&(!this.developer_mode_setting||this.developer_mode_setting&&data.settings.prefs.developer_mode)});is_enabled_computed=K(function(){return this.check_state({state_type:`is_enabled`})});is_enabled_final=()=>err(()=>!this.is_visible_computed()||!this.parent_disabled_computed()&&this.is_enabled_computed(),`shr_1224`);is_enabled_cls=K(function(){return this.is_enabled_final()?``:`is_disabled`});tab_index=K(function(){return this.is_enabled_final()?0:-1});parent_disabled_computed=K(function(){return this.parent_disabled?this.parent_disabled:!1});check_state=({state_type:e})=>err(()=>!(this.check_state_conds({state_conds:this[`${e}_conds`]})||!this[e]),`shr_1220`);check_state_conds=({state_conds:e})=>err(()=>{let t=!(0,bs.default)(e);return n(e)&&t?!e.every(e=>err(()=>e.pass_vals.some(t=>err(()=>{if(n(e.val_accessor)){let r=(0,ys.default)(data,e.val_accessor);return(n(r)?r:``)===t}return data.settings.prefs[e.input_name]===t},`shr_1207`)),`shr_1206`)):!1},`shr_1219`);set_input_errors=({input_errors:e})=>err(()=>{this.input_errors=e},`shr_1241`);is_column_layout_cond=()=>err(()=>this.is_column_layout?`is_column_layout`:``,`shr_1306`);edit_label_val=({parent_input:e},t)=>err(()=>{let r=t.target.value;n(r)&&(e.label_val=r)},`shr_1307`);icon_btn_title=()=>err(()=>this instanceof Ts?Qs.alt_msg({input:this,suffix:`btn_title`}):``,`shr_1322`);text_btn_title=({name:e})=>err(()=>Qs.alt_title({input:this,suffix:`${e}_text_btn_title`}),`shr_1328`);icon_btn_text=({input:e}={})=>err(()=>Qs.alt_msg({input:n(e)?e:this,suffix:`link_btn_text`}),`shr_1326`);side_btn_title=({name:e,alt_title:t})=>err(()=>n(t)?t:globalThis[_.type()].msg(`${e}_side_btn_title`),`shr_1327`);cut_features_is_visible_computed=K(function(){return this.is_visible_computed()&&(this.is_cut&&data.settings.prefs.enable_cut_features||!this.is_cut)})},xs=class extends q{type=`btn`;btn_type=`btn`;constructor(e){super(e),Object.assign(this,e)}btn_text=()=>err(()=>Qs.alt_msg({input:this,suffix:`btn_text`}),`shr_1321`)},Ss=class extends q{type=`checkbox`;constructor(e){super(e),Object.assign(this,e)}width_accessed=K(function(){return n(this.section)?J.width:`auto`})},Cs=class extends q{type=`file`;accept;multiple=!1;save_callback;constructor(e){super(e),Object.assign(this,e),this.accept=e.accept,this.save_callback=e.save_callback}},ws=class{name;id=x.unique_id();type=`hr`;constructor(e){Object.assign(this,e),this.name=e.name}},Ts=class extends q{type=`icon_btn`;Svg=``;include_label=!1;constructor(e){super(e),Object.assign(this,e)}},Es=class extends q{type=`link_btn`;constructor(e){super(e),Object.assign(this,e)}},Ds=class{name;type=`label`;constructor(e){Object.assign(this,e),this.name=e.name}},Os=class{name;id=x.unique_id();name_clean;type=`link`;label_type=`text`;browser;href;Svg=``;target=`_blank`;alt_msg;force_resolve=!1;constructor(e){Object.assign(this,e),this.name=e.name,this.name_clean=e.name.replace(/i\d+i/,``)}link_text=()=>err(()=>n(this.alt_msg)?this.alt_msg:rs(globalThis[_.type()].msg(`${this.name_clean}_link_text`)||globalThis[_.type()].msg(`${this.name_clean}_${this.browser}_link_text`)),`shr_1069`);href_final=()=>err(()=>{let e=n(this.href)?this.href:globalThis[_.type()].msg(`${this.name_clean}_link_href`)||globalThis[_.type()].msg(`${this.name_clean}_${this.browser}_link_href`)||globalThis[_.type()].msg(`offer_${this.name_clean}_${this.browser}_link_href`);return n(e)?e:``},`shr_1070`);show_link=()=>err(()=>{let e=!n(this.browser),t=this.browser===env.browser;return e||!t||n(this.force_resolve)&&this.force_resolve},`shr_1071`);link_title=()=>err(()=>this.label_type===`svg`?Qs.alt_msg({input:this,suffix:`link_title`}):``,`shr_1324`)},ks=class{name;val;alt_msg;constructor(e){Object.assign(this,e),this.name=e.name,this.val=n(e.val)?e.val:e.name}},As=class extends q{type=`range`;min=0;max=100;step=1;constructor(e){super(e),Object.assign(this,e)}displayed_val=K(function({input:e}){return n(e.step)?Math.round(Y.access({input:e})/e.step):0});lower_fill_percentage=K(function({input:e}){let t=e.displayed_val({input:e}),r=n(e.max)&&n(e.step)?e.max/e.step:0;return 100*t/r});lower_fill_width=K(function({input:e}){return`${e.lower_fill_percentage({input:e})}%`});help_is_present_cls=K(function({input:e}){return e.include_help?`help_is_present`:``})},js=class{name;include_help=!1;help_is_visible=!1;content_is_visible=!1;content_is_hideable=!1;alt_msg;alt_help_msg;inputs;available=!0;unavailable_msg=``;include_offers=!1;offer_banner_type=`horizontal`;subsections;change_visibility_of_content_save_callback;constructor(e){B(this,{help_is_visible:O,content_is_visible:O,available:O,set_content_is_visible:I,change_visibility_of_content:I}),Object.assign(this,e),this.name=e.name,this.inputs=e.inputs,Object.values(e.inputs).forEach(e=>{e.section=this.name})}visibility_cls=K(function({section:e}){return e.name===Sc.current_section?``:`hidden`});show_content_link_btn_is_visible=K(function(){return n(this.content_is_visible)&&!this.content_is_visible});hide_content_link_btn_is_visible=K(function(){return n(this.content_is_visible)&&this.content_is_visible});set_content_is_visible=()=>err_async(async()=>{this.content_is_visible=data.settings.prefs[`${this.name}_section_content_is_visible`]},`shr_1265`);change_visibility_of_content=()=>err_async(async()=>{this.content_is_visible=!this.content_is_visible,n(this.change_visibility_of_content_save_callback)&&this.change_visibility_of_content_save_callback({bool:this.content_is_visible})},`shr_1264`);section_unavailable_msg_text=()=>err(()=>globalThis[_.type()].msg(`${this.unavailable_msg}_section_unavailable_msg_text`)||this.unavailable_msg,`shr_1326`)},Ms=class extends q{type=`select`;options={};constructor(e){super(e),B(this,{options:O}),Object.assign(this,e),this.options=e.options}option_text=({i:e})=>err(()=>{let t=this.options[this.name][e];return t.alt_msg||globalThis[_.type()].msg(`${t.name}_option_text`)||t.name},`shr_1072`)},Ns=class extends q{type=`form`;action;inputs;constructor(e){super(e),Object.assign(this,e),this.action=e.action,this.inputs=e.inputs}},Ps=class extends q{type=`group`;inputs;content_is_visible_val_accessor;content_is_visible_default=!0;editing_label=!1;use_group_id_on_child_inputs=!1;constructor(e){super(e),B(this,{editing_label:O}),Object.assign(this,e),this.inputs=e.inputs}content_is_visible_computed=K(function(){if(n(this.content_is_visible_default)){if(n(this.content_is_visible_val_accessor)){let e=(0,ys.default)(data,this.content_is_visible_val_accessor);if(n(e))return e===!0||e===1}return this.content_is_visible_default}return!0});content_is_visible_cls=K(function(){return this.content_is_visible_computed()?``:`hidden`});content_is_visible_margin_cls=K(function(){return this.type!==`group`||this.content_is_visible_computed()?``:`margin_bottom_0`});is_column_layout_cond=()=>err(()=>this.is_column_layout?`is_column_layout`:``,`shr_1336`);get_input=({child_input:e})=>err(()=>this.use_group_id_on_child_inputs?this:e,`shr_1335`)},Fs=class extends q{type=`text`;text_type=`text`;allow_removing_val=!0;placeholder=``;autocomplete=`off`;text_btns=[];remove_val_callback;paste_callback=()=>void 0;constructor(e){super(e),B(this,{placeholder:O,text_btns:O}),Object.assign(this,e),n(this.text_btns)&&this.text_btns.forEach((e,t)=>err(()=>{n(this.text_btns)&&(this.text_btns[t].visibility_cond=n(this.text_btns[t].visibility_cond)?this.text_btns[t].visibility_cond:()=>!0)},`shr_1208`)),this.remove_val_callback=e.remove_val_callback}val_computed=K(function({input:e,parent_input:t}){return n(t)&&n(t.label_val)?t.label_val:Y.access({input:e})});remove_val_btn_is_visible=K(function({input:e}){return n(e.allow_removing_val)&&e.allow_removing_val&&Y.access({input:e})!==``});prevent_number_val_changeon_scroll=({input:e})=>err_async(async()=>{if(n(document.activeElement)&&e.text_type===`number`){let e=document.activeElement;e.blur(),await x.delay(0),e.focus()}},`shr_1298`)},Is=class extends q{type=`textarea`;constructor(e){super(e),Object.assign(this,e)}},Ls=class extends q{type=`upload_box`;multiple=!1;accept=`.png,.jpg,.jpeg,.gif`;loading_msg_is_visible=!1;error_msg_is_visible=!1;is_in_hover_state=!1;drag_counter=0;filenames_are_visible=!1;filenames=``;clear_val_on_upload=!0;constructor(e){super(e),B(this,{loading_msg_is_visible:O,error_msg_is_visible:O,is_in_hover_state:O,filenames:O}),Object.assign(this,e)}loading_msg_visibility_cls=K(function(){return this.loading_msg_is_visible?``:`none`});error_msg_visibility_cls=K(function(){return this.error_msg_is_visible?``:`none`});loading_cls=K(function(){return this.loading_msg_is_visible?`loading`:``});filenames_final=K(function(){return rb(this.filenames_are_visible)&&n(this.filenames)?this.filenames:``})},Rs=e({Btn:()=>xs,Checkbox:()=>Ss,File:()=>Cs,Form:()=>Ns,Group:()=>Ps,Hr:()=>ws,IconBtn:()=>Ts,InputBase:()=>q,Label:()=>Ds,Link:()=>Os,LinkBtn:()=>Es,Option:()=>ks,Range:()=>As,Section:()=>js,Select:()=>Ms,Text:()=>Fs,Textarea:()=>Is,UploadBox:()=>Ls}),zs={is_initialized:!1,is_visible:!1,is_closed:!0},Bs=class extends q{type=`color`;include_visualization=!0;include_palette_label=!1;palette_is_visible=!1;palette_is_closed=!0;palette_width=`0`;palette_height=`0`;color_picker_width=`0`;color_picker_height=`0`;include_remove_color_btn=!1;include_ok_btn=!1;state={main:zs,...Array(X.palette_color_amount).fill(zs).reduce((e,t,r)=>(e[r]=t,e),{})};select_palette_color_callback;remove_color_callback;restore_default_palette_callback;hide_color_help_callback;constructor(e){super(e),B(this,{palette_is_visible:O,palette_is_closed:O,palette_width:O,palette_height:O,color_picker_width:O,color_picker_height:O,state:O}),Object.assign(this,e),this.select_palette_color_callback=e.select_palette_color_callback,this.remove_color_callback=e.remove_color_callback,this.restore_default_palette_callback=e.restore_default_palette_callback,this.hide_color_help_callback=e.hide_color_help_callback}is_palette_color=({i:e})=>err(()=>typeof e==`number`,`shr_1030`);visualization_cls=({i:e})=>err(()=>e===`main`?`visualization`:``,`shr_1031`);palette_visualization_cls=({i:e})=>err(()=>e===`main`?``:`palette_visualization`,`shr_1032`);inset_border_cls=({i:e})=>err(()=>e===`main`?``:`inset_border`,`shr_1033`);el_to_show_type=({i:e})=>err(()=>e===`main`?`color_picker_or_palette`:`color_picker`,`shr_1034`);color_picker_is_visible=K(function({i:e}){return n(this.state)&&this.state[e].is_visible});palette_w_is_visible=K(function(){return this.include_visualization?this.palette_is_visible:!0});visualization_outline_opened=K(function({i:e}){return e===`main`&&this.palette_is_visible||n(this.state)&&this.state[e].is_visible?`opened`:``});visualization_outline_selected=K(function({i:e}){return this.is_palette_color({i:e})&&e===(n(this.val_accessor)?(0,ys.default)(data,this.val_accessor):data.settings.prefs[this.name])?`selected`:``});palette_visualization_outline_selected=K(function({i:e}){return e===data.settings.prefs.selected_palette_color?`selected`:``});color_picker_is_closed_visibility_cls=K(function({i:e}){return n(this.state)&&this.state[e].is_closed?`none`:``});palette_is_closed_visibility_cls=K(function(){return this.palette_is_closed?`none`:``});color_help_visibility_cls=K(function(){return Z.color_help_is_visible?``:`none`})},Vs=e({Color:()=>Bs}),Hs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{change_visibility:I})}change_visibility=({section_or_input:e})=>err(()=>{let t=e;t.help_is_visible=!t.help_is_visible},`shr_1045`);width_style=K(function({section_or_input:e}){let t=e.section,r=n(t);if(n(t))return r?J.width_style({input:e}):``});msg=K(function({section_or_input:e}){let t=env.env===`ext`?`ext`:`app`,r=n(e.alt_help_msg)?globalThis[t].msg(e.alt_help_msg)||e.alt_help_msg:globalThis[t].msg(`${e.name}_help_text`),i=/@(.*?)@/gm,a=Array.from(r.matchAll(i)).map(e=>err(()=>`<a class='link help' href='${globalThis[t].msg(`${e[1]}_help_link_href`)}' target='_blank' rel='noopener noreferrer'>${globalThis[t].msg(`${e[1]}_help_link_text`)}</a>`,`shr_1313`)),o=0;return r.replace(i,()=>err(()=>{let e=a[o];return o+=1,e},`shr_1314`))});help_msg=({msg:e})=>err(()=>n(e)?e:``,`shr_1323`)}.get_instance(),Us=class{static instance;static get_instance(){return this.instance||=new this}input_error_is_visible=K(function({input:e}){return n(e.is_in_warn_state)&&e.is_in_warn_state&&n(e.input_errors)&&e.input_errors.length!==0});input_error_visibility_cls=K(function({input:e}){return this.input_error_is_visible({input:e})?``:`hidden`});input_error=K(function({input:e}){return n(e.input_errors)?e.input_errors.reduce((e,t)=>`${e}\r\n${globalThis[_.type()].msg(`${t}_input_error_text`)}`,``).substring(2):``})}.get_instance(),Ws=r(((e,t)=>{var r=p();function i(e,t,i){for(var a=-1,o=e.length;++a<o;){var c=e[a],l=t(c);if(l!=null&&(u===void 0?l===l&&!r(l):i(l,u)))var u=l,d=c}return d}t.exports=i})),Gs=r(((e,t)=>{function r(e,t){return e>t}t.exports=r})),Ks=t(r(((e,t)=>{var r=Ws(),i=Gs(),o=a();function c(e,t){return e&&e.length?r(e,o(t,2),i):void 0}t.exports=c}))(),1),J=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{width:O,max_width_ob:O,resize_textarea_with_resize_handle:I})}width=0;min_width=0;max_width=0;max_width_ob={};old_width=0;width_style=K(function({input:e,input_w:t,calculate_width:r=!0}){if(r&&n(e.section)){let e=err(()=>this.width!==0&&n(this.width)&&(!n(t)||n(t)&&x.matches(t,`.checkbox`)&&t.offsetWidth>this.width)?x.px(this.width):`auto`,`shr_1236`);if(e!==`auto`)return e}return`auto`});calculate_width_cls=({calculate_width:e})=>err(()=>e?`calculate_width`:``,`shr_1255`);set_min_and_max_width=({min_width:e}={})=>err(()=>{this.min_width=n(e)?e:+globalThis[_.type()].msg(`input_min_width_css`),this.max_width=+globalThis[_.type()].msg(`input_max_width_css`)},`shr_1239`);calculate=({set_all_inputs_to_msg_input_min_width_css:e=!1}={})=>new Promise(t=>{this.set_min_and_max_width(),globalThis.requestAnimationFrame(()=>err(()=>{let r=sa(`.section .input_item .input_w.calculate_width, .section .input_item .label_in_input_item`);L(()=>err(()=>{this.width=0},`shr_1046`));let i=()=>err(()=>(0,Ks.default)(r,e=>{let t=x.closest(e,`.input_item, .btn_w`);return x.matches(t,`.checkbox`)?0:e.offsetWidth}),`shr_1047`);globalThis.requestAnimationFrame(()=>err_async(async()=>{await x.delay(0);let r=i();if(n(r)){let t=r.offsetWidth<this.min_width?this.min_width:r.offsetWidth,i=t>this.max_width?this.max_width:t;e?L(()=>err(()=>{this.width=this.min_width},`shr_1316`)):i===this.old_width?L(()=>err(()=>{this.width=i},`shr_1048`)):(this.old_width=i,await this.calculate())}t()},`shr_1049`))},`shr_1050`))});resize_textarea_with_resize_handle=({input:e,textarea:t})=>err(()=>{if(n(t)){let r=x.closest(t,`.inputs`),i=x.closest(t,`.input_item`);if(n(r)&&n(i)){let t=sb(i,`.help_btn`),a=x.get_float_css_val(r,`width`),o=x.get_numeric_css_val(i,`margin-left`),c=parseInt(se.get({name:`help_btn_size`}),10),l=parseInt(se.get({name:`help_btn_margin`}),10),u=a-o,d=n(t)?u-(c+l):u;this.max_width_ob[e.name]=x.px(d)}}},`shr_1238`)}.get_instance(),qs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{toggle_edit_label_state:I})}msg=K(function({input:e}){return e.alt_msg||globalThis[_.type()].msg(`${e.name}_label_text`)||x.underscore_to_readable(e.name)});label_text_computed=K(function({input:e}){return e.type===`group`&&n(e.label_val)?e.label_val:qs.msg({input:e})});toggle_edit_label_state=({input:e,callback:t})=>err(()=>{if(n(e.val_accessor)){let r=e.val_accessor.split(`.`);e.label_val=n(e.label_val)?e.label_val:r[r.length-1],e.editing_label?e.editing_label=!1:e.editing_label=!0,t({input:e})}},`shr_1306`);id=({input:e,id:t})=>err(()=>n(t)?t:e.id,`shr_1317`);content_is_visible_margin_cls=({input:e})=>err(()=>n(e.content_is_visible_margin_cls)?e.content_is_visible_margin_cls():``,`shr_1332`)}.get_instance(),Js=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{calculate_offset:I,set_parent_disbled_vals:I})}calculate_offset=({input:e})=>err(()=>{let t=0,r=n(e.parent);if(r){let r=s(`.${e.parent}`);n(r)&&(t=x.get_numeric_css_val(r,`margin-left`))}e.offset=(r?t+28:0).toString()},`shr_1054`);set_parent_disbled_vals=({input:e,sections:t,set_to_all_sections:r=!1})=>err(()=>{let i=({section:t})=>err(()=>{Object.values(t.inputs).forEach(i=>err(()=>{let a=i,o=[],c=()=>err(()=>{if(n(a)){let l=Object.values(t.inputs).find(e=>err(()=>e.name===a.parent,`shr_1055`));if(n(l))a=l,o.push(a.name),c();else{let t=!o.every(e=>err(()=>n(a.val_accessor)?(0,ys.default)(data,a.val_accessor):data.settings.prefs[e],`shr_1056`));i.parent_disabled=e.section===Sc.current_section||r?t:i.parent_disabled}}},`shr_1057`);n(a.parent)&&c(),i.type===`group`&&n(i.inputs)&&Object.values(i.inputs).forEach(e=>err(()=>{e.parent_disabled=!i.is_enabled},`shr_1263`))},`shr_1058`))},`shr_1196`);if(r)Object.values(t).forEach(e=>err(()=>{i({section:e})},`shr_1197`));else if(Sc.current_section!==``){let e=t[Sc.current_section];i({section:e})}},`shr_1059`);set_all_parents_disbled_vals=({sections:e,set_to_all_sections:t=!1})=>err(()=>{Object.values(e).forEach(r=>err(()=>{Object.values(r.inputs).forEach(r=>err(()=>{this.set_parent_disbled_vals({input:r,sections:e,set_to_all_sections:t})},`shr_1060`))},`shr_1061`))},`shr_1062`)}.get_instance(),Ys=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}msg=K(function({section:e}){return globalThis[_.type()].msg(`${e.name}_section_text`)||x.underscore_to_readable(e.name)})}.get_instance(),Xs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{set_side_btns_offset_bottom_val:I})}is_enabled_cls=K(function({name:e,input:t}){if(n(t.side_btns)){let r=t.side_btns.find(t=>err(()=>t.name===e,`shr_1337`));if(n(r)&&n(r.is_enabled_cond))return r.is_enabled_cond({input:t})?``:`is_disabled`}return``});set_side_btns_offset_bottom_val=({input:e,el:t},r)=>err(()=>{if(n(t)||n(r)){let i=({el_classname:t})=>err(()=>{let r=sb(c,`.${t}`),i=(t===`input_error`?e.is_in_warn_state:e.help_is_visible)?rn(x.get_numeric_css_val(r,`height`)):0;return{height:i,margin_top:i===0?0:rn(x.get_numeric_css_val(r,`margin-top`))}},`shr_1311`),a=n(t)?t:void 0,o=n(r)?r.target:a,c=x.closest(n(t)?t:o,`.input_item`),l=i({el_classname:`input_error`}),u=i({el_classname:`help`});e.side_btns_offset_bottom=`${l.height+u.height+l.margin_top+u.margin_top}px`}},`shr_1310`);set_side_btns_offset_bottom_val_help_tr_end=({section_or_input:e},t)=>err(()=>{`section`in e&&!e.help_is_visible&&this.set_side_btns_offset_bottom_val({input:e},t)},`shr_1312`)}.get_instance(),Zs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}tab_index=({section_or_input:e})=>err(()=>`type`in e?e.tab_index():0,`shr_1331`)}.get_instance(),Qs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}alt_msg=({input:e,suffix:t})=>err(()=>n(e.alt_msg)?e.alt_msg:globalThis[_.type()].msg(`${e.name}_${t}`),`shr_1320`);alt_title=({input:e,suffix:t})=>err(()=>n(e.alt_title)?e.alt_title:globalThis[_.type()].msg(`${e.name}_${t}`),`shr_1320`)}.get_instance(),$s=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set_placeholder_text=I(({input:e,msg_key:t})=>err(()=>{e.placeholder=globalThis[_.type()].msg(t)},`shr_1203`));clear_placeholder_text=I(({input:e})=>err(()=>{e.placeholder=``},`shr_1213`));set_loading_placeholder_text=I(({input:e})=>err(()=>{this.set_placeholder_text({input:e,msg_key:`loading_msg_text`})},`shr_1204`));set_error_placeholder_text=I(({input:e})=>err(()=>{this.set_placeholder_text({input:e,msg_key:`an_error_occured_msg`})},`shr_1205`))}.get_instance(),ec=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{highlight:I,unhighlight:I,set_filenames:I})}upload_files=I((e,{input:t,file_input:r})=>err_async(async()=>{e.preventDefault(),t.error_msg_is_visible=!1,t.loading_msg_is_visible=!0,t.drag_counter=0,t.is_in_hover_state=!1;let i=n(e.dataTransfer)?e.dataTransfer.files:e.target.files;this.set_filenames({input:t,files:i});try{await t.event_callback({input:t,files:n(e.dataTransfer)?e.dataTransfer.files:e.target.files})}catch(e){n(e)&&show_err_ribbon(e,`shr_1202`,{silent:!0}),L(()=>err(()=>{t.error_msg_is_visible=!0},`shr_1200`))}L(()=>err(()=>{t.loading_msg_is_visible=!1},`shr_1201`)),n(r)&&(t.clear_val_on_upload?r.value=``:n(i)&&Y.set({val:i,input:t})),await Y.set_warn_state({input:t})},`shr_1199`));highlight=({input:e})=>err(()=>{n(e.drag_counter)&&(e.drag_counter+=1,e.is_in_hover_state=!0)},`shr_1211`);unhighlight=({input:e})=>err(()=>{n(e.drag_counter)&&(--e.drag_counter,e.drag_counter===0&&(e.is_in_hover_state=!1))},`shr_1212`);set_filenames=({input:e,files:t})=>err(()=>{n(t)&&(e.filenames=e.filenames_are_visible?[...t].reduce((e,t,r)=>`${r===0?t.name:`${e}, ${t.name}`}`,``):``)},`shr_1256`)}.get_instance(),tc=r(((e,t)=>{var r=re(),i=c(),a=l(),u=d(),f=o();function p(e,t,o,c){if(!u(e))return e;t=i(t,e);for(var l=-1,d=t.length,p=d-1,m=e;m!=null&&++l<d;){var h=f(t[l]),g=o;if(h===`__proto__`||h===`constructor`||h===`prototype`)return e;if(l!=p){var ee=m[h];g=c?c(ee,h,m):void 0,g===void 0&&(g=u(ee)?ee:a(t[l+1])?[]:{})}r(m,h,g),m=m[h]}return e}t.exports=p})),nc=t(r(((e,t)=>{var r=tc();function i(e,t,i){return e==null?e:r(e,t,i)}t.exports=i}))(),1),Y=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{warn_state:O,set_focus_state:I,remove_val:I})}previous_val;set_focus_state=({input:e,state:t})=>err(()=>{let r=e;r.is_in_focus_state=t},`shr_1063`);set_warn_state=({input:e})=>err_async(async()=>{let t=!1,r=e;n(e.warn_state_checker)&&(t=await e.warn_state_checker({input:e}));let i=n(t);L(()=>err(()=>{i&&(r.is_in_warn_state=r.warn_state_allowed_forced&&e.warn_state_allowed&&t)},`shr_1240`))},`shr_1063`);focus_state=K(function({input:e}){return e.is_in_focus_state?`is_in_focus_state`:``});warn_state=K(function({input:e}){return e.is_in_warn_state?`is_in_warn_state`:``});access=({input:e})=>err(()=>{let t=e,r=n(e.default_val)?e.default_val:``;if(n(e.val_accessor)){let i=(0,ys.default)(data,e.val_accessor),a=n(i)?i:``;return L(()=>err(()=>{a!==``&&(t.warn_state_allowed=!0)},`shr_1244`)),a===``?r:a}let i=n(data.settings.prefs[e.name])?data.settings.prefs[e.name]:``;return L(()=>err(()=>{i!==``&&(t.warn_state_allowed=!0)},`shr_1245`)),i===``?r:i},`shr_1064`);change=({input:e},t)=>err(()=>{this.previous_val=this.access({input:e}),e.type===`checkbox`?this.set({val:t.target.checked,input:e}):this.set({val:t.target.value,input:e}),e.event_callback({input:e})},`shr_1065`);set=I(({val:e,input:t})=>err(()=>{n(t.val_accessor)?(0,nc.default)(data,t.val_accessor,e):data.settings.prefs[t.name]=e},`shr_1066`));remove_val=I(({input:e,parent_input:t,input_el:r})=>err_async(async()=>{!n(t)||!n(t.label_val)?(n(r)&&r.focus(),n(e.val_accessor)&&this.set({val:``,input:e}),n(e.val_accessor)?(0,nc.default)(data,e.val_accessor,``):data.settings.prefs[e.name]=``,n(e.remove_val_callback)&&e.remove_val_callback({input:e}),await Y.set_warn_state({input:e})):t.label_val=``},`shr_1067`));validate_input=({input:e})=>err(()=>{let t=Y.access({input:e});return e.name===`transition_duration`&&typeof t==`string`?!/^(?!0)[1-9][0-9]*$/.test(t):!1},`shr_1068`);text_and_textarea_on_input=({input:e,parent_input:t},r)=>err_async(async()=>{!n(t)||n(t)&&!n(t.label_val)?(Y.change({input:e},r),await Y.set_warn_state({input:e})):n(e.edit_label_val)&&e.edit_label_val({parent_input:t},r)},`shr_1254`);on_keydown=({input:e,parent_input:t},r)=>err_async(async()=>{n(e.keydown_callback)&&e.keydown_callback({input:e,parent_input:t},r)},`shr_1315`)}.get_instance(),rc=e({Help:()=>Hs,InputError:()=>Us,InputWidth:()=>J,LabelInInputItem:()=>qs,NestedInput:()=>Js,SectionBtn:()=>Ys,SideBtn:()=>Xs,TabIndex:()=>Zs,Text:()=>$s,TextTitle:()=>Qs,UploadBox:()=>ec,Val:()=>Y}),ic=r(((e,t)=>{var r=u(),i=f(),a=`[object Number]`;function o(e){return typeof e==`number`||i(e)&&r(e)==a}t.exports=o})),ac=t(r(((e,t)=>{var r=ic();function i(e){return r(e)&&e!=+e}t.exports=i}))(),1),X=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{set:I,select_palette_color:I,restore_default_palette:I})}palette_color_amount=Object.keys(ae.default_colors).length;previous_color=``;access=({input:e,i:t})=>err(()=>{if(t===`main`){let t=n(e.val_accessor)?(0,ys.default)(data,e.val_accessor):data.settings.prefs[e.name];return this.val_is_palette_color({input:e})?data.settings.prefs.colors[t]:t}return data.settings.prefs.colors[t]},`shr_1006`);access_from_val=({val:e})=>err(()=>typeof e==`number`?data.settings.prefs.colors[e]:e,`shr_1007`);set=({input:e,i:t,color:r})=>err(()=>{t===`main`?n(e.val_accessor)?(0,nc.default)(data,e.val_accessor,r):data.settings.prefs[e.name]=r:data.settings.prefs.colors[t]=r},`shr_1008`);save=({input:e,i:t,callback:r})=>err(()=>{this.set_previous_color({input:e,i:t}),t===`main`?Z.hide_main_and_palette({input:e}):Z.hide_palette_color_pickers({input:e}),r({input:e,i:t})},`shr_1009`);restore_old_color=()=>err(()=>{let e=Z;if(n(e.previously_visible_input)&&n(e.previously_visible_color_picker_i)){let t=e.previously_visible_color_picker_i!==`main`&&typeof this.previous_color==`number`?data.settings.prefs.colors[this.previous_color]:this.previous_color;this.set({input:e.previously_visible_input,i:e.previously_visible_color_picker_i,color:t})}else this.previous_color===``&&n(e.visible_input)&&this.set({input:e.visible_input,i:`main`,color:this.previous_color})},`shr_1010`);convert_pickr_color_to_rgb_string=({pickr_color:e})=>err(()=>{let{round:t}=Math,r=e.toRGBA();return`rgb(${t(r[0])} ${t(r[1])} ${t(r[2])})`},`shr_1011`);filter_palette_colors=({obj:e})=>err(()=>Object.keys(e).filter(e=>!(0,ac.default)(+e)),`shr_1012`);select_palette_color=({input:e,i:t},r)=>err(()=>{r.detail!==0&&e.is_palette_color({i:t})&&(n(e.val_accessor)?(0,nc.default)(data,e.val_accessor,t):data.settings.prefs[e.name]=t,this.previous_color=t,Z.previously_visible_input=e,Z.previously_visible_color_picker_i=t,e.select_palette_color_callback({input:e,i:t}))},`shr_1013`);val_is_palette_color=({input:e})=>err(()=>typeof(n(e.val_accessor)?(0,ys.default)(data,e.val_accessor):data.settings.prefs[e.name])==`number`,`shr_1014`);set_previous_color=({input:e,i:t})=>err(()=>{let r=n(e.val_accessor)?(0,ys.default)(data,e.val_accessor):data.settings.prefs[e.name];this.previous_color=t===`main`?r:X.access({input:e,i:t})},`shr_1015`);remove_color=({input:e})=>err(()=>{X.set({input:e,i:`main`,color:``}),this.reset_previous_vars(),e.remove_color_callback({input:e})},`shr_1016`);restore_default_palette=({input:e,default_colors:t})=>err(()=>{globalThis.confirm(globalThis[_.type()].msg(`restore_default_palette_confirm`))&&(data.settings.prefs.colors=n(t)?t:ae.default_colors,this.reset_previous_vars(),e.restore_default_palette_callback({default_colors:data.settings.prefs.colors}))},`shr_1017`);reset_previous_vars=()=>err(()=>{X.previous_color=``,Z.previously_visible_input=void 0,Z.previously_visible_color_picker_i=void 0},`shr_1018`)}.get_instance(),Z=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{color_help_is_visible:O,mark_color_picker_as_closed:I,mark_palette_as_closed:I,hide_main_and_palette:I,hide_palette_color_pickers:I})}visible_input;previously_visible_input;previously_visible_color_picker_i;visualization_of_visible_input;color_help_is_visible=!0;mark_color_picker_as_closed=({input:e,i:t,is_closed:r})=>err(()=>{n(e.state)&&(e.state[t].is_closed=r)},`shr_1019`);mark_palette_as_closed=({input:e,is_closed:t})=>err(()=>{e.palette_is_closed=t},`shr_1020`);change_visibility=({input:e,i:t,color_picker_state:r},i)=>err_async(async()=>{await x.delay(30),L(()=>err(()=>{let a=e,o=e.is_palette_color({i:t}),c=`button`in i?i.button:!1,l=c===0&&e.el_to_show_type({i:t})===`color_picker_or_palette`&&r===`is_visible`,u=!1,d=!1;if(n(a.state)){if(l?u=!a.palette_is_visible:l||(d=!a.state[t][r]),r===`is_visible`){if(o){if(n(this.previously_visible_color_picker_i)){let e=this.previously_visible_color_picker_i;a.state[e][r]=!1}}else n(this.visible_input)&&(this.hide_main_and_palette({input:this.visible_input}),this.hide_palette_color_pickers({input:this.visible_input}));(c===2||t===`main`)&&n(this.previously_visible_input)&&n(this.previously_visible_color_picker_i)&&X.restore_old_color()}l?(a.palette_is_visible=u,u&&this.mark_palette_as_closed({input:a,is_closed:!1})):(c===2||r===`is_initialized`)&&(d&&(a.state[t][r]=d,r===`is_visible`&&(X.set_previous_color({input:e,i:t}),this.mark_color_picker_as_closed({input:a,i:t,is_closed:!1}))),r===`is_visible`&&d&&(this.previously_visible_input=e,this.previously_visible_color_picker_i=t)),r===`is_visible`&&(this.visible_input=a)}},`shr_1021`))},`shr_1022`);hide_main_and_palette=({input:e})=>err(()=>{let t=e;n(t.state)&&(t.state.main.is_visible=!1),t.palette_is_visible=!1},`shr_1023`);hide_palette_color_pickers=({input:e})=>err(()=>{let t=e;n(t.state)&&X.filter_palette_colors({obj:t.state}).forEach((e,r)=>err(()=>{n(t.state)&&e!==`main`&&(t.state[r].is_visible=!1)},`shr_1024`))},`shr_1025`);hide_all=e=>err(()=>{let t=x.closest(e.target,`.visualization, .palette_visualization`),r=!!x.closest(e.target,`.color_picker_w`),i=!!x.closest(e.target,`.palette`),a=t===this.visualization_of_visible_input||!n(this.visualization_of_visible_input);t&&(this.visualization_of_visible_input=t),!r&&!a&&(n(this.visible_input)&&(i||this.hide_main_and_palette({input:this.visible_input}),this.hide_palette_color_pickers({input:this.visible_input})),n(this.previously_visible_input)&&n(this.previously_visible_color_picker_i)&&(!t||e.button===0)&&X.restore_old_color())},`shr_1026`);hide_color_picker_or_palette_on_esc=e=>err(()=>{if(n(this.visible_input)&&n(this.visible_input.state)&&e.code===`Escape`){let e=X.filter_palette_colors({obj:this.visible_input.state}).some((e,t)=>err(()=>this.visible_input&&n(this.visible_input.state)&&e!==`main`?this.visible_input.state[t].is_visible:!1,`shr_1027`));this.visible_input.palette_is_visible&&e?this.hide_palette_color_pickers({input:this.visible_input}):this.hide_main_and_palette({input:this.visible_input})}},`shr_1028`);hide_color_help=({input:e})=>err(()=>{data.settings.prefs.color_help_is_visible=!1,e.hide_color_help_callback()},`shr_1029`);hide_color_help_tr_end=()=>err(()=>{this.color_help_is_visible=!1},`shr_1210`)}.get_instance(),oc=e({Color:()=>X,Visibility:()=>Z}),sc=({input:e,id:t,calculate_width:r=!0,include_label:i=!0})=>err(()=>{let a;return e.type===`color`?a=(0,W.jsx)(Yo,{input:e}):e.type===`text`?a=(0,W.jsx)(Wo,{input:e,id:t,calculate_width:r,include_label:i}):e.type===`textarea`?a=(0,W.jsx)(Go,{input:e,id:t,calculate_width:r,include_label:i}):e.type===`select`?a=(0,W.jsx)(Ro,{input:e,calculate_width:r,id:t,include_label:i}):e.type===`range`?a=(0,W.jsx)(Po,{input:e,id:t,calculate_width:r,include_label:i}):e.type===`checkbox`?a=(0,W.jsx)(xo,{input:e,id:t,calculate_width:r}):e.type===`link`?a=(0,W.jsx)(No,{link:e}):e.type===`btn_group`||(e.type===`btn`?a=(0,W.jsx)(bo,{input:e}):e.type===`icon_btn`?a=(0,W.jsx)(Eo,{input:e,include_label:i}):e.type===`label`?a=(0,W.jsx)(Ao,{input:e}):e.type===`link_btn`?a=(0,W.jsx)(jo,{input:e}):e.type===`file`?a=(0,W.jsx)(So,{input:e}):e.type===`upload_box`?a=(0,W.jsx)(qo,{input:e,id:t,calculate_width:r}):e.type===`form`?a=(0,W.jsx)(zo,{input:e}):e.type===`group`?a=(0,W.jsx)(Bo,{input:e,calculate_width:r}):e.type===`hr`&&(a=(0,W.jsx)(To,{input:e}))),a},`shr_1073`),cc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}focus_input=({input:e,input_el:t})=>err(()=>{n(t)&&e.name.includes(`_edit_label_input`)&&t.focus()},`shr_1329`);run_text_btn_action=({input:e,text_btn:t,input_el:r})=>err_async(async()=>{n(r)&&r.focus(),t.event_callback({input:e})},`shr_1214`)}.get_instance(),lc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set_up_resize_observer=({input:e,input_el:t})=>err(()=>{n(t)&&new ResizeObserver(()=>{J.resize_textarea_with_resize_handle({input:e,textarea:t})}).observe(t)},`shr_1330`)}.get_instance(),uc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}trigger_click_on_file_input=({file_input:e})=>err(()=>{n(e)&&e.click()},`shr_1198`)}.get_instance(),dc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}setting_color=!1;init=({input:e,i:r,color_picker:i,visualization:a})=>err_async(async()=>{let o=(await import(`./pickr.min.mjs`).then(e=>t(e.default,1))).default,c=new o({container:i,el:a,theme:`monolith`,default:`#fff`,useAsButton:!0,autoReposition:!1,lockOpacity:!0,showAlways:!0,components:{palette:!0,preview:!0,hue:!0,interaction:{hex:!0,rgba:!0,hsva:!0,hsla:!0,input:!0,save:!0}},i18n:{"btn:save":`OK`}});return c.on(`save`,()=>err(()=>{this.setting_color||X.save({i:r,input:e,callback:()=>{e.event_callback({input:e,i:r})}})},`shr_1035`)),c.on(`change`,t=>err(()=>{n(e.state)&&e.state[r].is_visible&&X.set({input:e,i:r,color:X.convert_pickr_color_to_rgb_string({pickr_color:t})})},`shr_1036`)),c},`shr_1037`);update=({pickr:e,color_picker:t,input:r,i})=>err_async(async()=>{if(n(r.state)&&r.state[i].is_visible){await x.delay(50),this.setting_color=!0;let a=X.access({input:r,i});e.setColor(!n(a)||a===``?`#fff`:a),this.setting_color=!1,e.setColorRepresentation(`HSVA`),L(()=>err(()=>{r.color_picker_width=t.offsetWidth.toString(),r.color_picker_height=t.offsetHeight.toString()},`shr_1038`))}},`shr_1039`)}.get_instance(),fc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}gap_between_visualization_and_color_picker=8;set=()=>err(()=>{let e=Array.from(sab(document,`.palette_w.opacity_1, .color_picker_w.opacity_1`)||[]);if(e.length!==0){let t=e.map(e=>err(()=>sb(e.parentElement,`.fill_shadow_w`),`shr_1040`)),r=t.map(e=>err(()=>sb(e,`.fill_shadow`),`shr_1041`));e.forEach((i,a)=>err(()=>{let i,o=x.closest(e[a],`.palette`);if(n(o)){let t=x.closest(e[a],`.palette_visualization_w`);t&&(i=sb(t,`.palette_visualization`))}else{let t=x.closest(e[a],`.input_w`);t&&(i=sb(t,`.visualization:not(.palette_visualization)`))}if(n(i)){t[a].style.top=``,t[a].style.left=``;let c=({scroll:e})=>o?0:e,l=({val:e})=>e.replace(/--/,``),u=s(`.sections:not(.custom)`),d=n(u)?u:document.documentElement;if(n(d)){let o=t[a].getBoundingClientRect(),u=r[a].getBoundingClientRect(),f=i.offsetHeight,p=i.offsetWidth,m=d.scrollTop,h=d.scrollLeft,g=ce.get_dim({dim:`width`}),ee=ce.get_dim({dim:`height`});d.scrollTop=m,d.scrollLeft=h;let te=Math.ceil(o.top+u.height+(f-this.gap_between_visualization_and_color_picker))<=ee,ne=Math.floor(o.top-(f+this.gap_between_visualization_and_color_picker*2+u.height))>=0,re=Math.floor(o.left+u.width)<=g,ie=Math.floor(o.left-u.width+p)>=0;!te&&ne?(e[a].style.top=`-${c({scroll:m})+this.gap_between_visualization_and_color_picker+u.height}px`,t[a].style.top=e[a].style.top):(e[a].style.top=l({val:`-${c({scroll:m})-(this.gap_between_visualization_and_color_picker+f)}px`}),t[a].style.top=e[a].style.top),!re&&ie?(e[a].style.left=l({val:`-${c({scroll:h})-(p-u.width)}px`}),t[a].style.left=e[a].style.left):(e[a].style.left=`-${c({scroll:h})}px`,t[a].style.left=e[a].style.left)}}},`shr_1042`))}},`shr_1043`)}.get_instance(),pc=e({ColorPicker:()=>dc,Position:()=>fc}),mc=e({}),hc=e({}),gc=G(e=>{let{sections:t,initial_section:r,change_section_callback:i,enable_developer_mode_save_callback:a}=e;return v(()=>err(()=>{Sc.change({section_name:r}),x.bind(document,`mousedown`,Z.hide_all),x.bind(self,`resize`,fc.set),x.bind(document,`keydown`,Z.hide_color_picker_or_palette_on_esc)},`shr_1074`),[e,r]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`main_2 settings`,children:[(0,W.jsxs)(`div`,{className:`section_btns`,children:[Object.values(t).map(e=>{let t=Sc.enable_developer_mode_save_callback({section:e,enable_developer_mode_save_callback:a});return(0,W.jsx)(Fo,{section:e,change_section_callback:i,enable_developer_mode_save_callback:t},e.name)}),(0,W.jsx)(`div`,{className:`filler`})]}),(0,W.jsxs)(`div`,{className:`sections_and_offers`,children:[$.found_offers_for_current_locale()?(0,W.jsx)(Fc,{is_visible:data.settings.prefs.offers_are_visible,offer_banner_type:`horizontal`}):void 0,(0,W.jsx)(`div`,{className:`sections`,onScroll:fc.set,children:Object.values(t).map(e=>(0,W.jsx)(Lo,{section:e},e.name))})]})]}),(0,W.jsx)(Ac,{})]})}),_c=e({Body:()=>gc}),vc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{enable:I})}click_count=0;click_timeout=0;enable=({save_callback:e})=>err_async(async()=>{clearTimeout(this.click_timeout),this.increment_click_count(),this.click_timeout=window.setTimeout(this.reset_click_count,500),this.click_count>=10&&(this.reset_click_count(),data.settings.prefs.developer_mode=!0,show_notification({error_msg_key:`youre_now_a_developer_notification`}),e())},`shr_1266`);increment_click_count=()=>err(()=>{this.click_count+=1},`shr_1267`);reset_click_count=()=>err(()=>{this.click_count=0},`shr_1267`)}.get_instance(),yc=e({DeveloperMode:()=>vc}),bc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{set_checkbox_val:I})}set=({name:e,optional_permission_checkbox_dict:t,contains_permission:r,set_checkbox_val:i=!0})=>err_async(async()=>{let a=t[e];if(r){let t=await we.permissions.remove(a);i&&t&&this.set_checkbox_val({name:e,val:!1})}else{let t=await we.permissions.request(a);return i&&t&&this.set_checkbox_val({name:e,val:!0}),t}return!1},`shr_1221`);set_checkbox_val=({name:e,val:t})=>err(()=>{data.ui[e]=t},`shr_1222`);show_enable_permissions_notification=({permissions:e,settings:t})=>err_async(async()=>{let r=await e.reduce(async(e,r,i)=>{let a=await e,o=!await we.permissions.contains(r.permission)&&t.prefs[`${x.camel_to_underscore(r.name)}_permission`]?r.name:``;return i===0?`[${o}]`:`${a}, [${o}]`},Promise.resolve(``));r!==`[]`&&show_notification({alt_msg:`${globalThis[_.type()].msg(`backup_permissions_start_notification`)}${r}${globalThis[_.type()].msg(`backup_permissions_end_notification`)}`,hide_delay:3e4})},`shr_1301`)}.get_instance(),xc=e({Permission:()=>bc}),Sc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{current_section:O,change:I})}current_section=``;options={};init_options=()=>err(()=>{this.options={options_page_theme:[new ks({name:`light`}),new ks({name:`dark`}),new ks({name:`very_dark`}),new ks({name:`clover`}),new ks({name:`aqua`}),new ks({name:`lavender`}),new ks({name:`blaze`}),new ks({name:`ruby`})]}},`shr_1082`);get_shared_input=({input_change_val_callback:e})=>err(()=>({options_page_theme:new Ms({name:`options_page_theme`,options:this.options,event_callback:e}),transition_duration:new Fs({name:`transition_duration`,text_type:`number`,allow_removing_val:!1,event_callback:e,warn_state_checker:Y.validate_input})}),`shr_1223`);selected_cls=K(function({section_name:e}){return this.current_section===e?`selected`:``});tab_index=K(function({section_name:e}){return this.current_section===e?-1:void 0});change=({section_name:e,callback:t})=>err(()=>{this.current_section!==e&&(Z.previously_visible_color_picker_i=void 0,Z.previously_visible_input=void 0,this.current_section=e,t&&t())},`shr_1083`);enable_developer_mode_save_callback=({section:e,enable_developer_mode_save_callback:t})=>err(()=>e.name===`admin`?t:void 0,`shr_1333`);make_shared_sections=({download_back_up_callback:e,download_back_up_final_callback:t,upload_back_up_callback:r,upload_back_up_save_callback:i,restore_defaults_callback:a,input_change_val_callback:o,admin_inputs:c=[],back_up_inputs:l=[],restore_inputs:u=[],include_back_up_help:d=!1,restore_help_msg:f,download_backup:p=!0,include_part_i_in_back_up_name:m=!1,allow_multiple_file_backup_upload:h=!1,admin_content_is_hideable:g=!1,admin_change_visibility_of_content_save_callback:ee})=>err(()=>[new js({name:`restore`,include_help:d,alt_help_msg:f,inputs:[new xs({name:`restore_defaults`,event_callback:a}),...u,new xs({name:`download_back_up`,event_callback:()=>err_async(async()=>{let r=await e();p&&(wc.download({data_obj:r,part_i:m?0:`none`}),n(t)&&t())},`shr_1085`)}),new xs({name:`upload_back_up`,event_callback:wc.open_file_browser}),new Cs({name:`back_up`,accept:`.json`,multiple:h,event_callback:n(r)?r:wc.upload,save_callback:n(i)?i:()=>{}}),...l]}),new js({name:`admin`,include_help:!0,content_is_hideable:g,change_visibility_of_content_save_callback:ee,inputs:[new xs({name:`reload_ext`,event_callback:Tc.reload_ext}),this.get_shared_input({input_change_val_callback:o}).options_page_theme,this.get_shared_input({input_change_val_callback:o}).transition_duration,new Ss({name:`enable_cut_features`,event_callback:o}),new Ss({name:`persistent_service_worker`,event_callback:o}),new Ss({name:`detect_infinite_loops`,event_callback:o}),...$.found_offers_for_current_locale()?[new Ss({name:`offers_are_visible`,developer_mode_setting:!0,event_callback:o})]:[],new Ss({name:`developer_mode`,developer_mode_setting:!0,event_callback:o}),new Ss({name:`developer_mode`,developer_mode_setting:!0,event_callback:o}),...c]})],`shr_1086`)}.get_instance(),Cc=e({Sections:()=>Sc}),wc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}download=({data_obj:e,part_i:t})=>err(()=>{let r=new Blob([typeof e==`string`?e:JSON.stringify(e)],{type:`application/octet-stream`}),i=env.env===`ext`?we.runtime.getManifest().name:`App`,a=env.env===`ext`?ext.msg(`@@ui_locale`):app.get_language(),o=document.createElement(`a`);x.append(document.body,o),o.href=URL.createObjectURL(r),o.download=`${x.sanitize_filename(i)} back up ${new Date().toLocaleString(a.replace(/_/,`-`),{hour12:a===`en_US`})}${t===`none`?``:` Part ${t+1}`}.json`,o.click(),setTimeout(()=>{URL.revokeObjectURL(o.href)},5e3),x.remove(o)},`shr_1075`);open_file_browser=()=>err(()=>{let e=s(`.file.back_up`);e&&e.click()},`shr_1076`);upload=({input:e},t)=>err_async(async()=>{let r=[];for(let e of Array.from(t.target.files)){de.print_error_code({error_code:`shr_1077`,loop:!0});let t=s(`.file.back_up`);if(n(t)&&(t.value=``),e.type===`application/json`){let t=await this.read({blob:e});r.push(JSON.parse(t))}else throw_err(`Invalid file type`)}n(e.save_callback)&&e.save_callback({data_objs:r})},`shr_1077`,{error_msg_key:`invalid_file_type_back_up`});read=({blob:e})=>err_async(async()=>{let t=new FileReader;return new Promise((r,i)=>{err(()=>{t.onloadend=()=>err(()=>{r(t.result)},`shr_1078`),t.onerror=()=>err(()=>{i()},`shr_1079`),t.readAsText(e)},`shr_1080`)})},`shr_1081`)}.get_instance(),Tc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}reload_ext=()=>err(()=>{ext.send_msg({msg:`reload_ext`})},`shr_1084`)}.get_instance(),Ec=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}change=({input:e,name:t,additional_theme_callback:r})=>err(()=>{e.name===`options_page_theme`&&ue.set({name:t,additional_theme_callback:r})},`shr_1088`)}.get_instance(),Dc=e({BackUp:()=>wc,Sections:()=>Tc,Theme:()=>Ec}),Oc=e({}),kc=()=>err(()=>{Ja()},`shr_1112`),Ac=G(()=>(0,W.jsx)(`span`,{className:`ext_version`,children:`${qc.version()}${qc.suffix()}`})),jc=e({Body:()=>Ac}),Mc=G(e=>{let{app_id:t,on_render:r}=e;return v(()=>{r(),tl.hide_roots({app_id:t})},[t,r]),(0,W.jsx)(Q,{tag:`div`,name:`fade`,cls:x.cls([`main`,`tr_w`,`loading_screen`,Jc.inner_visibility_cls]),state:Jc.outer_is_visible,style:{left:`0`,top:`0`,width:`100%`,height:`100%`},children:(0,W.jsx)(qa.Hourglass,{})})}),Nc=e({Body:()=>Mc}),Pc=G(()=>$.get_ad_label_visibility_state()?(0,W.jsx)(`span`,{className:`ad_label`,children:(0,W.jsx)(`div`,{children:`Ad`})}):void 0),Fc=G(e=>{let{is_visible:t,offer_banner_type:r}=e;return n($.current_offer_text)?(0,W.jsx)(Q,{tag:`div`,name:`fade`,cls:`offers`,state:t,children:(0,W.jsxs)(`div`,{className:`offers_inner`,children:[(0,W.jsx)(Bc,{}),(0,W.jsx)(zc,{offer_banner_type:r})]})}):(0,W.jsx)(W.Fragment,{})}),Ic=G(()=>(0,W.jsx)(`span`,{className:`counter`,children:`${$.current_offer_no}/${$.offers_of_type.length}`})),Lc=G(()=>(0,W.jsx)(Eo,{input:new Ts({name:`next_offer`,Svg:qa.NavigateNext,event_callback:$.show_next_offer})})),Rc=G(()=>(0,W.jsx)(Eo,{input:new Ts({name:`previous_offer`,Svg:qa.NavigateBefore,event_callback:$.show_previous_offer})})),zc=G(e=>{let{offer_banner_type:t}=e,r=$.get_current_offer_banner({offer_banner_type:t});return(0,W.jsxs)(`div`,{className:`offer`,children:[(0,W.jsx)(`p`,{dangerouslySetInnerHTML:{__html:$.current_offer_text}}),n(r)?(0,W.jsx)(`a`,{href:$.current_offer_banner_link,target:`_blank`,rel:`noreferrer`,children:(0,W.jsx)(`img`,{src:r,alt:`Offer banner`,draggable:`false`})}):void 0]})}),Bc=G(()=>$.offers_of_type.length>1?(0,W.jsxs)(`div`,{className:`top_bar`,children:[(0,W.jsx)(Pc,{}),(0,W.jsxs)(`span`,{className:`visible`,children:[(0,W.jsx)(Ic,{}),(0,W.jsx)(Rc,{}),(0,W.jsx)(Lc,{})]}),(0,W.jsxs)(`span`,{className:`shadow`,children:[(0,W.jsx)(Ic,{}),(0,W.jsx)(Rc,{}),(0,W.jsx)(Lc,{})]})]}):(0,W.jsx)(W.Fragment,{})),Vc=e({AdLabel:()=>Pc,Body:()=>Fc,Counter:()=>Ic,NextOfferBtn:()=>Lc,Offer:()=>zc,PreviousOfferBtn:()=>Rc,TopBar:()=>Bc}),Hc=()=>({fade:new Gc({unactive_cls:`opacity_0`,active_cls:`opacity_1`}),fade_reverse:new Gc({unactive_cls:`opacity_0`,active_cls:`opacity_1`}),upload_box:new Gc({unactive_cls:`upload_box_idle`,active_cls:`upload_box_hover`})}),Q=G(e=>{let t=y(!0),r=y(null),{name:i,cls:a,state:o,attr:c,style:l,tr_end_unactive:u,tr_end_active:d,children:f,tag:p}=e,m=Hc(),h=ye(t=>{err(()=>{let{name:i,state:a}=e;el.handle_transition({name:i,state:a,tr_el_ref:r,called_from_component_did_update:t})},`shr_1131`)},[e]);v(()=>{t.current?(t.current=!1,h(!1)):h(!0)});let g=x.cls([a,el.transit({transitions:m,name:i,state:o})]);return(0,W.jsx)(p,{...c,className:g,ref:r,style:l,onTransitionEnd:e=>err(()=>{let t=e.target.className;typeof t==`string`&&t.includes(a)&&el.handle_transition({name:i,state:o,tr_end_unactive:u,tr_end_active:d,tr_el_ref:r,called_from_component_did_update:!1},e)},`shr_1132`),children:f})}),Uc=e({BaseTr:()=>Q}),Wc=class{name=``;exts_whitelist=`all`;browsers_whitelist=`all`;browsers_blacklist=[];countries_whitelist=`all`;countries_blacklist=[];is_enabled=!0;prominent=!1;has_banner=!1;has_ad_label=!1;force_offer_despite_extension_name_in_its_text=!1;constructor(e){Object.assign(this,e)}},Gc=class{unactive_cls;active_cls;constructor(e){this.unactive_cls=e.unactive_cls,this.active_cls=e.active_cls}},Kc=e({Transition:()=>Gc}),qc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}version=()=>err(()=>`v${globalThis[_.type()].get_app_version()}`,`shr_1339`);suffix=()=>err(()=>{let e=env.mode.replace(/elopment|uction/,``),t=n(env)&&env.env===`ext`?` ${env.browser}`:``;return`${t}${t===``?` ${e}`:`-${e}`}${n(env)&&env.test===`true`?`-test`:``}`},`shr_1334`)}.get_instance(),Jc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{outer_is_visible:O,inner_is_none:O,inner_visibility_cls:jn,show:I})}outer_is_visible=!1;inner_is_none=!1;get inner_visibility_cls(){return this.inner_is_none?`none`:``}show=()=>err_async(async()=>{this.inner_is_none||(nl.enable_no_tr(),this.outer_is_visible=!0)},`shr_1116`);hide=({app_id:e})=>err_async(async()=>{nl.disable_no_tr(),await x.delay(300),L(()=>err(()=>{this.outer_is_visible=!1},`shr_1117`)),tl.show_roots({app_id:e}),await x.delay(+se.get({name:`transition_duration`})),L(()=>err(()=>{this.inner_is_none=!0},`shr_1118`))},`shr_1119`)}.get_instance(),Yc=e({Visibility:()=>Jc}),Xc=t(r(((e,t)=>{var r=m(),i=g(),a=h(),o=ee();t.exports=i(function(e){return a(r(e,1,o,!0))})}))(),1),$=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{current_offer_text:jn,current_offer_no:jn,current_offer_i:O,choose_random_prominent_offer:I,show_next_offer:I})}offers_of_type=[];current_offer_i=0;set_offers=()=>err(()=>{this.set_offers_of_type(),this.choose_random_prominent_offer()},`shr_1280`);choose_random_prominent_offer=()=>err(()=>{let e=this.offers_of_type.some(e=>err(()=>n(e.prominent)?e.prominent:!1,`shr_1297`)),t=this.offers_of_type.filter(t=>err(()=>{let r=n(t.prominent)?t.prominent:!1;return e?r:!0},`shr_1282`));this.current_offer_i=x.range(0,t.length-1),this.offers_of_type=(0,Xc.default)(t,this.offers_of_type)},`shr_1281`);set_offers_of_type=()=>err(()=>{let e=env.env===`ext`?ext.get_app_name():app.get_app_name(),t=()=>err(()=>il.offers.flatMap(t=>err(()=>{let r=this.get_offer_text_raw({name:t.name}),i=this.check_if_is_all_or_current_type_offer({offer:t}),a=r.toLocaleLowerCase().includes(e.toLocaleLowerCase());return t.is_enabled&&i&&(!a||t.force_offer_despite_extension_name_in_its_text)?[t]:[]},`shr_1271`)),`shr_1270`);this.offers_of_type=t()},`shr_1269`);check_if_is_all_or_current_type_offer=({offer:e})=>err(()=>{let t=env.env===`ext`?we.i18n.getUILanguage():data.settings.prefs.locale,r=e.browsers_blacklist.some(e=>err(()=>e===env.browser,`shr_1338`)),i=e.countries_whitelist===`all`||e.countries_whitelist.some(e=>err(()=>e===t,`shr_1272`)),a=e.countries_blacklist.every(e=>err(()=>e!==t,`shr_1272`)),o=e.browsers_whitelist===`all`||e.browsers_whitelist.some(e=>err(()=>e===env.browser,`shr_1276`)),c=e.exts_whitelist===`all`||e.exts_whitelist.some(e=>err(()=>env.env===`ext`?e===we.runtime.id:!1,`shr_1296`));return!r&&i&&a&&o&&c},`shr_1279`);found_offers_for_current_locale=()=>err(()=>!(0,bs.default)(this.offers_of_type),`shr_1273`);show_previous_offer=()=>err(()=>{this.current_offer_i=this.current_offer_i-1==-1?this.offers_of_type.length-1:this.current_offer_i-1},`shr_1275`);show_next_offer=()=>err(()=>{this.current_offer_i=this.current_offer_i+1===this.offers_of_type.length?0:this.current_offer_i+1},`shr_1274`);get_offer_text_raw=({name:e})=>err(()=>globalThis[_.type()].msg(`offer_${e}_text`),`shr_1278`);get current_offer_text(){if(this.found_offers_for_current_locale()){let e=this.get_offer_text_raw({name:this.offers_of_type[this.current_offer_i].name}),t=globalThis[_.type()].msg(`offer_${this.offers_of_type[this.current_offer_i].name}_link_href`),r=globalThis[_.type()].msg(`offer_${this.offers_of_type[this.current_offer_i].name}_${env.browser}_link_href`),i=r===``?t:r;return e.replace(/@.*@/gm,`<a class='link offer' href='${i}' target='_blank' rel='noopener noreferrer'>$&</a>`).replace(/@/gm,``)}return``}get_current_offer_banner=({offer_banner_type:e})=>{let t=this.offers_of_type[this.current_offer_i];if(t.has_banner)return`offer_${t.name}_${e}.png`};get_ad_label_visibility_state=()=>{let e=this.offers_of_type[this.current_offer_i];return n(e.has_ad_label)?e.has_ad_label:!1};get current_offer_banner_link(){let e=this.offers_of_type[this.current_offer_i];return globalThis[_.type()].msg(`offer_${e.name}_link_href`)}get current_offer_no(){return this.current_offer_i+1}}.get_instance(),Zc=e({Offers:()=>$}),Qc=class{static instance;static get_instance(){return this.instance||=new this}transform=({data_obj:e,version:t,transform_items:r,keys_to_remove:i=[],force:a=!1})=>err_async(async()=>oe.transform({data_obj:e,version:t,transform_items:r,keys_to_remove:i,force:a,run_in_action:L}),`shr_1226`)}.get_instance(),$c=e({Schema:()=>Qc}),el=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}handle_transition=I(({name:e,state:t,tr_end_unactive:r,tr_end_active:i,tr_el_ref:a,called_from_component_did_update:o},c)=>err(()=>{e.includes(`fade`)&&n(a.current)&&(!o&&!t?x.add_cls(a.current,`hidden`):t&&x.remove_cls(a.current,`hidden`)),n(c)&&(n(i)&&t?this.run_tr_end_callbacks({tr_end_callbacks:i},c):n(r)&&!t&&this.run_tr_end_callbacks({tr_end_callbacks:r},c))},`shr_1133`));transit=({transitions:e,name:t,state:r})=>err(()=>r?e[t].active_cls:e[t].unactive_cls,`shr_1134`);run_tr_end_callbacks=({tr_end_callbacks:e},t)=>err(()=>{e.forEach(e=>{e(t)})},`shr_1135`)}.get_instance(),tl=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}hide_roots=({app_id:e})=>err(()=>{x.css(`hidden_roots`,document.head,`hidden_roots_link_${e}`)},`shr_1235`);show_roots=({app_id:e})=>err(()=>{x.remove(s(`.hidden_roots_link_${e}`))},`shr_1236`)}.get_instance(),nl=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}loading_screen_root_selector=`div[class^="root"][class*="loading_screen"]`;enable_no_tr=()=>err(()=>{let e=s(this.loading_screen_root_selector);n(e)&&n(e.shadowRoot)&&x.css(`no_tr`,e.shadowRoot,`no_tr`)},`shr_1236`);disable_no_tr=()=>err(()=>{let e=s(this.loading_screen_root_selector);n(e)&&n(e.shadowRoot)&&x.remove(sb(e.shadowRoot,`.no_tr`))},`shr_1236`)}.get_instance(),rl=e({Roots:()=>tl,Tr:()=>nl}),il=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}enable_offers=!0;clear_new_tab=[`nnmhbhoglljdlhbllfgkemgenlplalie`,`felphkbfjadmcejnibcmcncimlappdde`];offers=this.enable_offers?[new Wc({name:`tinkoff_black`,has_ad_label:!0,browsers_blacklist:[`edge`],countries_whitelist:[`ru`]}),new Wc({name:`tinkoff_investments_brokerage_account`,has_ad_label:!0,browsers_blacklist:[`edge`],countries_whitelist:[`ru`]}),new Wc({name:`keymeleon`,prominent:!0}),new Wc({name:`other_projects`,browsers_blacklist:[`edge`],prominent:!0}),new Wc({name:`animated_themes`,prominent:!0,exts_whitelist:[...this.clear_new_tab],browsers_whitelist:[`chrome`],force_offer_despite_extension_name_in_its_text:!0}),new Wc({name:`clear_new_tab`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Wc({name:`empty_new_tab_page`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Wc({name:`close_other_tabs_plus`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Wc({name:`search_enhancer_for_google`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Wc({name:`scroll_to_top`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Wc({name:`advanced_extension_reloader`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]})]:[]}.get_instance(),al=class{static instance;static get_instance(){return this.instance||=new this}outer_is_visible=!1;inner_is_none=!1;set_input_type=({parent:e,app_id:t=``},r)=>err(()=>{let i=({input_type:e,app_id_2:r=``})=>err(()=>t===``?e:`${e}_${r}`,`shr_1122`),a=i({input_type:`mouse`,app_id_2:t}),o=i({input_type:`keyboard`,app_id_2:t}),c=r.type===`mousedown`?a:o,l=r.type===`keyboard`&&n(r)&&n(r.code)&&r.code===`Escape`;(c===a||!l)&&(c===a?(x.remove_cls(e,o),x.add_cls(e,c)):c===o&&(x.remove_cls(e,a),x.add_cls(e,c)))},`shr_1123`);bind_set_input_type_f=({parent:e,app_id:t=``}={})=>err(()=>{let r=n(e)?e:document.body,i=e=>err(()=>{this.set_input_type({parent:r,app_id:t},e)},`shr_1124`);x.bind(r,`mousedown`,i),x.bind(r,`keydown`,i)},`shr_1125`);simulate_click_on_enter=e=>err(()=>{e.code===`Enter`&&e.target.click()},`shr_1126`);simulate_color_visualization_click_on_enter=({input:e,i:t},r)=>err(()=>{let i={button:0},a={detail:1},o=()=>err(()=>{Z.change_visibility({input:e,i:t,color_picker_state:`is_visible`},i)},`shr_1127`);r.code===`Enter`&&(r.ctrlKey||r.shiftKey||r.altKey?i.button=2:i.button=0,x.matches(r.target,`.palette_visualization`)&&!r.ctrlKey&&!r.shiftKey&&!r.altKey?(X.select_palette_color({input:e,i:t},a),n(e.state)&&e.state[t].is_visible&&o()):o())},`shr_1128`)}.get_instance(),ol=e({TabIndex:()=>al}),sl=e({});export{qa as A,pc as C,Rs as D,Vs as E,jn as F,B as I,O as L,Ha as M,I as N,Jo as O,qr as P,L as R,mc as S,rc as T,Cc as _,$c as a,_c as b,Kc as c,Nc as d,jc as f,Dc as g,Oc as h,rl as i,Ka as j,G as k,Uc as l,kc as m,ol as n,Zc as o,Ac as p,al as r,Yc as s,sl as t,Vc as u,xc as v,oc as w,hc as x,yc as y};
35
+ <%s key={someKey} {...props} />`,c,h,g,h),y[h+c]=!0)}if(h=null,a!==void 0&&(i(a),h=``+a),l(r)&&(i(r.key),h=``+r.key),`key`in r)for(var ee in a={},r)ee!==`key`&&(a[ee]=r[ee]);else a=r;return h&&u(a,typeof e==`function`?e.displayName||e.name||`Unknown`:e),f(e,h,a,o(),d,p)}function m(e){h(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===ue&&(e._payload.status===`fulfilled`?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function h(e){return typeof e==`object`&&!!e&&e.$$typeof===ee}var g=Ga(),ee=Symbol.for(`react.transitional.element`),te=Symbol.for(`react.portal`),ne=Symbol.for(`react.fragment`),re=Symbol.for(`react.strict_mode`),ie=Symbol.for(`react.profiler`),ae=Symbol.for(`react.consumer`),oe=Symbol.for(`react.context`),se=Symbol.for(`react.forward_ref`),ce=Symbol.for(`react.suspense`),_=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),ue=Symbol.for(`react.lazy`),de=Symbol.for(`react.activity`),fe=Symbol.for(`react.client.reference`),pe=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=Object.prototype.hasOwnProperty,he=Array.isArray,ge=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(e){return e()}};var _e,ve={},ye=g.react_stack_bottom_frame.bind(g,c)(),v=ge(a(c)),y={};e.Fragment=ne,e.jsx=function(e,t,r){var i=1e4>pe.recentlyCreatedOwnerStacks++;return p(e,t,r,!1,i?Error(`react-stack-top-frame`):ye,i?ge(a(e)):v)},e.jsxs=function(e,t,r){var i=1e4>pe.recentlyCreatedOwnerStacks++;return p(e,t,r,!0,i?Error(`react-stack-top-frame`):ye,i?ge(a(e)):v)}})()})),qa=r(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Wa():t.exports=Ka()})),U=qa(),Ja={Check:e=>(0,U.jsxs)(`svg`,{viewBox:`0 0 17.59 17.59`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,U.jsx)(`path`,{d:`m-3.41-1.41h24v24h-24z`,fill:`none`}),(0,U.jsx)(`path`,{d:`m5.59 12.67-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41z`})]}),Close:e=>(0,U.jsxs)(`svg`,{viewBox:`0 0 14 14`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,U.jsx)(`path`,{d:`m-5-5h24v24h-24z`,fill:`none`}),(0,U.jsx)(`path`,{d:`M 14,1.41 12.59,0 7,5.59 1.41,0 0,1.41 5.59,7 0,12.59 1.41,14 7,8.41 12.59,14 14,12.59 8.41,7 Z`})]}),Help:e=>(0,U.jsxs)(`svg`,{viewBox:`0 0 20 20`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,U.jsx)(`path`,{d:`m-2-2h24v24h-24z`,fill:`none`}),(0,U.jsx)(`path`,{d:`m10 0c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm1 17h-2v-2h2zm2.07-7.75-0.9 0.92c-0.72 0.73-1.17 1.33-1.17 2.83h-2v-0.5c0-1.1 0.45-2.1 1.17-2.83l1.24-1.26c0.37-0.36 0.59-0.86 0.59-1.41 0-1.1-0.9-2-2-2s-2 0.9-2 2h-2c0-2.21 1.79-4 4-4s4 1.79 4 4c0 0.88-0.36 1.68-0.93 2.25z`})]}),Hourglass:e=>(0,U.jsx)(`svg`,{enableBackground:`new 0 0 128 128`,viewBox:`0 0 104 104`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,U.jsxs)(`g`,{fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeMiterlimit:10,strokeWidth:4,children:[(0,U.jsx)(`path`,{d:`m45.999 49.555c-7.1595-1.5367-13.047-6.9284-15.068-14.202l-5.9314-21.353`}),(0,U.jsx)(`path`,{d:`m58 14h-36c-2.2091 0-4-1.7909-4-4v-4c0-2.2091 1.7909-4 4-4h60c2.2091 0 4 1.7909 4 4v4c0 1.8637-1.2746 3.4297-2.9996 3.8739l-4.0004 0.12612-5.9314 21.353c-1.9858 7.1489-7.7072 12.48-14.7 14.12`}),(0,U.jsx)(`line`,{x1:70,x2:67,y1:14,y2:14}),(0,U.jsx)(`path`,{d:`m59.008 54.689c6.7007 1.8073 12.136 7.0287 14.061 13.958l5.9314 21.353`}),(0,U.jsx)(`path`,{d:`m25 90 5.9314-21.353c2.0206-7.2742 7.9089-12.666 15.069-14.202`}),(0,U.jsx)(`path`,{d:`m22 90h60c2.2091 0 4 1.7909 4 4v4c0 2.2091-1.7909 4-4 4h-60c-2.2091 0-4-1.7909-4-4v-4c0-1.8637 1.2746-3.4297 2.9996-3.8739z`}),(0,U.jsx)(`line`,{x1:46,x2:46,y1:60,y2:46}),(0,U.jsx)(`line`,{x1:58,x2:58,y1:43,y2:56})]})}),NavigateBefore:e=>(0,U.jsxs)(`svg`,{fill:`#000000`,viewBox:`0 0 12.41 12.41`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,U.jsx)(`path`,{d:`m-8.2-6h24v24h-24z`,fill:`none`}),(0,U.jsx)(`path`,{d:`m9.91 1.615-1.41-1.41-6 6 6 6 1.41-1.41-4.58-4.59z`})]}),NavigateNext:e=>(0,U.jsxs)(`svg`,{fill:`#000000`,viewBox:`0 0 12.41 12.41`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,U.jsx)(`path`,{d:`m0 0h24v24h-24z`,fill:`none`}),(0,U.jsx)(`path`,{d:`m3.91 0.205-1.41 1.41 4.58 4.59-4.58 4.59 1.41 1.41 6-6z`})]})},Ya=()=>err(()=>{Cc.init_options(),$.set_offers()},`shr_1087`);if(!be)throw Error(`mobx-react-lite requires React with Hooks support`);if(!B)throw Error(`mobx-react-lite@3 requires mobx at least version 6 to be available`);function Xa(e){e()}function Za(e){e||(e=Xa,process.env.NODE_ENV!==`production`&&console.warn(`[MobX] Failed to get unstable_batched updates from react-dom / react-native`)),oi({reactionScheduler:e})}function Qa(e){return ci(e)}var $a=!1;function eo(){return $a}var to=1e4,no=1e4,ro=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){e===void 0&&(e=to),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var r=Date.now();t.registrations.forEach(function(i,a){r-i.registeredAt>=e&&(t.finalize(i.value),t.registrations.delete(a))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,no))}}),e}(),io=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:ro)(function(e){var t;(t=e.reaction)==null||t.dispose(),e.reaction=null}),ao=r((e=>{var t=Ga();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,c=t.useLayoutEffect,l=t.useDebugValue;function u(e,t){var r=t(),i=a({inst:{value:r,getSnapshot:t}}),u=i[0].inst,f=i[1];return c(function(){u.value=r,u.getSnapshot=t,d(u)&&f({inst:u})},[e,r,t]),o(function(){return d(u)&&f({inst:u}),e(function(){d(u)&&f({inst:u})})},[e]),l(r),r}function d(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch{return!0}}function f(e,t){return t()}var p=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?f:u;e.useSyncExternalStore=t.useSyncExternalStore===void 0?p:t.useSyncExternalStore})),oo=r((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function r(e,t){p||o.startTransition===void 0||(p=!0,console.error(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var r=t();if(!m){var a=t();c(r,a)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),m=!0)}a=l({inst:{value:r,getSnapshot:t}});var h=a[0].inst,g=a[1];return d(function(){h.value=r,h.getSnapshot=t,i(h)&&g({inst:h})},[e,r,t]),u(function(){return i(h)&&g({inst:h}),e(function(){i(h)&&g({inst:h})})},[e]),f(r),r}function i(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!c(e,r)}catch{return!0}}function a(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=Ga(),c=typeof Object.is==`function`?Object.is:t,l=o.useState,u=o.useEffect,d=o.useLayoutEffect,f=o.useDebugValue,p=!1,m=!1,h=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?a:r;e.useSyncExternalStore=o.useSyncExternalStore===void 0?h:o.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),so=r(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=ao():t.exports=oo()}))();function co(e){e.reaction=new Tr(`observer${e.name}`,function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)==null||t.call(e)})}function lo(e,t){if(t===void 0&&(t=`observed`),eo())return e();var r=he.useRef(null);if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(e){return io.unregister(i),i.onStoreChange=e,i.reaction||(co(i),i.stateVersion=Symbol()),function(){var e;i.onStoreChange=null,(e=i.reaction)==null||e.dispose(),i.reaction=null}},getSnapshot:function(){return i.stateVersion}};r.current=i}var a=r.current;a.reaction||(co(a),io.register(r,a,a)),he.useDebugValue(a.reaction,Qa),(0,so.useSyncExternalStore)(a.subscribe,a.getSnapshot,a.getSnapshot);var o,c;if(a.reaction.track(function(){try{o=e()}catch(e){c=e}}),c)throw c;return o}var uo=!0,fo=!0,po=typeof Symbol==`function`&&Symbol.for,mo=Object.getOwnPropertyDescriptor(function(){},`name`)?.configurable??!1,ho=po?Symbol.for(`react.forward_ref`):typeof _e==`function`&&_e(function(e){return null}).$$typeof,go=po?Symbol.for(`react.memo`):typeof ve==`function`&&ve(function(e){return null}).$$typeof;function W(e,t){if(process.env.NODE_ENV!==`production`&&uo&&t&&(uo=!1,console.warn("[mobx-react-lite] `observer(fn, { forwardRef: true })` is deprecated, use `observer(React.forwardRef(fn))`")),go&&e.$$typeof===go)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(eo())return e;var r=t?.forwardRef??!1,i=e,a=e.displayName||e.name;if(ho&&e.$$typeof===ho&&(r=!0,i=e.render,typeof i!=`function`))throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(e,t){return lo(function(){return i(e,t)},a)};return o.displayName=e.displayName,mo&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes,process.env.NODE_ENV!==`production`&&fo&&(fo=!1,console.warn(`[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release.`))),r&&(o=_e(o)),o=ve(o),vo(e,o),process.env.NODE_ENV!==`production`&&Object.defineProperty(o,"contextTypes",{set:function(){throw Error(`[mobx-react-lite] \`${this.displayName||this.type?.displayName||this.type?.name||`Component`}.contextTypes\` must be set before applying \`observer\`.`)}}),o}var _o={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function vo(e,t){Object.keys(e).forEach(function(r){_o[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}function yo(e){var t=e.children,r=e.render;t&&r&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var i=t||r;return typeof i==`function`?lo(i):null}process.env.NODE_ENV!==`production`&&(yo.propTypes={children:bo,render:bo}),yo.displayName=`Observer`;function bo(e,t,r,i,a){var o=t===`children`?`render`:`children`,c=typeof e[t]==`function`,l=typeof e[o]==`function`;return c&&l?Error("MobX Observer: Do not use children and render in the same time in`"+r):c||l?null:Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+r+"`, expected `function`.")}Za(xe),io.finalizeAllImmediately;var xo=W(e=>{let{input:t}=e;return(0,U.jsx)(Z,{tag:`span`,name:`fade`,cls:x.cls([`btn_w`,`text`,t.is_enabled_cls(),t.name]),state:t.cut_features_is_visible_computed(),attr:{tab_index:t.tab_index(),disabled:!t.is_enabled_final(),onClick:t.event_callback,onKeyDown:le},style:{marginLeft:x.px(t.offset)},children:(0,U.jsx)(`button`,{className:x.cls([`btn`,`text`]),type:`button`,children:t.btn_text()})})}),So=W(e=>{let{input:t,id:r,calculate_width:i}=e,a=t.width_accessed(),o=y(null),[c,l]=be(`auto`);v(()=>{if(n(o.current)){let e=q.width_style({input:t,calculate_width:i,input_w:o.current});n(e)&&l(e)}},[t,i,a]);let u=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,U.jsxs)(`span`,{className:x.cls([`input_w`,`checkbox`,t.name,`calculate_width`]),style:{width:c},ref:o,children:[(0,U.jsxs)(`label`,{className:`wrap_label`,children:[(0,U.jsx)(`input`,{id:Js.id({input:t,id:r}),name:t.name,type:`checkbox`,checked:J.access({input:t}),value:J.access({input:t}).toString(),onChange:e=>{J.change({input:t},e)}}),(0,U.jsx)(`span`,{className:`box`,role:`button`,tabIndex:t.tab_index(),"aria-label":`Checkbox`,onKeyDown:al.simulate_click_on_enter,children:(0,U.jsx)(Ja.Check,{})})]}),(0,U.jsx)(Ao,{input:t})]}),t.include_help?(0,U.jsx)(wo,{section_or_input:t}):void 0]}),t.include_help?(0,U.jsx)(To,{section_or_input:t}):void 0]});return(0,U.jsx)(ko,{input:t,input_w:u,include_label:!1})}),Co=W(e=>{let{input:t}=e;return(0,U.jsx)(`input`,{className:x.cls([`file`,t.name]),name:t.name,type:`file`,accept:t.accept,multiple:t.multiple,value:``,onChange:e=>{t.event_callback({input:t},e)}})}),wo=W(e=>{let{section_or_input:t}=e;return(0,U.jsx)(`button`,{className:`help_btn`,type:`button`,title:globalThis[_.type()].msg(`help_btn_title`),tabIndex:Qs.tab_index({section_or_input:t}),"aria-label":`Help button`,onClick:()=>{Us.change_visibility({section_or_input:t})},children:(0,U.jsx)(Ja.Help,{})})}),To=W(e=>{let{section_or_input:t}=e,r=Us.msg({section_or_input:t});return(0,U.jsx)(Z,{tag:`p`,name:`fade`,cls:`help`,state:t.help_is_visible,style:{width:Us.width_style({section_or_input:t})},tr_end_unactive:[e=>{Zs.set_side_btns_offset_bottom_val_help_tr_end({section_or_input:t},e)}],children:(0,U.jsx)(`span`,{dangerouslySetInnerHTML:{__html:Us.help_msg({msg:r})}})})}),Eo=W(e=>{let{input:t}=e;return(0,U.jsx)(`hr`,{className:t.name})}),Do=W(e=>{let{input:t,include_label:r}=e;return(0,U.jsxs)(Z,{tag:`span`,name:`fade`,cls:x.cls([`btn_w`,t.type,t.is_enabled_cls(),t.name]),attr:{title:t.icon_btn_title(),onClick:()=>{t.event_callback({input:t})},onKeyDown:le},state:t.cut_features_is_visible_computed(),style:{marginLeft:x.px(t.offset)},children:[(0,U.jsx)(`button`,{className:x.cls([`btn`]),type:`button`,"aria-label":t.name,tabIndex:t.tab_index(),children:(0,U.jsx)(t.Svg,{})}),r?(0,U.jsx)(Ao,{input:t}):void 0]})}),Oo=W(e=>{let{input:t}=e,r=y(null);return v(()=>{Zs.set_side_btns_offset_bottom_val({input:t,el:r.current})},[t.is_in_warn_state,t]),(0,U.jsx)(`p`,{className:x.cls([`input_error`,Ws.input_error_visibility_cls({input:t})]),style:{width:Us.width_style({section_or_input:t})},ref:r,children:Ws.input_error({input:t})})}),ko=W(e=>{let{input:t,input_w:r,include_label:i}=e;return v(()=>err(()=>{Ys.calculate_offset({input:t})},`shr_1044`)),(0,U.jsxs)(Z,{tag:`div`,name:`fade`,cls:x.cls([`input_item`,t.type,t.name,t.is_enabled_cls(),t.is_column_layout_cond()]),state:t.cut_features_is_visible_computed(),style:{marginLeft:x.px(t.offset)},children:[t.type===`group`?void 0:(0,U.jsx)(Uo,{input:t}),(0,U.jsxs)(`div`,{className:`input_item_inner`,children:[i?(0,U.jsx)(Ao,{input:t}):void 0,r]})]})}),Ao=W(e=>{let{input:t}=e,r=t.type===`group`?new Is({name:`${t.name}_edit_label_input`,section:t.section,val_accessor:t.val_accessor,event_callback:t.edit_label_val,keydown_callback:t.keydown_callback}):void 0;return(0,U.jsxs)(`div`,{className:x.cls([`label_in_input_item_w`,Js.content_is_visible_margin_cls({input:t})]),children:[t.type===`group`?(0,U.jsx)(Uo,{input:t}):void 0,t.type===`group`&&t.editing_label&&n(r)?(0,U.jsx)(Go,{input:r,calculate_width:!0,include_label:!1,parent_input:t}):(0,U.jsx)(`label`,{className:`label_in_input_item`,htmlFor:t.id,children:Js.label_text_computed({input:t})})]})}),jo=W(e=>{let{input:t}=e;return(0,U.jsx)(`div`,{className:x.cls([`label`,t.name]),children:globalThis[_.type()].msg(`${t.name}_label_text`)})}),Mo=W(e=>{let{input:t}=e;return(0,U.jsx)(No,{input:t,type:`link`})}),No=W(e=>{let{input:t,type:r}=e;return(0,U.jsx)(Z,{tag:`span`,name:`fade`,cls:x.cls([`btn_w`,`${r}_btn_w`,t.is_enabled_cls(),t.name]),attr:{title:t.icon_btn_title(),onClick:()=>{t.event_callback({input:t})},onKeyDown:le},state:t.cut_features_is_visible_computed(),style:{marginLeft:x.px(t.offset)},children:(0,U.jsx)(`button`,{className:x.cls([`btn`,`${r}_btn`]),type:`button`,tabIndex:t.tab_index(),children:t instanceof Es?(0,U.jsx)(t.Svg,{}):(0,U.jsx)(`span`,{children:t.icon_btn_text({input:t})})})})}),Po=W(e=>{let{link:t}=e;return rb(t.show_link)?(0,U.jsx)(`a`,{className:x.cls([`link`,t.label_type,t.name]),title:t.link_title(),href:rs(t.href_final),target:t.target,rel:`noopener noreferrer`,children:t.label_type===`svg`&&n(t.Svg)?(0,U.jsx)(t.Svg,{}):t.link_text()}):null}),Fo=W(e=>{let{input:t,id:r,calculate_width:i,include_label:a}=e,o=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`displayed_val_w`,children:[(0,U.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,U.jsxs)(`span`,{className:x.cls([`input_w`,`range`,t.name,q.calculate_width_cls({calculate_width:i})]),style:{width:q.width_style({input:t,calculate_width:i})},children:[(0,U.jsx)(`input`,{id:Js.id({input:t,id:r}),name:t.name,className:x.cls([`input`,J.focus_state({input:t})]),type:`range`,value:J.access({input:t}),autoComplete:`off`,min:t.min,max:t.max,step:t.step,tabIndex:t.tab_index(),onInput:e=>{J.change({input:t},e)},onFocus:()=>{J.set_focus_state({input:t,state:!0})},onBlur:()=>{J.set_focus_state({input:t,state:!1})}}),(0,U.jsx)(`span`,{className:`lower_fill`,style:{width:t.lower_fill_width({input:t})}})]}),t.include_help?(0,U.jsx)(wo,{section_or_input:t}):void 0]}),(0,U.jsx)(`div`,{className:x.cls([`displayed_val`,t.help_is_present_cls({input:t})]),children:t.displayed_val({input:t})})]}),t.include_help?(0,U.jsx)(To,{section_or_input:t}):void 0]});return(0,U.jsx)(ko,{input:t,input_w:o,include_label:t.label_is_visible_computed({include_label:a})})}),Io=W(e=>{let{section:t,change_section_callback:r,enable_developer_mode_save_callback:i}=e;return(0,U.jsx)(`button`,{className:x.cls([`section_btn`,t.name,Cc.selected_cls({section_name:t.name})]),type:`button`,tabIndex:Cc.tab_index({section_name:t.name}),onClick:()=>{Cc.change({section_name:t.name,callback:r}),n(i)&&yc.enable({save_callback:i})},children:Xs.msg({section:t})})}),Lo=W(e=>{let{section:t,inputs:r}=e;v(()=>{n(t)&&n(t.set_content_is_visible)&&t.set_content_is_visible()},[t]);let i=()=>(0,U.jsxs)(U.Fragment,{children:[n(t)&&t.show_content_link_btn_is_visible()?(0,U.jsx)(Mo,{input:new Ds({name:`show_content`,event_callback:t.change_visibility_of_content})}):void 0,n(t)&&t.hide_content_link_btn_is_visible()?(0,U.jsx)(Mo,{input:new Ds({name:`hide_content`,event_callback:t.change_visibility_of_content})}):void 0]}),a=()=>n(t)&&t.include_offers?(0,U.jsx)(Ic,{is_visible:!0,offer_banner_type:t.offer_banner_type}):(0,U.jsx)(U.Fragment,{}),o=()=>r.length===0?(0,U.jsx)(a,{}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`inputs`,children:Object.values(r).map(e=>(0,U.jsx)(ge,{children:cc({input:e})},e.id))}),(0,U.jsx)(a,{})]});return n(t)&&t.content_is_hideable?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(i,{}),(0,U.jsx)(Z,{tag:`div`,name:`fade`,cls:`section_inner`,state:n(t.content_is_visible)&&t.content_is_visible,children:(0,U.jsx)(o,{})})]}):(0,U.jsx)(o,{})}),Ro=W(e=>{let{section:t}=e;return(0,U.jsx)(`div`,{className:x.cls([`section`,t.name,t.visibility_cls({section:t})]),children:t.available?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`section_help`,children:[t.include_help?(0,U.jsx)(wo,{section_or_input:t}):void 0,t.include_help?(0,U.jsx)(To,{section_or_input:t}):void 0]}),(0,U.jsx)(Lo,{section:t,inputs:t.inputs})]}):(0,U.jsx)(`div`,{children:t.section_unavailable_msg_text()})})}),zo=W(e=>{let{input:t,id:r,calculate_width:i,include_label:a}=e,o=t.options[t.name],c=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,U.jsx)(`span`,{className:x.cls([`input_w`,`select`,t.name,`inset_border`,q.calculate_width_cls({calculate_width:i}),J.focus_state({input:t})]),style:{width:q.width_style({input:t,calculate_width:i})},children:(0,U.jsx)(`select`,{id:Js.id({input:t,id:r}),name:t.name,className:`input`,value:J.access({input:t}),tabIndex:t.tab_index(),onChange:e=>{J.change({input:t},e)},onFocus:()=>{J.set_focus_state({input:t,state:!0})},onBlur:()=>{J.set_focus_state({input:t,state:!1})},children:o.map((e,r)=>(0,U.jsx)(`option`,{value:e.val,children:t.option_text({i:r})},e.name))})}),t.include_help?(0,U.jsx)(wo,{section_or_input:t}):void 0]}),t.include_help?(0,U.jsx)(To,{section_or_input:t}):void 0]});return(0,U.jsx)(ko,{input:t,input_w:c,include_label:t.label_is_visible_computed({include_label:a})})}),Bo=W(e=>{let{input:t}=e;return n(t.inputs)?(0,U.jsx)(`form`,{className:`input_item_form`,action:t.action,method:`POST`,encType:`multipart/form-data`,children:Object.values(t.inputs).map(e=>(0,U.jsx)(ge,{children:cc({input:e})},e.name))}):(0,U.jsx)(U.Fragment,{})}),Vo=W(e=>{let{input:t}=e,r=n(t.inputs)?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,U.jsx)(`span`,{className:x.cls([`input_w`,`group`,t.name,t.content_is_visible_cls()]),style:{width:q.width_style({input:t})},children:Object.values(t.inputs).map(e=>(0,U.jsx)(ge,{children:cc({input:e,id:Js.id({input:t.get_input({child_input:e})}),calculate_width:t.is_column_layout,include_label:t.is_column_layout})},e.name))}),t.include_help?(0,U.jsx)(wo,{section_or_input:t}):void 0]}),t.include_help?(0,U.jsx)(To,{section_or_input:t}):void 0]}):(0,U.jsx)(U.Fragment,{});return(0,U.jsx)(ko,{input:t,input_w:r,include_label:t.label_is_visible_computed({include_label:!0})})}),Ho=W(e=>{let{input:t,name:r,alt_title:i,Svg:a,on_click:o}=e;return(0,U.jsx)(`button`,{className:x.cls([`btn`,`side_btn`,Zs.is_enabled_cls({name:r,input:t})]),type:`button`,title:t.side_btn_title({name:r,alt_title:i}),tabIndex:t.tab_index(),"aria-label":`Side button`,onClick:o,children:(0,U.jsx)(a,{})})}),Uo=W(e=>{let{input:t}=e,r=y(null);return v(()=>{t.help_is_visible&&Zs.set_side_btns_offset_bottom_val({input:t,el:r.current})},[t.help_is_visible,t]),n(t.side_btns)?(0,U.jsx)(`span`,{className:`side_btns`,ref:r,style:{bottom:t.side_btns_offset_bottom},children:t.side_btns.map(e=>(0,U.jsx)(Ho,{name:e.name,alt_title:e.alt_title,Svg:e.Svg,input:t,on_click:()=>{e.event_callback({input:t})}},e.name))}):null}),Wo=W(e=>{let{input:t,name:r,Svg:i,on_click:a}=e;return(0,U.jsx)(`button`,{className:x.cls([`btn`,`text_input`,J.warn_state({input:t})]),type:`button`,title:t.text_btn_title({name:r}),tabIndex:t.tab_index(),"aria-label":`Text button`,onClick:a,children:(0,U.jsx)(i,{})})}),Go=W(e=>{let t=y(null),{input:r,id:i,calculate_width:a,include_label:o,parent_input:c}=e;v(()=>{lc.focus_input({input:r,input_el:t.current})},[r]);let l=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,U.jsxs)(`span`,{className:x.cls([`input_w`,`text`,r.text_type,r.name,`inset_border`,q.calculate_width_cls({calculate_width:a}),J.focus_state({input:r}),J.warn_state({input:r})]),style:{width:q.width_style({input:r,calculate_width:a})},children:[(0,U.jsx)(`input`,{id:Js.id({input:r,id:i}),name:r.name,className:x.cls([`input`,r.text_type]),type:r.text_type,value:r.val_computed({input:r,parent_input:c}),placeholder:r.placeholder,autoComplete:r.autocomplete,spellCheck:`false`,tabIndex:r.tab_index(),ref:t,onInput:async e=>{await J.text_and_textarea_on_input({input:r,parent_input:c},e)},onPaste:e=>{r.paste_callback({input:r},e)},onFocus:()=>{J.set_focus_state({input:r,state:!0})},onBlur:()=>{J.set_focus_state({input:r,state:!1})},onWheel:()=>{r.prevent_number_val_changeon_scroll({input:r})},onKeyDown:e=>{J.on_keydown({input:r,parent_input:c},e)}}),n(r.text_btns)?r.text_btns.map(e=>n(e.visibility_cond)&&e.visibility_cond({input:r})?(0,U.jsx)(Wo,{name:e.name,Svg:e.Svg,input:r,on_click:()=>{lc.run_text_btn_action({input:r,text_btn:e,input_el:n(t.current)?t.current:void 0})}},e.name):(0,U.jsx)(ge,{},r.name)):void 0,r.remove_val_btn_is_visible({input:r})?(0,U.jsx)(Wo,{name:`remove_val`,Svg:Ja.Close,input:r,on_click:()=>J.remove_val({input:r,parent_input:c,input_el:t.current})}):void 0]}),r.include_help?(0,U.jsx)(wo,{section_or_input:r}):void 0]}),(0,U.jsx)(Oo,{input:r}),r.include_help?(0,U.jsx)(To,{section_or_input:r}):void 0]});return(0,U.jsx)(ko,{input:r,input_w:l,include_label:r.label_is_visible_computed({include_label:o})})}),Ko=W(e=>{let t=y(null),{input:r,id:i,calculate_width:a,include_label:o}=e,c=q.width_style({input:r,calculate_width:a});v(()=>{window.addEventListener(`resize`,()=>q.resize_textarea_with_resize_handle({input:r,textarea:t.current})),uc.set_up_resize_observer({input:r,input_el:t.current})},[r]);let l=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,U.jsx)(`span`,{className:x.cls([`input_w`,`textarea`,r.name,`inset_border`,q.calculate_width_cls({calculate_width:a}),J.focus_state({input:r}),J.warn_state({input:r})]),style:{minWidth:c,maxWidth:q.max_width_ob[r.name]},children:(0,U.jsx)(`textarea`,{id:Js.id({input:r,id:i}),name:r.name,className:`input`,value:J.access({input:r}),spellCheck:`false`,tabIndex:r.tab_index(),ref:t,onInput:async e=>{await J.text_and_textarea_on_input({input:r},e)},onFocus:()=>{J.set_focus_state({input:r,state:!0})},onBlur:()=>{J.set_focus_state({input:r,state:!1})}})}),r.include_help?(0,U.jsx)(wo,{section_or_input:r}):void 0]}),(0,U.jsx)(Oo,{input:r}),r.include_help?(0,U.jsx)(To,{section_or_input:r}):void 0]});return(0,U.jsx)(ko,{input:r,input_w:l,include_label:r.label_is_visible_computed({include_label:o})})}),qo=t(pe()),Jo=W(e=>{let t=y(null),{input:r,id:i,calculate_width:a}=e;v(()=>{J.access({input:r})});let o=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`input_w_and_help_btn`,children:[(0,U.jsx)(`span`,{className:x.cls([`input_w`,`upload_box`,r.name,q.calculate_width_cls({calculate_width:a}),J.warn_state({input:r})]),style:{width:q.width_style({input:r,calculate_width:a})},children:(0,U.jsxs)(Z,{tag:`div`,name:`upload_box`,cls:x.cls([`background`,r.loading_cls()]),attr:{onDragOver:te,onDragEnter:()=>{tc.highlight({input:r})},onDragLeave:()=>{tc.unhighlight({input:r})},onDrop:e=>{tc.upload_files(e,{input:r})}},state:r.is_in_hover_state,children:[(0,U.jsx)(`input`,{id:Js.id({input:r,id:i}),name:r.name,className:`input`,type:`file`,accept:r.accept,multiple:r.multiple,ref:t,onChange:e=>{tc.upload_files(e,{input:r,file_input:t.current})}}),(0,U.jsx)(`div`,{title:r.filenames_final(),className:x.cls([`status_msg`,`filenames`]),children:r.filenames_final()}),(0,U.jsxs)(`div`,{className:`what_to_do_msg`,children:[(0,U.jsx)(Mo,{input:(0,qo.default)({},r,{name:`browse`,type:`link_btn`,event_callback:()=>dc.trigger_click_on_file_input({file_input:t.current})})}),(0,U.jsx)(`span`,{children:` ${globalThis[_.type()].msg(`drag_files_msg_text`)}`})]}),(0,U.jsx)(`div`,{className:x.cls([`status_msg`,`loading`,r.loading_msg_visibility_cls()]),children:globalThis[_.type()].msg(`loading_msg_text`)}),(0,U.jsx)(`div`,{className:x.cls([`status_msg`,`error`,r.error_msg_visibility_cls()]),children:globalThis[_.type()].msg(`an_error_occured_msg`)})]})}),r.include_help?(0,U.jsx)(wo,{section_or_input:r}):void 0]}),(0,U.jsx)(Oo,{input:r}),r.include_help?(0,U.jsx)(To,{section_or_input:r}):void 0]});return(0,U.jsx)(ko,{input:r,input_w:o,include_label:r.label_is_visible_computed({include_label:!0})})}),Yo=e({Btn:()=>xo,Checkbox:()=>So,File:()=>Co,Form:()=>Bo,Group:()=>Vo,Help:()=>To,HelpBtn:()=>wo,Hr:()=>Eo,IconBtn:()=>Do,InputError:()=>Oo,InputItem:()=>ko,Label:()=>jo,LabelInInputItem:()=>Ao,Link:()=>Po,LinkBtn:()=>Mo,LinkIconBtn:()=>No,Range:()=>Fo,Section:()=>Ro,SectionBtn:()=>Io,SectionContent:()=>Lo,Select:()=>zo,SideBtn:()=>Ho,SideBtns:()=>Uo,Text:()=>Go,TextBtn:()=>Wo,Textarea:()=>Ko,UploadBox:()=>Jo}),Xo=W(e=>{let{input:t}=e,r=y(null);t.palette_is_visible,n(t.state)&&t.state.main,v(()=>err(()=>{L(()=>err(()=>{t.palette_is_visible&&n(r.current)&&(t.palette_width=r.current.offsetWidth.toString(),t.palette_height=r.current.offsetHeight.toString())},`shr_1001`))},`shr_1002`));let i=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`input_w_and_help_btn`,children:(0,U.jsxs)(`div`,{className:x.cls([`input_w`,`color`,t.name]),children:[(0,U.jsxs)(`span`,{className:`inner_w`,children:[(0,U.jsx)(Qo,{is_visible:t.palette_is_visible||!1,width:x.px(t.palette_width),height:x.px(t.palette_height)}),(0,U.jsx)(Z,{tag:`div`,name:`fade`,cls:`palette_w`,state:t.palette_w_is_visible(),tr_end_unactive:[()=>{X.mark_palette_as_closed({input:t,is_closed:!0})}],children:(0,U.jsxs)(`div`,{className:x.cls([`palette`,t.palette_is_closed_visibility_cls()]),ref:r,children:[(0,U.jsxs)(Z,{tag:`div`,name:`fade`,cls:x.cls([`color_help_w`,t.color_help_visibility_cls()]),state:data.settings.prefs.color_help_is_visible,tr_end_unactive:[X.hide_color_help_tr_end],children:[(0,U.jsx)(`p`,{className:`color_help`,children:globalThis[_.type()].msg(`color_help_text`)}),(0,U.jsx)(Mo,{input:new Ds({name:`hide`,event_callback:()=>{X.hide_color_help({input:t})}})})]}),(0,U.jsxs)(`div`,{className:`palette_link_btns`,children:[t.include_remove_color_btn?(0,U.jsx)(Mo,{input:new Ds({name:`remove_color`,event_callback:()=>{Y.remove_color({input:t})}})}):void 0,(0,U.jsx)(Mo,{input:new Ds({name:`restore_default_palette`,event_callback:()=>{Y.restore_default_palette({input:t})}})})]}),(0,U.jsx)(`div`,{className:`palette_colors`,children:n(data.settings.prefs.colors)?data.settings.prefs.colors.map((e,r)=>(0,U.jsx)($o,{input:t,i:r,aria_label:`Open color picker`},r)):void 0}),t.include_ok_btn?(0,U.jsx)(xo,{input:new Ss({name:`color_ok_btn`,alt_msg:`OK`,event_callback:()=>Y.save({i:`main`,input:t,callback:()=>{t.event_callback({input:t,i:`main`})}})})}):void 0]})})]}),t.include_visualization?(0,U.jsx)($o,{input:t,i:`main`,aria_label:`Choose color`}):void 0]})}),t.include_help?(0,U.jsx)(To,{section_or_input:t}):void 0]});return(0,U.jsx)(ko,{input:t,input_w:i,include_label:rb(t.include_palette_label)})}),Zo=W(e=>{let t=y(null),r=y(null),i=y(!1);v(()=>err(()=>{let{input:o,i:c}=e;!i.current&&n(o.state)&&o.state[c].is_initialized&&(i.current=!0,a()),n(r.current)&&fc.update({pickr:t.current,color_picker:r.current,input:o,i:c})},`shr_1003`));let a=()=>err_async(async()=>{let{visualization_ref:i}=e;if(n(r.current)&&n(i.current)){let{input:a,i:o}=e;t.current=await fc.init({input:a,i:o,color_picker:r.current,visualization:i.current})}},`shr_1004`),{input:o,i:c}=e;return n(o.state)&&(o.state[c].is_initialized||o.state[c].is_visible)?(0,U.jsxs)(`span`,{className:`inner_w`,children:[(0,U.jsx)(Qo,{is_visible:o.state[c].is_visible,width:x.px(o.color_picker_width),height:x.px(o.color_picker_height)}),(0,U.jsx)(Z,{tag:`span`,name:`fade`,cls:`color_picker_w`,state:o.state[c].is_visible,tr_end_unactive:[()=>{X.mark_color_picker_as_closed({input:o,i:c,is_closed:!0})}],children:(0,U.jsx)(`span`,{className:x.cls([`color_picker`,o.color_picker_is_closed_visibility_cls({i:c})]),onContextMenu:e=>{e.stopPropagation()},ref:r})})]}):null}),Qo=W(e=>{let{is_visible:t,width:r,height:i}=e;return v(()=>err(()=>{let{is_visible:t}=e;t&&pc.set()},`shr_1005`)),(0,U.jsx)(`span`,{className:`fill_shadow_w`,children:(0,U.jsx)(`span`,{className:`fill_shadow`,style:{width:r,height:i}})})}),$o=W(e=>{let t=y(null),r=y(null),{input:i,i:a,aria_label:o}=e,c=i.visualization_cls({i:a}),l=i.palette_visualization_cls({i:a});return n(i.state)&&i.state.main,(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{className:x.cls([c&&`${i.visualization_cls({i:a})}_w`,l&&`${i.palette_visualization_cls({i:a})}_w`,`${a}_visualization_w`,`inset_border`,i.visualization_outline_opened({i:a}),i.visualization_outline_selected({i:a})]),ref:t,onContextMenu:te,children:[(0,U.jsx)(`button`,{className:x.cls([i.visualization_cls({i:a}),i.palette_visualization_cls({i:a}),`${a}_visualization`]),type:`button`,"aria-label":o,tabIndex:i.tab_index(),style:{backgroundColor:Y.access({input:i,i:a})},ref:r,onClick:e=>{Y.select_palette_color({input:i,i:a},e)},onMouseDown:e=>{X.change_visibility({input:i,i:a,color_picker_state:`is_visible`},e)},onMouseEnter:e=>{X.change_visibility({input:i,i:a,color_picker_state:`is_initialized`},e)},onFocus:e=>{X.change_visibility({input:i,i:a,color_picker_state:`is_initialized`},e)},onKeyDown:e=>{al.simulate_color_visualization_click_on_enter({input:i,i:a},e)},children:globalThis[_.type()].msg(`${a}_color_btn_text`)}),(0,U.jsx)(Zo,{input:i,i:a,visualization_ref:r})]}),a===`main`?(0,U.jsx)(Ao,{input:i}):void 0,a===`main`&&i.include_help?(0,U.jsx)(wo,{section_or_input:i}):void 0]})});function es(e){throw Error(`[mobx-utils] `+e)}function ts(e,t){t===void 0&&(t=`Illegal state`),e||es(t)}var ns=function(e){return e&&e!==Object.prototype&&Object.getOwnPropertyNames(e).concat(ns(Object.getPrototypeOf(e))||[])},is=function(e){var t=ns(e);return t.filter(function(e,r){return t.indexOf(e)===r})},as=function(e){return is(e).filter(function(e){return e!==`constructor`&&!~e.indexOf(`__`)})},os=`pending`,ss=`fulfilled`,cs=`rejected`;function ls(e){switch(this.state){case os:return e.pending&&e.pending(this.value);case cs:return e.rejected&&e.rejected(this.value);case ss:return e.fulfilled?e.fulfilled(this.value):this.value}}function us(e,t){if(ts(arguments.length<=2,`fromPromise expects up to two arguments`),ts(typeof e==`function`||typeof e==`object`&&e&&typeof e.then==`function`,`Please pass a promise or function to fromPromise`),e.isPromiseBasedObservable===!0)return e;typeof e==`function`&&(e=new Promise(e));var r=e;return e.then(I(`observableFromPromise-resolve`,function(e){r.value=e,r.state=ss}),I(`observableFromPromise-reject`,function(e){r.value=e,r.state=cs})),r.isPromiseBasedObservable=!0,r.case=ls,si(r,{value:t&&(t.state===`fulfilled`||t.state===`pending`)?t.value:void 0,state:os},{},{deep:!1}),r}(function(e){e.reject=I(`fromPromise.reject`,function(t){var r=e(Promise.reject(t));return r.state=cs,r.value=t,r});function t(t){t===void 0&&(t=void 0);var r=e(Promise.resolve(t));return r.state=ss,r.value=t,r}e.resolve=I(`fromPromise.resolve`,t)})(us||={});var ds=function(e,t,r,i){var a=arguments.length,o=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,c;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(o=(a<3?c(o):a>3?c(t,r,o):c(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o};(function(){function e(e,t){var r=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),B(this),L(function(){r.current=t,r.subscription=e.subscribe(r)})}return Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(e.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e}}),Object.defineProperty(e.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(e.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e,this.dispose()}}),ds([O.ref],e.prototype,`current`,void 0),ds([I.bound],e.prototype,`next`,null),ds([I.bound],e.prototype,`complete`,null),ds([I.bound],e.prototype,`error`,null),e})();var fs=function(){return fs=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},fs.apply(this,arguments)},ps=function(e,t,r,i){var a=arguments.length,o=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,c;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(o=(a<3?c(o):a>3?c(t,r,o):c(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},ms=[`model`,`reset`,`submit`,`isDirty`,`isPropertyDirty`,`resetProperty`];(function(){function e(e){var t=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:O.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:O.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return t.localValues.has(e)}}),B(this),ts(ga(e),`createViewModel expects an observable object`);var r=as(this);as(e).forEach(function(i){if(!r.includes(i)&&!(i===D||i===`__mobxDidRunLazyInitializers`)){if(ts(ms.indexOf(i)===-1,`The propertyname `+i+` is reserved and cannot be used with viewModels`),bi(e,i)){var a=Aa(e,i),o=a.derivation.bind(t),c=a.setter_?.bind(t);t.localComputedValues.set(i,jn(o,{set:c}))}var l=Object.getOwnPropertyDescriptor(e,i),u=l?{enumerable:l.enumerable}:{};Object.defineProperty(t,i,fs(fs({},u),{configurable:!0,get:function(){return bi(e,i)?t.localComputedValues.get(i).get():t.isPropertyDirty(i)?t.localValues.get(i):t.model[i]},set:I(function(r){bi(e,i)?t.localComputedValues.get(i).set(r):r===t.model[i]?t.localValues.delete(i):t.localValues.set(i,r)})}))}})}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;Ci(this.localValues).forEach(function(t){var r=e.localValues.get(t),i=e.model[t];Zi(i)?i.replace(r):na(i)?(i.clear(),i.merge(r)):yi(r)||(e.model[t]=r)}),this.localValues.clear()}}),Object.defineProperty(e.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(e.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.localValues.delete(e)}}),ps([jn],e.prototype,`isDirty`,null),ps([jn],e.prototype,`changedValues`,null),ps([I.bound],e.prototype,`submit`,null),ps([I.bound],e.prototype,`reset`,null),ps([I.bound],e.prototype,`resetProperty`,null),e})();var hs=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})();(function(e){hs(t,e);function t(t,r,i){var a=i===void 0?{}:i,o=a.name,c=o===void 0?`ogm`+(Math.random()*1e3|0):o,l=a.keyToName,u=l===void 0?function(e){return``+e}:l,d=e.call(this)||this;Object.defineProperty(d,"_base",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_ogmInfoKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_groupBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_keyToName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(d,"_disposeBaseObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),d._keyToName=u,d._groupBy=r,d._ogmInfoKey=Symbol(`ogmInfo`+c),d._base=t;for(var f=0;f<t.length;f++)d._addItem(t[f]);return d._disposeBaseObserver=Ti(d._base,function(e){if(e.type===`splice`)Ni(function(){for(var t=0,r=e.removed;t<r.length;t++){var i=r[t];d._removeItem(i)}for(var a=0,o=e.added;a<o.length;a++){var c=o[a];d._addItem(c)}});else if(e.type===`update`)Ni(function(){d._removeItem(e.oldValue),d._addItem(e.newValue)});else throw Error(`illegal state`)}),d}return Object.defineProperty(t.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw Error(`not supported`)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw Error(`not supported`)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw Error(`not supported`)}}),Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._disposeBaseObserver();for(var e=0;e<this._base.length;e++){var t=this._base[e];t[this._ogmInfoKey].reaction(),delete t[this._ogmInfoKey]}}}),Object.defineProperty(t.prototype,"_getGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=e.prototype.get.call(this,t);return r===void 0&&(r=O([],{name:`GroupArray[`+this._keyToName(t)+`]`,deep:!1}),e.prototype.set.call(this,t,r)),r}}),Object.defineProperty(t.prototype,"_removeFromGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var i=e.prototype.get.call(this,t);i.length===1?e.prototype.delete.call(this,t):r===i.length-1?i.length--:(i[r]=i[i.length-1],i[r][this._ogmInfoKey].groupArrIndex=r,i.length--)}}),Object.defineProperty(t.prototype,"_addItem",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,r=this._groupBy(e),i=this._getGroupArr(r),a={groupByValue:r,groupArrIndex:i.length,reaction:Xr(function(){return t._groupBy(e)},function(r,i){var a=e[t._ogmInfoKey];t._removeFromGroupArr(a.groupByValue,a.groupArrIndex);var o=t._getGroupArr(r),c=o.length;o.push(e),a.groupByValue=r,a.groupArrIndex=c})};Object.defineProperty(e,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),i.push(e)}}),Object.defineProperty(t.prototype,"_removeItem",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e[this._ogmInfoKey];this._removeFromGroupArr(t.groupByValue,t.groupArrIndex),t.reaction(),delete e[this._ogmInfoKey]}}),t})(ta);var gs=function(){function e(e,t,r,i){Object.defineProperty(this,"base",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"versionChecker",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"closest",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"closestIdx",{enumerable:!0,configurable:!0,writable:!0,value:0});for(var a=this.closest=this.root=e,o=0;o<this.args.length-1&&(a=a.get(t[o]),a);o++)this.closest=a;this.closestIdx=o}return Object.defineProperty(e.prototype,"exists",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertCurrentVersion();var e=this.args.length;return this.closestIdx>=e-1&&this.closest.has(this.args[e-1])}}),Object.defineProperty(e.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.assertCurrentVersion(),!this.exists())throw Error(`Entry doesn't exist`);return this.closest.get(this.args[this.args.length-1])}}),Object.defineProperty(e.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertCurrentVersion();for(var t=this.args.length,r=this.closest,i=this.closestIdx;i<t-1;i++){var a=new Map;r.set(this.args[i],a),r=a}this.closestIdx=t-1,this.closest=r,r.set(this.args[t-1],e)}}),Object.defineProperty(e.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.assertCurrentVersion(),!this.exists())throw Error(`Entry doesn't exist`);var e=this.args.length;this.closest.delete(this.args[e-1]);for(var t=this.root,r=[t],i=0;i<e-1;i++)t=t.get(this.args[i]),r.push(t);for(var i=r.length-1;i>0;i--)r[i].size===0&&r[i-1].delete(this.args[i-1])}}),Object.defineProperty(e.prototype,"assertCurrentVersion",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.versionChecker(this.version))throw Error(`Concurrent modification exception`)}}),e}(),_s=function(){function e(){var e=this;Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"argsLength",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"currentVersion",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"checkVersion",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return e.currentVersion===t}})}return Object.defineProperty(e.prototype,"entry",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.argsLength===-1)this.argsLength=e.length;else if(this.argsLength!==e.length)throw Error(`DeepMap should be used with functions with a consistent length, expected: `+this.argsLength+`, got: `+e.length);return this.currentVersion>=2**53-1&&(this.currentVersion=0),this.currentVersion++,new gs(this.store,e,this.currentVersion,this.checkVersion)}}),e}(),vs=function(){return vs=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},vs.apply(this,arguments)},ys=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var i=Array(e),a=0,t=0;t<r;t++)for(var o=arguments[t],c=0,l=o.length;c<l;c++,a++)i[a]=o[c];return i};function G(e,t){if(t===void 0&&(t=!1),Kr(e))throw Error(`computedFn shouldn't be used on actions`);var r=!1,i=0,a=typeof t==`boolean`?{keepAlive:t}:t,o=new _s;return function(){for(var t=this,c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];var u=o.entry(c);if(u.exists())return u.get().get();if(!a.keepAlive&&!Zn()){!r&&(a.requiresReaction??mr().computedRequiresReaction)&&(console.warn(`Invoking a computedFn from outside a reactive context won't be memoized and is cleaned up immediately, unless keepAlive is set.`),r=!0);var d=e.apply(this,c);return a.onCleanup&&a.onCleanup.apply(a,ys([d],c)),d}var f,p=jn(function(){return f=e.apply(t,c)},vs(vs({},a),{name:`computedFn(`+(a.name||e.name)+`#`+ ++i+`)`}));return u.set(p),a.keepAlive||ti(p,function(){o.entry(c).delete(),a.onCleanup&&a.onCleanup.apply(a,ys([f],c)),f=void 0}),p.get()}}var bs=t(i(),1),xs=t(ne(),1),K=class{name;id=x.unique_id();is_cut=!1;is_visible_key;is_visible=!0;is_visible_conds=[];is_enabled=!0;is_enabled_conds=[];label_is_visible=void 0;parent_disabled=!1;is_in_focus_state=!1;is_in_warn_state=!1;input_errors=[];warn_state_allowed=!1;warn_state_allowed_forced=!0;val_accessor;default_val;is_column_layout=!1;alt_msg;alt_help_msg;alt_title;include_help=!1;help_is_visible=!1;label_val=void 0;side_btns=[];parent;offset=`0`;side_btns_offset_bottom=`0`;form;section;subsection;developer_mode_setting=!1;event_callback;keydown_callback;warn_state_checker;constructor(e){B(this,{is_cut:O,is_visible:O,is_visible_conds:O,is_enabled:O,is_enabled_conds:O,label_is_visible:O,parent_disabled:O,is_in_focus_state:O,is_in_warn_state:O,input_errors:O,warn_state_allowed:O,warn_state_allowed_forced:O,help_is_visible:O,label_val:O,offset:O,side_btns_offset_bottom:O,set_input_errors:I,edit_label_val:I}),Object.assign(this,e),this.name=e.name,this.event_callback=e.event_callback}label_is_visible_computed=G(function({include_label:e}){return n(this.label_is_visible)?this.label_is_visible:e});is_cut_computed=G(function(){return this.is_cut&&data.settings.prefs.enable_cut_features||!this.is_cut});is_visible_computed=G(function(){return this.check_state({state_type:`is_visible`})&&this.is_cut_computed()&&(!this.developer_mode_setting||this.developer_mode_setting&&data.settings.prefs.developer_mode)});is_enabled_computed=G(function(){return this.check_state({state_type:`is_enabled`})});is_enabled_final=()=>err(()=>!this.is_visible_computed()||!this.parent_disabled_computed()&&this.is_enabled_computed(),`shr_1224`);is_enabled_cls=G(function(){return this.is_enabled_final()?``:`is_disabled`});tab_index=G(function(){return this.is_enabled_final()?0:-1});parent_disabled_computed=G(function(){return this.parent_disabled?this.parent_disabled:!1});check_state=({state_type:e})=>err(()=>!(this.check_state_conds({state_conds:this[`${e}_conds`]})||!this[e]),`shr_1220`);check_state_conds=({state_conds:e})=>err(()=>{let t=!(0,xs.default)(e);return n(e)&&t?!e.every(e=>err(()=>e.pass_vals.some(t=>err(()=>{if(n(e.val_accessor)){let r=(0,bs.default)(data,e.val_accessor);return(n(r)?r:``)===t}return data.settings.prefs[e.input_name]===t},`shr_1207`)),`shr_1206`)):!1},`shr_1219`);set_input_errors=({input_errors:e})=>err(()=>{this.input_errors=e},`shr_1241`);is_column_layout_cond=()=>err(()=>this.is_column_layout?`is_column_layout`:``,`shr_1306`);edit_label_val=({parent_input:e},t)=>err(()=>{let r=t.target.value;n(r)&&(e.label_val=r)},`shr_1307`);icon_btn_title=()=>err(()=>this instanceof Es?$s.alt_msg({input:this,suffix:`btn_title`}):``,`shr_1322`);text_btn_title=({name:e})=>err(()=>$s.alt_title({input:this,suffix:`${e}_text_btn_title`}),`shr_1328`);icon_btn_text=({input:e}={})=>err(()=>$s.alt_msg({input:n(e)?e:this,suffix:`link_btn_text`}),`shr_1326`);side_btn_title=({name:e,alt_title:t})=>err(()=>n(t)?t:globalThis[_.type()].msg(`${e}_side_btn_title`),`shr_1327`);cut_features_is_visible_computed=G(function(){return this.is_visible_computed()&&(this.is_cut&&data.settings.prefs.enable_cut_features||!this.is_cut)})},Ss=class extends K{type=`btn`;btn_type=`btn`;constructor(e){super(e),Object.assign(this,e)}btn_text=()=>err(()=>$s.alt_msg({input:this,suffix:`btn_text`}),`shr_1321`)},Cs=class extends K{type=`checkbox`;constructor(e){super(e),Object.assign(this,e)}width_accessed=G(function(){return n(this.section)?q.width:`auto`})},ws=class extends K{type=`file`;accept;multiple=!1;save_callback;constructor(e){super(e),Object.assign(this,e),this.accept=e.accept,this.save_callback=e.save_callback}},Ts=class{name;id=x.unique_id();type=`hr`;constructor(e){Object.assign(this,e),this.name=e.name}},Es=class extends K{type=`icon_btn`;Svg=``;include_label=!1;constructor(e){super(e),Object.assign(this,e)}},Ds=class extends K{type=`link_btn`;constructor(e){super(e),Object.assign(this,e)}},Os=class{name;type=`label`;constructor(e){Object.assign(this,e),this.name=e.name}},ks=class{name;id=x.unique_id();name_clean;type=`link`;label_type=`text`;browser;href;Svg=``;target=`_blank`;alt_msg;force_resolve=!1;constructor(e){Object.assign(this,e),this.name=e.name,this.name_clean=e.name.replace(/i\d+i/,``)}link_text=()=>err(()=>n(this.alt_msg)?this.alt_msg:rs(globalThis[_.type()].msg(`${this.name_clean}_link_text`)||globalThis[_.type()].msg(`${this.name_clean}_${this.browser}_link_text`)),`shr_1069`);href_final=()=>err(()=>{let e=n(this.href)?this.href:globalThis[_.type()].msg(`${this.name_clean}_link_href`)||globalThis[_.type()].msg(`${this.name_clean}_${this.browser}_link_href`)||globalThis[_.type()].msg(`offer_${this.name_clean}_${this.browser}_link_href`);return n(e)?e:``},`shr_1070`);show_link=()=>err(()=>{let e=!n(this.browser),t=this.browser===env.browser;return e||!t||n(this.force_resolve)&&this.force_resolve},`shr_1071`);link_title=()=>err(()=>this.label_type===`svg`?$s.alt_msg({input:this,suffix:`link_title`}):``,`shr_1324`)},As=class{name;val;alt_msg;constructor(e){Object.assign(this,e),this.name=e.name,this.val=n(e.val)?e.val:e.name}},js=class extends K{type=`range`;min=0;max=100;step=1;constructor(e){super(e),Object.assign(this,e)}displayed_val=G(function({input:e}){return n(e.step)?Math.round(J.access({input:e})/e.step):0});lower_fill_percentage=G(function({input:e}){let t=e.displayed_val({input:e}),r=n(e.max)&&n(e.step)?e.max/e.step:0;return 100*t/r});lower_fill_width=G(function({input:e}){return`${e.lower_fill_percentage({input:e})}%`});help_is_present_cls=G(function({input:e}){return e.include_help?`help_is_present`:``})},Ms=class{name;include_help=!1;help_is_visible=!1;content_is_visible=!1;content_is_hideable=!1;alt_msg;alt_help_msg;inputs;available=!0;unavailable_msg=``;include_offers=!1;offer_banner_type=`horizontal`;subsections;change_visibility_of_content_save_callback;constructor(e){B(this,{help_is_visible:O,content_is_visible:O,available:O,set_content_is_visible:I,change_visibility_of_content:I}),Object.assign(this,e),this.name=e.name,this.inputs=e.inputs,Object.values(e.inputs).forEach(e=>{e.section=this.name})}visibility_cls=G(function({section:e}){return e.name===Cc.current_section?``:`hidden`});show_content_link_btn_is_visible=G(function(){return n(this.content_is_visible)&&!this.content_is_visible});hide_content_link_btn_is_visible=G(function(){return n(this.content_is_visible)&&this.content_is_visible});set_content_is_visible=()=>err_async(async()=>{this.content_is_visible=data.settings.prefs[`${this.name}_section_content_is_visible`]},`shr_1265`);change_visibility_of_content=()=>err_async(async()=>{this.content_is_visible=!this.content_is_visible,n(this.change_visibility_of_content_save_callback)&&this.change_visibility_of_content_save_callback({bool:this.content_is_visible})},`shr_1264`);section_unavailable_msg_text=()=>err(()=>globalThis[_.type()].msg(`${this.unavailable_msg}_section_unavailable_msg_text`)||this.unavailable_msg,`shr_1326`)},Ns=class extends K{type=`select`;options={};constructor(e){super(e),B(this,{options:O}),Object.assign(this,e),this.options=e.options}option_text=({i:e})=>err(()=>{let t=this.options[this.name][e];return t.alt_msg||globalThis[_.type()].msg(`${t.name}_option_text`)||t.name},`shr_1072`)},Ps=class extends K{type=`form`;action;inputs;constructor(e){super(e),Object.assign(this,e),this.action=e.action,this.inputs=e.inputs}},Fs=class extends K{type=`group`;inputs;content_is_visible_val_accessor;content_is_visible_default=!0;editing_label=!1;use_group_id_on_child_inputs=!1;constructor(e){super(e),B(this,{editing_label:O}),Object.assign(this,e),this.inputs=e.inputs}content_is_visible_computed=G(function(){if(n(this.content_is_visible_default)){if(n(this.content_is_visible_val_accessor)){let e=(0,bs.default)(data,this.content_is_visible_val_accessor);if(n(e))return e===!0||e===1}return this.content_is_visible_default}return!0});content_is_visible_cls=G(function(){return this.content_is_visible_computed()?``:`hidden`});content_is_visible_margin_cls=G(function(){return this.type!==`group`||this.content_is_visible_computed()?``:`margin_bottom_0`});is_column_layout_cond=()=>err(()=>this.is_column_layout?`is_column_layout`:``,`shr_1336`);get_input=({child_input:e})=>err(()=>this.use_group_id_on_child_inputs?this:e,`shr_1335`)},Is=class extends K{type=`text`;text_type=`text`;allow_removing_val=!0;placeholder=``;autocomplete=`off`;text_btns=[];remove_val_callback;paste_callback=()=>void 0;constructor(e){super(e),B(this,{placeholder:O,text_btns:O}),Object.assign(this,e),n(this.text_btns)&&this.text_btns.forEach((e,t)=>err(()=>{n(this.text_btns)&&(this.text_btns[t].visibility_cond=n(this.text_btns[t].visibility_cond)?this.text_btns[t].visibility_cond:()=>!0)},`shr_1208`)),this.remove_val_callback=e.remove_val_callback}val_computed=G(function({input:e,parent_input:t}){return n(t)&&n(t.label_val)?t.label_val:J.access({input:e})});remove_val_btn_is_visible=G(function({input:e}){return n(e.allow_removing_val)&&e.allow_removing_val&&J.access({input:e})!==``});prevent_number_val_changeon_scroll=({input:e})=>err_async(async()=>{if(n(document.activeElement)&&e.text_type===`number`){let e=document.activeElement;e.blur(),await x.delay(0),e.focus()}},`shr_1298`)},Ls=class extends K{type=`textarea`;constructor(e){super(e),Object.assign(this,e)}},Rs=class extends K{type=`upload_box`;multiple=!1;accept=`.png,.jpg,.jpeg,.gif`;loading_msg_is_visible=!1;error_msg_is_visible=!1;is_in_hover_state=!1;drag_counter=0;filenames_are_visible=!1;filenames=``;clear_val_on_upload=!0;constructor(e){super(e),B(this,{loading_msg_is_visible:O,error_msg_is_visible:O,is_in_hover_state:O,filenames:O}),Object.assign(this,e)}loading_msg_visibility_cls=G(function(){return this.loading_msg_is_visible?``:`none`});error_msg_visibility_cls=G(function(){return this.error_msg_is_visible?``:`none`});loading_cls=G(function(){return this.loading_msg_is_visible?`loading`:``});filenames_final=G(function(){return rb(this.filenames_are_visible)&&n(this.filenames)?this.filenames:``})},zs=e({Btn:()=>Ss,Checkbox:()=>Cs,File:()=>ws,Form:()=>Ps,Group:()=>Fs,Hr:()=>Ts,IconBtn:()=>Es,InputBase:()=>K,Label:()=>Os,Link:()=>ks,LinkBtn:()=>Ds,Option:()=>As,Range:()=>js,Section:()=>Ms,Select:()=>Ns,Text:()=>Is,Textarea:()=>Ls,UploadBox:()=>Rs}),Bs={is_initialized:!1,is_visible:!1,is_closed:!0},Vs=class extends K{type=`color`;include_visualization=!0;include_palette_label=!1;palette_is_visible=!1;palette_is_closed=!0;palette_width=`0`;palette_height=`0`;color_picker_width=`0`;color_picker_height=`0`;include_remove_color_btn=!1;include_ok_btn=!1;state={main:Bs,...Array(Y.palette_color_amount).fill(Bs).reduce((e,t,r)=>(e[r]=t,e),{})};select_palette_color_callback;remove_color_callback;restore_default_palette_callback;hide_color_help_callback;constructor(e){super(e),B(this,{palette_is_visible:O,palette_is_closed:O,palette_width:O,palette_height:O,color_picker_width:O,color_picker_height:O,state:O}),Object.assign(this,e),this.select_palette_color_callback=e.select_palette_color_callback,this.remove_color_callback=e.remove_color_callback,this.restore_default_palette_callback=e.restore_default_palette_callback,this.hide_color_help_callback=e.hide_color_help_callback}is_palette_color=({i:e})=>err(()=>typeof e==`number`,`shr_1030`);visualization_cls=({i:e})=>err(()=>e===`main`?`visualization`:``,`shr_1031`);palette_visualization_cls=({i:e})=>err(()=>e===`main`?``:`palette_visualization`,`shr_1032`);inset_border_cls=({i:e})=>err(()=>e===`main`?``:`inset_border`,`shr_1033`);el_to_show_type=({i:e})=>err(()=>e===`main`?`color_picker_or_palette`:`color_picker`,`shr_1034`);color_picker_is_visible=G(function({i:e}){return n(this.state)&&this.state[e].is_visible});palette_w_is_visible=G(function(){return this.include_visualization?this.palette_is_visible:!0});visualization_outline_opened=G(function({i:e}){return e===`main`&&this.palette_is_visible||n(this.state)&&this.state[e].is_visible?`opened`:``});visualization_outline_selected=G(function({i:e}){return this.is_palette_color({i:e})&&e===(n(this.val_accessor)?(0,bs.default)(data,this.val_accessor):data.settings.prefs[this.name])?`selected`:``});palette_visualization_outline_selected=G(function({i:e}){return e===data.settings.prefs.selected_palette_color?`selected`:``});color_picker_is_closed_visibility_cls=G(function({i:e}){return n(this.state)&&this.state[e].is_closed?`none`:``});palette_is_closed_visibility_cls=G(function(){return this.palette_is_closed?`none`:``});color_help_visibility_cls=G(function(){return X.color_help_is_visible?``:`none`})},Hs=e({Color:()=>Vs}),Us=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{change_visibility:I})}change_visibility=({section_or_input:e})=>err(()=>{let t=e;t.help_is_visible=!t.help_is_visible},`shr_1045`);width_style=G(function({section_or_input:e}){let t=e.section,r=n(t);if(n(t))return r?q.width_style({input:e}):``});msg=G(function({section_or_input:e}){let t=env.env===`ext`?`ext`:`app`,r=n(e.alt_help_msg)?globalThis[t].msg(e.alt_help_msg)||e.alt_help_msg:globalThis[t].msg(`${e.name}_help_text`),i=/@(.*?)@/gm,a=Array.from(r.matchAll(i)).map(e=>err(()=>`<a class='link help' href='${globalThis[t].msg(`${e[1]}_help_link_href`)}' target='_blank' rel='noopener noreferrer'>${globalThis[t].msg(`${e[1]}_help_link_text`)}</a>`,`shr_1313`)),o=0;return r.replace(i,()=>err(()=>{let e=a[o];return o+=1,e},`shr_1314`))});help_msg=({msg:e})=>err(()=>n(e)?e:``,`shr_1323`)}.get_instance(),Ws=class{static instance;static get_instance(){return this.instance||=new this}input_error_is_visible=G(function({input:e}){return n(e.is_in_warn_state)&&e.is_in_warn_state&&n(e.input_errors)&&e.input_errors.length!==0});input_error_visibility_cls=G(function({input:e}){return this.input_error_is_visible({input:e})?``:`hidden`});input_error=G(function({input:e}){return n(e.input_errors)?e.input_errors.reduce((e,t)=>`${e}\r\n${globalThis[_.type()].msg(`${t}_input_error_text`)}`,``).substring(2):``})}.get_instance(),Gs=r(((e,t)=>{var r=p();function i(e,t,i){for(var a=-1,o=e.length;++a<o;){var c=e[a],l=t(c);if(l!=null&&(u===void 0?l===l&&!r(l):i(l,u)))var u=l,d=c}return d}t.exports=i})),Ks=r(((e,t)=>{function r(e,t){return e>t}t.exports=r})),qs=t(r(((e,t)=>{var r=Gs(),i=Ks(),o=a();function c(e,t){return e&&e.length?r(e,o(t,2),i):void 0}t.exports=c}))(),1),q=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{width:O,max_width_ob:O,resize_textarea_with_resize_handle:I})}width=0;min_width=0;max_width=0;max_width_ob={};old_width=0;width_style=G(function({input:e,input_w:t,calculate_width:r=!0}){if(r&&n(e.section)){let e=err(()=>this.width!==0&&n(this.width)&&(!n(t)||n(t)&&x.matches(t,`.checkbox`)&&t.offsetWidth>this.width)?x.px(this.width):`auto`,`shr_1236`);if(e!==`auto`)return e}return`auto`});calculate_width_cls=({calculate_width:e})=>err(()=>e?`calculate_width`:``,`shr_1255`);set_min_and_max_width=({min_width:e}={})=>err(()=>{this.min_width=n(e)?e:+globalThis[_.type()].msg(`input_min_width_css`),this.max_width=+globalThis[_.type()].msg(`input_max_width_css`)},`shr_1239`);calculate=({set_all_inputs_to_msg_input_min_width_css:e=!1}={})=>new Promise(t=>{this.set_min_and_max_width(),globalThis.requestAnimationFrame(()=>err(()=>{let r=sa(`.section .input_item .input_w.calculate_width, .section .input_item .label_in_input_item`);L(()=>err(()=>{this.width=0},`shr_1046`));let i=()=>err(()=>(0,qs.default)(r,e=>{let t=x.closest(e,`.input_item, .btn_w`);return x.matches(t,`.checkbox`)?0:e.offsetWidth}),`shr_1047`);globalThis.requestAnimationFrame(()=>err_async(async()=>{await x.delay(0);let r=i();if(n(r)||e){let t=0;n(r)&&(t=r.offsetWidth<this.min_width?this.min_width:r.offsetWidth);let i=t>this.max_width?this.max_width:t;e?L(()=>err(()=>{this.width=this.min_width},`shr_1316`)):i===this.old_width?L(()=>err(()=>{this.width=i},`shr_1048`)):(this.old_width=i,await this.calculate())}t()},`shr_1049`))},`shr_1050`))});resize_textarea_with_resize_handle=({input:e,textarea:t})=>err(()=>{if(n(t)){let r=x.closest(t,`.inputs`),i=x.closest(t,`.input_item`);if(n(r)&&n(i)){let t=sb(i,`.help_btn`),a=x.get_float_css_val(r,`width`),o=x.get_numeric_css_val(i,`margin-left`),c=parseInt(se.get({name:`help_btn_size`}),10),l=parseInt(se.get({name:`help_btn_margin`}),10),u=a-o,d=n(t)?u-(c+l):u;this.max_width_ob[e.name]=x.px(d)}}},`shr_1238`)}.get_instance(),Js=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{toggle_edit_label_state:I})}msg=G(function({input:e}){return e.alt_msg||globalThis[_.type()].msg(`${e.name}_label_text`)||x.underscore_to_readable(e.name)});label_text_computed=G(function({input:e}){return e.type===`group`&&n(e.label_val)?e.label_val:Js.msg({input:e})});toggle_edit_label_state=({input:e,callback:t})=>err(()=>{if(n(e.val_accessor)){let r=e.val_accessor.split(`.`);e.label_val=n(e.label_val)?e.label_val:r[r.length-1],e.editing_label?e.editing_label=!1:e.editing_label=!0,t({input:e})}},`shr_1306`);id=({input:e,id:t})=>err(()=>n(t)?t:e.id,`shr_1317`);content_is_visible_margin_cls=({input:e})=>err(()=>n(e.content_is_visible_margin_cls)?e.content_is_visible_margin_cls():``,`shr_1332`)}.get_instance(),Ys=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{calculate_offset:I,set_parent_disbled_vals:I})}calculate_offset=({input:e})=>err(()=>{let t=0,r=n(e.parent);if(r){let r=s(`.${e.parent}`);n(r)&&(t=x.get_numeric_css_val(r,`margin-left`))}e.offset=(r?t+28:0).toString()},`shr_1054`);set_parent_disbled_vals=({input:e,sections:t,set_to_all_sections:r=!1})=>err(()=>{let i=({section:t})=>err(()=>{Object.values(t.inputs).forEach(i=>err(()=>{let a=i,o=[],c=()=>err(()=>{if(n(a)){let l=Object.values(t.inputs).find(e=>err(()=>e.name===a.parent,`shr_1055`));if(n(l))a=l,o.push(a.name),c();else{let t=!o.every(e=>err(()=>n(a.val_accessor)?(0,bs.default)(data,a.val_accessor):data.settings.prefs[e],`shr_1056`));i.parent_disabled=e.section===Cc.current_section||r?t:i.parent_disabled}}},`shr_1057`);n(a.parent)&&c(),i.type===`group`&&n(i.inputs)&&Object.values(i.inputs).forEach(e=>err(()=>{e.parent_disabled=!i.is_enabled},`shr_1263`))},`shr_1058`))},`shr_1196`);if(r)Object.values(t).forEach(e=>err(()=>{i({section:e})},`shr_1197`));else if(Cc.current_section!==``){let e=t[Cc.current_section];i({section:e})}},`shr_1059`);set_all_parents_disbled_vals=({sections:e,set_to_all_sections:t=!1})=>err(()=>{Object.values(e).forEach(r=>err(()=>{Object.values(r.inputs).forEach(r=>err(()=>{this.set_parent_disbled_vals({input:r,sections:e,set_to_all_sections:t})},`shr_1060`))},`shr_1061`))},`shr_1062`)}.get_instance(),Xs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}msg=G(function({section:e}){return globalThis[_.type()].msg(`${e.name}_section_text`)||x.underscore_to_readable(e.name)})}.get_instance(),Zs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{set_side_btns_offset_bottom_val:I})}is_enabled_cls=G(function({name:e,input:t}){if(n(t.side_btns)){let r=t.side_btns.find(t=>err(()=>t.name===e,`shr_1337`));if(n(r)&&n(r.is_enabled_cond))return r.is_enabled_cond({input:t})?``:`is_disabled`}return``});set_side_btns_offset_bottom_val=({input:e,el:t},r)=>err(()=>{if(n(t)||n(r)){let i=({el_classname:t})=>err(()=>{let r=sb(c,`.${t}`),i=(t===`input_error`?e.is_in_warn_state:e.help_is_visible)?rn(x.get_numeric_css_val(r,`height`)):0;return{height:i,margin_top:i===0?0:rn(x.get_numeric_css_val(r,`margin-top`))}},`shr_1311`),a=n(t)?t:void 0,o=n(r)?r.target:a,c=x.closest(n(t)?t:o,`.input_item`),l=i({el_classname:`input_error`}),u=i({el_classname:`help`});e.side_btns_offset_bottom=`${l.height+u.height+l.margin_top+u.margin_top}px`}},`shr_1310`);set_side_btns_offset_bottom_val_help_tr_end=({section_or_input:e},t)=>err(()=>{`section`in e&&!e.help_is_visible&&this.set_side_btns_offset_bottom_val({input:e},t)},`shr_1312`)}.get_instance(),Qs=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}tab_index=({section_or_input:e})=>err(()=>`type`in e?e.tab_index():0,`shr_1331`)}.get_instance(),$s=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}alt_msg=({input:e,suffix:t})=>err(()=>n(e.alt_msg)?e.alt_msg:globalThis[_.type()].msg(`${e.name}_${t}`),`shr_1320`);alt_title=({input:e,suffix:t})=>err(()=>n(e.alt_title)?e.alt_title:globalThis[_.type()].msg(`${e.name}_${t}`),`shr_1320`)}.get_instance(),ec=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set_placeholder_text=I(({input:e,msg_key:t})=>err(()=>{e.placeholder=globalThis[_.type()].msg(t)},`shr_1203`));clear_placeholder_text=I(({input:e})=>err(()=>{e.placeholder=``},`shr_1213`));set_loading_placeholder_text=I(({input:e})=>err(()=>{this.set_placeholder_text({input:e,msg_key:`loading_msg_text`})},`shr_1204`));set_error_placeholder_text=I(({input:e})=>err(()=>{this.set_placeholder_text({input:e,msg_key:`an_error_occured_msg`})},`shr_1205`))}.get_instance(),tc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{highlight:I,unhighlight:I,set_filenames:I})}upload_files=I((e,{input:t,file_input:r})=>err_async(async()=>{e.preventDefault(),t.error_msg_is_visible=!1,t.loading_msg_is_visible=!0,t.drag_counter=0,t.is_in_hover_state=!1;let i=n(e.dataTransfer)?e.dataTransfer.files:e.target.files;this.set_filenames({input:t,files:i});try{await t.event_callback({input:t,files:n(e.dataTransfer)?e.dataTransfer.files:e.target.files})}catch(e){n(e)&&show_err_ribbon(e,`shr_1202`,{silent:!0}),L(()=>err(()=>{t.error_msg_is_visible=!0},`shr_1200`))}L(()=>err(()=>{t.loading_msg_is_visible=!1},`shr_1201`)),n(r)&&(t.clear_val_on_upload?r.value=``:n(i)&&J.set({val:i,input:t})),await J.set_warn_state({input:t})},`shr_1199`));highlight=({input:e})=>err(()=>{n(e.drag_counter)&&(e.drag_counter+=1,e.is_in_hover_state=!0)},`shr_1211`);unhighlight=({input:e})=>err(()=>{n(e.drag_counter)&&(--e.drag_counter,e.drag_counter===0&&(e.is_in_hover_state=!1))},`shr_1212`);set_filenames=({input:e,files:t})=>err(()=>{n(t)&&(e.filenames=e.filenames_are_visible?[...t].reduce((e,t,r)=>`${r===0?t.name:`${e}, ${t.name}`}`,``):``)},`shr_1256`)}.get_instance(),nc=r(((e,t)=>{var r=re(),i=c(),a=l(),u=d(),f=o();function p(e,t,o,c){if(!u(e))return e;t=i(t,e);for(var l=-1,d=t.length,p=d-1,m=e;m!=null&&++l<d;){var h=f(t[l]),g=o;if(h===`__proto__`||h===`constructor`||h===`prototype`)return e;if(l!=p){var ee=m[h];g=c?c(ee,h,m):void 0,g===void 0&&(g=u(ee)?ee:a(t[l+1])?[]:{})}r(m,h,g),m=m[h]}return e}t.exports=p})),rc=t(r(((e,t)=>{var r=nc();function i(e,t,i){return e==null?e:r(e,t,i)}t.exports=i}))(),1),J=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{warn_state:O,set_focus_state:I,remove_val:I})}previous_val;set_focus_state=({input:e,state:t})=>err(()=>{let r=e;r.is_in_focus_state=t},`shr_1063`);set_warn_state=({input:e})=>err_async(async()=>{let t=!1,r=e;n(e.warn_state_checker)&&(t=await e.warn_state_checker({input:e}));let i=n(t);L(()=>err(()=>{i&&(r.is_in_warn_state=r.warn_state_allowed_forced&&e.warn_state_allowed&&t)},`shr_1240`))},`shr_1063`);focus_state=G(function({input:e}){return e.is_in_focus_state?`is_in_focus_state`:``});warn_state=G(function({input:e}){return e.is_in_warn_state?`is_in_warn_state`:``});access=({input:e})=>err(()=>{let t=e,r=n(e.default_val)?e.default_val:``;if(n(e.val_accessor)){let i=(0,bs.default)(data,e.val_accessor),a=n(i)?i:``;return L(()=>err(()=>{a!==``&&(t.warn_state_allowed=!0)},`shr_1244`)),a===``?r:a}let i=n(data.settings.prefs[e.name])?data.settings.prefs[e.name]:``;return L(()=>err(()=>{i!==``&&(t.warn_state_allowed=!0)},`shr_1245`)),i===``?r:i},`shr_1064`);change=({input:e},t)=>err(()=>{this.previous_val=this.access({input:e}),e.type===`checkbox`?this.set({val:t.target.checked,input:e}):this.set({val:t.target.value,input:e}),e.event_callback({input:e})},`shr_1065`);set=I(({val:e,input:t})=>err(()=>{n(t.val_accessor)?(0,rc.default)(data,t.val_accessor,e):data.settings.prefs[t.name]=e},`shr_1066`));remove_val=I(({input:e,parent_input:t,input_el:r})=>err_async(async()=>{!n(t)||!n(t.label_val)?(n(r)&&r.focus(),n(e.val_accessor)&&this.set({val:``,input:e}),n(e.val_accessor)?(0,rc.default)(data,e.val_accessor,``):data.settings.prefs[e.name]=``,n(e.remove_val_callback)&&e.remove_val_callback({input:e}),await J.set_warn_state({input:e})):t.label_val=``},`shr_1067`));validate_input=({input:e})=>err(()=>{let t=J.access({input:e});return e.name===`transition_duration`&&typeof t==`string`?!/^(?!0)[1-9][0-9]*$/.test(t):!1},`shr_1068`);text_and_textarea_on_input=({input:e,parent_input:t},r)=>err_async(async()=>{!n(t)||n(t)&&!n(t.label_val)?(J.change({input:e},r),await J.set_warn_state({input:e})):n(e.edit_label_val)&&e.edit_label_val({parent_input:t},r)},`shr_1254`);on_keydown=({input:e,parent_input:t},r)=>err_async(async()=>{n(e.keydown_callback)&&e.keydown_callback({input:e,parent_input:t},r)},`shr_1315`)}.get_instance(),ic=e({Help:()=>Us,InputError:()=>Ws,InputWidth:()=>q,LabelInInputItem:()=>Js,NestedInput:()=>Ys,SectionBtn:()=>Xs,SideBtn:()=>Zs,TabIndex:()=>Qs,Text:()=>ec,TextTitle:()=>$s,UploadBox:()=>tc,Val:()=>J}),ac=r(((e,t)=>{var r=u(),i=f(),a=`[object Number]`;function o(e){return typeof e==`number`||i(e)&&r(e)==a}t.exports=o})),oc=t(r(((e,t)=>{var r=ac();function i(e){return r(e)&&e!=+e}t.exports=i}))(),1),Y=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{set:I,select_palette_color:I,restore_default_palette:I})}palette_color_amount=Object.keys(ae.default_colors).length;previous_color=``;access=({input:e,i:t})=>err(()=>{if(t===`main`){let t=n(e.val_accessor)?(0,bs.default)(data,e.val_accessor):data.settings.prefs[e.name];return this.val_is_palette_color({input:e})?data.settings.prefs.colors[t]:t}return data.settings.prefs.colors[t]},`shr_1006`);access_from_val=({val:e})=>err(()=>typeof e==`number`?data.settings.prefs.colors[e]:e,`shr_1007`);set=({input:e,i:t,color:r})=>err(()=>{t===`main`?n(e.val_accessor)?(0,rc.default)(data,e.val_accessor,r):data.settings.prefs[e.name]=r:data.settings.prefs.colors[t]=r},`shr_1008`);save=({input:e,i:t,callback:r})=>err(()=>{this.set_previous_color({input:e,i:t}),t===`main`?X.hide_main_and_palette({input:e}):X.hide_palette_color_pickers({input:e}),r({input:e,i:t})},`shr_1009`);restore_old_color=()=>err(()=>{let e=X;if(n(e.previously_visible_input)&&n(e.previously_visible_color_picker_i)){let t=e.previously_visible_color_picker_i!==`main`&&typeof this.previous_color==`number`?data.settings.prefs.colors[this.previous_color]:this.previous_color;this.set({input:e.previously_visible_input,i:e.previously_visible_color_picker_i,color:t})}else this.previous_color===``&&n(e.visible_input)&&this.set({input:e.visible_input,i:`main`,color:this.previous_color})},`shr_1010`);convert_pickr_color_to_rgb_string=({pickr_color:e})=>err(()=>{let{round:t}=Math,r=e.toRGBA();return`rgb(${t(r[0])} ${t(r[1])} ${t(r[2])})`},`shr_1011`);filter_palette_colors=({obj:e})=>err(()=>Object.keys(e).filter(e=>!(0,oc.default)(+e)),`shr_1012`);select_palette_color=({input:e,i:t},r)=>err(()=>{r.detail!==0&&e.is_palette_color({i:t})&&(n(e.val_accessor)?(0,rc.default)(data,e.val_accessor,t):data.settings.prefs[e.name]=t,this.previous_color=t,X.previously_visible_input=e,X.previously_visible_color_picker_i=t,e.select_palette_color_callback({input:e,i:t}))},`shr_1013`);val_is_palette_color=({input:e})=>err(()=>typeof(n(e.val_accessor)?(0,bs.default)(data,e.val_accessor):data.settings.prefs[e.name])==`number`,`shr_1014`);set_previous_color=({input:e,i:t})=>err(()=>{let r=n(e.val_accessor)?(0,bs.default)(data,e.val_accessor):data.settings.prefs[e.name];this.previous_color=t===`main`?r:Y.access({input:e,i:t})},`shr_1015`);remove_color=({input:e})=>err(()=>{Y.set({input:e,i:`main`,color:``}),this.reset_previous_vars(),e.remove_color_callback({input:e})},`shr_1016`);restore_default_palette=({input:e,default_colors:t})=>err(()=>{globalThis.confirm(globalThis[_.type()].msg(`restore_default_palette_confirm`))&&(data.settings.prefs.colors=n(t)?t:ae.default_colors,this.reset_previous_vars(),e.restore_default_palette_callback({default_colors:data.settings.prefs.colors}))},`shr_1017`);reset_previous_vars=()=>err(()=>{Y.previous_color=``,X.previously_visible_input=void 0,X.previously_visible_color_picker_i=void 0},`shr_1018`)}.get_instance(),X=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{color_help_is_visible:O,mark_color_picker_as_closed:I,mark_palette_as_closed:I,hide_main_and_palette:I,hide_palette_color_pickers:I})}visible_input;previously_visible_input;previously_visible_color_picker_i;visualization_of_visible_input;color_help_is_visible=!0;mark_color_picker_as_closed=({input:e,i:t,is_closed:r})=>err(()=>{n(e.state)&&(e.state[t].is_closed=r)},`shr_1019`);mark_palette_as_closed=({input:e,is_closed:t})=>err(()=>{e.palette_is_closed=t},`shr_1020`);change_visibility=({input:e,i:t,color_picker_state:r},i)=>err_async(async()=>{await x.delay(30),L(()=>err(()=>{let a=e,o=e.is_palette_color({i:t}),c=`button`in i?i.button:!1,l=c===0&&e.el_to_show_type({i:t})===`color_picker_or_palette`&&r===`is_visible`,u=!1,d=!1;if(n(a.state)){if(l?u=!a.palette_is_visible:l||(d=!a.state[t][r]),r===`is_visible`){if(o){if(n(this.previously_visible_color_picker_i)){let e=this.previously_visible_color_picker_i;a.state[e][r]=!1}}else n(this.visible_input)&&(this.hide_main_and_palette({input:this.visible_input}),this.hide_palette_color_pickers({input:this.visible_input}));(c===2||t===`main`)&&n(this.previously_visible_input)&&n(this.previously_visible_color_picker_i)&&Y.restore_old_color()}l?(a.palette_is_visible=u,u&&this.mark_palette_as_closed({input:a,is_closed:!1})):(c===2||r===`is_initialized`)&&(d&&(a.state[t][r]=d,r===`is_visible`&&(Y.set_previous_color({input:e,i:t}),this.mark_color_picker_as_closed({input:a,i:t,is_closed:!1}))),r===`is_visible`&&d&&(this.previously_visible_input=e,this.previously_visible_color_picker_i=t)),r===`is_visible`&&(this.visible_input=a)}},`shr_1021`))},`shr_1022`);hide_main_and_palette=({input:e})=>err(()=>{let t=e;n(t.state)&&(t.state.main.is_visible=!1),t.palette_is_visible=!1},`shr_1023`);hide_palette_color_pickers=({input:e})=>err(()=>{let t=e;n(t.state)&&Y.filter_palette_colors({obj:t.state}).forEach((e,r)=>err(()=>{n(t.state)&&e!==`main`&&(t.state[r].is_visible=!1)},`shr_1024`))},`shr_1025`);hide_all=e=>err(()=>{let t=x.closest(e.target,`.visualization, .palette_visualization`),r=!!x.closest(e.target,`.color_picker_w`),i=!!x.closest(e.target,`.palette`),a=t===this.visualization_of_visible_input||!n(this.visualization_of_visible_input);t&&(this.visualization_of_visible_input=t),!r&&!a&&(n(this.visible_input)&&(i||this.hide_main_and_palette({input:this.visible_input}),this.hide_palette_color_pickers({input:this.visible_input})),n(this.previously_visible_input)&&n(this.previously_visible_color_picker_i)&&(!t||e.button===0)&&Y.restore_old_color())},`shr_1026`);hide_color_picker_or_palette_on_esc=e=>err(()=>{if(n(this.visible_input)&&n(this.visible_input.state)&&e.code===`Escape`){let e=Y.filter_palette_colors({obj:this.visible_input.state}).some((e,t)=>err(()=>this.visible_input&&n(this.visible_input.state)&&e!==`main`?this.visible_input.state[t].is_visible:!1,`shr_1027`));this.visible_input.palette_is_visible&&e?this.hide_palette_color_pickers({input:this.visible_input}):this.hide_main_and_palette({input:this.visible_input})}},`shr_1028`);hide_color_help=({input:e})=>err(()=>{data.settings.prefs.color_help_is_visible=!1,e.hide_color_help_callback()},`shr_1029`);hide_color_help_tr_end=()=>err(()=>{this.color_help_is_visible=!1},`shr_1210`)}.get_instance(),sc=e({Color:()=>Y,Visibility:()=>X}),cc=({input:e,id:t,calculate_width:r=!0,include_label:i=!0})=>err(()=>{let a;return e.type===`color`?a=(0,U.jsx)(Xo,{input:e}):e.type===`text`?a=(0,U.jsx)(Go,{input:e,id:t,calculate_width:r,include_label:i}):e.type===`textarea`?a=(0,U.jsx)(Ko,{input:e,id:t,calculate_width:r,include_label:i}):e.type===`select`?a=(0,U.jsx)(zo,{input:e,calculate_width:r,id:t,include_label:i}):e.type===`range`?a=(0,U.jsx)(Fo,{input:e,id:t,calculate_width:r,include_label:i}):e.type===`checkbox`?a=(0,U.jsx)(So,{input:e,id:t,calculate_width:r}):e.type===`link`?a=(0,U.jsx)(Po,{link:e}):e.type===`btn_group`||(e.type===`btn`?a=(0,U.jsx)(xo,{input:e}):e.type===`icon_btn`?a=(0,U.jsx)(Do,{input:e,include_label:i}):e.type===`label`?a=(0,U.jsx)(jo,{input:e}):e.type===`link_btn`?a=(0,U.jsx)(Mo,{input:e}):e.type===`file`?a=(0,U.jsx)(Co,{input:e}):e.type===`upload_box`?a=(0,U.jsx)(Jo,{input:e,id:t,calculate_width:r}):e.type===`form`?a=(0,U.jsx)(Bo,{input:e}):e.type===`group`?a=(0,U.jsx)(Vo,{input:e,calculate_width:r}):e.type===`hr`&&(a=(0,U.jsx)(Eo,{input:e}))),a},`shr_1073`),lc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}focus_input=({input:e,input_el:t})=>err(()=>{n(t)&&e.name.includes(`_edit_label_input`)&&t.focus()},`shr_1329`);run_text_btn_action=({input:e,text_btn:t,input_el:r})=>err_async(async()=>{n(r)&&r.focus(),t.event_callback({input:e})},`shr_1214`)}.get_instance(),uc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}set_up_resize_observer=({input:e,input_el:t})=>err(()=>{n(t)&&new ResizeObserver(()=>{q.resize_textarea_with_resize_handle({input:e,textarea:t})}).observe(t)},`shr_1330`)}.get_instance(),dc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}trigger_click_on_file_input=({file_input:e})=>err(()=>{n(e)&&e.click()},`shr_1198`)}.get_instance(),fc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}setting_color=!1;init=({input:e,i:r,color_picker:i,visualization:a})=>err_async(async()=>{let o=(await import(`./pickr.min.mjs`).then(e=>t(e.default,1))).default,c=new o({container:i,el:a,theme:`monolith`,default:`#fff`,useAsButton:!0,autoReposition:!1,lockOpacity:!0,showAlways:!0,components:{palette:!0,preview:!0,hue:!0,interaction:{hex:!0,rgba:!0,hsva:!0,hsla:!0,input:!0,save:!0}},i18n:{"btn:save":`OK`}});return c.on(`save`,()=>err(()=>{this.setting_color||Y.save({i:r,input:e,callback:()=>{e.event_callback({input:e,i:r})}})},`shr_1035`)),c.on(`change`,t=>err(()=>{n(e.state)&&e.state[r].is_visible&&Y.set({input:e,i:r,color:Y.convert_pickr_color_to_rgb_string({pickr_color:t})})},`shr_1036`)),c},`shr_1037`);update=({pickr:e,color_picker:t,input:r,i})=>err_async(async()=>{if(n(r.state)&&r.state[i].is_visible){await x.delay(50),this.setting_color=!0;let a=Y.access({input:r,i});e.setColor(!n(a)||a===``?`#fff`:a),this.setting_color=!1,e.setColorRepresentation(`HSVA`),L(()=>err(()=>{r.color_picker_width=t.offsetWidth.toString(),r.color_picker_height=t.offsetHeight.toString()},`shr_1038`))}},`shr_1039`)}.get_instance(),pc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}gap_between_visualization_and_color_picker=8;set=()=>err(()=>{let e=Array.from(sab(document,`.palette_w.opacity_1, .color_picker_w.opacity_1`)||[]);if(e.length!==0){let t=e.map(e=>err(()=>sb(e.parentElement,`.fill_shadow_w`),`shr_1040`)),r=t.map(e=>err(()=>sb(e,`.fill_shadow`),`shr_1041`));e.forEach((i,a)=>err(()=>{let i,o=x.closest(e[a],`.palette`);if(n(o)){let t=x.closest(e[a],`.palette_visualization_w`);t&&(i=sb(t,`.palette_visualization`))}else{let t=x.closest(e[a],`.input_w`);t&&(i=sb(t,`.visualization:not(.palette_visualization)`))}if(n(i)){t[a].style.top=``,t[a].style.left=``;let c=({scroll:e})=>o?0:e,l=({val:e})=>e.replace(/--/,``),u=s(`.sections:not(.custom)`),d=n(u)?u:document.documentElement;if(n(d)){let o=t[a].getBoundingClientRect(),u=r[a].getBoundingClientRect(),f=i.offsetHeight,p=i.offsetWidth,m=d.scrollTop,h=d.scrollLeft,g=ce.get_dim({dim:`width`}),ee=ce.get_dim({dim:`height`});d.scrollTop=m,d.scrollLeft=h;let te=Math.ceil(o.top+u.height+(f-this.gap_between_visualization_and_color_picker))<=ee,ne=Math.floor(o.top-(f+this.gap_between_visualization_and_color_picker*2+u.height))>=0,re=Math.floor(o.left+u.width)<=g,ie=Math.floor(o.left-u.width+p)>=0;!te&&ne?(e[a].style.top=`-${c({scroll:m})+this.gap_between_visualization_and_color_picker+u.height}px`,t[a].style.top=e[a].style.top):(e[a].style.top=l({val:`-${c({scroll:m})-(this.gap_between_visualization_and_color_picker+f)}px`}),t[a].style.top=e[a].style.top),!re&&ie?(e[a].style.left=l({val:`-${c({scroll:h})-(p-u.width)}px`}),t[a].style.left=e[a].style.left):(e[a].style.left=`-${c({scroll:h})}px`,t[a].style.left=e[a].style.left)}}},`shr_1042`))}},`shr_1043`)}.get_instance(),mc=e({ColorPicker:()=>fc,Position:()=>pc}),hc=e({}),gc=e({}),_c=W(e=>{let{sections:t,initial_section:r,change_section_callback:i,enable_developer_mode_save_callback:a}=e;return v(()=>err(()=>{Cc.change({section_name:r}),x.bind(document,`mousedown`,X.hide_all),x.bind(self,`resize`,pc.set),x.bind(document,`keydown`,X.hide_color_picker_or_palette_on_esc)},`shr_1074`),[e,r]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`main_2 settings`,children:[(0,U.jsxs)(`div`,{className:`section_btns`,children:[Object.values(t).map(e=>{let t=Cc.enable_developer_mode_save_callback({section:e,enable_developer_mode_save_callback:a});return(0,U.jsx)(Io,{section:e,change_section_callback:i,enable_developer_mode_save_callback:t},e.name)}),(0,U.jsx)(`div`,{className:`filler`})]}),(0,U.jsxs)(`div`,{className:`sections_and_offers`,children:[$.found_offers_for_current_locale()?(0,U.jsx)(Ic,{is_visible:data.settings.prefs.offers_are_visible,offer_banner_type:`horizontal`}):void 0,(0,U.jsx)(`div`,{className:`sections`,onScroll:pc.set,children:Object.values(t).map(e=>(0,U.jsx)(Ro,{section:e},e.name))})]})]}),(0,U.jsx)(jc,{})]})}),vc=e({Body:()=>_c}),yc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{enable:I})}click_count=0;click_timeout=0;enable=({save_callback:e})=>err_async(async()=>{clearTimeout(this.click_timeout),this.increment_click_count(),this.click_timeout=window.setTimeout(this.reset_click_count,500),this.click_count>=10&&(this.reset_click_count(),data.settings.prefs.developer_mode=!0,show_notification({error_msg_key:`youre_now_a_developer_notification`}),e())},`shr_1266`);increment_click_count=()=>err(()=>{this.click_count+=1},`shr_1267`);reset_click_count=()=>err(()=>{this.click_count=0},`shr_1267`)}.get_instance(),bc=e({DeveloperMode:()=>yc}),xc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{set_checkbox_val:I})}set=({name:e,optional_permission_checkbox_dict:t,contains_permission:r,set_checkbox_val:i=!0})=>err_async(async()=>{let a=t[e];if(r){let t=await we.permissions.remove(a);i&&t&&this.set_checkbox_val({name:e,val:!1})}else{let t=await we.permissions.request(a);return i&&t&&this.set_checkbox_val({name:e,val:!0}),t}return!1},`shr_1221`);set_checkbox_val=({name:e,val:t})=>err(()=>{data.ui[e]=t},`shr_1222`);show_enable_permissions_notification=({permissions:e,settings:t})=>err_async(async()=>{let r=await e.reduce(async(e,r,i)=>{let a=await e,o=!await we.permissions.contains(r.permission)&&t.prefs[`${x.camel_to_underscore(r.name)}_permission`]?r.name:``;return i===0?`[${o}]`:`${a}, [${o}]`},Promise.resolve(``));r!==`[]`&&show_notification({alt_msg:`${globalThis[_.type()].msg(`backup_permissions_start_notification`)}${r}${globalThis[_.type()].msg(`backup_permissions_end_notification`)}`,hide_delay:3e4})},`shr_1301`)}.get_instance(),Sc=e({Permission:()=>xc}),Cc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{current_section:O,change:I})}current_section=``;options={};init_options=()=>err(()=>{this.options={options_page_theme:[new As({name:`light`}),new As({name:`dark`}),new As({name:`very_dark`}),new As({name:`clover`}),new As({name:`aqua`}),new As({name:`lavender`}),new As({name:`blaze`}),new As({name:`ruby`})]}},`shr_1082`);get_shared_input=({input_change_val_callback:e})=>err(()=>({options_page_theme:new Ns({name:`options_page_theme`,options:this.options,event_callback:e}),transition_duration:new Is({name:`transition_duration`,text_type:`number`,allow_removing_val:!1,event_callback:e,warn_state_checker:J.validate_input})}),`shr_1223`);selected_cls=G(function({section_name:e}){return this.current_section===e?`selected`:``});tab_index=G(function({section_name:e}){return this.current_section===e?-1:void 0});change=({section_name:e,callback:t})=>err(()=>{this.current_section!==e&&(X.previously_visible_color_picker_i=void 0,X.previously_visible_input=void 0,this.current_section=e,t&&t())},`shr_1083`);enable_developer_mode_save_callback=({section:e,enable_developer_mode_save_callback:t})=>err(()=>e.name===`admin`?t:void 0,`shr_1333`);make_shared_sections=({download_back_up_callback:e,download_back_up_final_callback:t,upload_back_up_callback:r,upload_back_up_save_callback:i,restore_defaults_callback:a,input_change_val_callback:o,admin_inputs:c=[],back_up_inputs:l=[],restore_inputs:u=[],include_back_up_help:d=!1,restore_help_msg:f,download_backup:p=!0,include_part_i_in_back_up_name:m=!1,allow_multiple_file_backup_upload:h=!1,admin_content_is_hideable:g=!1,admin_change_visibility_of_content_save_callback:ee})=>err(()=>[new Ms({name:`restore`,include_help:d,alt_help_msg:f,inputs:[new Ss({name:`restore_defaults`,event_callback:a}),...u,new Ss({name:`download_back_up`,event_callback:()=>err_async(async()=>{let r=await e();p&&(Tc.download({data_obj:r,part_i:m?0:`none`}),n(t)&&t())},`shr_1085`)}),new Ss({name:`upload_back_up`,event_callback:Tc.open_file_browser}),new ws({name:`back_up`,accept:`.json`,multiple:h,event_callback:n(r)?r:Tc.upload,save_callback:n(i)?i:()=>{}}),...l]}),new Ms({name:`admin`,include_help:!0,content_is_hideable:g,change_visibility_of_content_save_callback:ee,inputs:[new Ss({name:`reload_ext`,event_callback:Ec.reload_ext}),this.get_shared_input({input_change_val_callback:o}).options_page_theme,this.get_shared_input({input_change_val_callback:o}).transition_duration,new Cs({name:`enable_cut_features`,event_callback:o}),new Cs({name:`persistent_service_worker`,event_callback:o}),new Cs({name:`detect_infinite_loops`,event_callback:o}),...$.found_offers_for_current_locale()?[new Cs({name:`offers_are_visible`,developer_mode_setting:!0,event_callback:o})]:[],new Cs({name:`developer_mode`,developer_mode_setting:!0,event_callback:o}),new Cs({name:`developer_mode`,developer_mode_setting:!0,event_callback:o}),...c]})],`shr_1086`)}.get_instance(),wc=e({Sections:()=>Cc}),Tc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}download=({data_obj:e,part_i:t})=>err(()=>{let r=new Blob([typeof e==`string`?e:JSON.stringify(e)],{type:`application/octet-stream`}),i=env.env===`ext`?we.runtime.getManifest().name:`App`,a=env.env===`ext`?ext.msg(`@@ui_locale`):app.get_language(),o=document.createElement(`a`);x.append(document.body,o),o.href=URL.createObjectURL(r),o.download=`${x.sanitize_filename(i)} back up ${new Date().toLocaleString(a.replace(/_/,`-`),{hour12:a===`en_US`})}${t===`none`?``:` Part ${t+1}`}.json`,o.click(),setTimeout(()=>{URL.revokeObjectURL(o.href)},5e3),x.remove(o)},`shr_1075`);open_file_browser=()=>err(()=>{let e=s(`.file.back_up`);e&&e.click()},`shr_1076`);upload=({input:e},t)=>err_async(async()=>{let r=[];for(let e of Array.from(t.target.files)){de.print_error_code({error_code:`shr_1077`,loop:!0});let t=s(`.file.back_up`);if(n(t)&&(t.value=``),e.type===`application/json`){let t=await this.read({blob:e});r.push(JSON.parse(t))}else throw_err(`Invalid file type`)}n(e.save_callback)&&e.save_callback({data_objs:r})},`shr_1077`,{error_msg_key:`invalid_file_type_back_up`});read=({blob:e})=>err_async(async()=>{let t=new FileReader;return new Promise((r,i)=>{err(()=>{t.onloadend=()=>err(()=>{r(t.result)},`shr_1078`),t.onerror=()=>err(()=>{i()},`shr_1079`),t.readAsText(e)},`shr_1080`)})},`shr_1081`)}.get_instance(),Ec=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}reload_ext=()=>err(()=>{ext.send_msg({msg:`reload_ext`})},`shr_1084`)}.get_instance(),Dc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}change=({input:e,name:t,additional_theme_callback:r})=>err(()=>{e.name===`options_page_theme`&&ue.set({name:t,additional_theme_callback:r})},`shr_1088`)}.get_instance(),Oc=e({BackUp:()=>Tc,Sections:()=>Ec,Theme:()=>Dc}),kc=e({}),Ac=()=>err(()=>{Ya()},`shr_1112`),jc=W(()=>(0,U.jsx)(`span`,{className:`ext_version`,children:`${qc.version()}${qc.suffix()}`})),Mc=e({Body:()=>jc}),Nc=W(e=>{let{app_id:t,on_render:r}=e;return v(()=>{r(),tl.hide_roots({app_id:t})},[t,r]),(0,U.jsx)(Z,{tag:`div`,name:`fade`,cls:x.cls([`main`,`tr_w`,`loading_screen`,Jc.inner_visibility_cls]),state:Jc.outer_is_visible,style:{left:`0`,top:`0`,width:`100%`,height:`100%`},children:(0,U.jsx)(Ja.Hourglass,{})})}),Pc=e({Body:()=>Nc}),Fc=W(()=>$.get_ad_label_visibility_state()?(0,U.jsx)(`span`,{className:`ad_label`,children:(0,U.jsx)(`div`,{children:`Ad`})}):void 0),Ic=W(e=>{let{is_visible:t,offer_banner_type:r}=e;return n($.current_offer_text)?(0,U.jsx)(Z,{tag:`div`,name:`fade`,cls:`offers`,state:t,children:(0,U.jsxs)(`div`,{className:`offers_inner`,children:[(0,U.jsx)(Vc,{}),(0,U.jsx)(Bc,{offer_banner_type:r})]})}):(0,U.jsx)(U.Fragment,{})}),Lc=W(()=>(0,U.jsx)(`span`,{className:`counter`,children:`${$.current_offer_no}/${$.offers_of_type.length}`})),Rc=W(()=>(0,U.jsx)(Do,{input:new Es({name:`next_offer`,Svg:Ja.NavigateNext,event_callback:$.show_next_offer})})),zc=W(()=>(0,U.jsx)(Do,{input:new Es({name:`previous_offer`,Svg:Ja.NavigateBefore,event_callback:$.show_previous_offer})})),Bc=W(e=>{let{offer_banner_type:t}=e,r=$.get_current_offer_banner({offer_banner_type:t});return(0,U.jsxs)(`div`,{className:`offer`,children:[(0,U.jsx)(`p`,{dangerouslySetInnerHTML:{__html:$.current_offer_text}}),n(r)?(0,U.jsx)(`a`,{href:$.current_offer_banner_link,target:`_blank`,rel:`noreferrer`,children:(0,U.jsx)(`img`,{src:r,alt:`Offer banner`,draggable:`false`})}):void 0]})}),Vc=W(()=>$.offers_of_type.length>1?(0,U.jsxs)(`div`,{className:`top_bar`,children:[(0,U.jsx)(Fc,{}),(0,U.jsxs)(`span`,{className:`visible`,children:[(0,U.jsx)(Lc,{}),(0,U.jsx)(zc,{}),(0,U.jsx)(Rc,{})]}),(0,U.jsxs)(`span`,{className:`shadow`,children:[(0,U.jsx)(Lc,{}),(0,U.jsx)(zc,{}),(0,U.jsx)(Rc,{})]})]}):(0,U.jsx)(U.Fragment,{})),Hc=e({AdLabel:()=>Fc,Body:()=>Ic,Counter:()=>Lc,NextOfferBtn:()=>Rc,Offer:()=>Bc,PreviousOfferBtn:()=>zc,TopBar:()=>Vc}),Uc=()=>({fade:new Gc({unactive_cls:`opacity_0`,active_cls:`opacity_1`}),fade_reverse:new Gc({unactive_cls:`opacity_0`,active_cls:`opacity_1`}),upload_box:new Gc({unactive_cls:`upload_box_idle`,active_cls:`upload_box_hover`})}),Z=W(e=>{let t=y(!0),r=y(null),{name:i,cls:a,state:o,attr:c,style:l,tr_end_unactive:u,tr_end_active:d,children:f,tag:p}=e,m=Uc(),h=ye(t=>{err(()=>{let{name:i,state:a}=e;el.handle_transition({name:i,state:a,tr_el_ref:r,called_from_component_did_update:t})},`shr_1131`)},[e]);v(()=>{t.current?(t.current=!1,h(!1)):h(!0)});let g=x.cls([a,el.transit({transitions:m,name:i,state:o})]);return(0,U.jsx)(p,{...c,className:g,ref:r,style:l,onTransitionEnd:e=>err(()=>{let t=e.target.className;typeof t==`string`&&t.includes(a)&&el.handle_transition({name:i,state:o,tr_end_unactive:u,tr_end_active:d,tr_el_ref:r,called_from_component_did_update:!1},e)},`shr_1132`),children:f})}),Wc=e({BaseTr:()=>Z}),Q=class{name=``;apps_whitelist=`all`;apps_blacklist=[];browsers_whitelist=`all`;browsers_blacklist=[];countries_whitelist=`all`;countries_blacklist=[];is_enabled=!0;prominent=!1;has_banner=!1;has_ad_label=!1;force_offer_despite_extension_name_in_its_text=!1;constructor(e){Object.assign(this,e)}},Gc=class{unactive_cls;active_cls;constructor(e){this.unactive_cls=e.unactive_cls,this.active_cls=e.active_cls}},Kc=e({Transition:()=>Gc}),qc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}version=()=>err(()=>`v${globalThis[_.type()].get_app_version()}`,`shr_1339`);suffix=()=>err(()=>{let e=env.mode.replace(/elopment|uction/,``),t=n(env)&&env.env===`ext`?` ${env.browser}`:``;return`${t}${t===``?` ${e}`:`-${e}`}${n(env)&&env.test===`true`?`-test`:``}`},`shr_1334`)}.get_instance(),Jc=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{outer_is_visible:O,inner_is_none:O,inner_visibility_cls:jn,show:I})}outer_is_visible=!1;inner_is_none=!1;get inner_visibility_cls(){return this.inner_is_none?`none`:``}show=()=>err_async(async()=>{this.inner_is_none||(nl.enable_no_tr(),this.outer_is_visible=!0)},`shr_1116`);hide=({app_id:e})=>err_async(async()=>{nl.disable_no_tr(),await x.delay(300),L(()=>err(()=>{this.outer_is_visible=!1},`shr_1117`)),tl.show_roots({app_id:e}),await x.delay(+se.get({name:`transition_duration`})),L(()=>err(()=>{this.inner_is_none=!0},`shr_1118`))},`shr_1119`)}.get_instance(),Yc=e({Visibility:()=>Jc}),Xc=t(r(((e,t)=>{var r=m(),i=g(),a=h(),o=ee();t.exports=i(function(e){return a(r(e,1,o,!0))})}))(),1),$=class{static instance;static get_instance(){return this.instance||=new this}constructor(){B(this,{current_offer_text:jn,current_offer_no:jn,current_offer_i:O,choose_random_prominent_offer:I,show_next_offer:I})}offers_of_type=[];current_offer_i=0;set_offers=()=>err(()=>{this.set_offers_of_type(),this.choose_random_prominent_offer()},`shr_1280`);choose_random_prominent_offer=()=>err(()=>{let e=this.offers_of_type.some(e=>err(()=>n(e.prominent)?e.prominent:!1,`shr_1297`)),t=this.offers_of_type.filter(t=>err(()=>{let r=n(t.prominent)?t.prominent:!1;return e?r:!0},`shr_1282`));this.current_offer_i=x.range(0,t.length-1),this.offers_of_type=(0,Xc.default)(t,this.offers_of_type)},`shr_1281`);set_offers_of_type=()=>err(()=>{let e=x.dash_to_underscore(env.env===`ext`?ext.get_app_name():app.get_app_name()),t=()=>err(()=>il.offers.flatMap(t=>err(()=>{let r=x.space_to_underscore(this.get_offer_text_raw({name:t.name}).toLowerCase()),i=this.check_if_is_all_or_current_type_offer({offer:t}),a=r.includes(e);return t.is_enabled&&i&&(!a||t.force_offer_despite_extension_name_in_its_text)?[t]:[]},`shr_1271`)),`shr_1270`);this.offers_of_type=t()},`shr_1269`);check_if_is_all_or_current_type_offer=({offer:e})=>err(()=>{let t=env.env===`ext`?we.i18n.getUILanguage():data.settings.prefs.locale,r=x.dash_to_underscore(env.env===`ext`?ext.get_app_name():app.get_app_name()),i=e.browsers_blacklist.some(e=>err(()=>e===env.browser,`shr_1338`)),a=e.countries_whitelist===`all`||e.countries_whitelist.some(e=>err(()=>e===t,`shr_1272`)),o=e.countries_blacklist.every(e=>err(()=>e!==t,`shr_1272`)),c=e.browsers_whitelist===`all`||e.browsers_whitelist.some(e=>err(()=>e===env.browser,`shr_1276`)),l=e.apps_whitelist===`all`||e.apps_whitelist.some(e=>err(()=>e===r,`shr_1340`)),u=e.apps_blacklist.every(e=>err(()=>e!==r,`shr_1341`));return!i&&a&&o&&c&&l&&u},`shr_1279`);found_offers_for_current_locale=()=>err(()=>!(0,xs.default)(this.offers_of_type),`shr_1273`);show_previous_offer=()=>err(()=>{this.current_offer_i=this.current_offer_i-1==-1?this.offers_of_type.length-1:this.current_offer_i-1},`shr_1275`);show_next_offer=()=>err(()=>{this.current_offer_i=this.current_offer_i+1===this.offers_of_type.length?0:this.current_offer_i+1},`shr_1274`);get_offer_text_raw=({name:e})=>err(()=>globalThis[_.type()].msg(`offer_${e}_text`),`shr_1278`);get current_offer_text(){if(this.found_offers_for_current_locale()){let e=this.get_offer_text_raw({name:this.offers_of_type[this.current_offer_i].name}),t=globalThis[_.type()].msg(`offer_${this.offers_of_type[this.current_offer_i].name}_link_href`),r=globalThis[_.type()].msg(`offer_${this.offers_of_type[this.current_offer_i].name}_${env.browser}_link_href`),i=r===``?t:r;return e.replace(/@.*@/gm,`<a class='link offer' href='${i}' target='_blank' rel='noopener noreferrer'>$&</a>`).replace(/@/gm,``)}return``}get_current_offer_banner=({offer_banner_type:e})=>{let t=this.offers_of_type[this.current_offer_i];if(t.has_banner)return`offer_${t.name}_${e}.png`};get_ad_label_visibility_state=()=>{let e=this.offers_of_type[this.current_offer_i];return n(e.has_ad_label)?e.has_ad_label:!1};get current_offer_banner_link(){let e=this.offers_of_type[this.current_offer_i];return globalThis[_.type()].msg(`offer_${e.name}_link_href`)}get current_offer_no(){return this.current_offer_i+1}}.get_instance(),Zc=e({Offers:()=>$}),Qc=class{static instance;static get_instance(){return this.instance||=new this}transform=({data_obj:e,version:t,transform_items:r,keys_to_remove:i=[],force:a=!1})=>err_async(async()=>oe.transform({data_obj:e,version:t,transform_items:r,keys_to_remove:i,force:a,run_in_action:L}),`shr_1226`)}.get_instance(),$c=e({Schema:()=>Qc}),el=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}handle_transition=I(({name:e,state:t,tr_end_unactive:r,tr_end_active:i,tr_el_ref:a,called_from_component_did_update:o},c)=>err(()=>{e.includes(`fade`)&&n(a.current)&&(!o&&!t?x.add_cls(a.current,`hidden`):t&&x.remove_cls(a.current,`hidden`)),n(c)&&(n(i)&&t?this.run_tr_end_callbacks({tr_end_callbacks:i},c):n(r)&&!t&&this.run_tr_end_callbacks({tr_end_callbacks:r},c))},`shr_1133`));transit=({transitions:e,name:t,state:r})=>err(()=>r?e[t].active_cls:e[t].unactive_cls,`shr_1134`);run_tr_end_callbacks=({tr_end_callbacks:e},t)=>err(()=>{e.forEach(e=>{e(t)})},`shr_1135`)}.get_instance(),tl=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}hide_roots=({app_id:e})=>err(()=>{x.css(`hidden_roots`,document.head,`hidden_roots_link_${e}`)},`shr_1235`);show_roots=({app_id:e})=>err(()=>{x.remove(s(`.hidden_roots_link_${e}`))},`shr_1236`)}.get_instance(),nl=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}loading_screen_root_selector=`div[class^="root"][class*="loading_screen"]`;enable_no_tr=()=>err(()=>{let e=s(this.loading_screen_root_selector);n(e)&&n(e.shadowRoot)&&x.css(`no_tr`,e.shadowRoot,`no_tr`)},`shr_1236`);disable_no_tr=()=>err(()=>{let e=s(this.loading_screen_root_selector);n(e)&&n(e.shadowRoot)&&x.remove(sb(e.shadowRoot,`.no_tr`))},`shr_1236`)}.get_instance(),rl=e({Roots:()=>tl,Tr:()=>nl}),il=class{static instance;static get_instance(){return this.instance||=new this}constructor(){}enable_offers=!0;offers=this.enable_offers?[new Q({name:`tinkoff_black`,has_ad_label:!0,browsers_blacklist:[`edge`],countries_whitelist:[`ru`]}),new Q({name:`tinkoff_investments_brokerage_account`,has_ad_label:!0,browsers_blacklist:[`edge`],countries_whitelist:[`ru`]}),new Q({name:`keymeleon`}),new Q({name:`other_projects_extensions`,browsers_blacklist:[`edge`],apps_blacklist:[`keymeleon`]}),new Q({name:`other_projects_apps`,browsers_blacklist:[`edge`],apps_whitelist:[`keymeleon`]}),new Q({name:`animated_themes`,apps_whitelist:[`clear_new_tab`],browsers_whitelist:[`chrome`],force_offer_despite_extension_name_in_its_text:!0}),new Q({name:`clear_new_tab`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Q({name:`empty_new_tab_page`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Q({name:`close_other_tabs_plus`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Q({name:`search_enhancer_for_google`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Q({name:`scroll_to_top`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]}),new Q({name:`advanced_extension_reloader`,browsers_whitelist:`all`,browsers_blacklist:[`opera`,`brave`,`yandex`,`firefox`]})]:[]}.get_instance(),al=class{static instance;static get_instance(){return this.instance||=new this}outer_is_visible=!1;inner_is_none=!1;set_input_type=({parent:e,app_id:t=``},r)=>err(()=>{let i=({input_type:e,app_id_2:r=``})=>err(()=>t===``?e:`${e}_${r}`,`shr_1122`),a=i({input_type:`mouse`,app_id_2:t}),o=i({input_type:`keyboard`,app_id_2:t}),c=r.type===`mousedown`?a:o,l=r.type===`keyboard`&&n(r)&&n(r.code)&&r.code===`Escape`;(c===a||!l)&&(c===a?(x.remove_cls(e,o),x.add_cls(e,c)):c===o&&(x.remove_cls(e,a),x.add_cls(e,c)))},`shr_1123`);bind_set_input_type_f=({parent:e,app_id:t=``}={})=>err(()=>{let r=n(e)?e:document.body,i=e=>err(()=>{this.set_input_type({parent:r,app_id:t},e)},`shr_1124`);x.bind(r,`mousedown`,i),x.bind(r,`keydown`,i)},`shr_1125`);simulate_click_on_enter=e=>err(()=>{e.code===`Enter`&&e.target.click()},`shr_1126`);simulate_color_visualization_click_on_enter=({input:e,i:t},r)=>err(()=>{let i={button:0},a={detail:1},o=()=>err(()=>{X.change_visibility({input:e,i:t,color_picker_state:`is_visible`},i)},`shr_1127`);r.code===`Enter`&&(r.ctrlKey||r.shiftKey||r.altKey?i.button=2:i.button=0,x.matches(r.target,`.palette_visualization`)&&!r.ctrlKey&&!r.shiftKey&&!r.altKey?(Y.select_palette_color({input:e,i:t},a),n(e.state)&&e.state[t].is_visible&&o()):o())},`shr_1128`)}.get_instance(),ol=e({TabIndex:()=>al}),sl=e({});export{Ja as A,mc as C,zs as D,Hs as E,jn as F,B as I,O as L,Ua as M,I as N,Yo as O,qr as P,L as R,hc as S,ic as T,wc as _,$c as a,vc as b,Kc as c,Pc as d,Mc as f,Oc as g,kc as h,rl as i,qa as j,W as k,Wc as l,Ac as m,ol as n,Zc as o,jc as p,al as r,Yc as s,sl as t,Hc as u,Sc as v,sc as w,gc as x,bc as y};