@revisium/admin 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-Bm4gz4e7.js +1885 -0
- package/dist/assets/{index-6HqKMu_R.css → index-D4XFaIWw.css} +1 -1
- package/dist/assets/vendor-chakra-81WUgB9u.js +16 -0
- package/dist/assets/vendor-graphql-BN0-5miB.js +50 -0
- package/dist/assets/vendor-mobx-RTHsWS6u.js +3 -0
- package/dist/assets/vendor-react-B-wSUMrZ.js +2 -0
- package/dist/index.html +6 -6
- package/package.json +12 -9
- package/dist/assets/index-Cr2BqgYM.js +0 -1892
- package/dist/assets/vendor-chakra-BM54tmcH.js +0 -9
- package/dist/assets/vendor-graphql-G4Xi1cXi.js +0 -49
- package/dist/assets/vendor-mobx-3H1Pbg0A.js +0 -3
- package/dist/assets/vendor-react-BVJTUrr9.js +0 -9
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import{g as Pe}from"./vendor-react-BVJTUrr9.js";function Be(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const he=JSON,Ue=e=>e.toUpperCase(),Me=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},je=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Ve=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},qe=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0};function X(e,t){if(!!!e)throw new Error(t)}function $e(e){return typeof e=="object"&&e!==null}function Ge(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const He=/\r\n|[\n\r]/g;function ce(e,t){let n=0,r=1;for(const i of e.body.matchAll(He)){if(typeof i.index=="number"||Ge(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ye(e){return Ae(e.source,ce(e.source,e.start))}function Ae(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,c=t.line+s,u=t.line===1?n:0,p=t.column+u,d=`${e.name}:${c}:${p}
|
|
2
|
-
`,y=r.split(/\r\n|[\n\r]/g),m=y[i];if(m.length>120){const T=Math.floor(p/80),A=p%80,E=[];for(let I=0;I<m.length;I+=80)E.push(m.slice(I,I+80));return d+fe([[`${c} |`,E[0]],...E.slice(1,T+1).map(I=>["|",I]),["|","^".padStart(A)],["|",E[T+1]]])}return d+fe([[`${c-1} |`,y[i-1]],[`${c} |`,m],["|","^".padStart(p)],[`${c+1} |`,y[i+1]]])}function fe(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
|
3
|
-
`)}function ze(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class pe extends Error{constructor(t,...n){var r,i,s;const{nodes:c,source:u,positions:p,path:d,originalError:y,extensions:m}=ze(n);super(t),this.name="GraphQLError",this.path=d??void 0,this.originalError=y??void 0,this.nodes=ye(Array.isArray(c)?c:c?[c]:void 0);const T=ye((r=this.nodes)===null||r===void 0?void 0:r.map(E=>E.loc).filter(E=>E!=null));this.source=u??(T==null||(i=T[0])===null||i===void 0?void 0:i.source),this.positions=p??T?.map(E=>E.start),this.locations=p&&u?p.map(E=>ce(u,E)):T?.map(E=>ce(E.source,E.start));const A=$e(y?.extensions)?y?.extensions:void 0;this.extensions=(s=m??A)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),y!=null&&y.stack?Object.defineProperty(this,"stack",{value:y.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,pe):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
|
|
4
|
-
|
|
5
|
-
`+Ye(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
|
|
6
|
-
|
|
7
|
-
`+Ae(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function ye(e){return e===void 0||e.length===0?void 0:e}function g(e,t,n){return new pe(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Je{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Ie{constructor(t,n,r,i,s,c){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=c,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Oe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Qe=new Set(Object.keys(Oe));function Ee(e){const t=e?.kind;return typeof t=="string"&&Qe.has(t)}var U;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(U||(U={}));var ue;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(ue||(ue={}));var f;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(f||(f={}));function le(e){return e===9||e===32}function G(e){return e>=48&&e<=57}function ge(e){return e>=97&&e<=122||e>=65&&e<=90}function _e(e){return ge(e)||e===95}function Xe(e){return ge(e)||G(e)||e===95}function We(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let c=0;c<e.length;++c){var s;const u=e[c],p=Ze(u);p!==u.length&&(r=(s=r)!==null&&s!==void 0?s:c,i=c,c!==0&&p<n&&(n=p))}return e.map((c,u)=>u===0?c:c.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Ze(e){let t=0;for(;t<e.length&&le(e.charCodeAt(t));)++t;return t}function Ke(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,s=r.length>1&&r.slice(1).every(A=>A.length===0||le(A.charCodeAt(0))),c=n.endsWith('\\"""'),u=e.endsWith('"')&&!c,p=e.endsWith("\\"),d=u||p,y=!i||e.length>70||d||s||c;let m="";const T=i&&le(e.charCodeAt(0));return(y&&!T||s)&&(m+=`
|
|
8
|
-
`),m+=n,(y||d)&&(m+=`
|
|
9
|
-
`),'"""'+m+'"""'}var a;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(a||(a={}));class et{constructor(t){const n=new Ie(a.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==a.EOF)do if(t.next)t=t.next;else{const n=nt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===a.COMMENT);return t}}function tt(e){return e===a.BANG||e===a.DOLLAR||e===a.AMP||e===a.PAREN_L||e===a.PAREN_R||e===a.SPREAD||e===a.COLON||e===a.EQUALS||e===a.AT||e===a.BRACKET_L||e===a.BRACKET_R||e===a.BRACE_L||e===a.PIPE||e===a.BRACE_R}function M(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ee(e,t){return be(e.charCodeAt(t))&&De(e.charCodeAt(t+1))}function be(e){return e>=55296&&e<=56319}function De(e){return e>=56320&&e<=57343}function F(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return a.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function O(e,t,n,r,i){const s=e.line,c=1+n-e.lineStart;return new Ie(t,n,r,s,c,i)}function nt(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return it(e,i);case 33:return O(e,a.BANG,i,i+1);case 36:return O(e,a.DOLLAR,i,i+1);case 38:return O(e,a.AMP,i,i+1);case 40:return O(e,a.PAREN_L,i,i+1);case 41:return O(e,a.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return O(e,a.SPREAD,i,i+3);break;case 58:return O(e,a.COLON,i,i+1);case 61:return O(e,a.EQUALS,i,i+1);case 64:return O(e,a.AT,i,i+1);case 91:return O(e,a.BRACKET_L,i,i+1);case 93:return O(e,a.BRACKET_R,i,i+1);case 123:return O(e,a.BRACE_L,i,i+1);case 124:return O(e,a.PIPE,i,i+1);case 125:return O(e,a.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?ut(e,i):st(e,i)}if(G(s)||s===45)return rt(e,i,s);if(_e(s))return lt(e,i);throw g(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:M(s)||ee(n,i)?`Unexpected character: ${F(e,i)}.`:`Invalid character: ${F(e,i)}.`)}return O(e,a.EOF,r,r)}function it(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(s===10||s===13)break;if(M(s))++i;else if(ee(n,i))i+=2;else break}return O(e,a.COMMENT,t,i,n.slice(t+1,i))}function rt(e,t,n){const r=e.source.body;let i=t,s=n,c=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),G(s))throw g(e.source,i,`Invalid number, unexpected digit after 0: ${F(e,i)}.`)}else i=re(e,i,s),s=r.charCodeAt(i);if(s===46&&(c=!0,s=r.charCodeAt(++i),i=re(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(c=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=re(e,i,s),s=r.charCodeAt(i)),s===46||_e(s))throw g(e.source,i,`Invalid number, expected digit but got: ${F(e,i)}.`);return O(e,c?a.FLOAT:a.INT,t,i,r.slice(t,i))}function re(e,t,n){if(!G(n))throw g(e.source,t,`Invalid number, expected digit but got: ${F(e,t)}.`);const r=e.source.body;let i=t+1;for(;G(r.charCodeAt(i));)++i;return i}function st(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,c="";for(;i<r;){const u=n.charCodeAt(i);if(u===34)return c+=n.slice(s,i),O(e,a.STRING,t,i+1,c);if(u===92){c+=n.slice(s,i);const p=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?ot(e,i):at(e,i):ct(e,i);c+=p.value,i+=p.size,s=i;continue}if(u===10||u===13)break;if(M(u))++i;else if(ee(n,i))i+=2;else throw g(e.source,i,`Invalid character within String: ${F(e,i)}.`)}throw g(e.source,i,"Unterminated string.")}function ot(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const s=n.charCodeAt(t+i++);if(s===125){if(i<5||!M(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|V(s),r<0)break}throw g(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function at(e,t){const n=e.source.body,r=me(n,t+2);if(M(r))return{value:String.fromCodePoint(r),size:6};if(be(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=me(n,t+8);if(De(i))return{value:String.fromCodePoint(r,i),size:12}}throw g(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function me(e,t){return V(e.charCodeAt(t))<<12|V(e.charCodeAt(t+1))<<8|V(e.charCodeAt(t+2))<<4|V(e.charCodeAt(t+3))}function V(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function ct(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
|
|
10
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw g(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function ut(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,c=s,u="";const p=[];for(;s<r;){const d=n.charCodeAt(s);if(d===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(c,s),p.push(u);const y=O(e,a.BLOCK_STRING,t,s+3,We(p).join(`
|
|
11
|
-
`));return e.line+=p.length-1,e.lineStart=i,y}if(d===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(c,s),c=s+1,s+=4;continue}if(d===10||d===13){u+=n.slice(c,s),p.push(u),d===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",c=s,i=s;continue}if(M(d))++s;else if(ee(n,s))s+=2;else throw g(e.source,s,`Invalid character within String: ${F(e,s)}.`)}throw g(e.source,s,"Unterminated string.")}function lt(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Xe(s))++i;else break}return O(e,a.NAME,t,i,n.slice(t,i))}const ht=10,Se=2;function de(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return pt(e,t);default:return String(e)}}function pt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(dt(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:te(r,n)}else if(Array.isArray(e))return yt(e,n);return ft(e,n)}function dt(e){return typeof e.toJSON=="function"}function ft(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Se?"["+Et(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function yt(e,t){if(e.length===0)return"[]";if(t.length>Se)return"[Array]";const n=Math.min(ht,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(te(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Et(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const mt=globalThis.process?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){const c=de(t);throw new Error(`Cannot use ${i} "${c}" from another module or realm.
|
|
12
|
-
|
|
13
|
-
Ensure that there is only one instance of "graphql" in the node_modules
|
|
14
|
-
directory. If different versions of "graphql" are the dependencies of other
|
|
15
|
-
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
16
|
-
|
|
17
|
-
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
18
|
-
|
|
19
|
-
Duplicate "graphql" modules cannot be used at the same time since different
|
|
20
|
-
versions may have different capabilities and behavior. The data from one
|
|
21
|
-
version used in the function from another could produce confusing and
|
|
22
|
-
spurious results.`)}}return!1};class Ce{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||X(!1,`Body must be a string. Received: ${de(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||X(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||X(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Tt(e){return mt(e,Ce)}function Nt(e,t){return new vt(e,t).parseDocument()}class vt{constructor(t,n={}){const r=Tt(t)?t:new Ce(t);this._lexer=new et(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(a.NAME);return this.node(t,{kind:f.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:f.DOCUMENT,definitions:this.many(a.SOF,this.parseDefinition,a.EOF)})}parseDefinition(){if(this.peek(a.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===a.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw g(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(a.BRACE_L))return this.node(t,{kind:f.OPERATION_DEFINITION,operation:U.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(a.NAME)&&(r=this.parseName()),this.node(t,{kind:f.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(a.NAME);switch(t.value){case"query":return U.QUERY;case"mutation":return U.MUTATION;case"subscription":return U.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(a.PAREN_L,this.parseVariableDefinition,a.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:f.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(a.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(a.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(a.DOLLAR),this.node(t,{kind:f.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:f.SELECTION_SET,selections:this.many(a.BRACE_L,this.parseSelection,a.BRACE_R)})}parseSelection(){return this.peek(a.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(a.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:f.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(a.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(a.PAREN_L,n,a.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(a.COLON),this.node(n,{kind:f.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(a.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(a.NAME)?this.node(t,{kind:f.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:f.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:f.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:f.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case a.BRACKET_L:return this.parseList(t);case a.BRACE_L:return this.parseObject(t);case a.INT:return this.advanceLexer(),this.node(n,{kind:f.INT,value:n.value});case a.FLOAT:return this.advanceLexer(),this.node(n,{kind:f.FLOAT,value:n.value});case a.STRING:case a.BLOCK_STRING:return this.parseStringLiteral();case a.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:f.BOOLEAN,value:!0});case"false":return this.node(n,{kind:f.BOOLEAN,value:!1});case"null":return this.node(n,{kind:f.NULL});default:return this.node(n,{kind:f.ENUM,value:n.value})}case a.DOLLAR:if(t)if(this.expectToken(a.DOLLAR),this._lexer.token.kind===a.NAME){const r=this._lexer.token.value;throw g(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:f.STRING,value:t.value,block:t.kind===a.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:f.LIST,values:this.any(a.BRACKET_L,n,a.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:f.OBJECT,fields:this.any(a.BRACE_L,n,a.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(a.COLON),this.node(n,{kind:f.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(a.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(a.AT),this.node(n,{kind:f.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(a.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(a.BRACKET_R),n=this.node(t,{kind:f.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(a.BANG)?this.node(t,{kind:f.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:f.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(a.STRING)||this.peek(a.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);return this.node(t,{kind:f.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(a.COLON);const r=this.parseNamedType();return this.node(t,{kind:f.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:f.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:f.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:c})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(a.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseFieldDefinition,a.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(a.COLON);const s=this.parseTypeReference(),c=this.parseConstDirectives();return this.node(t,{kind:f.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:c})}parseArgumentDefs(){return this.optionalMany(a.PAREN_L,this.parseInputValueDef,a.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(a.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(a.EQUALS)&&(s=this.parseConstValueLiteral());const c=this.parseConstDirectives();return this.node(t,{kind:f.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:c})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:f.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:c})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:f.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(a.EQUALS)?this.delimitedMany(a.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:f.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(a.BRACE_L,this.parseEnumValueDefinition,a.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:f.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw g(this._lexer.source,this._lexer.token.start,`${Q(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:f.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseInputValueDef,a.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===a.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:f.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:f.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:f.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:f.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:f.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:f.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:f.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(a.AT);const r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const c=this.parseDirectiveLocations();return this.node(t,{kind:f.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:c})}parseDirectiveLocations(){return this.delimitedMany(a.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(ue,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Je(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw g(this._lexer.source,n.start,`Expected ${ke(t)}, found ${Q(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===a.NAME&&n.value===t)this.advanceLexer();else throw g(this._lexer.source,n.start,`Expected "${t}", found ${Q(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===a.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return g(this._lexer.source,n.start,`Unexpected ${Q(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==a.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw g(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function Q(e){const t=e.value;return ke(e.kind)+(t!=null?` "${t}"`:"")}function ke(e){return tt(e)?`"${e}"`:e}function xt(e){return`"${e.replace(At,It)}"`}const At=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function It(e){return Ot[e.charCodeAt(0)]}const Ot=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],gt=Object.freeze({});function _t(e,t,n=Oe){const r=new Map;for(const S of Object.values(f))r.set(S,bt(t,S));let i,s=Array.isArray(e),c=[e],u=-1,p=[],d=e,y,m;const T=[],A=[];do{u++;const S=u===c.length,H=S&&p.length!==0;if(S){if(y=A.length===0?void 0:T[T.length-1],d=m,m=A.pop(),H)if(s){d=d.slice();let C=0;for(const[P,Y]of p){const z=P-C;Y===null?(d.splice(z,1),C++):d[z]=Y}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[C,P]of p)d[C]=P}u=i.index,c=i.keys,p=i.edits,s=i.inArray,i=i.prev}else if(m){if(y=s?u:c[u],d=m[y],d==null)continue;T.push(y)}let w;if(!Array.isArray(d)){var E,I;Ee(d)||X(!1,`Invalid AST Node: ${de(d)}.`);const C=S?(E=r.get(d.kind))===null||E===void 0?void 0:E.leave:(I=r.get(d.kind))===null||I===void 0?void 0:I.enter;if(w=C?.call(t,d,y,m,T,A),w===gt)break;if(w===!1){if(!S){T.pop();continue}}else if(w!==void 0&&(p.push([y,w]),!S))if(Ee(w))d=w;else{T.pop();continue}}if(w===void 0&&H&&p.push([y,d]),S)T.pop();else{var D;i={inArray:s,index:u,keys:c,edits:p,prev:i},s=Array.isArray(d),c=s?d:(D=n[d.kind])!==null&&D!==void 0?D:[],u=-1,p=[],m&&A.push(m),m=d}}while(i!==void 0);return p.length!==0?p[p.length-1][1]:e}function bt(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function we(e){return _t(e,St)}const Dt=80,St={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>h(e.definitions,`
|
|
23
|
-
|
|
24
|
-
`)},OperationDefinition:{leave(e){const t=v("(",h(e.variableDefinitions,", "),")"),n=h([e.operation,h([e.name,t]),h(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+v(" = ",n)+v(" ",h(r," "))},SelectionSet:{leave:({selections:e})=>k(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=v("",e,": ")+t;let c=s+v("(",h(n,", "),")");return c.length>Dt&&(c=s+v(`(
|
|
25
|
-
`,W(h(n,`
|
|
26
|
-
`)),`
|
|
27
|
-
)`)),h([c,h(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+v(" ",h(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>h(["...",v("on ",e),h(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${v("(",h(n,", "),")")} on ${t} ${v("",h(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Ke(e):xt(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+h(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+h(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+v("(",h(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>v("",e,`
|
|
28
|
-
`)+h(["schema",h(t," "),k(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>v("",e,`
|
|
29
|
-
`)+h(["scalar",t,h(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>v("",e,`
|
|
30
|
-
`)+h(["type",t,v("implements ",h(n," & ")),h(r," "),k(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>v("",e,`
|
|
31
|
-
`)+t+(Te(n)?v(`(
|
|
32
|
-
`,W(h(n,`
|
|
33
|
-
`)),`
|
|
34
|
-
)`):v("(",h(n,", "),")"))+": "+r+v(" ",h(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>v("",e,`
|
|
35
|
-
`)+h([t+": "+n,v("= ",r),h(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>v("",e,`
|
|
36
|
-
`)+h(["interface",t,v("implements ",h(n," & ")),h(r," "),k(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>v("",e,`
|
|
37
|
-
`)+h(["union",t,h(n," "),v("= ",h(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>v("",e,`
|
|
38
|
-
`)+h(["enum",t,h(n," "),k(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>v("",e,`
|
|
39
|
-
`)+h([t,h(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>v("",e,`
|
|
40
|
-
`)+h(["input",t,h(n," "),k(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>v("",e,`
|
|
41
|
-
`)+"directive @"+t+(Te(n)?v(`(
|
|
42
|
-
`,W(h(n,`
|
|
43
|
-
`)),`
|
|
44
|
-
)`):v("(",h(n,", "),")"))+(r?" repeatable":"")+" on "+h(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>h(["extend schema",h(e," "),k(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>h(["extend scalar",e,h(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>h(["extend type",e,v("implements ",h(t," & ")),h(n," "),k(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>h(["extend interface",e,v("implements ",h(t," & ")),h(n," "),k(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>h(["extend union",e,h(t," "),v("= ",h(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>h(["extend enum",e,h(t," "),k(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>h(["extend input",e,h(t," "),k(n)]," ")}};function h(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function k(e){return v(`{
|
|
45
|
-
`,W(h(e,`
|
|
46
|
-
`)),`
|
|
47
|
-
}`)}function v(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function W(e){return v(" ",e.replace(/\n/g,`
|
|
48
|
-
`))}function Te(e){var t;return(t=e?.some(n=>n.includes(`
|
|
49
|
-
`)))!==null&&t!==void 0?t:!1}const Mt=Object.freeze(Object.defineProperty({__proto__:null,print:we},Symbol.toStringTag,{value:"Module"}));function Ct(e,t){let n=null;for(const i of e.definitions)if(i.kind===f.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}const jt=Object.freeze(Object.defineProperty({__proto__:null,getOperationAST:Ct},Symbol.toStringTag,{value:"Module"})),Ne=e=>{let t;const n=e.definitions.filter(r=>r.kind==="OperationDefinition");return n.length===1&&(t=n[0]?.name?.value),t},se=e=>{if(typeof e=="string"){let n;try{const r=Nt(e);n=Ne(r)}catch{}return{query:e,operationName:n}}const t=Ne(e);return{query:we(e),operationName:t}};class $ extends Error{constructor(t,n){const r=`${$.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,$.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var q={exports:{}},kt=q.exports,ve;function wt(){return ve||(ve=1,function(e,t){var n=typeof self<"u"?self:kt,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(c){var u={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function p(o){return o&&DataView.prototype.isPrototypeOf(o)}if(u.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],y=ArrayBuffer.isView||function(o){return o&&d.indexOf(Object.prototype.toString.call(o))>-1};function m(o){if(typeof o!="string"&&(o=String(o)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))throw new TypeError("Invalid character in header field name");return o.toLowerCase()}function T(o){return typeof o!="string"&&(o=String(o)),o}function A(o){var l={next:function(){var N=o.shift();return{done:N===void 0,value:N}}};return u.iterable&&(l[Symbol.iterator]=function(){return l}),l}function E(o){this.map={},o instanceof E?o.forEach(function(l,N){this.append(N,l)},this):Array.isArray(o)?o.forEach(function(l){this.append(l[0],l[1])},this):o&&Object.getOwnPropertyNames(o).forEach(function(l){this.append(l,o[l])},this)}E.prototype.append=function(o,l){o=m(o),l=T(l);var N=this.map[o];this.map[o]=N?N+", "+l:l},E.prototype.delete=function(o){delete this.map[m(o)]},E.prototype.get=function(o){return o=m(o),this.has(o)?this.map[o]:null},E.prototype.has=function(o){return this.map.hasOwnProperty(m(o))},E.prototype.set=function(o,l){this.map[m(o)]=T(l)},E.prototype.forEach=function(o,l){for(var N in this.map)this.map.hasOwnProperty(N)&&o.call(l,this.map[N],N,this)},E.prototype.keys=function(){var o=[];return this.forEach(function(l,N){o.push(N)}),A(o)},E.prototype.values=function(){var o=[];return this.forEach(function(l){o.push(l)}),A(o)},E.prototype.entries=function(){var o=[];return this.forEach(function(l,N){o.push([N,l])}),A(o)},u.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function I(o){if(o.bodyUsed)return Promise.reject(new TypeError("Already read"));o.bodyUsed=!0}function D(o){return new Promise(function(l,N){o.onload=function(){l(o.result)},o.onerror=function(){N(o.error)}})}function S(o){var l=new FileReader,N=D(l);return l.readAsArrayBuffer(o),N}function H(o){var l=new FileReader,N=D(l);return l.readAsText(o),N}function w(o){for(var l=new Uint8Array(o),N=new Array(l.length),b=0;b<l.length;b++)N[b]=String.fromCharCode(l[b]);return N.join("")}function C(o){if(o.slice)return o.slice(0);var l=new Uint8Array(o.byteLength);return l.set(new Uint8Array(o)),l.buffer}function P(){return this.bodyUsed=!1,this._initBody=function(o){this._bodyInit=o,o?typeof o=="string"?this._bodyText=o:u.blob&&Blob.prototype.isPrototypeOf(o)?this._bodyBlob=o:u.formData&&FormData.prototype.isPrototypeOf(o)?this._bodyFormData=o:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)?this._bodyText=o.toString():u.arrayBuffer&&u.blob&&p(o)?(this._bodyArrayBuffer=C(o.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(o)||y(o))?this._bodyArrayBuffer=C(o):this._bodyText=o=Object.prototype.toString.call(o):this._bodyText="",this.headers.get("content-type")||(typeof o=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var o=I(this);if(o)return o;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?I(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(S)}),this.text=function(){var o=I(this);if(o)return o;if(this._bodyBlob)return H(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(w(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(Re)}),this.json=function(){return this.text().then(JSON.parse)},this}var Y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function z(o){var l=o.toUpperCase();return Y.indexOf(l)>-1?l:o}function L(o,l){l=l||{};var N=l.body;if(o instanceof L){if(o.bodyUsed)throw new TypeError("Already read");this.url=o.url,this.credentials=o.credentials,l.headers||(this.headers=new E(o.headers)),this.method=o.method,this.mode=o.mode,this.signal=o.signal,!N&&o._bodyInit!=null&&(N=o._bodyInit,o.bodyUsed=!0)}else this.url=String(o);if(this.credentials=l.credentials||this.credentials||"same-origin",(l.headers||!this.headers)&&(this.headers=new E(l.headers)),this.method=z(l.method||this.method||"GET"),this.mode=l.mode||this.mode||null,this.signal=l.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&N)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(N)}L.prototype.clone=function(){return new L(this,{body:this._bodyInit})};function Re(o){var l=new FormData;return o.trim().split("&").forEach(function(N){if(N){var b=N.split("="),_=b.shift().replace(/\+/g," "),x=b.join("=").replace(/\+/g," ");l.append(decodeURIComponent(_),decodeURIComponent(x))}}),l}function Le(o){var l=new E,N=o.replace(/\r?\n[\t ]+/g," ");return N.split(/\r?\n/).forEach(function(b){var _=b.split(":"),x=_.shift().trim();if(x){var J=_.join(":").trim();l.append(x,J)}}),l}P.call(L.prototype);function R(o,l){l||(l={}),this.type="default",this.status=l.status===void 0?200:l.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in l?l.statusText:"OK",this.headers=new E(l.headers),this.url=l.url||"",this._initBody(o)}P.call(R.prototype),R.prototype.clone=function(){return new R(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},R.error=function(){var o=new R(null,{status:0,statusText:""});return o.type="error",o};var Fe=[301,302,303,307,308];R.redirect=function(o,l){if(Fe.indexOf(l)===-1)throw new RangeError("Invalid status code");return new R(null,{status:l,headers:{location:o}})},c.DOMException=s.DOMException;try{new c.DOMException}catch{c.DOMException=function(l,N){this.message=l,this.name=N;var b=Error(l);this.stack=b.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function ne(o,l){return new Promise(function(N,b){var _=new L(o,l);if(_.signal&&_.signal.aborted)return b(new c.DOMException("Aborted","AbortError"));var x=new XMLHttpRequest;function J(){x.abort()}x.onload=function(){var j={status:x.status,statusText:x.statusText,headers:Le(x.getAllResponseHeaders()||"")};j.url="responseURL"in x?x.responseURL:j.headers.get("X-Request-URL");var ie="response"in x?x.response:x.responseText;N(new R(ie,j))},x.onerror=function(){b(new TypeError("Network request failed"))},x.ontimeout=function(){b(new TypeError("Network request failed"))},x.onabort=function(){b(new c.DOMException("Aborted","AbortError"))},x.open(_.method,_.url,!0),_.credentials==="include"?x.withCredentials=!0:_.credentials==="omit"&&(x.withCredentials=!1),"responseType"in x&&u.blob&&(x.responseType="blob"),_.headers.forEach(function(j,ie){x.setRequestHeader(ie,j)}),_.signal&&(_.signal.addEventListener("abort",J),x.onreadystatechange=function(){x.readyState===4&&_.signal.removeEventListener("abort",J)}),x.send(typeof _._bodyInit>"u"?null:_._bodyInit)})}return ne.polyfill=!0,s.fetch||(s.fetch=ne,s.Headers=E,s.Request=L,s.Response=R),c.Headers=E,c.Request=L,c.Response=R,c.fetch=ne,Object.defineProperty(c,"__esModule",{value:!0}),c})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(q,q.exports)),q.exports}var K=wt();const Z=Pe(K),Rt=Be({__proto__:null,default:Z},[K]),B=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Rt&&K.Headers&&e instanceof K.Headers?t=Me(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):t=e),t},xe=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Lt=e=>{if(!Array.isArray(e.query)){const r=e,i=[`query=${encodeURIComponent(xe(r.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,n=e.query.reduce((r,i,s)=>(r.push({query:xe(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),r),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},Ft=e=>async t=>{const{url:n,query:r,variables:i,operationName:s,fetch:c,fetchOptions:u,middleware:p}=t,d={...t.headers};let y="",m;e==="POST"?(m=Pt(r,i,s,u.jsonSerializer),typeof m=="string"&&(d["Content-Type"]="application/json")):y=Lt({query:r,variables:i,operationName:s,jsonSerializer:u.jsonSerializer??he});const T={method:e,headers:d,body:m,...u};let A=n,E=T;if(p){const I=await Promise.resolve(p({...T,url:n,operationName:s,variables:i})),{url:D,...S}=I;A=D,E=S}return y&&(A=`${A}?${y}`),await c(A,E)};class Vt{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=async(...r)=>{const[i,s,c]=r,u=Ve(i,s,c),{headers:p,fetch:d=Z,method:y="POST",requestMiddleware:m,responseMiddleware:T,...A}=this.requestConfig,{url:E}=this;u.signal!==void 0&&(A.signal=u.signal);const{operationName:I}=se(u.query);return oe({url:E,query:u.query,variables:u.variables,headers:{...B(ae(p)),...B(u.requestHeaders)},operationName:I,fetch:d,method:y,fetchOptions:A,middleware:m}).then(D=>(T&&T(D),D)).catch(D=>{throw T&&T(D),D})}}async request(t,...n){const[r,i]=n,s=je(t,r,i),{headers:c,fetch:u=Z,method:p="POST",requestMiddleware:d,responseMiddleware:y,...m}=this.requestConfig,{url:T}=this;s.signal!==void 0&&(m.signal=s.signal);const{query:A,operationName:E}=se(s.document);return oe({url:T,query:A,variables:s.variables,headers:{...B(ae(c)),...B(s.requestHeaders)},operationName:E,fetch:u,method:p,fetchOptions:m,middleware:d}).then(I=>(y&&y(I),I.data)).catch(I=>{throw y&&y(I),I})}batchRequests(t,n){const r=qe(t,n),{headers:i,...s}=this.requestConfig;r.signal!==void 0&&(s.signal=r.signal);const c=r.documents.map(({document:p})=>se(p).query),u=r.documents.map(({variables:p})=>p);return oe({url:this.url,query:c,variables:u,headers:{...B(ae(i)),...B(r.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??Z,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(p=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p.data)).catch(p=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,n){const{headers:r}=this.requestConfig;return r?r[t]=n:this.requestConfig.headers={[t]:n},this}setEndpoint(t){return this.url=t,this}}const oe=async e=>{const{query:t,variables:n,fetchOptions:r}=e,i=Ft(Ue(e.method??"post")),s=Array.isArray(e.query),c=await i(e),u=await Bt(c,r.jsonSerializer??he),p=Array.isArray(u)?!u.some(({data:y})=>!y):!!u.data,d=Array.isArray(u)||!u.errors||Array.isArray(u.errors)&&!u.errors.length||r.errorPolicy==="all"||r.errorPolicy==="ignore";if(c.ok&&d&&p){const{errors:y,...m}=(Array.isArray(u),u),T=r.errorPolicy==="ignore"?m:u;return{...s?{data:T}:T,headers:c.headers,status:c.status}}else{const y=typeof u=="string"?{error:u}:u;throw new $({...y,status:c.status,headers:c.headers},{query:t,variables:n})}},Pt=(e,t,n,r)=>{const i=r??he;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:n});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((c,u,p)=>(c.push({query:u,variables:t?t[p]:void 0}),c),[]);return i.stringify(s)},Bt=async(e,t)=>{let n;return e.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},ae=e=>typeof e=="function"?e():e;export{Vt as G,Mt as a,jt as g,Nt as p};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as te,a as fn,R as zt,b as cn}from"./vendor-react-BVJTUrr9.js";function d(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var vn={};function Tt(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:vn}var fr=Object.assign,qe=Object.getOwnPropertyDescriptor,M=Object.defineProperty,Re=Object.prototype,bt=[];Object.freeze(bt);var Dt={};Object.freeze(Dt);var hn=typeof Proxy<"u",_n=Object.toString();function cr(){hn||d("Proxy not available")}function vr(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var ve=function(){};function T(e){return typeof e=="function"}function re(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function tt(e){return e!==null&&typeof e=="object"}function G(e){if(!tt(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n.toString()===_n}function hr(e){var t=e?.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function xe(e,t,n){M(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function _r(e,t,n){M(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function X(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(r){return tt(r)&&r[n]===!0}}function ye(e){return e instanceof Map}function Te(e){return e instanceof Set}var dr=typeof Object.getOwnPropertySymbols<"u";function dn(e){var t=Object.keys(e);if(!dr)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(r){return Re.propertyIsEnumerable.call(e,r)})):t}var _e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:dr?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function pr(e){return e===null?null:typeof e=="object"?""+e:e}function K(e,t){return Re.hasOwnProperty.call(e,t)}var pn=Object.getOwnPropertyDescriptors||function(t){var n={};return _e(t).forEach(function(r){n[r]=qe(t,r)}),n};function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mn(r.key),r)}}function Vt(e,t,n){return t&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ne.apply(this,arguments)}function br(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gt(e,t)}function gt(e,t){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gt(e,t)}function st(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gn(e,t){if(e){if(typeof e=="string")return qt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(e,t)}}function qt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function he(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=gn(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yn(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mn(e){var t=yn(e,"string");return typeof t=="symbol"?t:String(t)}var I=Symbol("mobx-stored-annotations");function V(e){function t(n,r){if(De(r))return e.decorate_20223_(n,r);me(n,r,e)}return Object.assign(t,e)}function me(e,t,n){K(e,I)||xe(e,I,ne({},e[I])),Pn(n)||(e[I][t]=n)}function On(e){return K(e,I)||xe(e,I,ne({},e[I])),e[I]}function De(e){return typeof e=="object"&&typeof e.kind=="string"}var _=Symbol("mobx administration"),Ve=function(){function e(n){n===void 0&&(n="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=p.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=n}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},t.reportObserved=function(){return Ir(this)},t.reportChanged=function(){R(),Mr(this),x()},t.toString=function(){return this.name_},e}(),Nt=X("Atom",Ve);function gr(e,t,n){t===void 0&&(t=ve),n===void 0&&(n=ve);var r=new Ve(e);return t!==ve&&Ci(r,t),n!==ve&&qr(r,n),r}function An(e,t){return sn(e,t)}function Sn(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var de={structural:An,default:Sn};function ie(e,t,n){return It(e)?e:Array.isArray(e)?O.array(e,{name:n}):G(e)?O.object(e,void 0,{name:n}):ye(e)?O.map(e,{name:n}):Te(e)?O.set(e,{name:n}):typeof e=="function"&&!ot(e)&&!Pe(e)?hr(e)?be(e):Ee(n,e):e}function wn(e,t,n){if(e==null||k(e)||ue(e)||U(e)||J(e))return e;if(Array.isArray(e))return O.array(e,{name:n,deep:!1});if(G(e))return O.object(e,void 0,{name:n,deep:!1});if(ye(e))return O.map(e,{name:n,deep:!1});if(Te(e))return O.set(e,{name:n,deep:!1})}function rt(e){return e}function En(e,t){return sn(e,t)?t:e}var yr="override",Na=V({annotationType_:yr,make_:jn,extend_:Rn,decorate_20223_:xn});function Pn(e){return e.annotationType_===yr}function jn(e,t){return 0}function Rn(e,t,n,r){d("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function xn(e,t){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function Ne(e,t){return{annotationType_:e,options_:t,make_:Tn,extend_:Dn,decorate_20223_:Vn}}function Tn(e,t,n,r){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,n,!1)===null?0:1;if(r===e.target_)return this.extend_(e,t,n,!1)===null?0:2;if(ot(n.value))return 1;var a=mr(e,this,t,n,!1);return M(r,t,a),2}function Dn(e,t,n,r){var i=mr(e,this,t,n);return e.defineProperty_(t,i,r)}function Vn(e,t){var n=t.kind,r=t.name,i=t.addInitializer,a=this,o=function(l){var f,v,h,b;return ae((f=(v=a.options_)==null?void 0:v.name)!=null?f:r.toString(),l,(h=(b=a.options_)==null?void 0:b.autoAction)!=null?h:!1)};if(n=="field"){i(function(){me(this,r,a)});return}if(n=="method"){var s;return ot(e)||(e=o(e)),(s=this.options_)!=null&&s.bound&&i(function(){var u=this,l=u[r].bind(u);l.isMobxAction=!0,u[r]=l}),e}d("Cannot apply '"+a.annotationType_+"' to '"+String(r)+"' (kind: "+n+"):"+(`
|
|
3
|
-
'`+a.annotationType_+"' can only be used on properties with a function value."))}function Nn(e,t,n,r){t.annotationType_,r.value}function mr(e,t,n,r,i){var a,o,s,u,l,f,v;i===void 0&&(i=c.safeDescriptors),Nn(e,t,n,r);var h=r.value;if((a=t.options_)!=null&&a.bound){var b;h=h.bind((b=e.proxy_)!=null?b:e.target_)}return{value:ae((o=(s=t.options_)==null?void 0:s.name)!=null?o:n.toString(),h,(u=(l=t.options_)==null?void 0:l.autoAction)!=null?u:!1,(f=t.options_)!=null&&f.bound?(v=e.proxy_)!=null?v:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function Or(e,t){return{annotationType_:e,options_:t,make_:Bn,extend_:Cn,decorate_20223_:Ln}}function Bn(e,t,n,r){var i;if(r===e.target_)return this.extend_(e,t,n,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!K(e.target_,t)||!Pe(e.target_[t]))&&this.extend_(e,t,n,!1)===null)return 0;if(Pe(n.value))return 1;var a=Ar(e,this,t,n,!1,!1);return M(r,t,a),2}function Cn(e,t,n,r){var i,a=Ar(e,this,t,n,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,a,r)}function Ln(e,t){var n,r=t.name,i=t.addInitializer;return Pe(e)||(e=be(e)),(n=this.options_)!=null&&n.bound&&i(function(){var a=this,o=a[r].bind(a);o.isMobXFlow=!0,a[r]=o}),e}function In(e,t,n,r){t.annotationType_,r.value}function Ar(e,t,n,r,i,a){a===void 0&&(a=c.safeDescriptors),In(e,t,n,r);var o=r.value;if(Pe(o)||(o=be(o)),i){var s;o=o.bind((s=e.proxy_)!=null?s:e.target_),o.isMobXFlow=!0}return{value:o,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function Bt(e,t){return{annotationType_:e,options_:t,make_:Mn,extend_:$n,decorate_20223_:Un}}function Mn(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function $n(e,t,n,r){return Kn(e,this,t,n),e.defineComputedProperty_(t,ne({},this.options_,{get:n.get,set:n.set}),r)}function Un(e,t){var n=this,r=t.name,i=t.addInitializer;return i(function(){var a=le(this)[_],o=ne({},n.options_,{get:e,context:this});o.name||(o.name="ObservableObject."+r.toString()),a.values_.set(r,new pe(o))}),function(){return this[_].getObservablePropValue_(r)}}function Kn(e,t,n,r){t.annotationType_,r.get}function nt(e,t){return{annotationType_:e,options_:t,make_:Fn,extend_:Gn,decorate_20223_:zn}}function Fn(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function Gn(e,t,n,r){var i,a;return qn(e,this),e.defineObservableProperty_(t,n.value,(i=(a=this.options_)==null?void 0:a.enhancer)!=null?i:ie,r)}function zn(e,t){var n=this,r=t.kind,i=t.name,a=new WeakSet;function o(s,u){var l,f,v=le(s)[_],h=new Y(u,(l=(f=n.options_)==null?void 0:f.enhancer)!=null?l:ie,"ObservableObject."+i.toString(),!1);v.values_.set(i,h),a.add(s)}if(r=="accessor")return{get:function(){return a.has(this)||o(this,e.get.call(this)),this[_].getObservablePropValue_(i)},set:function(u){return a.has(this)||o(this,u),this[_].setObservablePropValue_(i,u)},init:function(u){return a.has(this)||o(this,u),u}}}function qn(e,t,n,r){t.annotationType_}var Wn="true",Hn=Sr();function Sr(e){return{annotationType_:Wn,options_:e,make_:Yn,extend_:Xn,decorate_20223_:Jn}}function Yn(e,t,n,r){var i,a;if(n.get)return ee.make_(e,t,n,r);if(n.set){var o=ae(t.toString(),n.set);return r===e.target_?e.defineProperty_(t,{configurable:c.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(M(r,t,{configurable:!0,set:o}),2)}if(r!==e.target_&&typeof n.value=="function"){var s;if(hr(n.value)){var u,l=(u=this.options_)!=null&&u.autoBind?be.bound:be;return l.make_(e,t,n,r)}var f=(s=this.options_)!=null&&s.autoBind?Ee.bound:Ee;return f.make_(e,t,n,r)}var v=((i=this.options_)==null?void 0:i.deep)===!1?O.ref:O;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var h;n.value=n.value.bind((h=e.proxy_)!=null?h:e.target_)}return v.make_(e,t,n,r)}function Xn(e,t,n,r){var i,a;if(n.get)return ee.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:c.safeDescriptors?e.isPlainObject_:!0,set:ae(t.toString(),n.set)},r);if(typeof n.value=="function"&&(i=this.options_)!=null&&i.autoBind){var o;n.value=n.value.bind((o=e.proxy_)!=null?o:e.target_)}var s=((a=this.options_)==null?void 0:a.deep)===!1?O.ref:O;return s.extend_(e,t,n,r)}function Jn(e,t){d("'"+this.annotationType_+"' cannot be used as a decorator")}var kn="observable",Zn="observable.ref",Qn="observable.shallow",ei="observable.struct",wr={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(wr);function Ie(e){return e||wr}var yt=nt(kn),ti=nt(Zn,{enhancer:rt}),ri=nt(Qn,{enhancer:wn}),ni=nt(ei,{enhancer:En}),Er=V(yt);function Me(e){return e.deep===!0?ie:e.deep===!1?rt:ai(e.defaultDecorator)}function ii(e){var t;return e?(t=e.defaultDecorator)!=null?t:Sr(e):void 0}function ai(e){var t,n;return e&&(t=(n=e.options_)==null?void 0:n.enhancer)!=null?t:ie}function Pr(e,t,n){if(De(t))return yt.decorate_20223_(e,t);if(re(t)){me(e,t,yt);return}return It(e)?e:G(e)?O.object(e,t,n):Array.isArray(e)?O.array(e,t):ye(e)?O.map(e,t):Te(e)?O.set(e,t):typeof e=="object"&&e!==null?e:O.box(e,t)}fr(Pr,Er);var oi={box:function(t,n){var r=Ie(n);return new Y(t,Me(r),r.name,!0,r.equals)},array:function(t,n){var r=Ie(n);return(c.useProxies===!1||r.proxy===!1?fa:ea)(t,Me(r),r.name)},map:function(t,n){var r=Ie(n);return new Ut(t,Me(r),r.name)},set:function(t,n){var r=Ie(n);return new tn(t,Me(r),r.name)},object:function(t,n,r){return Z(function(){return Lt(c.useProxies===!1||r?.proxy===!1?le({},r):ki({},r),t,n)})},ref:V(ti),shallow:V(ri),deep:Er,struct:V(ni)},O=fr(Pr,oi),jr="computed",si="computed.struct",mt=Bt(jr),ui=Bt(si,{equals:de.structural}),ee=function(t,n){if(De(n))return mt.decorate_20223_(t,n);if(re(n))return me(t,n,mt);if(G(t))return V(Bt(jr,t));var r=G(n)?n:{};return r.get=t,r.name||(r.name=t.name||""),new pe(r)};Object.assign(ee,mt);ee.struct=V(ui);var Wt,Ht,We=0,li=1,fi=(Wt=(Ht=qe(function(){},"name"))==null?void 0:Ht.configurable)!=null?Wt:!1,Yt={value:"action",configurable:!0,writable:!1,enumerable:!1};function ae(e,t,n,r){n===void 0&&(n=!1);function i(){return Rr(e,n,t,r||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},fi&&(Yt.value=e,M(i,"name",Yt)),i}function Rr(e,t,n,r,i){var a=ci(e,t);try{return n.apply(r,i)}catch(o){throw a.error_=o,o}finally{vi(a)}}function ci(e,t,n,r){var i=!1,a=0,o=c.trackingDerivation,s=!t||!o;R();var u=c.allowStateChanges;s&&(se(),u=it(!0));var l=Ct(!0),f={runAsAction_:s,prevDerivation_:o,prevAllowStateChanges_:u,prevAllowStateReads_:l,notifySpy_:i,startTime_:a,actionId_:li++,parentActionId_:We};return We=f.actionId_,f}function vi(e){We!==e.actionId_&&d(30),We=e.parentActionId_,e.error_!==void 0&&(c.suppressReactionErrors=!0),at(e.prevAllowStateChanges_),Ae(e.prevAllowStateReads_),x(),e.runAsAction_&&F(e.prevDerivation_),c.suppressReactionErrors=!1}function hi(e,t){var n=it(e);try{return t()}finally{at(n)}}function it(e){var t=c.allowStateChanges;return c.allowStateChanges=e,t}function at(e){c.allowStateChanges=e}var xr;xr=Symbol.toPrimitive;var Y=function(e){br(t,e);function t(r,i,a,o,s){var u;return a===void 0&&(a="ObservableValue"),s===void 0&&(s=de.default),u=e.call(this,a)||this,u.enhancer=void 0,u.name_=void 0,u.equals=void 0,u.hasUnreportedChange_=!1,u.interceptors_=void 0,u.changeListeners_=void 0,u.value_=void 0,u.dehancer=void 0,u.enhancer=i,u.name_=a,u.equals=s,u.value_=i(r,void 0,a),u}var n=t.prototype;return n.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},n.set=function(i){this.value_,i=this.prepareNewValue_(i),i!==c.UNCHANGED&&this.setNewValue_(i)},n.prepareNewValue_=function(i){if(P(this)){var a=j(this,{object:this,type:$,newValue:i});if(!a)return c.UNCHANGED;i=a.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?c.UNCHANGED:i},n.setNewValue_=function(i){var a=this.value_;this.value_=i,this.reportChanged(),N(this)&&B(this,{type:$,object:this,newValue:i,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(i){return Be(this,i)},n.observe_=function(i,a){return a&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:$,newValue:this.value_,oldValue:void 0}),Ce(this,i)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return pr(this.get())},n[xr]=function(){return this.valueOf()},t}(Ve),_i=X("ObservableValue",Y),Tr;Tr=Symbol.toPrimitive;var pe=function(){function e(n){this.dependenciesState_=p.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=p.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ye(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=He.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,n.get||d(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=ae("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?de.structural:de.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){yi(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},t.get=function(){if(this.isComputing_&&d(32,this.name_,this.derivation),c.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Ot(this)&&(this.warnAboutUntrackedRead_(),R(),this.value_=this.computeValue_(!1),x());else if(Ir(this),Ot(this)){var r=c.trackingContext;this.keepAlive_&&!r&&(c.trackingContext=this),this.trackAndCompute()&&gi(this),c.trackingContext=r}var i=this.value_;if(Fe(i))throw i.cause;return i},t.set=function(r){if(this.setter_){this.isRunningSetter_&&d(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,r)}finally{this.isRunningSetter_=!1}}else d(34,this.name_)},t.trackAndCompute=function(){var r=this.value_,i=this.dependenciesState_===p.NOT_TRACKING_,a=this.computeValue_(!0),o=i||Fe(r)||Fe(a)||!this.equals_(r,a);return o&&(this.value_=a),o},t.computeValue_=function(r){this.isComputing_=!0;var i=it(!1),a;if(r)a=Dr(this,this.derivation,this.scope_);else if(c.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(o){a=new Ye(o)}return at(i),this.isComputing_=!1,a},t.suspend_=function(){this.keepAlive_||(At(this),this.value_=void 0)},t.observe_=function(r,i){var a=this,o=!0,s=void 0;return xi(function(){var u=a.get();if(!o||i){var l=se();r({observableKind:"computed",debugObjectName:a.name_,type:$,object:a,newValue:u,oldValue:s}),F(l)}o=!1,s=u})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return pr(this.get())},t[Tr]=function(){return this.valueOf()},e}(),oe=X("ComputedValue",pe),p;(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_"})(p||(p={}));var He;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(He||(He={}));var Ye=function(t){this.cause=void 0,this.cause=t};function Fe(e){return e instanceof Ye}function Ot(e){switch(e.dependenciesState_){case p.UP_TO_DATE_:return!1;case p.NOT_TRACKING_:case p.STALE_:return!0;case p.POSSIBLY_STALE_:{for(var t=Ct(!0),n=se(),r=e.observing_,i=r.length,a=0;a<i;a++){var o=r[a];if(oe(o)){if(c.disableErrorBoundaries)o.get();else try{o.get()}catch{return F(n),Ae(t),!0}if(e.dependenciesState_===p.STALE_)return F(n),Ae(t),!0}}return Nr(e),F(n),Ae(t),!1}}}function Dr(e,t,n){var r=Ct(!0);Nr(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++c.runId;var i=c.trackingDerivation;c.trackingDerivation=e,c.inBatch++;var a;if(c.disableErrorBoundaries===!0)a=t.call(n);else try{a=t.call(n)}catch(o){a=new Ye(o)}return c.inBatch--,c.trackingDerivation=i,di(e),Ae(r),a}function di(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=p.UP_TO_DATE_,i=0,a=e.unboundDepsCount_,o=0;o<a;o++){var s=n[o];s.diffValue_===0&&(s.diffValue_=1,i!==o&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}for(n.length=i,e.newObserving_=null,a=t.length;a--;){var u=t[a];u.diffValue_===0&&Cr(u,e),u.diffValue_=0}for(;i--;){var l=n[i];l.diffValue_===1&&(l.diffValue_=0,bi(l,e))}r!==p.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function At(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)Cr(t[n],e);e.dependenciesState_=p.NOT_TRACKING_}function Vr(e){var t=se();try{return e()}finally{F(t)}}function se(){var e=c.trackingDerivation;return c.trackingDerivation=null,e}function F(e){c.trackingDerivation=e}function Ct(e){var t=c.allowStateReads;return c.allowStateReads=e,t}function Ae(e){c.allowStateReads=e}function Nr(e){if(e.dependenciesState_!==p.UP_TO_DATE_){e.dependenciesState_=p.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=p.UP_TO_DATE_}}var Ge=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},ze=!0,Br=!1,c=function(){var e=Tt();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(ze=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new Ge().version&&(ze=!1),ze?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ge):(setTimeout(function(){Br||d(35)},1),new Ge)}();function pi(){if((c.pendingReactions.length||c.inBatch||c.isRunningReactions)&&d(36),Br=!0,ze){var e=Tt();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),c=new Ge}}function bi(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Cr(e,t){e.observers_.delete(t),e.observers_.size===0&&Lr(e)}function Lr(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,c.pendingUnobservations.push(e))}function R(){c.inBatch++}function x(){if(--c.inBatch===0){$r();for(var e=c.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,n.observers_.size===0&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof pe&&n.suspend_())}c.pendingUnobservations=[]}}function Ir(e){var t=c.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&c.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),e.isBeingObserved_):(e.observers_.size===0&&c.inBatch>0&&Lr(e),!1)}function Mr(e){e.lowestObserverState_!==p.STALE_&&(e.lowestObserverState_=p.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===p.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=p.STALE_}))}function gi(e){e.lowestObserverState_!==p.STALE_&&(e.lowestObserverState_=p.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===p.POSSIBLY_STALE_?t.dependenciesState_=p.STALE_:t.dependenciesState_===p.UP_TO_DATE_&&(e.lowestObserverState_=p.UP_TO_DATE_)}))}function yi(e){e.lowestObserverState_===p.UP_TO_DATE_&&(e.lowestObserverState_=p.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===p.UP_TO_DATE_&&(t.dependenciesState_=p.POSSIBLY_STALE_,t.onBecomeStale_())}))}var we=function(){function e(n,r,i,a){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=p.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=He.NONE,this.name_=n,this.onInvalidate_=r,this.errorHandler_=i,this.requiresObservable_=a}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,c.pendingReactions.push(this),$r())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){R(),this.isScheduled_=!1;var r=c.trackingContext;if(c.trackingContext=this,Ot(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}c.trackingContext=r,x()}},t.track=function(r){if(!this.isDisposed_){R(),this.isRunning_=!0;var i=c.trackingContext;c.trackingContext=this;var a=Dr(this,r,void 0);c.trackingContext=i,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&At(this),Fe(a)&&this.reportExceptionInDerivation_(a.cause),x()}},t.reportExceptionInDerivation_=function(r){var i=this;if(this.errorHandler_){this.errorHandler_(r,this);return}if(c.disableErrorBoundaries)throw r;var a="[mobx] uncaught error in '"+this+"'";c.suppressReactionErrors||console.error(a,r),c.globalReactionErrorHandlers.forEach(function(o){return o(r,i)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(R(),At(this),x()))},t.getDisposer_=function(r){var i=this,a=function o(){i.dispose(),r==null||r.removeEventListener==null||r.removeEventListener("abort",o)};return r==null||r.addEventListener==null||r.addEventListener("abort",a),a[_]=this,a},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(r){},e}(),mi=100,St=function(t){return t()};function $r(){c.inBatch>0||c.isRunningReactions||St(Oi)}function Oi(){c.isRunningReactions=!0;for(var e=c.pendingReactions,t=0;e.length>0;){++t===mi&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}c.isRunningReactions=!1}var Xe=X("Reaction",we);function Ai(e){var t=St;St=function(r){return e(function(){return t(r)})}}function Se(){return!1}function Si(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Ur="action",wi="action.bound",Kr="autoAction",Ei="autoAction.bound",Fr="<unnamed action>",wt=Ne(Ur),Pi=Ne(wi,{bound:!0}),Et=Ne(Kr,{autoAction:!0}),ji=Ne(Ei,{autoAction:!0,bound:!0});function Gr(e){var t=function(r,i){if(T(r))return ae(r.name||Fr,r,e);if(T(i))return ae(r,i,e);if(De(i))return(e?Et:wt).decorate_20223_(r,i);if(re(i))return me(r,i,e?Et:wt);if(re(r))return V(Ne(e?Kr:Ur,{name:r,autoAction:e}))};return t}var A=Gr(!1);Object.assign(A,wt);var Ee=Gr(!0);Object.assign(Ee,Et);A.bound=V(Pi);Ee.bound=V(ji);function Ri(e){return Rr(e.name||Fr,!1,e,this,void 0)}function ot(e){return T(e)&&e.isMobxAction===!0}function xi(e,t){var n,r,i,a,o;t===void 0&&(t=Dt);var s=(n=(r=t)==null?void 0:r.name)!=null?n:"Autorun",u=!t.scheduler&&!t.delay,l;if(u)l=new we(s,function(){this.track(h)},t.onError,t.requiresObservable);else{var f=zr(t),v=!1;l=new we(s,function(){v||(v=!0,f(function(){v=!1,l.isDisposed_||l.track(h)}))},t.onError,t.requiresObservable)}function h(){e(l)}return(i=t)!=null&&(a=i.signal)!=null&&a.aborted||l.schedule_(),l.getDisposer_((o=t)==null?void 0:o.signal)}var Ti=function(t){return t()};function zr(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ti}function Di(e,t,n){var r,i,a,o;n===void 0&&(n=Dt);var s=(r=n.name)!=null?r:"Reaction",u=A(s,n.onError?Vi(n.onError,t):t),l=!n.scheduler&&!n.delay,f=zr(n),v=!0,h=!1,b,S=n.compareStructural?de.structural:n.equals||de.default,g=new we(s,function(){v||l?m():h||(h=!0,f(m))},n.onError,n.requiresObservable);function m(){if(h=!1,!g.isDisposed_){var L=!1,z=b;g.track(function(){var q=hi(!1,function(){return e(g)});L=v||!S(b,q),b=q}),(v&&n.fireImmediately||!v&&L)&&u(b,z,g),v=!1}}return(i=n)!=null&&(a=i.signal)!=null&&a.aborted||g.schedule_(),g.getDisposer_((o=n)==null?void 0:o.signal)}function Vi(e,t){return function(){try{return t.apply(this,arguments)}catch(n){e.call(this,n)}}}var Ni="onBO",Bi="onBUO";function Ci(e,t,n){return Wr(Ni,e,t,n)}function qr(e,t,n){return Wr(Bi,e,t,n)}function Wr(e,t,n,r){var i=ge(t),a=T(r)?r:n,o=e+"L";return i[o]?i[o].add(a):i[o]=new Set([a]),function(){var s=i[o];s&&(s.delete(a),s.size===0&&delete i[o])}}var Li="never",$e="always",Ii="observed";function Mi(e){e.isolateGlobalState===!0&&pi();var t=e.useProxies,n=e.enforceActions;if(t!==void 0&&(c.useProxies=t===$e?!0:t===Li?!1:typeof Proxy<"u"),t==="ifavailable"&&(c.verifyProxies=!0),n!==void 0){var r=n===$e?$e:n===Ii;c.enforceActions=r,c.allowStateChanges=!(r===!0||r===$e)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(c[i]=!!e[i])}),c.allowStateReads=!c.observableRequiresReaction,e.reactionScheduler&&Ai(e.reactionScheduler)}function Lt(e,t,n,r){var i=pn(t);return Z(function(){var a=le(e,r)[_];_e(i).forEach(function(o){a.extend_(o,i[o],n&&o in n?n[o]:!0)})}),e}function $i(e,t){return Hr(ge(e,t))}function Hr(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=Ui(e.observing_).map(Hr)),t}function Ui(e){return Array.from(new Set(e))}var Ki=0;function Yr(){this.message="FLOW_CANCELLED"}Yr.prototype=Object.create(Error.prototype);var ut=Or("flow"),Fi=Or("flow.bound",{bound:!0}),be=Object.assign(function(t,n){if(De(n))return ut.decorate_20223_(t,n);if(re(n))return me(t,n,ut);var r=t,i=r.name||"<unnamed flow>",a=function(){var s=this,u=arguments,l=++Ki,f=A(i+" - runid: "+l+" - init",r).apply(s,u),v,h=void 0,b=new Promise(function(S,g){var m=0;v=g;function L(w){h=void 0;var W;try{W=A(i+" - runid: "+l+" - yield "+m++,f.next).call(f,w)}catch(Q){return g(Q)}q(W)}function z(w){h=void 0;var W;try{W=A(i+" - runid: "+l+" - yield "+m++,f.throw).call(f,w)}catch(Q){return g(Q)}q(W)}function q(w){if(T(w?.then)){w.then(q,g);return}return w.done?S(w.value):(h=Promise.resolve(w.value),h.then(L,z))}L(void 0)});return b.cancel=A(i+" - runid: "+l+" - cancel",function(){try{h&&Xt(h);var S=f.return(void 0),g=Promise.resolve(S.value);g.then(ve,ve),Xt(g),v(new Yr)}catch(m){v(m)}}),b};return a.isMobXFlow=!0,a},ut);be.bound=V(Fi);function Xt(e){T(e.cancel)&&e.cancel()}function Pe(e){return e?.isMobXFlow===!0}function Xr(e,t){if(t===void 0)return oe(e);if(k(e)===!1||!e[_].values_.has(t))return!1;var n=ge(e,t);return oe(n)}function Gi(e){return Xr(e)}function lt(e,t){return Xr(e,t)}function zi(e,t){return e?k(e)||!!e[_]||Nt(e)||Xe(e)||oe(e):!1}function It(e){return zi(e)}function qi(e){if(k(e))return e[_].keys_();if(U(e)||J(e))return Array.from(e.keys());if(ue(e))return e.map(function(t,n){return n});d(5)}function Wi(e){if(k(e))return e[_].ownKeys_();d(38)}function Hi(e,t,n,r){return T(n)?Xi(e,t,n,r):Yi(e,t,n)}function Yi(e,t,n){return Le(e).observe_(t,n)}function Xi(e,t,n,r){return Le(e,t).observe_(n,r)}function Ue(e,t,n){return e.set(t,n),n}function ce(e,t){if(e==null||typeof e!="object"||e instanceof Date||!It(e))return e;if(_i(e)||oe(e))return ce(e.get(),t);if(t.has(e))return t.get(e);if(ue(e)){var n=Ue(t,e,new Array(e.length));return e.forEach(function(o,s){n[s]=ce(o,t)}),n}if(J(e)){var r=Ue(t,e,new Set);return e.forEach(function(o){r.add(ce(o,t))}),r}if(U(e)){var i=Ue(t,e,new Map);return e.forEach(function(o,s){i.set(s,ce(o,t))}),i}else{var a=Ue(t,e,{});return Wi(e).forEach(function(o){Re.propertyIsEnumerable.call(e,o)&&(a[o]=ce(e[o],t))}),a}}function Ba(e,t){return ce(e,new Map)}function D(e,t){t===void 0&&(t=void 0),R();try{return e.apply(t)}finally{x()}}function fe(e){return e[_]}var Ji={has:function(t,n){return fe(t).has_(n)},get:function(t,n){return fe(t).get_(n)},set:function(t,n,r){var i;return re(n)?(i=fe(t).set_(n,r,!0))!=null?i:!0:!1},deleteProperty:function(t,n){var r;return re(n)?(r=fe(t).delete_(n,!0))!=null?r:!0:!1},defineProperty:function(t,n,r){var i;return(i=fe(t).defineProperty_(n,r))!=null?i:!0},ownKeys:function(t){return fe(t).ownKeys_()},preventExtensions:function(t){d(13)}};function ki(e,t){var n,r;return cr(),e=le(e,t),(r=(n=e[_]).proxy_)!=null?r:n.proxy_=new Proxy(e,Ji)}function P(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Be(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),vr(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function j(e,t){var n=se();try{for(var r=[].concat(e.interceptors_||[]),i=0,a=r.length;i<a&&(t=r[i](t),t&&!t.type&&d(14),!!t);i++);return t}finally{F(n)}}function N(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function Ce(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),vr(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function B(e,t){var n=se(),r=e.changeListeners_;if(r){r=r.slice();for(var i=0,a=r.length;i<a;i++)r[i](t);F(n)}}function Mt(e,t,n){return Z(function(){var r,i=le(e,n)[_];(r=t)!=null||(t=On(e)),_e(t).forEach(function(a){return i.make_(a,t[a])})}),e}var ft=Symbol("mobx-keys");function Ca(e,t,n){return G(e)?Lt(e,e,t,n):(Z(function(){var r=le(e,n)[_];if(!e[ft]){var i=Object.getPrototypeOf(e),a=new Set([].concat(_e(e),_e(i)));a.delete("constructor"),a.delete(_),xe(i,ft,a)}e[ft].forEach(function(o){return r.make_(o,t&&o in t?t[o]:!0)})}),e)}var Jt="splice",$="update",Zi=1e4,Qi={get:function(t,n){var r=t[_];return n===_?r:n==="length"?r.getArrayLength_():typeof n=="string"&&!isNaN(n)?r.get_(parseInt(n)):K(Je,n)?Je[n]:t[n]},set:function(t,n,r){var i=t[_];return n==="length"&&i.setArrayLength_(r),typeof n=="symbol"||isNaN(n)?t[n]=r:i.set_(parseInt(n),r),!0},preventExtensions:function(){d(15)}},$t=function(){function e(n,r,i,a){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=i,this.legacyMode_=a,this.atom_=new Ve(n),this.enhancer_=function(o,s){return r(o,s,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.dehanceValues_=function(r){return this.dehancer!==void 0&&r.length>0?r.map(this.dehancer):r},t.intercept_=function(r){return Be(this,r)},t.observe_=function(r,i){return i===void 0&&(i=!1),i&&r({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Ce(this,r)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(r){(typeof r!="number"||isNaN(r)||r<0)&&d("Out of range: "+r);var i=this.values_.length;if(r!==i)if(r>i){for(var a=new Array(r-i),o=0;o<r-i;o++)a[o]=void 0;this.spliceWithArray_(i,0,a)}else this.spliceWithArray_(r,i-r)},t.updateArrayLength_=function(r,i){r!==this.lastKnownLength_&&d(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&on(r+i+1)},t.spliceWithArray_=function(r,i,a){var o=this;this.atom_;var s=this.values_.length;if(r===void 0?r=0:r>s?r=s:r<0&&(r=Math.max(0,s+r)),arguments.length===1?i=s-r:i==null?i=0:i=Math.max(0,Math.min(i,s-r)),a===void 0&&(a=bt),P(this)){var u=j(this,{object:this.proxy_,type:Jt,index:r,removedCount:i,added:a});if(!u)return bt;i=u.removedCount,a=u.added}if(a=a.length===0?a:a.map(function(v){return o.enhancer_(v,void 0)}),this.legacyMode_){var l=a.length-i;this.updateArrayLength_(s,l)}var f=this.spliceItemsIntoValues_(r,i,a);return(i!==0||a.length!==0)&&this.notifyArraySplice_(r,a,f),this.dehanceValues_(f)},t.spliceItemsIntoValues_=function(r,i,a){if(a.length<Zi){var o;return(o=this.values_).splice.apply(o,[r,i].concat(a))}else{var s=this.values_.slice(r,r+i),u=this.values_.slice(r+i);this.values_.length+=a.length-i;for(var l=0;l<a.length;l++)this.values_[r+l]=a[l];for(var f=0;f<u.length;f++)this.values_[r+a.length+f]=u[f];return s}},t.notifyArrayChildUpdate_=function(r,i,a){var o=!this.owned_&&Se(),s=N(this),u=s||o?{observableKind:"array",object:this.proxy_,type:$,debugObjectName:this.atom_.name_,index:r,newValue:i,oldValue:a}:null;this.atom_.reportChanged(),s&&B(this,u)},t.notifyArraySplice_=function(r,i,a){var o=!this.owned_&&Se(),s=N(this),u=s||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Jt,index:r,removed:a,added:i,removedCount:a.length,addedCount:i.length}:null;this.atom_.reportChanged(),s&&B(this,u)},t.get_=function(r){if(this.legacyMode_&&r>=this.values_.length){console.warn("[mobx] Out of bounds read: "+r);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[r])},t.set_=function(r,i){var a=this.values_;if(this.legacyMode_&&r>a.length&&d(17,r,a.length),r<a.length){this.atom_;var o=a[r];if(P(this)){var s=j(this,{type:$,object:this.proxy_,index:r,newValue:i});if(!s)return;i=s.newValue}i=this.enhancer_(i,o);var u=i!==o;u&&(a[r]=i,this.notifyArrayChildUpdate_(r,i,o))}else{for(var l=new Array(r+1-a.length),f=0;f<l.length-1;f++)l[f]=void 0;l[l.length-1]=i,this.spliceWithArray_(a.length,0,l)}},e}();function ea(e,t,n,r){return n===void 0&&(n="ObservableArray"),r===void 0&&(r=!1),cr(),Z(function(){var i=new $t(n,t,r,!1);_r(i.values_,_,i);var a=new Proxy(i.values_,Qi);return i.proxy_=a,e&&e.length&&i.spliceWithArray_(0,0,e),a})}var Je={clear:function(){return this.splice(0)},replace:function(t){var n=this[_];return n.spliceWithArray_(0,n.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];var o=this[_];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(t);case 2:return o.spliceWithArray_(t,n)}return o.spliceWithArray_(t,n,i)},spliceWithArray:function(t,n,r){return this[_].spliceWithArray_(t,n,r)},push:function(){for(var t=this[_],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,r),t.values_.length},pop:function(){return this.splice(Math.max(this[_].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[_],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.spliceWithArray_(0,0,r),t.values_.length},reverse:function(){return c.trackingDerivation&&d(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){c.trackingDerivation&&d(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var n=this[_],r=n.dehanceValues_(n.values_).indexOf(t);return r>-1?(this.splice(r,1),!0):!1}};y("at",E);y("concat",E);y("flat",E);y("includes",E);y("indexOf",E);y("join",E);y("lastIndexOf",E);y("slice",E);y("toString",E);y("toLocaleString",E);y("toSorted",E);y("toSpliced",E);y("with",E);y("every",C);y("filter",C);y("find",C);y("findIndex",C);y("findLast",C);y("findLastIndex",C);y("flatMap",C);y("forEach",C);y("map",C);y("some",C);y("toReversed",C);y("reduce",Jr);y("reduceRight",Jr);function y(e,t){typeof Array.prototype[e]=="function"&&(Je[e]=t(e))}function E(e){return function(){var t=this[_];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function C(e){return function(t,n){var r=this,i=this[_];i.atom_.reportObserved();var a=i.dehanceValues_(i.values_);return a[e](function(o,s){return t.call(n,o,s,r)})}}function Jr(e){return function(){var t=this,n=this[_];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(a,o,s){return i(a,o,s,t)},r[e].apply(r,arguments)}}var ta=X("ObservableArrayAdministration",$t);function ue(e){return tt(e)&&ta(e[_])}var kr,Zr,ra={},H="add",ke="delete";kr=Symbol.iterator;Zr=Symbol.toStringTag;var Ut=function(){function e(n,r,i){var a=this;r===void 0&&(r=ie),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[_]=ra,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_=r,this.name_=i,T(Map)||d(18),Z(function(){a.keysAtom_=gr("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,n&&a.merge(n)})}var t=e.prototype;return t.has_=function(r){return this.data_.has(r)},t.has=function(r){var i=this;if(!c.trackingDerivation)return this.has_(r);var a=this.hasMap_.get(r);if(!a){var o=a=new Y(this.has_(r),rt,"ObservableMap.key?",!1);this.hasMap_.set(r,o),qr(o,function(){return i.hasMap_.delete(r)})}return a.get()},t.set=function(r,i){var a=this.has_(r);if(P(this)){var o=j(this,{type:a?$:H,object:this,newValue:i,name:r});if(!o)return this;i=o.newValue}return a?this.updateValue_(r,i):this.addValue_(r,i),this},t.delete=function(r){var i=this;if(this.keysAtom_,P(this)){var a=j(this,{type:ke,object:this,name:r});if(!a)return!1}if(this.has_(r)){var o=Se(),s=N(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:ke,object:this,oldValue:this.data_.get(r).value_,name:r}:null;return D(function(){var l;i.keysAtom_.reportChanged(),(l=i.hasMap_.get(r))==null||l.setNewValue_(!1);var f=i.data_.get(r);f.setNewValue_(void 0),i.data_.delete(r)}),s&&B(this,u),!0}return!1},t.updateValue_=function(r,i){var a=this.data_.get(r);if(i=a.prepareNewValue_(i),i!==c.UNCHANGED){var o=Se(),s=N(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:$,object:this,oldValue:a.value_,name:r,newValue:i}:null;a.setNewValue_(i),s&&B(this,u)}},t.addValue_=function(r,i){var a=this;this.keysAtom_,D(function(){var l,f=new Y(i,a.enhancer_,"ObservableMap.key",!1);a.data_.set(r,f),i=f.value_,(l=a.hasMap_.get(r))==null||l.setNewValue_(!0),a.keysAtom_.reportChanged()});var o=Se(),s=N(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:H,object:this,name:r,newValue:i}:null;s&&B(this,u)},t.get=function(r){return this.has(r)?this.dehanceValue_(this.data_.get(r).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var r=this,i=this.keys();return je({next:function(){var o=i.next(),s=o.done,u=o.value;return{done:s,value:s?void 0:r.get(u)}}})},t.entries=function(){var r=this,i=this.keys();return je({next:function(){var o=i.next(),s=o.done,u=o.value;return{done:s,value:s?void 0:[u,r.get(u)]}}})},t[kr]=function(){return this.entries()},t.forEach=function(r,i){for(var a=he(this),o;!(o=a()).done;){var s=o.value,u=s[0],l=s[1];r.call(i,l,u,this)}},t.merge=function(r){var i=this;return U(r)&&(r=new Map(r)),D(function(){G(r)?dn(r).forEach(function(a){return i.set(a,r[a])}):Array.isArray(r)?r.forEach(function(a){var o=a[0],s=a[1];return i.set(o,s)}):ye(r)?(r.constructor!==Map&&d(19,r),r.forEach(function(a,o){return i.set(o,a)})):r!=null&&d(20,r)}),this},t.clear=function(){var r=this;D(function(){Vr(function(){for(var i=he(r.keys()),a;!(a=i()).done;){var o=a.value;r.delete(o)}})})},t.replace=function(r){var i=this;return D(function(){for(var a=na(r),o=new Map,s=!1,u=he(i.data_.keys()),l;!(l=u()).done;){var f=l.value;if(!a.has(f)){var v=i.delete(f);if(v)s=!0;else{var h=i.data_.get(f);o.set(f,h)}}}for(var b=he(a.entries()),S;!(S=b()).done;){var g=S.value,m=g[0],L=g[1],z=i.data_.has(m);if(i.set(m,L),i.data_.has(m)){var q=i.data_.get(m);o.set(m,q),z||(s=!0)}}if(!s)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var w=i.data_.keys(),W=o.keys(),Q=w.next(),Gt=W.next();!Q.done;){if(Q.value!==Gt.value){i.keysAtom_.reportChanged();break}Q=w.next(),Gt=W.next()}i.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(r,i){return Ce(this,r)},t.intercept_=function(r){return Be(this,r)},Vt(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Zr,get:function(){return"Map"}}]),e}(),U=X("ObservableMap",Ut);function na(e){if(ye(e)||U(e))return e;if(Array.isArray(e))return new Map(e);if(G(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}else return d(21,e)}var Qr,en,ia={};Qr=Symbol.iterator;en=Symbol.toStringTag;var tn=function(){function e(n,r,i){var a=this;r===void 0&&(r=ie),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[_]=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_=i,T(Set)||d(22),this.enhancer_=function(o,s){return r(o,s,i)},Z(function(){a.atom_=gr(a.name_),n&&a.replace(n)})}var t=e.prototype;return t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.clear=function(){var r=this;D(function(){Vr(function(){for(var i=he(r.data_.values()),a;!(a=i()).done;){var o=a.value;r.delete(o)}})})},t.forEach=function(r,i){for(var a=he(this),o;!(o=a()).done;){var s=o.value;r.call(i,s,s,this)}},t.add=function(r){var i=this;if(this.atom_,P(this)){var a=j(this,{type:H,object:this,newValue:r});if(!a)return this}if(!this.has(r)){D(function(){i.data_.add(i.enhancer_(r,void 0)),i.atom_.reportChanged()});var o=!1,s=N(this),u=s||o?{observableKind:"set",debugObjectName:this.name_,type:H,object:this,newValue:r}:null;s&&B(this,u)}return this},t.delete=function(r){var i=this;if(P(this)){var a=j(this,{type:ke,object:this,oldValue:r});if(!a)return!1}if(this.has(r)){var o=!1,s=N(this),u=s||o?{observableKind:"set",debugObjectName:this.name_,type:ke,object:this,oldValue:r}:null;return D(function(){i.atom_.reportChanged(),i.data_.delete(r)}),s&&B(this,u),!0}return!1},t.has=function(r){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(r))},t.entries=function(){var r=0,i=Array.from(this.keys()),a=Array.from(this.values());return je({next:function(){var s=r;return r+=1,s<a.length?{value:[i[s],a[s]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var r=this,i=0,a=Array.from(this.data_.values());return je({next:function(){return i<a.length?{value:r.dehanceValue_(a[i++]),done:!1}:{done:!0}}})},t.replace=function(r){var i=this;return J(r)&&(r=new Set(r)),D(function(){Array.isArray(r)?(i.clear(),r.forEach(function(a){return i.add(a)})):Te(r)?(i.clear(),r.forEach(function(a){return i.add(a)})):r!=null&&d("Cannot initialize set from "+r)}),this},t.observe_=function(r,i){return Ce(this,r)},t.intercept_=function(r){return Be(this,r)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Qr]=function(){return this.values()},Vt(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:en,get:function(){return"Set"}}]),e}(),J=X("ObservableSet",tn),kt=Object.create(null),Zt="remove",rn=function(){function e(n,r,i,a){r===void 0&&(r=new Map),a===void 0&&(a=Hn),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.target_=n,this.values_=r,this.name_=i,this.defaultAnnotation_=a,this.keysAtom_=new Ve("ObservableObject.keys"),this.isPlainObject_=G(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(r){return this.values_.get(r).get()},t.setObservablePropValue_=function(r,i){var a=this.values_.get(r);if(a instanceof pe)return a.set(i),!0;if(P(this)){var o=j(this,{type:$,object:this.proxy_||this.target_,name:r,newValue:i});if(!o)return null;i=o.newValue}if(i=a.prepareNewValue_(i),i!==c.UNCHANGED){var s=N(this),u=!1,l=s||u?{type:$,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:r,newValue:i}:null;a.setNewValue_(i),s&&B(this,l)}return!0},t.get_=function(r){return c.trackingDerivation&&!K(this.target_,r)&&this.has_(r),this.target_[r]},t.set_=function(r,i,a){return a===void 0&&(a=!1),K(this.target_,r)?this.values_.has(r)?this.setObservablePropValue_(r,i):a?Reflect.set(this.target_,r,i):(this.target_[r]=i,!0):this.extend_(r,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},t.has_=function(r){if(!c.trackingDerivation)return r in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(r);return i||(i=new Y(r in this.target_,rt,"ObservableObject.key?",!1),this.pendingKeys_.set(r,i)),i.get()},t.make_=function(r,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(!(r in this.target_)){var a;if((a=this.target_[I])!=null&&a[r])return;d(1,i.annotationType_,this.name_+"."+r.toString())}for(var o=this.target_;o&&o!==Re;){var s=qe(o,r);if(s){var u=i.make_(this,r,s,o);if(u===0)return;if(u===1)break}o=Object.getPrototypeOf(o)}er(this,i,r)}},t.extend_=function(r,i,a,o){if(o===void 0&&(o=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(r,i,o);var s=a.extend_(this,r,i,o);return s&&er(this,a,r),s},t.defineProperty_=function(r,i,a){a===void 0&&(a=!1),this.keysAtom_;try{R();var o=this.delete_(r);if(!o)return o;if(P(this)){var s=j(this,{object:this.proxy_||this.target_,name:r,type:H,newValue:i.value});if(!s)return null;var u=s.newValue;i.value!==u&&(i=ne({},i,{value:u}))}if(a){if(!Reflect.defineProperty(this.target_,r,i))return!1}else M(this.target_,r,i);this.notifyPropertyAddition_(r,i.value)}finally{x()}return!0},t.defineObservableProperty_=function(r,i,a,o){o===void 0&&(o=!1),this.keysAtom_;try{R();var s=this.delete_(r);if(!s)return s;if(P(this)){var u=j(this,{object:this.proxy_||this.target_,name:r,type:H,newValue:i});if(!u)return null;i=u.newValue}var l=Qt(r),f={configurable:c.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:l.get,set:l.set};if(o){if(!Reflect.defineProperty(this.target_,r,f))return!1}else M(this.target_,r,f);var v=new Y(i,a,"ObservableObject.key",!1);this.values_.set(r,v),this.notifyPropertyAddition_(r,v.value_)}finally{x()}return!0},t.defineComputedProperty_=function(r,i,a){a===void 0&&(a=!1),this.keysAtom_;try{R();var o=this.delete_(r);if(!o)return o;if(P(this)){var s=j(this,{object:this.proxy_||this.target_,name:r,type:H,newValue:void 0});if(!s)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var u=Qt(r),l={configurable:c.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:u.get,set:u.set};if(a){if(!Reflect.defineProperty(this.target_,r,l))return!1}else M(this.target_,r,l);this.values_.set(r,new pe(i)),this.notifyPropertyAddition_(r,void 0)}finally{x()}return!0},t.delete_=function(r,i){if(i===void 0&&(i=!1),this.keysAtom_,!K(this.target_,r))return!0;if(P(this)){var a=j(this,{object:this.proxy_||this.target_,name:r,type:Zt});if(!a)return null}try{var o,s;R();var u=N(this),l=!1,f=this.values_.get(r),v=void 0;if(!f&&(u||l)){var h;v=(h=qe(this.target_,r))==null?void 0:h.value}if(i){if(!Reflect.deleteProperty(this.target_,r))return!1}else delete this.target_[r];if(f&&(this.values_.delete(r),f instanceof Y&&(v=f.value_),Mr(f)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(s=o.get(r))==null||s.set(r in this.target_),u||l){var b={type:Zt,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:v,name:r};u&&B(this,b)}}finally{x()}return!0},t.observe_=function(r,i){return Ce(this,r)},t.intercept_=function(r){return Be(this,r)},t.notifyPropertyAddition_=function(r,i){var a,o,s=N(this),u=!1;if(s||u){var l=s||u?{type:H,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:r,newValue:i}:null;s&&B(this,l)}(a=this.pendingKeys_)==null||(o=a.get(r))==null||o.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),_e(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function le(e,t){var n;if(K(e,_))return e;var r=(n=t?.name)!=null?n:"ObservableObject",i=new rn(e,new Map,String(r),ii(t));return xe(e,_,i),e}var aa=X("ObservableObjectAdministration",rn);function Qt(e){return kt[e]||(kt[e]={get:function(){return this[_].getObservablePropValue_(e)},set:function(n){return this[_].setObservablePropValue_(e,n)}})}function k(e){return tt(e)?aa(e[_]):!1}function er(e,t,n){var r;(r=e.target_[I])==null||delete r[n]}var oa=an(0),sa=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ct=0,nn=function(){};function ua(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}ua(nn,Array.prototype);var Kt=function(e,t,n){br(r,e);function r(a,o,s,u){var l;return s===void 0&&(s="ObservableArray"),u===void 0&&(u=!1),l=e.call(this)||this,Z(function(){var f=new $t(s,o,u,!0);f.proxy_=st(l),_r(st(l),_,f),a&&a.length&&l.spliceWithArray(0,0,a),sa&&Object.defineProperty(st(l),"0",oa)}),l}var i=r.prototype;return i.concat=function(){this[_].atom_.reportObserved();for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),s.map(function(l){return ue(l)?l.slice():l}))},i[n]=function(){var a=this,o=0;return je({next:function(){return o<a.length?{value:a[o++],done:!1}:{done:!0,value:void 0}}})},Vt(r,[{key:"length",get:function(){return this[_].getArrayLength_()},set:function(o){this[_].setArrayLength_(o)}},{key:t,get:function(){return"Array"}}]),r}(nn,Symbol.toStringTag,Symbol.iterator);Object.entries(Je).forEach(function(e){var t=e[0],n=e[1];t!=="concat"&&xe(Kt.prototype,t,n)});function an(e){return{enumerable:!1,configurable:!0,get:function(){return this[_].get_(e)},set:function(n){this[_].set_(e,n)}}}function la(e){M(Kt.prototype,""+e,an(e))}function on(e){if(e>ct){for(var t=ct;t<e+100;t++)la(t);ct=e}}on(1e3);function fa(e,t,n){return new Kt(e,t,n)}function ge(e,t){if(typeof e=="object"&&e!==null){if(ue(e))return t!==void 0&&d(23),e[_].atom_;if(J(e))return e.atom_;if(U(e)){if(t===void 0)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||d(25,t,Pt(e)),n}if(k(e)){if(!t)return d(26);var r=e[_].values_.get(t);return r||d(27,t,Pt(e)),r}if(Nt(e)||oe(e)||Xe(e))return e}else if(T(e)&&Xe(e[_]))return e[_];d(28)}function Le(e,t){if(e||d(29),t!==void 0)return Le(ge(e,t));if(Nt(e)||oe(e)||Xe(e)||U(e)||J(e))return e;if(e[_])return e[_];d(24,e)}function Pt(e,t){var n;if(t!==void 0)n=ge(e,t);else{if(ot(e))return e.name;k(e)||U(e)||J(e)?n=Le(e):n=ge(e)}return n.name_}function Z(e){var t=se(),n=it(!0);R();try{return e()}finally{x(),at(n),F(t)}}var tr=Re.toString;function sn(e,t,n){return n===void 0&&(n=-1),jt(e,t,n)}function jt(e,t,n,r,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!=="function"&&a!=="object"&&typeof t!="object")return!1;var o=tr.call(e);if(o!==tr.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+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]":n>=0&&n++;break}e=rr(e),t=rr(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var u=e.constructor,l=t.constructor;if(u!==l&&!(T(u)&&u instanceof u&&T(l)&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],i=i||[];for(var f=r.length;f--;)if(r[f]===e)return i[f]===t;if(r.push(e),i.push(t),s){if(f=e.length,f!==t.length)return!1;for(;f--;)if(!jt(e[f],t[f],n-1,r,i))return!1}else{var v=Object.keys(e),h;if(f=v.length,Object.keys(t).length!==f)return!1;for(;f--;)if(h=v[f],!(K(t,h)&&jt(e[h],t[h],n-1,r,i)))return!1}return r.pop(),i.pop(),!0}function rr(e){return ue(e)?e.slice():ye(e)||U(e)||Te(e)||J(e)?Array.from(e.entries()):e}function je(e){return e[Symbol.iterator]=ca,e}function ca(){return this}["Symbol","Map","Set"].forEach(function(e){var t=Tt();typeof t[e]>"u"&&d("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Si,extras:{getDebugName:Pt},$mobx:_});if(!te.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Mt)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function va(e){e()}function ha(e){e||(e=va),Mi({reactionScheduler:e})}function _a(e){return $i(e)}var da=1e4,pa=1e4,ba=function(){function e(t){var n=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),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(r){r===void 0&&(r=da),clearTimeout(n.sweepTimeout),n.sweepTimeout=void 0;var i=Date.now();n.registrations.forEach(function(a,o){i-a.registeredAt>=r&&(n.finalize(a.value),n.registrations.delete(o))}),n.registrations.size>0&&n.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){n.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r){this.registrations.set(r,{value:n,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,pa))}}),e}(),ga=typeof FinalizationRegistry<"u"?FinalizationRegistry:ba,Rt=new ga(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),vt={exports:{}},ht={};var nr;function ya(){if(nr)return ht;nr=1;var e=fn();function t(v,h){return v===h&&(v!==0||1/v===1/h)||v!==v&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(v,h){var b=h(),S=r({inst:{value:b,getSnapshot:h}}),g=S[0].inst,m=S[1];return a(function(){g.value=b,g.getSnapshot=h,u(g)&&m({inst:g})},[v,b,h]),i(function(){return u(g)&&m({inst:g}),v(function(){u(g)&&m({inst:g})})},[v]),o(b),b}function u(v){var h=v.getSnapshot;v=v.value;try{var b=h();return!n(v,b)}catch{return!0}}function l(v,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return ht.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,ht}var ir;function ma(){return ir||(ir=1,vt.exports=ya()),vt.exports}var Oa=ma();function ar(e){e.reaction=new we("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function Aa(e,t){t===void 0&&(t="observed");var n=zt.useRef(null);if(!n.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(s){return Rt.unregister(r),r.onStoreChange=s,r.reaction||(ar(r),r.stateVersion=Symbol()),function(){var u;r.onStoreChange=null,(u=r.reaction)===null||u===void 0||u.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};n.current=r}var i=n.current;i.reaction||(ar(i),Rt.register(n,i,i)),zt.useDebugValue(i.reaction,_a),Oa.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot);var a,o;if(i.reaction.track(function(){try{a=e()}catch(s){o=s}}),o)throw o;return a}var _t,dt,un=typeof Symbol=="function"&&Symbol.for,Sa=(dt=(_t=Object.getOwnPropertyDescriptor(function(){},"name"))===null||_t===void 0?void 0:_t.configurable)!==null&&dt!==void 0?dt:!1,or=un?Symbol.for("react.forward_ref"):typeof te.forwardRef=="function"&&te.forwardRef(function(e){return null}).$$typeof,sr=un?Symbol.for("react.memo"):typeof te.memo=="function"&&te.memo(function(e){return null}).$$typeof;function La(e,t){var n;if(sr&&e.$$typeof===sr)throw new 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.");var r=(n=void 0)!==null&&n!==void 0?n:!1,i=e,a=e.displayName||e.name;if(or&&e.$$typeof===or&&(r=!0,i=e.render,typeof i!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(s,u){return Aa(function(){return i(s,u)},a)};return o.displayName=e.displayName,Sa&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),r&&(o=te.forwardRef(o)),o=te.memo(o),Ea(e,o),o}var wa={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function Ea(e,t){Object.keys(e).forEach(function(n){wa[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}var pt;ha(cn.unstable_batchedUpdates);pt=Rt.finalizeAllImmediately;function Pa(e){throw new Error("[mobx-utils] "+e)}function Ze(e,t){t===void 0&&(t="Illegal state"),e||Pa(t)}var ln=function(e){return e&&e!==Object.prototype&&Object.getOwnPropertyNames(e).concat(ln(Object.getPrototypeOf(e))||[])},ja=function(e){var t=ln(e),n=t.filter(function(r,i){return t.indexOf(r)===i});return n},ur=function(e){return ja(e).filter(function(t){return t!=="constructor"&&!~t.indexOf("__")})},xt="pending",Qe="fulfilled",Ft="rejected";function Ra(e){switch(this.state){case xt:return e.pending&&e.pending(this.value);case Ft:return e.rejected&&e.rejected(this.value);case Qe:return e.fulfilled?e.fulfilled(this.value):this.value}}function lr(e,t){if(Ze(arguments.length<=2,"fromPromise expects up to two arguments"),Ze(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 n=e;e.then(A("observableFromPromise-resolve",function(i){n.value=i,n.state=Qe}),A("observableFromPromise-reject",function(i){n.value=i,n.state=Ft})),n.isPromiseBasedObservable=!0,n.case=Ra;var r=t&&(t.state===Qe||t.state===xt)?t.value:void 0;return Lt(n,{value:r,state:xt},{},{deep:!1}),n}(function(e){e.reject=A("fromPromise.reject",function(n){var r=e(Promise.reject(n));return r.state=Ft,r.value=n,r});function t(n){n===void 0&&(n=void 0);var r=e(Promise.resolve(n));return r.state=Qe,r.value=n,r}e.resolve=A("fromPromise.resolve",t)})(lr||(lr={}));var Ke=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};(function(){function e(t,n){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}),Mt(this),Ri(function(){r.current=n,r.subscription=t.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(t){this.current=t}}),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(t){this.current=t,this.dispose()}}),Ke([O.ref],e.prototype,"current",void 0),Ke([A.bound],e.prototype,"next",null),Ke([A.bound],e.prototype,"complete",null),Ke([A.bound],e.prototype,"error",null),e})();var et=function(){return et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},et.apply(this,arguments)},Oe=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},xa=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"],Ta=function(){function e(t){var n=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:t}),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(i){return n.localValues.has(i)}}),Mt(this),Ze(k(t),"createViewModel expects an observable object");var r=ur(this);ur(t).forEach(function(i){var a;if(!r.includes(i)&&!(i===_||i==="__mobxDidRunLazyInitializers")){if(Ze(xa.indexOf(i)===-1,"The propertyname "+i+" is reserved and cannot be used with viewModels"),lt(t,i)){var o=Le(t,i),s=o.derivation.bind(n),u=(a=o.setter_)===null||a===void 0?void 0:a.bind(n);n.localComputedValues.set(i,ee(s,{set:u}))}var l=Object.getOwnPropertyDescriptor(t,i),f=l?{enumerable:l.enumerable}:{};Object.defineProperty(n,i,et(et({},f),{configurable:!0,get:function(){return lt(t,i)?n.localComputedValues.get(i).get():n.isPropertyDirty(i)?n.localValues.get(i):n.model[i]},set:A(function(v){lt(t,i)?n.localComputedValues.get(i).set(v):v!==n.model[i]?n.localValues.set(i,v):n.localValues.delete(i)})}))}})}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 t=this;qi(this.localValues).forEach(function(n){var r=t.localValues.get(n),i=t.model[n];ue(i)?i.replace(r):U(i)?(i.clear(),i.merge(r)):Gi(r)||(t.model[n]=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(t){this.localValues.delete(t)}}),Oe([ee],e.prototype,"isDirty",null),Oe([ee],e.prototype,"changedValues",null),Oe([A.bound],e.prototype,"submit",null),Oe([A.bound],e.prototype,"reset",null),Oe([A.bound],e.prototype,"resetProperty",null),e}();function Ia(e){return new Ta(e)}var Da=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(e){Da(t,e);function t(n,r,i){var a=i===void 0?{}:i,o=a.name,s=o===void 0?"ogm"+(Math.random()*1e3|0):o,u=a.keyToName,l=u===void 0?function(h){return""+h}:u,f=e.call(this)||this;Object.defineProperty(f,"_base",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_ogmInfoKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_groupBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_keyToName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(f,"_disposeBaseObserver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),f._keyToName=l,f._groupBy=r,f._ogmInfoKey=Symbol("ogmInfo"+s),f._base=n;for(var v=0;v<n.length;v++)f._addItem(n[v]);return f._disposeBaseObserver=Hi(f._base,function(h){if(h.type==="splice")D(function(){for(var b=0,S=h.removed;b<S.length;b++){var g=S[b];f._removeItem(g)}for(var m=0,L=h.added;m<L.length;m++){var z=L[m];f._addItem(z)}});else if(h.type==="update")D(function(){f._removeItem(h.oldValue),f._addItem(h.newValue)});else throw new Error("illegal state")}),f}return Object.defineProperty(t.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(n){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(n,r){throw new Error("not supported")}}),Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._disposeBaseObserver();for(var n=0;n<this._base.length;n++){var r=this._base[n],i=r[this._ogmInfoKey];i.reaction(),delete r[this._ogmInfoKey]}}}),Object.defineProperty(t.prototype,"_getGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(n){var r=e.prototype.get.call(this,n);return r===void 0&&(r=O([],{name:"GroupArray["+this._keyToName(n)+"]",deep:!1}),e.prototype.set.call(this,n,r)),r}}),Object.defineProperty(t.prototype,"_removeFromGroupArr",{enumerable:!1,configurable:!0,writable:!0,value:function(n,r){var i=e.prototype.get.call(this,n);i.length===1?e.prototype.delete.call(this,n):(r===i.length-1||(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(n){var r=this,i=this._groupBy(n),a=this._getGroupArr(i),o={groupByValue:i,groupArrIndex:a.length,reaction:Di(function(){return r._groupBy(n)},function(s,u){var l=n[r._ogmInfoKey];r._removeFromGroupArr(l.groupByValue,l.groupArrIndex);var f=r._getGroupArr(s),v=f.length;f.push(n),l.groupByValue=s,l.groupArrIndex=v})};Object.defineProperty(n,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:o}),a.push(n)}}),Object.defineProperty(t.prototype,"_removeItem",{enumerable:!1,configurable:!0,writable:!0,value:function(n){var r=n[this._ogmInfoKey];this._removeFromGroupArr(r.groupByValue,r.groupArrIndex),r.reaction(),delete n[this._ogmInfoKey]}}),t})(Ut);export{Di as a,Mt as b,A as c,ee as d,La as e,Na as f,ma as g,Ia as h,Ca as m,O as o,Ri as r,Ba as t};
|