@revisium/admin 2.2.1 → 2.4.0-alpha.1

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.
@@ -0,0 +1,50 @@
1
+ import{e as Q,g as je}from"./vendor-chakra-81WUgB9u.js";const pe=JSON,Ve=e=>e.toUpperCase(),qe=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},He=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Ge=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},Ye=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0};function Z(e,t){if(!!!e)throw new Error(t)}function $e(e){return typeof e=="object"&&e!==null}function ze(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const Je=/\r\n|[\n\r]/g;function ue(e,t){let n=0,r=1;for(const i of e.body.matchAll(Je)){if(typeof i.index=="number"||ze(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Qe(e){return ge(e.source,ue(e.source,e.start))}function ge(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,l=t.line===1?n:0,h=t.column+l,p=`${e.name}:${c}:${h}
2
+ `,y=r.split(/\r\n|[\n\r]/g),v=y[i];if(v.length>120){const E=Math.floor(h/80),O=h%80,x=[];for(let m=0;m<v.length;m+=80)x.push(v.slice(m,m+80));return p+me([[`${c} |`,x[0]],...x.slice(1,E+1).map(m=>["|",m]),["|","^".padStart(O)],["|",x[E+1]]])}return p+me([[`${c-1} |`,y[i-1]],[`${c} |`,v],["|","^".padStart(h)],[`${c+1} |`,y[i+1]]])}function me(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 Xe(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 de extends Error{constructor(t,...n){var r,i,s;const{nodes:c,source:l,positions:h,path:p,originalError:y,extensions:v}=Xe(n);super(t),this.name="GraphQLError",this.path=p??void 0,this.originalError=y??void 0,this.nodes=Te(Array.isArray(c)?c:c?[c]:void 0);const E=Te((r=this.nodes)===null||r===void 0?void 0:r.map(x=>x.loc).filter(x=>x!=null));this.source=l??(E==null||(i=E[0])===null||i===void 0?void 0:i.source),this.positions=h??E?.map(x=>x.start),this.locations=h&&l?h.map(x=>ue(l,x)):E?.map(x=>ue(x.source,x.start));const O=$e(y?.extensions)?y?.extensions:void 0;this.extensions=(s=v??O)!==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,de):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
+ `+Qe(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
6
+
7
+ `+ge(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 Te(e){return e===void 0||e.length===0?void 0:e}function _(e,t,n){return new de(`Syntax Error: ${n}`,{source:e,positions:[t]})}class We{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 be{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 _e={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"]},Ze=new Set(Object.keys(_e));function Ne(e){const t=e?.kind;return typeof t=="string"&&Ze.has(t)}var j;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(j||(j={}));var le;(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"})(le||(le={}));var d;(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"})(d||(d={}));function he(e){return e===9||e===32}function Y(e){return e>=48&&e<=57}function De(e){return e>=97&&e<=122||e>=65&&e<=90}function Se(e){return De(e)||e===95}function Ke(e){return De(e)||Y(e)||e===95}function et(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let c=0;c<e.length;++c){var s;const l=e[c],h=tt(l);h!==l.length&&(r=(s=r)!==null&&s!==void 0?s:c,i=c,c!==0&&h<n&&(n=h))}return e.map((c,l)=>l===0?c:c.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function tt(e){let t=0;for(;t<e.length&&he(e.charCodeAt(t));)++t;return t}function nt(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(O=>O.length===0||he(O.charCodeAt(0))),c=n.endsWith('\\"""'),l=e.endsWith('"')&&!c,h=e.endsWith("\\"),p=l||h,y=!i||e.length>70||p||s||c;let v="";const E=i&&he(e.charCodeAt(0));return(y&&!E||s)&&(v+=`
8
+ `),v+=n,(y||p)&&(v+=`
9
+ `),'"""'+v+'"""'}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 it{constructor(t){const n=new be(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=st(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===a.COMMENT);return t}}function rt(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 V(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function te(e,t){return Ce(e.charCodeAt(t))&&we(e.charCodeAt(t+1))}function Ce(e){return e>=55296&&e<=56319}function we(e){return e>=56320&&e<=57343}function B(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 b(e,t,n,r,i){const s=e.line,c=1+n-e.lineStart;return new be(t,n,r,s,c,i)}function st(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 ot(e,i);case 33:return b(e,a.BANG,i,i+1);case 36:return b(e,a.DOLLAR,i,i+1);case 38:return b(e,a.AMP,i,i+1);case 40:return b(e,a.PAREN_L,i,i+1);case 41:return b(e,a.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return b(e,a.SPREAD,i,i+3);break;case 58:return b(e,a.COLON,i,i+1);case 61:return b(e,a.EQUALS,i,i+1);case 64:return b(e,a.AT,i,i+1);case 91:return b(e,a.BRACKET_L,i,i+1);case 93:return b(e,a.BRACKET_R,i,i+1);case 123:return b(e,a.BRACE_L,i,i+1);case 124:return b(e,a.PIPE,i,i+1);case 125:return b(e,a.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?ft(e,i):ct(e,i)}if(Y(s)||s===45)return at(e,i,s);if(Se(s))return pt(e,i);throw _(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:V(s)||te(n,i)?`Unexpected character: ${B(e,i)}.`:`Invalid character: ${B(e,i)}.`)}return b(e,a.EOF,r,r)}function ot(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(V(s))++i;else if(te(n,i))i+=2;else break}return b(e,a.COMMENT,t,i,n.slice(t+1,i))}function at(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),Y(s))throw _(e.source,i,`Invalid number, unexpected digit after 0: ${B(e,i)}.`)}else i=se(e,i,s),s=r.charCodeAt(i);if(s===46&&(c=!0,s=r.charCodeAt(++i),i=se(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=se(e,i,s),s=r.charCodeAt(i)),s===46||Se(s))throw _(e.source,i,`Invalid number, expected digit but got: ${B(e,i)}.`);return b(e,c?a.FLOAT:a.INT,t,i,r.slice(t,i))}function se(e,t,n){if(!Y(n))throw _(e.source,t,`Invalid number, expected digit but got: ${B(e,t)}.`);const r=e.source.body;let i=t+1;for(;Y(r.charCodeAt(i));)++i;return i}function ct(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,c="";for(;i<r;){const l=n.charCodeAt(i);if(l===34)return c+=n.slice(s,i),b(e,a.STRING,t,i+1,c);if(l===92){c+=n.slice(s,i);const h=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?ut(e,i):lt(e,i):ht(e,i);c+=h.value,i+=h.size,s=i;continue}if(l===10||l===13)break;if(V(l))++i;else if(te(n,i))i+=2;else throw _(e.source,i,`Invalid character within String: ${B(e,i)}.`)}throw _(e.source,i,"Unterminated string.")}function ut(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||!V(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|H(s),r<0)break}throw _(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function lt(e,t){const n=e.source.body,r=ve(n,t+2);if(V(r))return{value:String.fromCodePoint(r),size:6};if(Ce(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=ve(n,t+8);if(we(i))return{value:String.fromCodePoint(r,i),size:12}}throw _(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ve(e,t){return H(e.charCodeAt(t))<<12|H(e.charCodeAt(t+1))<<8|H(e.charCodeAt(t+2))<<4|H(e.charCodeAt(t+3))}function H(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function ht(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 _(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function ft(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,c=s,l="";const h=[];for(;s<r;){const p=n.charCodeAt(s);if(p===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){l+=n.slice(c,s),h.push(l);const y=b(e,a.BLOCK_STRING,t,s+3,et(h).join(`
11
+ `));return e.line+=h.length-1,e.lineStart=i,y}if(p===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){l+=n.slice(c,s),c=s+1,s+=4;continue}if(p===10||p===13){l+=n.slice(c,s),h.push(l),p===13&&n.charCodeAt(s+1)===10?s+=2:++s,l="",c=s,i=s;continue}if(V(p))++s;else if(te(n,s))s+=2;else throw _(e.source,s,`Invalid character within String: ${B(e,s)}.`)}throw _(e.source,s,"Unterminated string.")}function pt(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Ke(s))++i;else break}return b(e,a.NAME,t,i,n.slice(t,i))}const dt=10,Re=2;function ye(e){return ne(e,[])}function ne(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return yt(e,t);default:return String(e)}}function yt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Et(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:ne(r,n)}else if(Array.isArray(e))return Tt(e,n);return mt(e,n)}function Et(e){return typeof e.toJSON=="function"}function mt(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Re?"["+Nt(e)+"]":"{ "+n.map(([i,s])=>i+": "+ne(s,t)).join(", ")+" }"}function Tt(e,t){if(e.length===0)return"[]";if(t.length>Re)return"[Array]";const n=Math.min(dt,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(ne(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Nt(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 vt=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=ye(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 ke{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ye(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function At(e){return vt(e,ke)}function xt(e,t){return new It(e,t).parseDocument()}class It{constructor(t,n={}){const r=At(t)?t:new ke(t);this._lexer=new it(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(a.NAME);return this.node(t,{kind:d.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:d.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 _(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:d.OPERATION_DEFINITION,operation:j.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:d.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 j.QUERY;case"mutation":return j.MUTATION;case"subscription":return j.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:d.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:d.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:d.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:d.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:d.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:d.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:d.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:d.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:d.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:d.INT,value:n.value});case a.FLOAT:return this.advanceLexer(),this.node(n,{kind:d.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:d.BOOLEAN,value:!0});case"false":return this.node(n,{kind:d.BOOLEAN,value:!1});case"null":return this.node(n,{kind:d.NULL});default:return this.node(n,{kind:d.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 _(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:d.STRING,value:t.value,block:t.kind===a.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:d.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:d.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:d.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:d.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:d.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(a.BANG)?this.node(t,{kind:d.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:d.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:d.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:d.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:d.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:d.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:d.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:d.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:d.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:d.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:d.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:d.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 _(this._lexer.source,this._lexer.token.start,`${X(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:d.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:d.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:d.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:d.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:d.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:d.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:d.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:d.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:d.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(le,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new We(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 _(this._lexer.source,n.start,`Expected ${Le(t)}, found ${X(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 _(this._lexer.source,n.start,`Expected "${t}", found ${X(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 _(this._lexer.source,n.start,`Unexpected ${X(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 _(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function X(e){const t=e.value;return Le(e.kind)+(t!=null?` "${t}"`:"")}function Le(e){return rt(e)?`"${e}"`:e}function Ot(e){return`"${e.replace(gt,bt)}"`}const gt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function bt(e){return _t[e.charCodeAt(0)]}const _t=["\\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"],Dt=Object.freeze({});function St(e,t,n=_e){const r=new Map;for(const C of Object.values(d))r.set(C,Ct(t,C));let i,s=Array.isArray(e),c=[e],l=-1,h=[],p=e,y,v;const E=[],O=[];do{l++;const C=l===c.length,$=C&&h.length!==0;if(C){if(y=O.length===0?void 0:E[E.length-1],p=v,v=O.pop(),$)if(s){p=p.slice();let L=0;for(const[U,q]of h){const z=U-L;q===null?(p.splice(z,1),L++):p[z]=q}}else{p=Object.defineProperties({},Object.getOwnPropertyDescriptors(p));for(const[L,U]of h)p[L]=U}l=i.index,c=i.keys,h=i.edits,s=i.inArray,i=i.prev}else if(v){if(y=s?l:c[l],p=v[y],p==null)continue;E.push(y)}let k;if(!Array.isArray(p)){var x,m;Ne(p)||Z(!1,`Invalid AST Node: ${ye(p)}.`);const L=C?(x=r.get(p.kind))===null||x===void 0?void 0:x.leave:(m=r.get(p.kind))===null||m===void 0?void 0:m.enter;if(k=L?.call(t,p,y,v,E,O),k===Dt)break;if(k===!1){if(!C){E.pop();continue}}else if(k!==void 0&&(h.push([y,k]),!C))if(Ne(k))p=k;else{E.pop();continue}}if(k===void 0&&$&&h.push([y,p]),C)E.pop();else{var S;i={inArray:s,index:l,keys:c,edits:h,prev:i},s=Array.isArray(p),c=s?p:(S=n[p.kind])!==null&&S!==void 0?S:[],l=-1,h=[],v&&O.push(v),v=p}}while(i!==void 0);return h.length!==0?h[h.length-1][1]:e}function Ct(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 Fe(e){return St(e,Rt)}const wt=80,Rt={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>f(e.definitions,`
23
+
24
+ `)},OperationDefinition:{leave(e){const t=N("(",f(e.variableDefinitions,", "),")"),n=f([e.operation,f([e.name,t]),f(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+N(" = ",n)+N(" ",f(r," "))},SelectionSet:{leave:({selections:e})=>R(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=N("",e,": ")+t;let c=s+N("(",f(n,", "),")");return c.length>wt&&(c=s+N(`(
25
+ `,K(f(n,`
26
+ `)),`
27
+ )`)),f([c,f(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+N(" ",f(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>f(["...",N("on ",e),f(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${N("(",f(n,", "),")")} on ${t} ${N("",f(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?nt(e):Ot(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+f(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+f(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+N("(",f(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>N("",e,`
28
+ `)+f(["schema",f(t," "),R(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>N("",e,`
29
+ `)+f(["scalar",t,f(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>N("",e,`
30
+ `)+f(["type",t,N("implements ",f(n," & ")),f(r," "),R(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>N("",e,`
31
+ `)+t+(Ae(n)?N(`(
32
+ `,K(f(n,`
33
+ `)),`
34
+ )`):N("(",f(n,", "),")"))+": "+r+N(" ",f(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>N("",e,`
35
+ `)+f([t+": "+n,N("= ",r),f(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>N("",e,`
36
+ `)+f(["interface",t,N("implements ",f(n," & ")),f(r," "),R(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>N("",e,`
37
+ `)+f(["union",t,f(n," "),N("= ",f(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>N("",e,`
38
+ `)+f(["enum",t,f(n," "),R(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>N("",e,`
39
+ `)+f([t,f(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>N("",e,`
40
+ `)+f(["input",t,f(n," "),R(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>N("",e,`
41
+ `)+"directive @"+t+(Ae(n)?N(`(
42
+ `,K(f(n,`
43
+ `)),`
44
+ )`):N("(",f(n,", "),")"))+(r?" repeatable":"")+" on "+f(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>f(["extend schema",f(e," "),R(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>f(["extend scalar",e,f(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>f(["extend type",e,N("implements ",f(t," & ")),f(n," "),R(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>f(["extend interface",e,N("implements ",f(t," & ")),f(n," "),R(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>f(["extend union",e,f(t," "),N("= ",f(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>f(["extend enum",e,f(t," "),R(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>f(["extend input",e,f(t," "),R(n)]," ")}};function f(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function R(e){return N(`{
45
+ `,K(f(e,`
46
+ `)),`
47
+ }`)}function N(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function K(e){return N(" ",e.replace(/\n/g,`
48
+ `))}function Ae(e){var t;return(t=e?.some(n=>n.includes(`
49
+ `)))!==null&&t!==void 0?t:!1}const Vt=Object.freeze(Object.defineProperty({__proto__:null,print:Fe},Symbol.toStringTag,{value:"Module"}));function kt(e,t){let n=null;for(const i of e.definitions)if(i.kind===d.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 qt=Object.freeze(Object.defineProperty({__proto__:null,getOperationAST:kt},Symbol.toStringTag,{value:"Module"})),xe=e=>{let t;const n=e.definitions.filter(r=>r.kind==="OperationDefinition");return n.length===1&&(t=n[0]?.name?.value),t},oe=e=>{if(typeof e=="string"){let n;try{const r=xt(e);n=xe(r)}catch{}return{query:e,operationName:n}}const t=xe(e);return{query:Fe(e),operationName:t}};class G extends Error{constructor(t,n){const r=`${G.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,G.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,G)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var W={exports:{}},Ie;function Lt(){return Ie||(Ie=1,(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Q<"u"&&Q,r=(function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s})();(function(s){(function(c){var l=typeof s<"u"&&s||typeof self<"u"&&self||typeof Q<"u"&&Q||{},h={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function p(o){return o&&DataView.prototype.isPrototypeOf(o)}if(h.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=ArrayBuffer.isView||function(o){return o&&y.indexOf(Object.prototype.toString.call(o))>-1};function E(o){if(typeof o!="string"&&(o=String(o)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(o)||o==="")throw new TypeError('Invalid character in header field name: "'+o+'"');return o.toLowerCase()}function O(o){return typeof o!="string"&&(o=String(o)),o}function x(o){var u={next:function(){var T=o.shift();return{done:T===void 0,value:T}}};return h.iterable&&(u[Symbol.iterator]=function(){return u}),u}function m(o){this.map={},o instanceof m?o.forEach(function(u,T){this.append(T,u)},this):Array.isArray(o)?o.forEach(function(u){if(u.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+u.length);this.append(u[0],u[1])},this):o&&Object.getOwnPropertyNames(o).forEach(function(u){this.append(u,o[u])},this)}m.prototype.append=function(o,u){o=E(o),u=O(u);var T=this.map[o];this.map[o]=T?T+", "+u:u},m.prototype.delete=function(o){delete this.map[E(o)]},m.prototype.get=function(o){return o=E(o),this.has(o)?this.map[o]:null},m.prototype.has=function(o){return this.map.hasOwnProperty(E(o))},m.prototype.set=function(o,u){this.map[E(o)]=O(u)},m.prototype.forEach=function(o,u){for(var T in this.map)this.map.hasOwnProperty(T)&&o.call(u,this.map[T],T,this)},m.prototype.keys=function(){var o=[];return this.forEach(function(u,T){o.push(T)}),x(o)},m.prototype.values=function(){var o=[];return this.forEach(function(u){o.push(u)}),x(o)},m.prototype.entries=function(){var o=[];return this.forEach(function(u,T){o.push([T,u])}),x(o)},h.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function S(o){if(!o._noBody){if(o.bodyUsed)return Promise.reject(new TypeError("Already read"));o.bodyUsed=!0}}function C(o){return new Promise(function(u,T){o.onload=function(){u(o.result)},o.onerror=function(){T(o.error)}})}function $(o){var u=new FileReader,T=C(u);return u.readAsArrayBuffer(o),T}function k(o){var u=new FileReader,T=C(u),I=/charset=([A-Za-z0-9_-]+)/.exec(o.type),g=I?I[1]:"utf-8";return u.readAsText(o,g),T}function L(o){for(var u=new Uint8Array(o),T=new Array(u.length),I=0;I<u.length;I++)T[I]=String.fromCharCode(u[I]);return T.join("")}function U(o){if(o.slice)return o.slice(0);var u=new Uint8Array(o.byteLength);return u.set(new Uint8Array(o)),u.buffer}function q(){return this.bodyUsed=!1,this._initBody=function(o){this.bodyUsed=this.bodyUsed,this._bodyInit=o,o?typeof o=="string"?this._bodyText=o:h.blob&&Blob.prototype.isPrototypeOf(o)?this._bodyBlob=o:h.formData&&FormData.prototype.isPrototypeOf(o)?this._bodyFormData=o:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)?this._bodyText=o.toString():h.arrayBuffer&&h.blob&&p(o)?(this._bodyArrayBuffer=U(o.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(o)||v(o))?this._bodyArrayBuffer=U(o):this._bodyText=o=Object.prototype.toString.call(o):(this._noBody=!0,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):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var o=S(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(){if(this._bodyArrayBuffer){var o=S(this);return o||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(h.blob)return this.blob().then($);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var o=S(this);if(o)return o;if(this._bodyBlob)return k(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(Be)}),this.json=function(){return this.text().then(JSON.parse)},this}var z=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Pe(o){var u=o.toUpperCase();return z.indexOf(u)>-1?u:o}function F(o,u){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');u=u||{};var T=u.body;if(o instanceof F){if(o.bodyUsed)throw new TypeError("Already read");this.url=o.url,this.credentials=o.credentials,u.headers||(this.headers=new m(o.headers)),this.method=o.method,this.mode=o.mode,this.signal=o.signal,!T&&o._bodyInit!=null&&(T=o._bodyInit,o.bodyUsed=!0)}else this.url=String(o);if(this.credentials=u.credentials||this.credentials||"same-origin",(u.headers||!this.headers)&&(this.headers=new m(u.headers)),this.method=Pe(u.method||this.method||"GET"),this.mode=u.mode||this.mode||null,this.signal=u.signal||this.signal||(function(){if("AbortController"in l){var A=new AbortController;return A.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(T),(this.method==="GET"||this.method==="HEAD")&&(u.cache==="no-store"||u.cache==="no-cache")){var I=/([?&])_=[^&]*/;if(I.test(this.url))this.url=this.url.replace(I,"$1_="+new Date().getTime());else{var g=/\?/;this.url+=(g.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}F.prototype.clone=function(){return new F(this,{body:this._bodyInit})};function Be(o){var u=new FormData;return o.trim().split("&").forEach(function(T){if(T){var I=T.split("="),g=I.shift().replace(/\+/g," "),A=I.join("=").replace(/\+/g," ");u.append(decodeURIComponent(g),decodeURIComponent(A))}}),u}function Ue(o){var u=new m,T=o.replace(/\r?\n[\t ]+/g," ");return T.split("\r").map(function(I){return I.indexOf(`
50
+ `)===0?I.substr(1,I.length):I}).forEach(function(I){var g=I.split(":"),A=g.shift().trim();if(A){var J=g.join(":").trim();try{u.append(A,J)}catch(re){console.warn("Response "+re.message)}}}),u}q.call(F.prototype);function w(o,u){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(u||(u={}),this.type="default",this.status=u.status===void 0?200:u.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=u.statusText===void 0?"":""+u.statusText,this.headers=new m(u.headers),this.url=u.url||"",this._initBody(o)}q.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},w.error=function(){var o=new w(null,{status:200,statusText:""});return o.ok=!1,o.status=0,o.type="error",o};var Me=[301,302,303,307,308];w.redirect=function(o,u){if(Me.indexOf(u)===-1)throw new RangeError("Invalid status code");return new w(null,{status:u,headers:{location:o}})},c.DOMException=l.DOMException;try{new c.DOMException}catch{c.DOMException=function(u,T){this.message=u,this.name=T;var I=Error(u);this.stack=I.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function ie(o,u){return new Promise(function(T,I){var g=new F(o,u);if(g.signal&&g.signal.aborted)return I(new c.DOMException("Aborted","AbortError"));var A=new XMLHttpRequest;function J(){A.abort()}A.onload=function(){var D={statusText:A.statusText,headers:Ue(A.getAllResponseHeaders()||"")};g.url.indexOf("file://")===0&&(A.status<200||A.status>599)?D.status=200:D.status=A.status,D.url="responseURL"in A?A.responseURL:D.headers.get("X-Request-URL");var P="response"in A?A.response:A.responseText;setTimeout(function(){T(new w(P,D))},0)},A.onerror=function(){setTimeout(function(){I(new TypeError("Network request failed"))},0)},A.ontimeout=function(){setTimeout(function(){I(new TypeError("Network request timed out"))},0)},A.onabort=function(){setTimeout(function(){I(new c.DOMException("Aborted","AbortError"))},0)};function re(D){try{return D===""&&l.location.href?l.location.href:D}catch{return D}}if(A.open(g.method,re(g.url),!0),g.credentials==="include"?A.withCredentials=!0:g.credentials==="omit"&&(A.withCredentials=!1),"responseType"in A&&(h.blob?A.responseType="blob":h.arrayBuffer&&(A.responseType="arraybuffer")),u&&typeof u.headers=="object"&&!(u.headers instanceof m||l.Headers&&u.headers instanceof l.Headers)){var Ee=[];Object.getOwnPropertyNames(u.headers).forEach(function(D){Ee.push(E(D)),A.setRequestHeader(D,O(u.headers[D]))}),g.headers.forEach(function(D,P){Ee.indexOf(P)===-1&&A.setRequestHeader(P,D)})}else g.headers.forEach(function(D,P){A.setRequestHeader(P,D)});g.signal&&(g.signal.addEventListener("abort",J),A.onreadystatechange=function(){A.readyState===4&&g.signal.removeEventListener("abort",J)}),A.send(typeof g._bodyInit>"u"?null:g._bodyInit)})}return ie.polyfill=!0,l.fetch||(l.fetch=ie,l.Headers=m,l.Request=F,l.Response=w),c.Headers=m,c.Request=F,c.Response=w,c.fetch=ie,Object.defineProperty(c,"__esModule",{value:!0}),c})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n: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})(W,W.exports)),W.exports}var fe=Lt();const ee=je(fe),Ft=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"})),M=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Ft&&fe.Headers&&e instanceof fe.Headers?t=qe(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):t=e),t},Oe=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Pt=e=>{if(!Array.isArray(e.query)){const r=e,i=[`query=${encodeURIComponent(Oe(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:Oe(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),r),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},Bt=e=>async t=>{const{url:n,query:r,variables:i,operationName:s,fetch:c,fetchOptions:l,middleware:h}=t,p={...t.headers};let y="",v;e==="POST"?(v=Ut(r,i,s,l.jsonSerializer),typeof v=="string"&&(p["Content-Type"]="application/json")):y=Pt({query:r,variables:i,operationName:s,jsonSerializer:l.jsonSerializer??pe});const E={method:e,headers:p,body:v,...l};let O=n,x=E;if(h){const m=await Promise.resolve(h({...E,url:n,operationName:s,variables:i})),{url:S,...C}=m;O=S,x=C}return y&&(O=`${O}?${y}`),await c(O,x)};class Ht{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=async(...r)=>{const[i,s,c]=r,l=Ge(i,s,c),{headers:h,fetch:p=ee,method:y="POST",requestMiddleware:v,responseMiddleware:E,...O}=this.requestConfig,{url:x}=this;l.signal!==void 0&&(O.signal=l.signal);const{operationName:m}=oe(l.query);return ae({url:x,query:l.query,variables:l.variables,headers:{...M(ce(h)),...M(l.requestHeaders)},operationName:m,fetch:p,method:y,fetchOptions:O,middleware:v}).then(S=>(E&&E(S),S)).catch(S=>{throw E&&E(S),S})}}async request(t,...n){const[r,i]=n,s=He(t,r,i),{headers:c,fetch:l=ee,method:h="POST",requestMiddleware:p,responseMiddleware:y,...v}=this.requestConfig,{url:E}=this;s.signal!==void 0&&(v.signal=s.signal);const{query:O,operationName:x}=oe(s.document);return ae({url:E,query:O,variables:s.variables,headers:{...M(ce(c)),...M(s.requestHeaders)},operationName:x,fetch:l,method:h,fetchOptions:v,middleware:p}).then(m=>(y&&y(m),m.data)).catch(m=>{throw y&&y(m),m})}batchRequests(t,n){const r=Ye(t,n),{headers:i,...s}=this.requestConfig;r.signal!==void 0&&(s.signal=r.signal);const c=r.documents.map(({document:h})=>oe(h).query),l=r.documents.map(({variables:h})=>h);return ae({url:this.url,query:c,variables:l,headers:{...M(ce(i)),...M(r.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??ee,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}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 ae=async e=>{const{query:t,variables:n,fetchOptions:r}=e,i=Bt(Ve(e.method??"post")),s=Array.isArray(e.query),c=await i(e),l=await Mt(c,r.jsonSerializer??pe),h=Array.isArray(l)?!l.some(({data:y})=>!y):!!l.data,p=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||r.errorPolicy==="all"||r.errorPolicy==="ignore";if(c.ok&&p&&h){const{errors:y,...v}=(Array.isArray(l),l),E=r.errorPolicy==="ignore"?v:l;return{...s?{data:E}:E,headers:c.headers,status:c.status}}else{const y=typeof l=="string"?{error:l}:l;throw new G({...y,status:c.status,headers:c.headers},{query:t,variables:n})}},Ut=(e,t,n,r)=>{const i=r??pe;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,l,h)=>(c.push({query:l,variables:t?t[h]:void 0}),c),[]);return i.stringify(s)},Mt=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()},ce=e=>typeof e=="function"?e():e;export{Ht as G,Vt as a,qt as g,xt as p};
@@ -0,0 +1,3 @@
1
+ import{r as ie,a as pn,R as zt,b as bn}from"./vendor-chakra-81WUgB9u.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 gn={};function Rt(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:gn}var lr=Object.assign,ze=Object.getOwnPropertyDescriptor,U=Object.defineProperty,Te=Object.prototype,pt=[];Object.freeze(pt);var xt={};Object.freeze(xt);var mn=typeof Proxy<"u",yn=Object.toString();function cr(){mn||d("Proxy not available")}function vr(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var de=function(){};function T(e){return typeof e=="function"}function ae(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function Qe(e){return e!==null&&typeof e=="object"}function q(e){if(!Qe(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()===yn}function hr(e){var t=e?.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function De(e,t,n){U(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function _r(e,t,n){U(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ee(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(r){return Qe(r)&&r[n]===!0}}function Se(e){return e instanceof Map}function Ne(e){return e instanceof Set}var dr=typeof Object.getOwnPropertySymbols<"u";function On(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 Te.propertyIsEnumerable.call(e,r)})):t}var ge=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 Te.hasOwnProperty.call(e,t)}var An=Object.getOwnPropertyDescriptors||function(t){var n={};return ge(t).forEach(function(r){n[r]=ze(t,r)}),n};function Sn(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,Pn(r.key),r)}}function Tt(e,t,n){return t&&Sn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z(){return Z=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},Z.apply(this,arguments)}function br(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bt(e,t)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},bt(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 wn(e,t){if(e){if(typeof e=="string")return Wt(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 Wt(e,t)}}function Wt(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 pe(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=wn(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 En(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 Pn(e){var t=En(e,"string");return typeof t=="symbol"?t:String(t)}var I=Symbol("mobx-stored-annotations");function j(e){function t(n,r){if(Ce(r))return e.decorate_20223_(n,r);we(n,r,e)}return Object.assign(t,e)}function we(e,t,n){K(e,I)||De(e,I,Z({},e[I])),Ln(n)||(e[I][t]=n)}function Rn(e){return K(e,I)||De(e,I,Z({},e[I])),e[I]}function Ce(e){return typeof e=="object"&&typeof e.kind=="string"}var v=Symbol("mobx administration"),Be=(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 $r(this)},t.reportChanged=function(){E(),Mr(this),P()},t.toString=function(){return this.name_},e})(),Dt=ee("Atom",Be);function Nt(e,t,n){t===void 0&&(t=de),n===void 0&&(n=de);var r=new Be(e);return t!==de&&Wr(r,t),n!==de&&$t(r,n),r}function xn(e,t){return e===t}function Tn(e,t){return Ft(e,t)}function Dn(e,t){return Ft(e,t,1)}function Nn(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var oe={identity:xn,structural:Tn,default:Nn,shallow:Dn};function se(e,t,n){return ot(e)?e:Array.isArray(e)?y.array(e,{name:n}):q(e)?y.object(e,void 0,{name:n}):Se(e)?y.map(e,{name:n}):Ne(e)?y.set(e,{name:n}):typeof e=="function"&&!Ve(e)&&!Ae(e)?hr(e)?fe(e):Oe(n,e):e}function Cn(e,t,n){if(e==null||A(e)||R(e)||S(e)||w(e))return e;if(Array.isArray(e))return y.array(e,{name:n,deep:!1});if(q(e))return y.object(e,void 0,{name:n,deep:!1});if(Se(e))return y.map(e,{name:n,deep:!1});if(Ne(e))return y.set(e,{name:n,deep:!1})}function et(e){return e}function Bn(e,t){return Ft(e,t)?t:e}var gr="override",jn=j({annotationType_:gr,make_:Vn,extend_:$n,decorate_20223_:Mn});function Ln(e){return e.annotationType_===gr}function Vn(e,t){return 0}function $n(e,t,n,r){d("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function Mn(e,t){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function je(e,t){return{annotationType_:e,options_:t,make_:In,extend_:Un,decorate_20223_:Gn}}function In(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(Ve(n.value))return 1;var a=mr(e,this,t,n,!1);return U(r,t,a),2}function Un(e,t,n,r){var i=mr(e,this,t,n);return e.defineProperty_(t,i,r)}function Gn(e,t){var n=t.kind,r=t.name,i=t.addInitializer,a=this,o=function(f){var c,h,_,g;return Q((c=(h=a.options_)==null?void 0:h.name)!=null?c:r.toString(),f,(_=(g=a.options_)==null?void 0:g.autoAction)!=null?_:!1)};if(n=="field"){i(function(){we(this,r,a)});return}if(n=="method"){var s;return Ve(e)||(e=o(e)),(s=this.options_)!=null&&s.bound&&i(function(){var u=this,f=u[r].bind(u);f.isMobxAction=!0,u[r]=f}),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 Kn(e,t,n,r){t.annotationType_,r.value}function mr(e,t,n,r,i){var a,o,s,u,f,c,h;i===void 0&&(i=l.safeDescriptors),Kn(e,t,n,r);var _=r.value;if((a=t.options_)!=null&&a.bound){var g;_=_.bind((g=e.proxy_)!=null?g:e.target_)}return{value:Q((o=(s=t.options_)==null?void 0:s.name)!=null?o:n.toString(),_,(u=(f=t.options_)==null?void 0:f.autoAction)!=null?u:!1,(c=t.options_)!=null&&c.bound?(h=e.proxy_)!=null?h:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function yr(e,t){return{annotationType_:e,options_:t,make_:Fn,extend_:qn,decorate_20223_:zn}}function Fn(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)||!Ae(e.target_[t]))&&this.extend_(e,t,n,!1)===null)return 0;if(Ae(n.value))return 1;var a=Or(e,this,t,n,!1,!1);return U(r,t,a),2}function qn(e,t,n,r){var i,a=Or(e,this,t,n,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,a,r)}function zn(e,t){var n,r=t.name,i=t.addInitializer;return Ae(e)||(e=fe(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 Wn(e,t,n,r){t.annotationType_,r.value}function Or(e,t,n,r,i,a){a===void 0&&(a=l.safeDescriptors),Wn(e,t,n,r);var o=r.value;if(Ae(o)||(o=fe(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 Ct(e,t){return{annotationType_:e,options_:t,make_:Hn,extend_:Yn,decorate_20223_:Xn}}function Hn(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function Yn(e,t,n,r){return Jn(e,this,t,n),e.defineComputedProperty_(t,Z({},this.options_,{get:n.get,set:n.set}),r)}function Xn(e,t){var n=this,r=t.name,i=t.addInitializer;return i(function(){var a=ce(this)[v],o=Z({},n.options_,{get:e,context:this});o.name||(o.name="ObservableObject."+r.toString()),a.values_.set(r,new me(o))}),function(){return this[v].getObservablePropValue_(r)}}function Jn(e,t,n,r){t.annotationType_,r.get}function tt(e,t){return{annotationType_:e,options_:t,make_:kn,extend_:Zn,decorate_20223_:Qn}}function kn(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function Zn(e,t,n,r){var i,a;return ei(e,this),e.defineObservableProperty_(t,n.value,(i=(a=this.options_)==null?void 0:a.enhancer)!=null?i:se,r)}function Qn(e,t){var n=this,r=t.kind,i=t.name,a=new WeakSet;function o(s,u){var f,c,h=ce(s)[v],_=new k(u,(f=(c=n.options_)==null?void 0:c.enhancer)!=null?f:se,"ObservableObject."+i.toString(),!1);h.values_.set(i,_),a.add(s)}if(r=="accessor")return{get:function(){return a.has(this)||o(this,e.get.call(this)),this[v].getObservablePropValue_(i)},set:function(u){return a.has(this)||o(this,u),this[v].setObservablePropValue_(i,u)},init:function(u){return a.has(this)||o(this,u),u}}}function ei(e,t,n,r){t.annotationType_}var ti="true",ri=Ar();function Ar(e){return{annotationType_:ti,options_:e,make_:ni,extend_:ii,decorate_20223_:ai}}function ni(e,t,n,r){var i,a;if(n.get)return Le.make_(e,t,n,r);if(n.set){var o=Q(t.toString(),n.set);return r===e.target_?e.defineProperty_(t,{configurable:l.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(U(r,t,{configurable:!0,set:o}),2)}if(r!==e.target_&&typeof n.value=="function"){var s;if(hr(n.value)){var u,f=(u=this.options_)!=null&&u.autoBind?fe.bound:fe;return f.make_(e,t,n,r)}var c=(s=this.options_)!=null&&s.autoBind?Oe.bound:Oe;return c.make_(e,t,n,r)}var h=((i=this.options_)==null?void 0:i.deep)===!1?y.ref:y;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var _;n.value=n.value.bind((_=e.proxy_)!=null?_:e.target_)}return h.make_(e,t,n,r)}function ii(e,t,n,r){var i,a;if(n.get)return Le.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:l.safeDescriptors?e.isPlainObject_:!0,set:Q(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?y.ref:y;return s.extend_(e,t,n,r)}function ai(e,t){d("'"+this.annotationType_+"' cannot be used as a decorator")}var oi="observable",si="observable.ref",ui="observable.shallow",fi="observable.struct",Sr={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Sr);function Ie(e){return e||Sr}var gt=tt(oi),li=tt(si,{enhancer:et}),ci=tt(ui,{enhancer:Cn}),vi=tt(fi,{enhancer:Bn}),wr=j(gt);function Ue(e){return e.deep===!0?se:e.deep===!1?et:_i(e.defaultDecorator)}function hi(e){var t;return e?(t=e.defaultDecorator)!=null?t:Ar(e):void 0}function _i(e){var t,n;return e&&(t=(n=e.options_)==null?void 0:n.enhancer)!=null?t:se}function Er(e,t,n){if(Ce(t))return gt.decorate_20223_(e,t);if(ae(t)){we(e,t,gt);return}return ot(e)?e:q(e)?y.object(e,t,n):Array.isArray(e)?y.array(e,t):Se(e)?y.map(e,t):Ne(e)?y.set(e,t):typeof e=="object"&&e!==null?e:y.box(e,t)}lr(Er,wr);var di={box:function(t,n){var r=Ie(n);return new k(t,Ue(r),r.name,!0,r.equals)},array:function(t,n){var r=Ie(n);return(l.useProxies===!1||r.proxy===!1?Ca:Aa)(t,Ue(r),r.name)},map:function(t,n){var r=Ie(n);return new Ut(t,Ue(r),r.name)},set:function(t,n){var r=Ie(n);return new Gt(t,Ue(r),r.name)},object:function(t,n,r){return te(function(){return Mt(l.useProxies===!1||r?.proxy===!1?ce({},r):ga({},r),t,n)})},ref:j(li),shallow:j(ci),deep:wr,struct:j(vi)},y=lr(Er,di),Pr="computed",pi="computed.struct",mt=Ct(Pr),bi=Ct(pi,{equals:oe.structural}),Le=function(t,n){if(Ce(n))return mt.decorate_20223_(t,n);if(ae(n))return we(t,n,mt);if(q(t))return j(Ct(Pr,t));var r=q(n)?n:{};return r.get=t,r.name||(r.name=t.name||""),new me(r)};Object.assign(Le,mt);Le.struct=j(bi);var Ht,Yt,We=0,gi=1,mi=(Ht=(Yt=ze(function(){},"name"))==null?void 0:Yt.configurable)!=null?Ht:!1,Xt={value:"action",configurable:!0,writable:!1,enumerable:!1};function Q(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()},mi&&(Xt.value=e,U(i,"name",Xt)),i}function Rr(e,t,n,r,i){var a=xr(e,t);try{return n.apply(r,i)}catch(o){throw a.error_=o,o}finally{Tr(a)}}function xr(e,t,n,r){var i=!1,a=0,o=l.trackingDerivation,s=!t||!o;E();var u=l.allowStateChanges;s&&(le(),u=rt(!0));var f=it(!0),c={runAsAction_:s,prevDerivation_:o,prevAllowStateChanges_:u,prevAllowStateReads_:f,notifySpy_:i,startTime_:a,actionId_:gi++,parentActionId_:We};return We=c.actionId_,c}function Tr(e){We!==e.actionId_&&d(30),We=e.parentActionId_,e.error_!==void 0&&(l.suppressReactionErrors=!0),nt(e.prevAllowStateChanges_),be(e.prevAllowStateReads_),P(),e.runAsAction_&&F(e.prevDerivation_),l.suppressReactionErrors=!1}function Bt(e,t){var n=rt(e);try{return t()}finally{nt(n)}}function rt(e){var t=l.allowStateChanges;return l.allowStateChanges=e,t}function nt(e){l.allowStateChanges=e}var Dr;Dr=Symbol.toPrimitive;var k=(function(e){br(t,e);function t(r,i,a,o,s){var u;return a===void 0&&(a="ObservableValue"),s===void 0&&(s=oe.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!==l.UNCHANGED&&this.setNewValue_(i)},n.prepareNewValue_=function(i){if(C(this)){var a=B(this,{object:this,type:G,newValue:i});if(!a)return l.UNCHANGED;i=a.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?l.UNCHANGED:i},n.setNewValue_=function(i){var a=this.value_;this.value_=i,this.reportChanged(),L(this)&&V(this,{type:G,object:this,newValue:i,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(i){return $e(this,i)},n.observe_=function(i,a){return a&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:G,newValue:this.value_,oldValue:void 0}),Me(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[Dr]=function(){return this.valueOf()},t})(Be),jt=ee("ObservableValue",k),Nr;Nr=Symbol.toPrimitive;var me=(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_=Q("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?oe.structural:oe.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){Di(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),l.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)yt(this)&&(this.warnAboutUntrackedRead_(),E(),this.value_=this.computeValue_(!1),P());else if($r(this),yt(this)){var r=l.trackingContext;this.keepAlive_&&!r&&(l.trackingContext=this),this.trackAndCompute()&&Ti(this),l.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=rt(!1),a;if(r)a=Cr(this,this.derivation,this.scope_);else if(l.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(o){a=new Ye(o)}return nt(i),this.isComputing_=!1,a},t.suspend_=function(){this.keepAlive_||(Ot(this),this.value_=void 0)},t.observe_=function(r,i){var a=this,o=!0,s=void 0;return Vt(function(){var u=a.get();if(!o||i){var f=le();r({observableKind:"computed",debugObjectName:a.name_,type:G,object:a,newValue:u,oldValue:s}),F(f)}o=!1,s=u})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return pr(this.get())},t[Nr]=function(){return this.valueOf()},e})(),ue=ee("ComputedValue",me),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 yt(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=it(!0),n=le(),r=e.observing_,i=r.length,a=0;a<i;a++){var o=r[a];if(ue(o)){if(l.disableErrorBoundaries)o.get();else try{o.get()}catch{return F(n),be(t),!0}if(e.dependenciesState_===p.STALE_)return F(n),be(t),!0}}return Br(e),F(n),be(t),!1}}}function yi(){return l.trackingDerivation!==null}function Cr(e,t,n){var r=it(!0);Br(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++l.runId;var i=l.trackingDerivation;l.trackingDerivation=e,l.inBatch++;var a;if(l.disableErrorBoundaries===!0)a=t.call(n);else try{a=t.call(n)}catch(o){a=new Ye(o)}return l.inBatch--,l.trackingDerivation=i,Oi(e),be(r),a}function Oi(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&&Lr(u,e),u.diffValue_=0}for(;i--;){var f=n[i];f.diffValue_===1&&(f.diffValue_=0,xi(f,e))}r!==p.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function Ot(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)Lr(t[n],e);e.dependenciesState_=p.NOT_TRACKING_}function Lt(e){var t=le();try{return e()}finally{F(t)}}function le(){var e=l.trackingDerivation;return l.trackingDerivation=null,e}function F(e){l.trackingDerivation=e}function it(e){var t=l.allowStateReads;return l.allowStateReads=e,t}function be(e){l.allowStateReads=e}function Br(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 Ai=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],Ee=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},qe=!0,jr=!1,l=(function(){var e=Rt();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(qe=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new Ee().version&&(qe=!1),qe?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ee):(setTimeout(function(){jr||d(35)},1),new Ee)})();function Si(){if((l.pendingReactions.length||l.inBatch||l.isRunningReactions)&&d(36),jr=!0,qe){var e=Rt();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),l=new Ee}}function wi(){return l}function Ei(){var e=new Ee;for(var t in e)Ai.indexOf(t)===-1&&(l[t]=e[t]);l.allowStateChanges=!l.enforceActions}function Pi(e){return e.observers_&&e.observers_.size>0}function Ri(e){return e.observers_}function xi(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Lr(e,t){e.observers_.delete(t),e.observers_.size===0&&Vr(e)}function Vr(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,l.pendingUnobservations.push(e))}function E(){l.inBatch++}function P(){if(--l.inBatch===0){Ir();for(var e=l.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 me&&n.suspend_())}l.pendingUnobservations=[]}}function $r(e){var t=l.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&l.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),e.isBeingObserved_):(e.observers_.size===0&&l.inBatch>0&&Vr(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 Ti(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 Di(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 ye=(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,l.pendingReactions.push(this),Ir())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){E(),this.isScheduled_=!1;var r=l.trackingContext;if(l.trackingContext=this,yt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}l.trackingContext=r,P()}},t.track=function(r){if(!this.isDisposed_){E(),this.isRunning_=!0;var i=l.trackingContext;l.trackingContext=this;var a=Cr(this,r,void 0);l.trackingContext=i,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Ot(this),Fe(a)&&this.reportExceptionInDerivation_(a.cause),P()}},t.reportExceptionInDerivation_=function(r){var i=this;if(this.errorHandler_){this.errorHandler_(r,this);return}if(l.disableErrorBoundaries)throw r;var a="[mobx] uncaught error in '"+this+"'";l.suppressReactionErrors||console.error(a,r),l.globalReactionErrorHandlers.forEach(function(o){return o(r,i)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(E(),Ot(this),P()))},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[v]=this,a},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(r){},e})();function Ni(e){return l.globalReactionErrorHandlers.push(e),function(){var t=l.globalReactionErrorHandlers.indexOf(e);t>=0&&l.globalReactionErrorHandlers.splice(t,1)}}var Ci=100,At=function(t){return t()};function Ir(){l.inBatch>0||l.isRunningReactions||At(Bi)}function Bi(){l.isRunningReactions=!0;for(var e=l.pendingReactions,t=0;e.length>0;){++t===Ci&&(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_()}l.isRunningReactions=!1}var Xe=ee("Reaction",ye);function ji(e){var t=At;At=function(r){return e(function(){return t(r)})}}function Pe(){return!1}function Ur(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Gr="action",Li="action.bound",Kr="autoAction",Vi="autoAction.bound",Fr="<unnamed action>",St=je(Gr),$i=je(Li,{bound:!0}),wt=je(Kr,{autoAction:!0}),Mi=je(Vi,{autoAction:!0,bound:!0});function qr(e){var t=function(r,i){if(T(r))return Q(r.name||Fr,r,e);if(T(i))return Q(r,i,e);if(Ce(i))return(e?wt:St).decorate_20223_(r,i);if(ae(i))return we(r,i,e?wt:St);if(ae(r))return j(je(e?Kr:Gr,{name:r,autoAction:e}))};return t}var X=qr(!1);Object.assign(X,St);var Oe=qr(!0);Object.assign(Oe,wt);X.bound=j($i);Oe.bound=j(Mi);function Jt(e){return Rr(e.name||Fr,!1,e,this,void 0)}function Ve(e){return T(e)&&e.isMobxAction===!0}function Vt(e,t){var n,r,i,a,o;t===void 0&&(t=xt);var s=(n=(r=t)==null?void 0:r.name)!=null?n:"Autorun",u=!t.scheduler&&!t.delay,f;if(u)f=new ye(s,function(){this.track(_)},t.onError,t.requiresObservable);else{var c=zr(t),h=!1;f=new ye(s,function(){h||(h=!0,c(function(){h=!1,f.isDisposed_||f.track(_)}))},t.onError,t.requiresObservable)}function _(){e(f)}return(i=t)!=null&&(a=i.signal)!=null&&a.aborted||f.schedule_(),f.getDisposer_((o=t)==null?void 0:o.signal)}var Ii=function(t){return t()};function zr(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ii}function Ui(e,t,n){var r,i,a,o;n===void 0&&(n=xt);var s=(r=n.name)!=null?r:"Reaction",u=X(s,n.onError?Gi(n.onError,t):t),f=!n.scheduler&&!n.delay,c=zr(n),h=!0,_=!1,g,N=n.compareStructural?oe.structural:n.equals||oe.default,b=new ye(s,function(){h||f?O():_||(_=!0,c(O))},n.onError,n.requiresObservable);function O(){if(_=!1,!b.isDisposed_){var re=!1,ve=g;b.track(function(){var H=Bt(!1,function(){return e(b)});re=h||!N(g,H),g=H}),(h&&n.fireImmediately||!h&&re)&&u(g,ve,b),h=!1}}return(i=n)!=null&&(a=i.signal)!=null&&a.aborted||b.schedule_(),b.getDisposer_((o=n)==null?void 0:o.signal)}function Gi(e,t){return function(){try{return t.apply(this,arguments)}catch(n){e.call(this,n)}}}var Ki="onBO",Fi="onBUO";function Wr(e,t,n){return Hr(Ki,e,t,n)}function $t(e,t,n){return Hr(Fi,e,t,n)}function Hr(e,t,n,r){var i=typeof r=="function"?z(t,n):z(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 qi="never",Ge="always",zi="observed";function Yr(e){e.isolateGlobalState===!0&&Si();var t=e.useProxies,n=e.enforceActions;if(t!==void 0&&(l.useProxies=t===Ge?!0:t===qi?!1:typeof Proxy<"u"),t==="ifavailable"&&(l.verifyProxies=!0),n!==void 0){var r=n===Ge?Ge:n===zi;l.enforceActions=r,l.allowStateChanges=!(r===!0||r===Ge)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(l[i]=!!e[i])}),l.allowStateReads=!l.observableRequiresReaction,e.reactionScheduler&&ji(e.reactionScheduler)}function Mt(e,t,n,r){var i=An(t);return te(function(){var a=ce(e,r)[v];ge(i).forEach(function(o){a.extend_(o,i[o],n&&o in n?n[o]:!0)})}),e}function Xr(e,t){return Jr(z(e,t))}function Jr(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=Hi(e.observing_).map(Jr)),t}function Wi(e,t){return kr(z(e,t))}function kr(e){var t={name:e.name_};return Pi(e)&&(t.observers=Array.from(Ri(e)).map(kr)),t}function Hi(e){return Array.from(new Set(e))}var Yi=0;function at(){this.message="FLOW_CANCELLED"}at.prototype=Object.create(Error.prototype);function Xi(e){return e instanceof at}var ut=yr("flow"),Ji=yr("flow.bound",{bound:!0}),fe=Object.assign(function(t,n){if(Ce(n))return ut.decorate_20223_(t,n);if(ae(n))return we(t,n,ut);var r=t,i=r.name||"<unnamed flow>",a=function(){var s=this,u=arguments,f=++Yi,c=X(i+" - runid: "+f+" - init",r).apply(s,u),h,_=void 0,g=new Promise(function(N,b){var O=0;h=b;function re(x){_=void 0;var Y;try{Y=X(i+" - runid: "+f+" - yield "+O++,c.next).call(c,x)}catch(ne){return b(ne)}H(Y)}function ve(x){_=void 0;var Y;try{Y=X(i+" - runid: "+f+" - yield "+O++,c.throw).call(c,x)}catch(ne){return b(ne)}H(Y)}function H(x){if(T(x?.then)){x.then(H,b);return}return x.done?N(x.value):(_=Promise.resolve(x.value),_.then(re,ve))}re(void 0)});return g.cancel=X(i+" - runid: "+f+" - cancel",function(){try{_&&kt(_);var N=c.return(void 0),b=Promise.resolve(N.value);b.then(de,de),kt(b),h(new at)}catch(O){h(O)}}),g};return a.isMobXFlow=!0,a},ut);fe.bound=j(Ji);function kt(e){T(e.cancel)&&e.cancel()}function ki(e){return e}function Ae(e){return e?.isMobXFlow===!0}function Zi(e,t,n){var r;return S(e)||R(e)||jt(e)?r=W(e):A(e)&&(r=W(e,t)),r.dehancer=typeof t=="function"?t:n,function(){r.dehancer=void 0}}function Qi(e,t,n){return T(n)?ta(e,t,n):ea(e,t)}function ea(e,t){return W(e).intercept_(t)}function ta(e,t,n){return W(e,t).intercept_(n)}function Zr(e,t){if(t===void 0)return ue(e);if(A(e)===!1||!e[v].values_.has(t))return!1;var n=z(e,t);return ue(n)}function ra(e){return Zr(e)}function na(e,t){return Zr(e,t)}function Qr(e,t){return e?t!==void 0?A(e)?e[v].values_.has(t):!1:A(e)||!!e[v]||Dt(e)||Xe(e)||ue(e):!1}function ot(e){return Qr(e)}function ia(e,t){return Qr(e,t)}function Re(e){if(A(e))return e[v].keys_();if(S(e)||w(e))return Array.from(e.keys());if(R(e))return e.map(function(t,n){return n});d(5)}function aa(e){if(A(e))return Re(e).map(function(t){return e[t]});if(S(e))return Re(e).map(function(t){return e.get(t)});if(w(e))return Array.from(e.values());if(R(e))return e.slice();d(6)}function oa(e){if(A(e))return Re(e).map(function(t){return[t,e[t]]});if(S(e))return Re(e).map(function(t){return[t,e.get(t)]});if(w(e))return Array.from(e.entries());if(R(e))return e.map(function(t,n){return[n,t]});d(7)}function en(e,t,n){if(arguments.length===2&&!w(e)){E();var r=t;try{for(var i in r)en(e,i,r[i])}finally{P()}return}A(e)?e[v].set_(t,n):S(e)?e.set(t,n):w(e)?e.add(t):R(e)?(typeof t!="number"&&(t=parseInt(t,10)),t<0&&d("Invalid index: '"+t+"'"),E(),t>=e.length&&(e.length=t+1),e[t]=n,P()):d(8)}function sa(e,t){A(e)?e[v].delete_(t):S(e)||w(e)?e.delete(t):R(e)?(typeof t!="number"&&(t=parseInt(t,10)),e.splice(t,1)):d(9)}function tn(e,t){if(A(e))return e[v].has_(t);if(S(e))return e.has(t);if(w(e))return e.has(t);if(R(e))return t>=0&&t<e.length;d(10)}function ua(e,t){if(tn(e,t)){if(A(e))return e[v].get_(t);if(S(e))return e.get(t);if(R(e))return e[t];d(11)}}function fa(e,t,n){if(A(e))return e[v].defineProperty_(t,n);d(39)}function rn(e){if(A(e))return e[v].ownKeys_();d(38)}function la(e,t,n,r){return T(n)?va(e,t,n,r):ca(e,t,n)}function ca(e,t,n){return W(e).observe_(t,n)}function va(e,t,n,r){return W(e,t).observe_(n,r)}function Ke(e,t,n){return e.set(t,n),n}function _e(e,t){if(e==null||typeof e!="object"||e instanceof Date||!ot(e))return e;if(jt(e)||ue(e))return _e(e.get(),t);if(t.has(e))return t.get(e);if(R(e)){var n=Ke(t,e,new Array(e.length));return e.forEach(function(o,s){n[s]=_e(o,t)}),n}if(w(e)){var r=Ke(t,e,new Set);return e.forEach(function(o){r.add(_e(o,t))}),r}if(S(e)){var i=Ke(t,e,new Map);return e.forEach(function(o,s){i.set(s,_e(o,t))}),i}else{var a=Ke(t,e,{});return rn(e).forEach(function(o){Te.propertyIsEnumerable.call(e,o)&&(a[o]=_e(e[o],t))}),a}}function ha(e,t){return _e(e,new Map)}function _a(){}function M(e,t){t===void 0&&(t=void 0),E();try{return e.apply(t)}finally{P()}}function da(e,t,n){return arguments.length===1||t&&typeof t=="object"?pa(e,t):nn(e,t,n||{})}function nn(e,t,n){var r;if(typeof n.timeout=="number"){var i=new Error("WHEN_TIMEOUT");r=setTimeout(function(){if(!o[v].isDisposed_)if(o(),n.onError)n.onError(i);else throw i},n.timeout)}n.name="When";var a=Q("When-effect",t),o=Vt(function(s){var u=Bt(!1,e);u&&(s.dispose(),r&&clearTimeout(r),a())},n);return o}function pa(e,t){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var r,i,a=new Promise(function(o,s){var u,f=nn(e,o,Z({},t,{onError:s}));r=function(){f(),s(new Error("WHEN_CANCELLED"))},i=function(){f(),s(new Error("WHEN_ABORTED"))},t==null||(u=t.signal)==null||u.addEventListener==null||u.addEventListener("abort",i)}).finally(function(){var o;return t==null||(o=t.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",i)});return a.cancel=r,a}function he(e){return e[v]}var ba={has:function(t,n){return he(t).has_(n)},get:function(t,n){return he(t).get_(n)},set:function(t,n,r){var i;return ae(n)?(i=he(t).set_(n,r,!0))!=null?i:!0:!1},deleteProperty:function(t,n){var r;return ae(n)?(r=he(t).delete_(n,!0))!=null?r:!0:!1},defineProperty:function(t,n,r){var i;return(i=he(t).defineProperty_(n,r))!=null?i:!0},ownKeys:function(t){return he(t).ownKeys_()},preventExtensions:function(t){d(13)}};function ga(e,t){var n,r;return cr(),e=ce(e,t),(r=(n=e[v]).proxy_)!=null?r:n.proxy_=new Proxy(e,ba)}function C(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function $e(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 B(e,t){var n=le();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 L(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function Me(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 V(e,t){var n=le(),r=e.changeListeners_;if(r){r=r.slice();for(var i=0,a=r.length;i<a;i++)r[i](t);F(n)}}function an(e,t,n){return te(function(){var r,i=ce(e,n)[v];(r=t)!=null||(t=Rn(e)),ge(t).forEach(function(a){return i.make_(a,t[a])})}),e}var ft=Symbol("mobx-keys");function ma(e,t,n){return q(e)?Mt(e,e,t,n):(te(function(){var r=ce(e,n)[v];if(!e[ft]){var i=Object.getPrototypeOf(e),a=new Set([].concat(ge(e),ge(i)));a.delete("constructor"),a.delete(v),De(i,ft,a)}e[ft].forEach(function(o){return r.make_(o,t&&o in t?t[o]:!0)})}),e)}var Zt="splice",G="update",ya=1e4,Oa={get:function(t,n){var r=t[v];return n===v?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[v];return n==="length"&&i.setArrayLength_(r),typeof n=="symbol"||isNaN(n)?t[n]=r:i.set_(parseInt(n),r),!0},preventExtensions:function(){d(15)}},It=(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 Be(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 $e(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}),Me(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&&_n(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=pt),C(this)){var u=B(this,{object:this.proxy_,type:Zt,index:r,removedCount:i,added:a});if(!u)return pt;i=u.removedCount,a=u.added}if(a=a.length===0?a:a.map(function(h){return o.enhancer_(h,void 0)}),this.legacyMode_){var f=a.length-i;this.updateArrayLength_(s,f)}var c=this.spliceItemsIntoValues_(r,i,a);return(i!==0||a.length!==0)&&this.notifyArraySplice_(r,a,c),this.dehanceValues_(c)},t.spliceItemsIntoValues_=function(r,i,a){if(a.length<ya){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 f=0;f<a.length;f++)this.values_[r+f]=a[f];for(var c=0;c<u.length;c++)this.values_[r+a.length+c]=u[c];return s}},t.notifyArrayChildUpdate_=function(r,i,a){var o=!this.owned_&&Pe(),s=L(this),u=s||o?{observableKind:"array",object:this.proxy_,type:G,debugObjectName:this.atom_.name_,index:r,newValue:i,oldValue:a}:null;this.atom_.reportChanged(),s&&V(this,u)},t.notifyArraySplice_=function(r,i,a){var o=!this.owned_&&Pe(),s=L(this),u=s||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Zt,index:r,removed:a,added:i,removedCount:a.length,addedCount:i.length}:null;this.atom_.reportChanged(),s&&V(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(C(this)){var s=B(this,{type:G,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 f=new Array(r+1-a.length),c=0;c<f.length-1;c++)f[c]=void 0;f[f.length-1]=i,this.spliceWithArray_(a.length,0,f)}},e})();function Aa(e,t,n,r){return n===void 0&&(n="ObservableArray"),r===void 0&&(r=!1),cr(),te(function(){var i=new It(n,t,r,!1);_r(i.values_,v,i);var a=new Proxy(i.values_,Oa);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[v];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[v];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[v].spliceWithArray_(t,n,r)},push:function(){for(var t=this[v],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[v].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[v],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 l.trackingDerivation&&d(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){l.trackingDerivation&&d(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var n=this[v],r=n.dehanceValues_(n.values_).indexOf(t);return r>-1?(this.splice(r,1),!0):!1}};m("at",D);m("concat",D);m("flat",D);m("includes",D);m("indexOf",D);m("join",D);m("lastIndexOf",D);m("slice",D);m("toString",D);m("toLocaleString",D);m("toSorted",D);m("toSpliced",D);m("with",D);m("every",$);m("filter",$);m("find",$);m("findIndex",$);m("findLast",$);m("findLastIndex",$);m("flatMap",$);m("forEach",$);m("map",$);m("some",$);m("toReversed",$);m("reduce",on);m("reduceRight",on);function m(e,t){typeof Array.prototype[e]=="function"&&(Je[e]=t(e))}function D(e){return function(){var t=this[v];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function $(e){return function(t,n){var r=this,i=this[v];i.atom_.reportObserved();var a=i.dehanceValues_(i.values_);return a[e](function(o,s){return t.call(n,o,s,r)})}}function on(e){return function(){var t=this,n=this[v];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 Sa=ee("ObservableArrayAdministration",It);function R(e){return Qe(e)&&Sa(e[v])}var sn,un,wa={},J="add",ke="delete";sn=Symbol.iterator;un=Symbol.toStringTag;var Ut=(function(){function e(n,r,i){var a=this;r===void 0&&(r=se),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[v]=wa,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),te(function(){a.keysAtom_=Nt("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(!l.trackingDerivation)return this.has_(r);var a=this.hasMap_.get(r);if(!a){var o=a=new k(this.has_(r),et,"ObservableMap.key?",!1);this.hasMap_.set(r,o),$t(o,function(){return i.hasMap_.delete(r)})}return a.get()},t.set=function(r,i){var a=this.has_(r);if(C(this)){var o=B(this,{type:a?G:J,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_,C(this)){var a=B(this,{type:ke,object:this,name:r});if(!a)return!1}if(this.has_(r)){var o=Pe(),s=L(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:ke,object:this,oldValue:this.data_.get(r).value_,name:r}:null;return M(function(){var f;i.keysAtom_.reportChanged(),(f=i.hasMap_.get(r))==null||f.setNewValue_(!1);var c=i.data_.get(r);c.setNewValue_(void 0),i.data_.delete(r)}),s&&V(this,u),!0}return!1},t.updateValue_=function(r,i){var a=this.data_.get(r);if(i=a.prepareNewValue_(i),i!==l.UNCHANGED){var o=Pe(),s=L(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:G,object:this,oldValue:a.value_,name:r,newValue:i}:null;a.setNewValue_(i),s&&V(this,u)}},t.addValue_=function(r,i){var a=this;this.keysAtom_,M(function(){var f,c=new k(i,a.enhancer_,"ObservableMap.key",!1);a.data_.set(r,c),i=c.value_,(f=a.hasMap_.get(r))==null||f.setNewValue_(!0),a.keysAtom_.reportChanged()});var o=Pe(),s=L(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:J,object:this,name:r,newValue:i}:null;s&&V(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 xe({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 xe({next:function(){var o=i.next(),s=o.done,u=o.value;return{done:s,value:s?void 0:[u,r.get(u)]}}})},t[sn]=function(){return this.entries()},t.forEach=function(r,i){for(var a=pe(this),o;!(o=a()).done;){var s=o.value,u=s[0],f=s[1];r.call(i,f,u,this)}},t.merge=function(r){var i=this;return S(r)&&(r=new Map(r)),M(function(){q(r)?On(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)}):Se(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;M(function(){Lt(function(){for(var i=pe(r.keys()),a;!(a=i()).done;){var o=a.value;r.delete(o)}})})},t.replace=function(r){var i=this;return M(function(){for(var a=Ea(r),o=new Map,s=!1,u=pe(i.data_.keys()),f;!(f=u()).done;){var c=f.value;if(!a.has(c)){var h=i.delete(c);if(h)s=!0;else{var _=i.data_.get(c);o.set(c,_)}}}for(var g=pe(a.entries()),N;!(N=g()).done;){var b=N.value,O=b[0],re=b[1],ve=i.data_.has(O);if(i.set(O,re),i.data_.has(O)){var H=i.data_.get(O);o.set(O,H),ve||(s=!0)}}if(!s)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var x=i.data_.keys(),Y=o.keys(),ne=x.next(),qt=Y.next();!ne.done;){if(ne.value!==qt.value){i.keysAtom_.reportChanged();break}ne=x.next(),qt=Y.next()}i.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(r,i){return Me(this,r)},t.intercept_=function(r){return $e(this,r)},Tt(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:un,get:function(){return"Map"}}]),e})(),S=ee("ObservableMap",Ut);function Ea(e){if(Se(e)||S(e))return e;if(Array.isArray(e))return new Map(e);if(q(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}else return d(21,e)}var fn,ln,Pa={};fn=Symbol.iterator;ln=Symbol.toStringTag;var Gt=(function(){function e(n,r,i){var a=this;r===void 0&&(r=se),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[v]=Pa,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)},te(function(){a.atom_=Nt(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;M(function(){Lt(function(){for(var i=pe(r.data_.values()),a;!(a=i()).done;){var o=a.value;r.delete(o)}})})},t.forEach=function(r,i){for(var a=pe(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_,C(this)){var a=B(this,{type:J,object:this,newValue:r});if(!a)return this}if(!this.has(r)){M(function(){i.data_.add(i.enhancer_(r,void 0)),i.atom_.reportChanged()});var o=!1,s=L(this),u=s||o?{observableKind:"set",debugObjectName:this.name_,type:J,object:this,newValue:r}:null;s&&V(this,u)}return this},t.delete=function(r){var i=this;if(C(this)){var a=B(this,{type:ke,object:this,oldValue:r});if(!a)return!1}if(this.has(r)){var o=!1,s=L(this),u=s||o?{observableKind:"set",debugObjectName:this.name_,type:ke,object:this,oldValue:r}:null;return M(function(){i.atom_.reportChanged(),i.data_.delete(r)}),s&&V(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 xe({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 xe({next:function(){return i<a.length?{value:r.dehanceValue_(a[i++]),done:!1}:{done:!0}}})},t.replace=function(r){var i=this;return w(r)&&(r=new Set(r)),M(function(){Array.isArray(r)?(i.clear(),r.forEach(function(a){return i.add(a)})):Ne(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 Me(this,r)},t.intercept_=function(r){return $e(this,r)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[fn]=function(){return this.values()},Tt(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:ln,get:function(){return"Set"}}]),e})(),w=ee("ObservableSet",Gt),Qt=Object.create(null),er="remove",cn=(function(){function e(n,r,i,a){r===void 0&&(r=new Map),a===void 0&&(a=ri),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 Be("ObservableObject.keys"),this.isPlainObject_=q(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 me)return a.set(i),!0;if(C(this)){var o=B(this,{type:G,object:this.proxy_||this.target_,name:r,newValue:i});if(!o)return null;i=o.newValue}if(i=a.prepareNewValue_(i),i!==l.UNCHANGED){var s=L(this),u=!1,f=s||u?{type:G,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:r,newValue:i}:null;a.setNewValue_(i),s&&V(this,f)}return!0},t.get_=function(r){return l.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(!l.trackingDerivation)return r in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(r);return i||(i=new k(r in this.target_,et,"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!==Te;){var s=ze(o,r);if(s){var u=i.make_(this,r,s,o);if(u===0)return;if(u===1)break}o=Object.getPrototypeOf(o)}rr(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&&rr(this,a,r),s},t.defineProperty_=function(r,i,a){a===void 0&&(a=!1),this.keysAtom_;try{E();var o=this.delete_(r);if(!o)return o;if(C(this)){var s=B(this,{object:this.proxy_||this.target_,name:r,type:J,newValue:i.value});if(!s)return null;var u=s.newValue;i.value!==u&&(i=Z({},i,{value:u}))}if(a){if(!Reflect.defineProperty(this.target_,r,i))return!1}else U(this.target_,r,i);this.notifyPropertyAddition_(r,i.value)}finally{P()}return!0},t.defineObservableProperty_=function(r,i,a,o){o===void 0&&(o=!1),this.keysAtom_;try{E();var s=this.delete_(r);if(!s)return s;if(C(this)){var u=B(this,{object:this.proxy_||this.target_,name:r,type:J,newValue:i});if(!u)return null;i=u.newValue}var f=tr(r),c={configurable:l.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:f.get,set:f.set};if(o){if(!Reflect.defineProperty(this.target_,r,c))return!1}else U(this.target_,r,c);var h=new k(i,a,"ObservableObject.key",!1);this.values_.set(r,h),this.notifyPropertyAddition_(r,h.value_)}finally{P()}return!0},t.defineComputedProperty_=function(r,i,a){a===void 0&&(a=!1),this.keysAtom_;try{E();var o=this.delete_(r);if(!o)return o;if(C(this)){var s=B(this,{object:this.proxy_||this.target_,name:r,type:J,newValue:void 0});if(!s)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var u=tr(r),f={configurable:l.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:u.get,set:u.set};if(a){if(!Reflect.defineProperty(this.target_,r,f))return!1}else U(this.target_,r,f);this.values_.set(r,new me(i)),this.notifyPropertyAddition_(r,void 0)}finally{P()}return!0},t.delete_=function(r,i){if(i===void 0&&(i=!1),this.keysAtom_,!K(this.target_,r))return!0;if(C(this)){var a=B(this,{object:this.proxy_||this.target_,name:r,type:er});if(!a)return null}try{var o,s;E();var u=L(this),f=!1,c=this.values_.get(r),h=void 0;if(!c&&(u||f)){var _;h=(_=ze(this.target_,r))==null?void 0:_.value}if(i){if(!Reflect.deleteProperty(this.target_,r))return!1}else delete this.target_[r];if(c&&(this.values_.delete(r),c instanceof k&&(h=c.value_),Mr(c)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(s=o.get(r))==null||s.set(r in this.target_),u||f){var g={type:er,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:h,name:r};u&&V(this,g)}}finally{P()}return!0},t.observe_=function(r,i){return Me(this,r)},t.intercept_=function(r){return $e(this,r)},t.notifyPropertyAddition_=function(r,i){var a,o,s=L(this),u=!1;if(s||u){var f=s||u?{type:J,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:r,newValue:i}:null;s&&V(this,f)}(a=this.pendingKeys_)==null||(o=a.get(r))==null||o.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),ge(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e})();function ce(e,t){var n;if(K(e,v))return e;var r=(n=t?.name)!=null?n:"ObservableObject",i=new cn(e,new Map,String(r),hi(t));return De(e,v,i),e}var Ra=ee("ObservableObjectAdministration",cn);function tr(e){return Qt[e]||(Qt[e]={get:function(){return this[v].getObservablePropValue_(e)},set:function(n){return this[v].setObservablePropValue_(e,n)}})}function A(e){return Qe(e)?Ra(e[v]):!1}function rr(e,t,n){var r;(r=e.target_[I])==null||delete r[n]}var xa=hn(0),Ta=(function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1})(),lt=0,vn=function(){};function Da(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}Da(vn,Array.prototype);var Kt=(function(e,t,n){br(r,e);function r(a,o,s,u){var f;return s===void 0&&(s="ObservableArray"),u===void 0&&(u=!1),f=e.call(this)||this,te(function(){var c=new It(s,o,u,!0);c.proxy_=st(f),_r(st(f),v,c),a&&a.length&&f.spliceWithArray(0,0,a),Ta&&Object.defineProperty(st(f),"0",xa)}),f}var i=r.prototype;return i.concat=function(){this[v].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(f){return R(f)?f.slice():f}))},i[n]=function(){var a=this,o=0;return xe({next:function(){return o<a.length?{value:a[o++],done:!1}:{done:!0,value:void 0}}})},Tt(r,[{key:"length",get:function(){return this[v].getArrayLength_()},set:function(o){this[v].setArrayLength_(o)}},{key:t,get:function(){return"Array"}}]),r})(vn,Symbol.toStringTag,Symbol.iterator);Object.entries(Je).forEach(function(e){var t=e[0],n=e[1];t!=="concat"&&De(Kt.prototype,t,n)});function hn(e){return{enumerable:!1,configurable:!0,get:function(){return this[v].get_(e)},set:function(n){this[v].set_(e,n)}}}function Na(e){U(Kt.prototype,""+e,hn(e))}function _n(e){if(e>lt){for(var t=lt;t<e+100;t++)Na(t);lt=e}}_n(1e3);function Ca(e,t,n){return new Kt(e,t,n)}function z(e,t){if(typeof e=="object"&&e!==null){if(R(e))return t!==void 0&&d(23),e[v].atom_;if(w(e))return e.atom_;if(S(e)){if(t===void 0)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||d(25,t,Ze(e)),n}if(A(e)){if(!t)return d(26);var r=e[v].values_.get(t);return r||d(27,t,Ze(e)),r}if(Dt(e)||ue(e)||Xe(e))return e}else if(T(e)&&Xe(e[v]))return e[v];d(28)}function W(e,t){if(e||d(29),t!==void 0)return W(z(e,t));if(Dt(e)||ue(e)||Xe(e)||S(e)||w(e))return e;if(e[v])return e[v];d(24,e)}function Ze(e,t){var n;if(t!==void 0)n=z(e,t);else{if(Ve(e))return e.name;A(e)||S(e)||w(e)?n=W(e):n=z(e)}return n.name_}function te(e){var t=le(),n=rt(!0);E();try{return e()}finally{P(),nt(n),F(t)}}var nr=Te.toString;function Ft(e,t,n){return n===void 0&&(n=-1),Et(e,t,n)}function Et(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=nr.call(e);if(o!==nr.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=ir(e),t=ir(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var u=e.constructor,f=t.constructor;if(u!==f&&!(T(u)&&u instanceof u&&T(f)&&f instanceof f)&&"constructor"in e&&"constructor"in t)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===e)return i[c]===t;if(r.push(e),i.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!Et(e[c],t[c],n-1,r,i))return!1}else{var h=Object.keys(e),_;if(c=h.length,Object.keys(t).length!==c)return!1;for(;c--;)if(_=h[c],!(K(t,_)&&Et(e[_],t[_],n-1,r,i)))return!1}return r.pop(),i.pop(),!0}function ir(e){return R(e)?e.slice():Se(e)||S(e)||Ne(e)||w(e)?Array.from(e.entries()):e}function xe(e){return e[Symbol.iterator]=Ba,e}function Ba(){return this}["Symbol","Map","Set"].forEach(function(e){var t=Rt();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:Ur,extras:{getDebugName:Ze},$mobx:v});const Xa=Object.freeze(Object.defineProperty({__proto__:null,$mobx:v,FlowCancellationError:at,ObservableMap:Ut,ObservableSet:Gt,Reaction:ye,_allowStateChanges:Bt,_allowStateChangesInsideComputed:Jt,_allowStateReadsEnd:be,_allowStateReadsStart:it,_autoAction:Oe,_endAction:Tr,_getAdministration:W,_getGlobalState:wi,_interceptReads:Zi,_isComputingDerivation:yi,_resetGlobalState:Ei,_startAction:xr,action:X,autorun:Vt,comparer:oe,computed:Le,configure:Yr,createAtom:Nt,defineProperty:fa,entries:oa,extendObservable:Mt,flow:fe,flowResult:ki,get:ua,getAtom:z,getDebugName:Ze,getDependencyTree:Xr,getObserverTree:Wi,has:tn,intercept:Qi,isAction:Ve,isBoxedObservable:jt,isComputed:ra,isComputedProp:na,isFlow:Ae,isFlowCancellationError:Xi,isObservable:ot,isObservableArray:R,isObservableMap:S,isObservableObject:A,isObservableProp:ia,isObservableSet:w,keys:Re,makeAutoObservable:ma,makeObservable:an,observable:y,observe:la,onBecomeObserved:Wr,onBecomeUnobserved:$t,onReactionError:Ni,override:jn,ownKeys:rn,reaction:Ui,remove:sa,runInAction:Jt,set:en,spy:Ur,toJS:ha,trace:_a,transaction:M,untracked:Lt,values:aa,when:da},Symbol.toStringTag,{value:"Module"}));if(!ie.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!an)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function ja(e){e()}function La(e){e||(e=ja),Yr({reactionScheduler:e})}function Va(e){return Xr(e)}var $a=1e4,Ma=1e4,Ia=(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=$a),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,Ma))}}),e})(),Ua=typeof FinalizationRegistry<"u"?FinalizationRegistry:Ia,Pt=new Ua(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),ct={exports:{}},vt={};var ar;function Ga(){if(ar)return vt;ar=1;var e=pn();function t(h,_){return h===_&&(h!==0||1/h===1/_)||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(h,_){var g=_(),N=r({inst:{value:g,getSnapshot:_}}),b=N[0].inst,O=N[1];return a(function(){b.value=g,b.getSnapshot=_,u(b)&&O({inst:b})},[h,g,_]),i(function(){return u(b)&&O({inst:b}),h(function(){u(b)&&O({inst:b})})},[h]),o(g),g}function u(h){var _=h.getSnapshot;h=h.value;try{var g=_();return!n(h,g)}catch{return!0}}function f(h,_){return _()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:s;return vt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,vt}var or;function Ka(){return or||(or=1,ct.exports=Ga()),ct.exports}var Fa=Ka();function sr(e){e.reaction=new ye("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function qa(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 Pt.unregister(r),r.onStoreChange=s,r.reaction||(sr(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||(sr(i),Pt.register(n,i,i)),zt.useDebugValue(i.reaction,Va),Fa.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 ht,_t,dn=typeof Symbol=="function"&&Symbol.for,za=(_t=(ht=Object.getOwnPropertyDescriptor(function(){},"name"))===null||ht===void 0?void 0:ht.configurable)!==null&&_t!==void 0?_t:!1,ur=dn?Symbol.for("react.forward_ref"):typeof ie.forwardRef=="function"&&ie.forwardRef(function(e){return null}).$$typeof,fr=dn?Symbol.for("react.memo"):typeof ie.memo=="function"&&ie.memo(function(e){return null}).$$typeof;function Ja(e,t){var n;if(fr&&e.$$typeof===fr)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(ur&&e.$$typeof===ur&&(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 qa(function(){return i(s,u)},a)};return o.displayName=e.displayName,za&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),r&&(o=ie.forwardRef(o)),o=ie.memo(o),Ha(e,o),o}var Wa={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function Ha(e,t){Object.keys(e).forEach(function(n){Wa[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}var dt;La(bn.unstable_batchedUpdates);dt=Pt.finalizeAllImmediately;export{y as a,Ui as b,Xa as c,an as d,X as e,Le as f,jn as g,Ka as h,ma as m,Ja as o,Jt as r,ha as t};
@@ -0,0 +1,2 @@
1
+ import{r as g,c as Xr,d as Qr}from"./vendor-chakra-81WUgB9u.js";function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}var X;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(X||(X={}));const Kt="popstate";function Zr(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:o,hash:c}=n.location;return Ge("",{pathname:l,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Me(a)}return en(t,r,null,e)}function _(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ye(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qr(){return Math.random().toString(36).substr(2,8)}function Jt(e,t){return{usr:e.state,key:e.key,idx:t}}function Ge(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?we(t):t,{state:r,key:t&&t.key||n||qr()})}function Me(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function we(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function en(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,o=a.history,c=X.Pop,u=null,h=p();h==null&&(h=0,o.replaceState(H({},o.state,{idx:h}),""));function p(){return(o.state||{idx:null}).idx}function f(){c=X.Pop;let C=p(),A=C==null?null:C-h;h=C,u&&u({action:c,location:E.location,delta:A})}function y(C,A){c=X.Push;let M=Ge(E.location,C,A);h=p()+1;let z=Jt(M,h),K=E.createHref(M);try{o.pushState(z,"",K)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;a.location.assign(K)}l&&u&&u({action:c,location:E.location,delta:1})}function w(C,A){c=X.Replace;let M=Ge(E.location,C,A);h=p();let z=Jt(M,h),K=E.createHref(M);o.replaceState(z,"",K),l&&u&&u({action:c,location:E.location,delta:0})}function L(C){let A=a.location.origin!=="null"?a.location.origin:a.location.href,M=typeof C=="string"?C:Me(C);return M=M.replace(/ $/,"%20"),_(A,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,A)}let E={get action(){return c},get location(){return e(a,o)},listen(C){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(Kt,f),u=C,()=>{a.removeEventListener(Kt,f),u=null}},createHref(C){return t(a,C)},createURL:L,encodeLocation(C){let A=L(C);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:y,replace:w,go(C){return o.go(C)}};return E}var B;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(B||(B={}));const tn=new Set(["lazy","caseSensitive","path","id","index","children"]);function rn(e){return e.index===!0}function ft(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,l)=>{let o=[...r,String(l)],c=typeof a.id=="string"?a.id:o.join("-");if(_(a.index!==!0||!a.children,"Cannot specify children on an index route"),_(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),rn(a)){let u=H({},a,t(a),{id:c});return n[c]=u,u}else{let u=H({},a,t(a),{id:c,children:void 0});return n[c]=u,a.children&&(u.children=ft(a.children,t,o,n)),u}})}function Le(e,t,r){return r===void 0&&(r="/"),dt(e,t,r,!1)}function dt(e,t,r,n){let a=typeof t=="string"?we(t):t,l=Ae(a.pathname||"/",r);if(l==null)return null;let o=vr(e);nn(o);let c=null;for(let u=0;c==null&&u<o.length;++u){let h=pn(l);c=hn(o[u],h,n)}return c}function pr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function vr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,o,c)=>{let u={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};u.relativePath.startsWith("/")&&(_(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let h=fe([n,u.relativePath]),p=r.concat(u);l.children&&l.children.length>0&&(_(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),vr(l.children,t,p,h)),!(l.path==null&&!l.index)&&t.push({path:h,score:dn(h,l.index),routesMeta:p})};return e.forEach((l,o)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))a(l,o);else for(let u of gr(l.path))a(l,o,u)}),t}function gr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let o=gr(n.join("/")),c=[];return c.push(...o.map(u=>u===""?l:[l,u].join("/"))),a&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function nn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:fn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const an=/^:[\w-]+$/,on=3,ln=2,sn=1,un=10,cn=-2,Yt=e=>e==="*";function dn(e,t){let r=e.split("/"),n=r.length;return r.some(Yt)&&(n+=cn),t&&(n+=ln),r.filter(a=>!Yt(a)).reduce((a,l)=>a+(an.test(l)?on:l===""?sn:un),n)}function fn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function hn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},l="/",o=[];for(let c=0;c<n.length;++c){let u=n[c],h=c===n.length-1,p=l==="/"?t:t.slice(l.length)||"/",f=Gt({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},p),y=u.route;if(!f&&h&&r&&!n[n.length-1].route.index&&(f=Gt({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},p)),!f)return null;Object.assign(a,f.params),o.push({params:a,pathname:fe([l,f.pathname]),pathnameBase:wn(fe([l,f.pathnameBase])),route:y}),f.pathnameBase!=="/"&&(l=fe([l,f.pathnameBase]))}return o}function _a(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(ye(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=o=>o==null?"":typeof o=="string"?o:String(o),l=r.split(/\/+/).map((o,c,u)=>{if(c===u.length-1&&o==="*")return a(t["*"]);const p=o.match(/^:([\w-]+)(\??)$/);if(p){const[,f,y]=p;let w=t[f];return _(y==="?"||w!=null,'Missing ":'+f+'" param'),a(w)}return o.replace(/\?$/g,"")}).filter(o=>!!o);return n+l.join("/")}function Gt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=mn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],o=l.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((h,p,f)=>{let{paramName:y,isOptional:w}=p;if(y==="*"){let E=c[f]||"";o=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const L=c[f];return w&&!L?h[y]=void 0:h[y]=(L||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:o,pattern:e}}function mn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ye(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u)=>(n.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function pn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ye(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ae(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=e=>vn.test(e);function yn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?we(e):e,l;if(r)if(gn(r))l=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),ye(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?l=Xt(r.substring(1),"/"):l=Xt(r,t)}else l=t;return{pathname:l,search:bn(n),hash:Rn(a)}}function Xt(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function bt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function yr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Dt(e,t){let r=yr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ct(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=we(e):(a=H({},e),_(!a.pathname||!a.pathname.includes("?"),bt("?","pathname","search",a)),_(!a.pathname||!a.pathname.includes("#"),bt("#","pathname","hash",a)),_(!a.search||!a.search.includes("#"),bt("#","search","hash",a)));let l=e===""||a.pathname==="",o=l?"/":a.pathname,c;if(o==null)c=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let y=o.split("/");for(;y[0]==="..";)y.shift(),f-=1;a.pathname=y.join("/")}c=f>=0?t[f]:"/"}let u=yn(a,c),h=o&&o!=="/"&&o.endsWith("/"),p=(l||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||p)&&(u.pathname+="/"),u}const fe=e=>e.join("/").replace(/\/\/+/g,"/"),wn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Rn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Oa=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,H({},n,{headers:a}))};class ht{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Xe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wr=["post","put","patch","delete"],En=new Set(wr),Sn=["get",...wr],xn=new Set(Sn),Pn=new Set([301,302,303,307,308]),Ln=new Set([307,308]),Rt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Dn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$e={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Mt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),br="remix-router-transitions";function Mn(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;_(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=s=>({hasErrorBoundary:i(s)})}else a=Cn;let l={},o=ft(e.routes,a,void 0,l),c,u=e.basename||"/",h=e.dataStrategy||_n,p=e.patchRoutesOnNavigation,f=H({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),y=null,w=new Set,L=null,E=null,C=null,A=e.hydrationData!=null,M=Le(o,e.history.location,u),z=!1,K=null;if(M==null&&!p){let i=re(404,{pathname:e.history.location.pathname}),{matches:s,route:d}=lr(o);M=s,K={[d.id]:i}}M&&!e.hydrationData&&ot(M,o,e.history.location.pathname).active&&(M=null);let J;if(M)if(M.some(i=>i.route.lazy))J=!1;else if(!M.some(i=>i.route.loader))J=!0;else if(f.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null;if(s){let d=M.findIndex(v=>s[v.route.id]!==void 0);J=M.slice(0,d+1).every(v=>!xt(v.route,i,s))}else J=M.every(d=>!xt(d.route,i,s))}else J=e.hydrationData!=null;else if(J=!1,M=[],f.v7_partialHydration){let i=ot(null,o,e.history.location.pathname);i.active&&i.matches&&(z=!0,M=i.matches)}let be,m={historyAction:e.history.action,location:e.history.location,matches:M,initialized:J,navigation:Rt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||K,fetchers:new Map,blockers:new Map},U=X.Pop,W=!1,O,q=!1,Y=new Map,ne=null,te=!1,se=!1,et=[],tt=new Set,Q=new Map,rt=0,Be=-1,Ue=new Map,ue=new Set,Fe=new Map,ze=new Map,ie=new Set,Re=new Map,Ee=new Map,nt;function _r(){if(y=e.history.listen(i=>{let{action:s,location:d,delta:v}=i;if(nt){nt(),nt=void 0;return}ye(Ee.size===0||v!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let b=Ht({currentLocation:m.location,nextLocation:d,historyAction:s});if(b&&v!=null){let D=new Promise(T=>{nt=T});e.history.go(v*-1),it(b,{state:"blocked",location:d,proceed(){it(b,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),D.then(()=>e.history.go(v))},reset(){let T=new Map(m.blockers);T.set(b,$e),ee({blockers:T})}});return}return Se(s,d)}),r){Jn(t,Y);let i=()=>Yn(t,Y);t.addEventListener("pagehide",i),ne=()=>t.removeEventListener("pagehide",i)}return m.initialized||Se(X.Pop,m.location,{initialHydration:!0}),be}function Or(){y&&y(),ne&&ne(),w.clear(),O&&O.abort(),m.fetchers.forEach((i,s)=>at(s)),m.blockers.forEach((i,s)=>kt(s))}function jr(i){return w.add(i),()=>w.delete(i)}function ee(i,s){s===void 0&&(s={}),m=H({},m,i);let d=[],v=[];f.v7_fetcherPersist&&m.fetchers.forEach((b,D)=>{b.state==="idle"&&(ie.has(D)?v.push(D):d.push(D))}),ie.forEach(b=>{!m.fetchers.has(b)&&!Q.has(b)&&v.push(b)}),[...w].forEach(b=>b(m,{deletedFetchers:v,viewTransitionOpts:s.viewTransitionOpts,flushSync:s.flushSync===!0})),f.v7_fetcherPersist?(d.forEach(b=>m.fetchers.delete(b)),v.forEach(b=>at(b))):v.forEach(b=>ie.delete(b))}function _e(i,s,d){var v,b;let{flushSync:D}=d===void 0?{}:d,T=m.actionData!=null&&m.navigation.formMethod!=null&&oe(m.navigation.formMethod)&&m.navigation.state==="loading"&&((v=i.state)==null?void 0:v._isRedirect)!==!0,S;s.actionData?Object.keys(s.actionData).length>0?S=s.actionData:S=null:T?S=m.actionData:S=null;let x=s.loaderData?ir(m.loaderData,s.loaderData,s.matches||[],s.errors):m.loaderData,R=m.blockers;R.size>0&&(R=new Map(R),R.forEach((j,Z)=>R.set(Z,$e)));let P=W===!0||m.navigation.formMethod!=null&&oe(m.navigation.formMethod)&&((b=i.state)==null?void 0:b._isRedirect)!==!0;c&&(o=c,c=void 0),te||U===X.Pop||(U===X.Push?e.history.push(i,i.state):U===X.Replace&&e.history.replace(i,i.state));let F;if(U===X.Pop){let j=Y.get(m.location.pathname);j&&j.has(i.pathname)?F={currentLocation:m.location,nextLocation:i}:Y.has(i.pathname)&&(F={currentLocation:i,nextLocation:m.location})}else if(q){let j=Y.get(m.location.pathname);j?j.add(i.pathname):(j=new Set([i.pathname]),Y.set(m.location.pathname,j)),F={currentLocation:m.location,nextLocation:i}}ee(H({},s,{actionData:S,loaderData:x,historyAction:U,location:i,initialized:!0,navigation:Rt,revalidation:"idle",restoreScrollPosition:Vt(i,s.matches||m.matches),preventScrollReset:P,blockers:R}),{viewTransitionOpts:F,flushSync:D===!0}),U=X.Pop,W=!1,q=!1,te=!1,se=!1,et=[]}async function Ot(i,s){if(typeof i=="number"){e.history.go(i);return}let d=St(m.location,m.matches,u,f.v7_prependBasename,i,f.v7_relativeSplatPath,s?.fromRouteId,s?.relative),{path:v,submission:b,error:D}=Qt(f.v7_normalizeFormMethod,!1,d,s),T=m.location,S=Ge(m.location,v,s&&s.state);S=H({},S,e.history.encodeLocation(S));let x=s&&s.replace!=null?s.replace:void 0,R=X.Push;x===!0?R=X.Replace:x===!1||b!=null&&oe(b.formMethod)&&b.formAction===m.location.pathname+m.location.search&&(R=X.Replace);let P=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,F=(s&&s.flushSync)===!0,j=Ht({currentLocation:T,nextLocation:S,historyAction:R});if(j){it(j,{state:"blocked",location:S,proceed(){it(j,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),Ot(i,s)},reset(){let Z=new Map(m.blockers);Z.set(j,$e),ee({blockers:Z})}});return}return await Se(R,S,{submission:b,pendingError:D,preventScrollReset:P,replace:s&&s.replace,enableViewTransition:s&&s.viewTransition,flushSync:F})}function Ir(){if(vt(),ee({revalidation:"loading"}),m.navigation.state!=="submitting"){if(m.navigation.state==="idle"){Se(m.historyAction,m.location,{startUninterruptedRevalidation:!0});return}Se(U||m.historyAction,m.navigation.location,{overrideNavigation:m.navigation,enableViewTransition:q===!0})}}async function Se(i,s,d){O&&O.abort(),O=null,U=i,te=(d&&d.startUninterruptedRevalidation)===!0,Kr(m.location,m.matches),W=(d&&d.preventScrollReset)===!0,q=(d&&d.enableViewTransition)===!0;let v=c||o,b=d&&d.overrideNavigation,D=d!=null&&d.initialHydration&&m.matches&&m.matches.length>0&&!z?m.matches:Le(v,s,u),T=(d&&d.flushSync)===!0;if(D&&m.initialized&&!se&&Bn(m.location,s)&&!(d&&d.submission&&oe(d.submission.formMethod))){_e(s,{matches:D},{flushSync:T});return}let S=ot(D,v,s.pathname);if(S.active&&S.matches&&(D=S.matches),!D){let{error:k,notFoundMatches:N,route:V}=gt(s.pathname);_e(s,{matches:N,loaderData:{},errors:{[V.id]:k}},{flushSync:T});return}O=new AbortController;let x=Ne(e.history,s,O.signal,d&&d.submission),R;if(d&&d.pendingError)R=[De(D).route.id,{type:B.error,error:d.pendingError}];else if(d&&d.submission&&oe(d.submission.formMethod)){let k=await Nr(x,s,d.submission,D,S.active,{replace:d.replace,flushSync:T});if(k.shortCircuited)return;if(k.pendingActionResult){let[N,V]=k.pendingActionResult;if(ae(V)&&Xe(V.error)&&V.error.status===404){O=null,_e(s,{matches:k.matches,loaderData:{},errors:{[N]:V.error}});return}}D=k.matches||D,R=k.pendingActionResult,b=Et(s,d.submission),T=!1,S.active=!1,x=Ne(e.history,x.url,x.signal)}let{shortCircuited:P,matches:F,loaderData:j,errors:Z}=await Ar(x,s,D,S.active,b,d&&d.submission,d&&d.fetcherSubmission,d&&d.replace,d&&d.initialHydration===!0,T,R);P||(O=null,_e(s,H({matches:F||D},or(R),{loaderData:j,errors:Z})))}async function Nr(i,s,d,v,b,D){D===void 0&&(D={}),vt();let T=$n(s,d);if(ee({navigation:T},{flushSync:D.flushSync===!0}),b){let R=await lt(v,s.pathname,i.signal);if(R.type==="aborted")return{shortCircuited:!0};if(R.type==="error"){let P=De(R.partialMatches).route.id;return{matches:R.partialMatches,pendingActionResult:[P,{type:B.error,error:R.error}]}}else if(R.matches)v=R.matches;else{let{notFoundMatches:P,error:F,route:j}=gt(s.pathname);return{matches:P,pendingActionResult:[j.id,{type:B.error,error:F}]}}}let S,x=Ye(v,s);if(!x.route.action&&!x.route.lazy)S={type:B.error,error:re(405,{method:i.method,pathname:s.pathname,routeId:x.route.id})};else if(S=(await ke("action",m,i,[x],v,null))[x.route.id],i.signal.aborted)return{shortCircuited:!0};if(Ce(S)){let R;return D&&D.replace!=null?R=D.replace:R=rr(S.response.headers.get("Location"),new URL(i.url),u,e.history)===m.location.pathname+m.location.search,await xe(i,S,!0,{submission:d,replace:R}),{shortCircuited:!0}}if(ge(S))throw re(400,{type:"defer-action"});if(ae(S)){let R=De(v,x.route.id);return(D&&D.replace)!==!0&&(U=X.Push),{matches:v,pendingActionResult:[R.route.id,S]}}return{matches:v,pendingActionResult:[x.route.id,S]}}async function Ar(i,s,d,v,b,D,T,S,x,R,P){let F=b||Et(s,D),j=D||T||ur(F),Z=!te&&(!f.v7_partialHydration||!x);if(v){if(Z){let $=jt(P);ee(H({navigation:F},$!==void 0?{actionData:$}:{}),{flushSync:R})}let I=await lt(d,s.pathname,i.signal);if(I.type==="aborted")return{shortCircuited:!0};if(I.type==="error"){let $=De(I.partialMatches).route.id;return{matches:I.partialMatches,loaderData:{},errors:{[$]:I.error}}}else if(I.matches)d=I.matches;else{let{error:$,notFoundMatches:je,route:Ve}=gt(s.pathname);return{matches:je,loaderData:{},errors:{[Ve.id]:$}}}}let k=c||o,[N,V]=qt(e.history,m,d,j,s,f.v7_partialHydration&&x===!0,f.v7_skipActionErrorRevalidation,se,et,tt,ie,Fe,ue,k,u,P);if(yt(I=>!(d&&d.some($=>$.route.id===I))||N&&N.some($=>$.route.id===I)),Be=++rt,N.length===0&&V.length===0){let I=Bt();return _e(s,H({matches:d,loaderData:{},errors:P&&ae(P[1])?{[P[0]]:P[1].error}:null},or(P),I?{fetchers:new Map(m.fetchers)}:{}),{flushSync:R}),{shortCircuited:!0}}if(Z){let I={};if(!v){I.navigation=F;let $=jt(P);$!==void 0&&(I.actionData=$)}V.length>0&&(I.fetchers=Br(V)),ee(I,{flushSync:R})}V.forEach(I=>{pe(I.key),I.controller&&Q.set(I.key,I.controller)});let Oe=()=>V.forEach(I=>pe(I.key));O&&O.signal.addEventListener("abort",Oe);let{loaderResults:He,fetcherResults:de}=await It(m,d,N,V,i);if(i.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Oe),V.forEach(I=>Q.delete(I.key));let le=ct(He);if(le)return await xe(i,le.result,!0,{replace:S}),{shortCircuited:!0};if(le=ct(de),le)return ue.add(le.key),await xe(i,le.result,!0,{replace:S}),{shortCircuited:!0};let{loaderData:wt,errors:We}=ar(m,d,He,P,V,de,Re);Re.forEach((I,$)=>{I.subscribe(je=>{(je||I.done)&&Re.delete($)})}),f.v7_partialHydration&&x&&m.errors&&(We=H({},m.errors,We));let Pe=Bt(),st=zt(Be),ut=Pe||st||V.length>0;return H({matches:d,loaderData:wt,errors:We},ut?{fetchers:new Map(m.fetchers)}:{})}function jt(i){if(i&&!ae(i[1]))return{[i[0]]:i[1].data};if(m.actionData)return Object.keys(m.actionData).length===0?null:m.actionData}function Br(i){return i.forEach(s=>{let d=m.fetchers.get(s.key),v=Ke(void 0,d?d.data:void 0);m.fetchers.set(s.key,v)}),new Map(m.fetchers)}function zr(i,s,d,v){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");pe(i);let b=(v&&v.flushSync)===!0,D=c||o,T=St(m.location,m.matches,u,f.v7_prependBasename,d,f.v7_relativeSplatPath,s,v?.relative),S=Le(D,T,u),x=ot(S,D,T);if(x.active&&x.matches&&(S=x.matches),!S){ce(i,s,re(404,{pathname:T}),{flushSync:b});return}let{path:R,submission:P,error:F}=Qt(f.v7_normalizeFormMethod,!0,T,v);if(F){ce(i,s,F,{flushSync:b});return}let j=Ye(S,R),Z=(v&&v.preventScrollReset)===!0;if(P&&oe(P.formMethod)){kr(i,s,R,j,S,x.active,b,Z,P);return}Fe.set(i,{routeId:s,path:R}),Hr(i,s,R,j,S,x.active,b,Z,P)}async function kr(i,s,d,v,b,D,T,S,x){vt(),Fe.delete(i);function R(G){if(!G.route.action&&!G.route.lazy){let Ie=re(405,{method:x.formMethod,pathname:d,routeId:s});return ce(i,s,Ie,{flushSync:T}),!0}return!1}if(!D&&R(v))return;let P=m.fetchers.get(i);me(i,Kn(x,P),{flushSync:T});let F=new AbortController,j=Ne(e.history,d,F.signal,x);if(D){let G=await lt(b,new URL(j.url).pathname,j.signal,i);if(G.type==="aborted")return;if(G.type==="error"){ce(i,s,G.error,{flushSync:T});return}else if(G.matches){if(b=G.matches,v=Ye(b,d),R(v))return}else{ce(i,s,re(404,{pathname:d}),{flushSync:T});return}}Q.set(i,F);let Z=rt,N=(await ke("action",m,j,[v],b,i))[v.route.id];if(j.signal.aborted){Q.get(i)===F&&Q.delete(i);return}if(f.v7_fetcherPersist&&ie.has(i)){if(Ce(N)||ae(N)){me(i,ve(void 0));return}}else{if(Ce(N))if(Q.delete(i),Be>Z){me(i,ve(void 0));return}else return ue.add(i),me(i,Ke(x)),xe(j,N,!1,{fetcherSubmission:x,preventScrollReset:S});if(ae(N)){ce(i,s,N.error);return}}if(ge(N))throw re(400,{type:"defer-action"});let V=m.navigation.location||m.location,Oe=Ne(e.history,V,F.signal),He=c||o,de=m.navigation.state!=="idle"?Le(He,m.navigation.location,u):m.matches;_(de,"Didn't find any matches after fetcher action");let le=++rt;Ue.set(i,le);let wt=Ke(x,N.data);m.fetchers.set(i,wt);let[We,Pe]=qt(e.history,m,de,x,V,!1,f.v7_skipActionErrorRevalidation,se,et,tt,ie,Fe,ue,He,u,[v.route.id,N]);Pe.filter(G=>G.key!==i).forEach(G=>{let Ie=G.key,$t=m.fetchers.get(Ie),Gr=Ke(void 0,$t?$t.data:void 0);m.fetchers.set(Ie,Gr),pe(Ie),G.controller&&Q.set(Ie,G.controller)}),ee({fetchers:new Map(m.fetchers)});let st=()=>Pe.forEach(G=>pe(G.key));F.signal.addEventListener("abort",st);let{loaderResults:ut,fetcherResults:I}=await It(m,de,We,Pe,Oe);if(F.signal.aborted)return;F.signal.removeEventListener("abort",st),Ue.delete(i),Q.delete(i),Pe.forEach(G=>Q.delete(G.key));let $=ct(ut);if($)return xe(Oe,$.result,!1,{preventScrollReset:S});if($=ct(I),$)return ue.add($.key),xe(Oe,$.result,!1,{preventScrollReset:S});let{loaderData:je,errors:Ve}=ar(m,de,ut,void 0,Pe,I,Re);if(m.fetchers.has(i)){let G=ve(N.data);m.fetchers.set(i,G)}zt(le),m.navigation.state==="loading"&&le>Be?(_(U,"Expected pending action"),O&&O.abort(),_e(m.navigation.location,{matches:de,loaderData:je,errors:Ve,fetchers:new Map(m.fetchers)})):(ee({errors:Ve,loaderData:ir(m.loaderData,je,de,Ve),fetchers:new Map(m.fetchers)}),se=!1)}async function Hr(i,s,d,v,b,D,T,S,x){let R=m.fetchers.get(i);me(i,Ke(x,R?R.data:void 0),{flushSync:T});let P=new AbortController,F=Ne(e.history,d,P.signal);if(D){let N=await lt(b,new URL(F.url).pathname,F.signal,i);if(N.type==="aborted")return;if(N.type==="error"){ce(i,s,N.error,{flushSync:T});return}else if(N.matches)b=N.matches,v=Ye(b,d);else{ce(i,s,re(404,{pathname:d}),{flushSync:T});return}}Q.set(i,P);let j=rt,k=(await ke("loader",m,F,[v],b,i))[v.route.id];if(ge(k)&&(k=await Tt(k,F.signal,!0)||k),Q.get(i)===P&&Q.delete(i),!F.signal.aborted){if(ie.has(i)){me(i,ve(void 0));return}if(Ce(k))if(Be>j){me(i,ve(void 0));return}else{ue.add(i),await xe(F,k,!1,{preventScrollReset:S});return}if(ae(k)){ce(i,s,k.error);return}_(!ge(k),"Unhandled fetcher deferred data"),me(i,ve(k.data))}}async function xe(i,s,d,v){let{submission:b,fetcherSubmission:D,preventScrollReset:T,replace:S}=v===void 0?{}:v;s.response.headers.has("X-Remix-Revalidate")&&(se=!0);let x=s.response.headers.get("Location");_(x,"Expected a Location header on the redirect Response"),x=rr(x,new URL(i.url),u,e.history);let R=Ge(m.location,x,{_isRedirect:!0});if(r){let N=!1;if(s.response.headers.has("X-Remix-Reload-Document"))N=!0;else if(Mt.test(x)){const V=e.history.createURL(x);N=V.origin!==t.location.origin||Ae(V.pathname,u)==null}if(N){S?t.location.replace(x):t.location.assign(x);return}}O=null;let P=S===!0||s.response.headers.has("X-Remix-Replace")?X.Replace:X.Push,{formMethod:F,formAction:j,formEncType:Z}=m.navigation;!b&&!D&&F&&j&&Z&&(b=ur(m.navigation));let k=b||D;if(Ln.has(s.response.status)&&k&&oe(k.formMethod))await Se(P,R,{submission:H({},k,{formAction:x}),preventScrollReset:T||W,enableViewTransition:d?q:void 0});else{let N=Et(R,b);await Se(P,R,{overrideNavigation:N,fetcherSubmission:D,preventScrollReset:T||W,enableViewTransition:d?q:void 0})}}async function ke(i,s,d,v,b,D){let T,S={};try{T=await On(h,i,s,d,v,b,D,l,a)}catch(x){return v.forEach(R=>{S[R.route.id]={type:B.error,error:x}}),S}for(let[x,R]of Object.entries(T))if(zn(R)){let P=R.result;S[x]={type:B.redirect,response:Nn(P,d,x,b,u,f.v7_relativeSplatPath)}}else S[x]=await In(R);return S}async function It(i,s,d,v,b){let D=i.matches,T=ke("loader",i,b,d,s,null),S=Promise.all(v.map(async P=>{if(P.matches&&P.match&&P.controller){let j=(await ke("loader",i,Ne(e.history,P.path,P.controller.signal),[P.match],P.matches,P.key))[P.match.route.id];return{[P.key]:j}}else return Promise.resolve({[P.key]:{type:B.error,error:re(404,{pathname:P.path})}})})),x=await T,R=(await S).reduce((P,F)=>Object.assign(P,F),{});return await Promise.all([Wn(s,x,b.signal,D,i.loaderData),Vn(s,R,v)]),{loaderResults:x,fetcherResults:R}}function vt(){se=!0,et.push(...yt()),Fe.forEach((i,s)=>{Q.has(s)&&tt.add(s),pe(s)})}function me(i,s,d){d===void 0&&(d={}),m.fetchers.set(i,s),ee({fetchers:new Map(m.fetchers)},{flushSync:(d&&d.flushSync)===!0})}function ce(i,s,d,v){v===void 0&&(v={});let b=De(m.matches,s);at(i),ee({errors:{[b.route.id]:d},fetchers:new Map(m.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function Nt(i){return ze.set(i,(ze.get(i)||0)+1),ie.has(i)&&ie.delete(i),m.fetchers.get(i)||Dn}function at(i){let s=m.fetchers.get(i);Q.has(i)&&!(s&&s.state==="loading"&&Ue.has(i))&&pe(i),Fe.delete(i),Ue.delete(i),ue.delete(i),f.v7_fetcherPersist&&ie.delete(i),tt.delete(i),m.fetchers.delete(i)}function Wr(i){let s=(ze.get(i)||0)-1;s<=0?(ze.delete(i),ie.add(i),f.v7_fetcherPersist||at(i)):ze.set(i,s),ee({fetchers:new Map(m.fetchers)})}function pe(i){let s=Q.get(i);s&&(s.abort(),Q.delete(i))}function At(i){for(let s of i){let d=Nt(s),v=ve(d.data);m.fetchers.set(s,v)}}function Bt(){let i=[],s=!1;for(let d of ue){let v=m.fetchers.get(d);_(v,"Expected fetcher: "+d),v.state==="loading"&&(ue.delete(d),i.push(d),s=!0)}return At(i),s}function zt(i){let s=[];for(let[d,v]of Ue)if(v<i){let b=m.fetchers.get(d);_(b,"Expected fetcher: "+d),b.state==="loading"&&(pe(d),Ue.delete(d),s.push(d))}return At(s),s.length>0}function Vr(i,s){let d=m.blockers.get(i)||$e;return Ee.get(i)!==s&&Ee.set(i,s),d}function kt(i){m.blockers.delete(i),Ee.delete(i)}function it(i,s){let d=m.blockers.get(i)||$e;_(d.state==="unblocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="proceeding"||d.state==="blocked"&&s.state==="unblocked"||d.state==="proceeding"&&s.state==="unblocked","Invalid blocker state transition: "+d.state+" -> "+s.state);let v=new Map(m.blockers);v.set(i,s),ee({blockers:v})}function Ht(i){let{currentLocation:s,nextLocation:d,historyAction:v}=i;if(Ee.size===0)return;Ee.size>1&&ye(!1,"A router only supports one blocker at a time");let b=Array.from(Ee.entries()),[D,T]=b[b.length-1],S=m.blockers.get(D);if(!(S&&S.state==="proceeding")&&T({currentLocation:s,nextLocation:d,historyAction:v}))return D}function gt(i){let s=re(404,{pathname:i}),d=c||o,{matches:v,route:b}=lr(d);return yt(),{notFoundMatches:v,route:b,error:s}}function yt(i){let s=[];return Re.forEach((d,v)=>{(!i||i(v))&&(d.cancel(),s.push(v),Re.delete(v))}),s}function $r(i,s,d){if(L=i,C=s,E=d||null,!A&&m.navigation===Rt){A=!0;let v=Vt(m.location,m.matches);v!=null&&ee({restoreScrollPosition:v})}return()=>{L=null,C=null,E=null}}function Wt(i,s){return E&&E(i,s.map(v=>pr(v,m.loaderData)))||i.key}function Kr(i,s){if(L&&C){let d=Wt(i,s);L[d]=C()}}function Vt(i,s){if(L){let d=Wt(i,s),v=L[d];if(typeof v=="number")return v}return null}function ot(i,s,d){if(p)if(i){if(Object.keys(i[0].params).length>0)return{active:!0,matches:dt(s,d,u,!0)}}else return{active:!0,matches:dt(s,d,u,!0)||[]};return{active:!1,matches:null}}async function lt(i,s,d,v){if(!p)return{type:"success",matches:i};let b=i;for(;;){let D=c==null,T=c||o,S=l;try{await p({signal:d,path:s,matches:b,fetcherKey:v,patch:(P,F)=>{d.aborted||tr(P,F,T,S,a)}})}catch(P){return{type:"error",error:P,partialMatches:b}}finally{D&&!d.aborted&&(o=[...o])}if(d.aborted)return{type:"aborted"};let x=Le(T,s,u);if(x)return{type:"success",matches:x};let R=dt(T,s,u,!0);if(!R||b.length===R.length&&b.every((P,F)=>P.route.id===R[F].route.id))return{type:"success",matches:null};b=R}}function Jr(i){l={},c=ft(i,a,void 0,l)}function Yr(i,s){let d=c==null;tr(i,s,c||o,l,a),d&&(o=[...o],ee({}))}return be={get basename(){return u},get future(){return f},get state(){return m},get routes(){return o},get window(){return t},initialize:_r,subscribe:jr,enableScrollRestoration:$r,navigate:Ot,fetch:zr,revalidate:Ir,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Nt,deleteFetcher:Wr,dispose:Or,getBlocker:Vr,deleteBlocker:kt,patchRoutes:Yr,_internalFetchControllers:Q,_internalActiveDeferreds:Re,_internalSetRoutes:Jr},be}function Tn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function St(e,t,r,n,a,l,o,c){let u,h;if(o){u=[];for(let f of t)if(u.push(f),f.route.id===o){h=f;break}}else u=t,h=t[t.length-1];let p=Ct(a||".",Dt(u,l),Ae(e.pathname,r)||e.pathname,c==="path");if(a==null&&(p.search=e.search,p.hash=e.hash),(a==null||a===""||a===".")&&h){let f=Ut(p.search);if(h.route.index&&!f)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&f){let y=new URLSearchParams(p.search),w=y.getAll("index");y.delete("index"),w.filter(E=>E).forEach(E=>y.append("index",E));let L=y.toString();p.search=L?"?"+L:""}}return n&&r!=="/"&&(p.pathname=p.pathname==="/"?r:fe([r,p.pathname])),Me(p)}function Qt(e,t,r,n){if(!n||!Tn(n))return{path:r};if(n.formMethod&&!Hn(n.formMethod))return{path:r,error:re(405,{method:n.formMethod})};let a=()=>({path:r,error:re(400,{type:"invalid-body"})}),l=n.formMethod||"get",o=e?l.toUpperCase():l.toLowerCase(),c=Sr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!oe(o))return a();let y=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((w,L)=>{let[E,C]=L;return""+w+E+"="+C+`
2
+ `},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!oe(o))return a();try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}_(typeof FormData=="function","FormData is not available in this environment");let u,h;if(n.formData)u=Pt(n.formData),h=n.formData;else if(n.body instanceof FormData)u=Pt(n.body),h=n.body;else if(n.body instanceof URLSearchParams)u=n.body,h=nr(u);else if(n.body==null)u=new URLSearchParams,h=new FormData;else try{u=new URLSearchParams(n.body),h=nr(u)}catch{return a()}let p={formMethod:o,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(oe(p.formMethod))return{path:r,submission:p};let f=we(r);return t&&f.search&&Ut(f.search)&&u.append("index",""),f.search="?"+u,{path:Me(f),submission:p}}function Zt(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function qt(e,t,r,n,a,l,o,c,u,h,p,f,y,w,L,E){let C=E?ae(E[1])?E[1].error:E[1].data:void 0,A=e.createURL(t.location),M=e.createURL(a),z=r;l&&t.errors?z=Zt(r,Object.keys(t.errors)[0],!0):E&&ae(E[1])&&(z=Zt(r,E[0]));let K=E?E[1].statusCode:void 0,J=o&&K&&K>=400,be=z.filter((U,W)=>{let{route:O}=U;if(O.lazy)return!0;if(O.loader==null)return!1;if(l)return xt(O,t.loaderData,t.errors);if(Un(t.loaderData,t.matches[W],U)||u.some(ne=>ne===U.route.id))return!0;let q=t.matches[W],Y=U;return er(U,H({currentUrl:A,currentParams:q.params,nextUrl:M,nextParams:Y.params},n,{actionResult:C,actionStatus:K,defaultShouldRevalidate:J?!1:c||A.pathname+A.search===M.pathname+M.search||A.search!==M.search||Rr(q,Y)}))}),m=[];return f.forEach((U,W)=>{if(l||!r.some(te=>te.route.id===U.routeId)||p.has(W))return;let O=Le(w,U.path,L);if(!O){m.push({key:W,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let q=t.fetchers.get(W),Y=Ye(O,U.path),ne=!1;y.has(W)?ne=!1:h.has(W)?(h.delete(W),ne=!0):q&&q.state!=="idle"&&q.data===void 0?ne=c:ne=er(Y,H({currentUrl:A,currentParams:t.matches[t.matches.length-1].params,nextUrl:M,nextParams:r[r.length-1].params},n,{actionResult:C,actionStatus:K,defaultShouldRevalidate:J?!1:c})),ne&&m.push({key:W,routeId:U.routeId,path:U.path,matches:O,match:Y,controller:new AbortController})}),[be,m]}function xt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function Un(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function Rr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function er(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function tr(e,t,r,n,a){var l;let o;if(e){let h=n[e];_(h,"No route found to patch children into: routeId = "+e),h.children||(h.children=[]),o=h.children}else o=r;let c=t.filter(h=>!o.some(p=>Er(h,p))),u=ft(c,a,[e||"_","patch",String(((l=o)==null?void 0:l.length)||"0")],n);o.push(...u)}function Er(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(l=>Er(r,l))}):!1}async function Fn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];_(a,"No route found in manifest");let l={};for(let o in n){let u=a[o]!==void 0&&o!=="hasErrorBoundary";ye(!u,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!u&&!tn.has(o)&&(l[o]=n[o])}Object.assign(a,l),Object.assign(a,H({},t(a),{lazy:void 0}))}async function _n(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,l,o)=>Object.assign(a,{[r[o].route.id]:l}),{})}async function On(e,t,r,n,a,l,o,c,u,h){let p=l.map(w=>w.route.lazy?Fn(w.route,u,c):void 0),f=l.map((w,L)=>{let E=p[L],C=a.some(M=>M.route.id===w.route.id);return H({},w,{shouldLoad:C,resolve:async M=>(M&&n.method==="GET"&&(w.route.lazy||w.route.loader)&&(C=!0),C?jn(t,n,w,E,M,h):Promise.resolve({type:B.data,result:void 0}))})}),y=await e({matches:f,request:n,params:l[0].params,fetcherKey:o,context:h});try{await Promise.all(p)}catch{}return y}async function jn(e,t,r,n,a,l){let o,c,u=h=>{let p,f=new Promise((L,E)=>p=E);c=()=>p(),t.signal.addEventListener("abort",c);let y=L=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):h({request:t,params:r.params,context:l},...L!==void 0?[L]:[]),w=(async()=>{try{return{type:"data",result:await(a?a(E=>y(E)):y())}}catch(L){return{type:"error",result:L}}})();return Promise.race([w,f])};try{let h=r.route[e];if(n)if(h){let p,[f]=await Promise.all([u(h).catch(y=>{p=y}),n]);if(p!==void 0)throw p;o=f}else if(await n,h=r.route[e],h)o=await u(h);else if(e==="action"){let p=new URL(t.url),f=p.pathname+p.search;throw re(405,{method:t.method,pathname:f,routeId:r.route.id})}else return{type:B.data,result:void 0};else if(h)o=await u(h);else{let p=new URL(t.url),f=p.pathname+p.search;throw re(404,{pathname:f})}_(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:B.error,result:h}}finally{c&&t.signal.removeEventListener("abort",c)}return o}async function In(e){let{result:t,type:r}=e;if(xr(t)){let f;try{let y=t.headers.get("Content-Type");y&&/\bapplication\/json\b/.test(y)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(y){return{type:B.error,error:y}}return r===B.error?{type:B.error,error:new ht(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:B.data,data:f,statusCode:t.status,headers:t.headers}}if(r===B.error){if(sr(t)){var n,a;if(t.data instanceof Error){var l,o;return{type:B.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:B.error,error:new ht(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:Xe(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:B.error,error:t,statusCode:Xe(t)?t.status:void 0}}if(kn(t)){var c,u;return{type:B.deferred,deferredData:t,statusCode:(c=t.init)==null?void 0:c.status,headers:((u=t.init)==null?void 0:u.headers)&&new Headers(t.init.headers)}}if(sr(t)){var h,p;return{type:B.data,data:t.data,statusCode:(h=t.init)==null?void 0:h.status,headers:(p=t.init)!=null&&p.headers?new Headers(t.init.headers):void 0}}return{type:B.data,data:t}}function Nn(e,t,r,n,a,l){let o=e.headers.get("Location");if(_(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Mt.test(o)){let c=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=St(new URL(t.url),c,a,!0,o,l),e.headers.set("Location",o)}return e}function rr(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Mt.test(e)){let l=e,o=l.startsWith("//")?new URL(t.protocol+l):new URL(l);if(a.includes(o.protocol))throw new Error("Invalid redirect location");let c=Ae(o.pathname,r)!=null;if(o.origin===t.origin&&c)return o.pathname+o.search+o.hash}try{let l=n.createURL(e);if(a.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ne(e,t,r,n){let a=e.createURL(Sr(t)).toString(),l={signal:r};if(n&&oe(n.formMethod)){let{formMethod:o,formEncType:c}=n;l.method=o.toUpperCase(),c==="application/json"?(l.headers=new Headers({"Content-Type":c}),l.body=JSON.stringify(n.json)):c==="text/plain"?l.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?l.body=Pt(n.formData):l.body=n.formData}return new Request(a,l)}function Pt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function nr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function An(e,t,r,n,a){let l={},o=null,c,u=!1,h={},p=r&&ae(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let y=f.route.id,w=t[y];if(_(!Ce(w),"Cannot handle redirect results in processLoaderData"),ae(w)){let L=w.error;p!==void 0&&(L=p,p=void 0),o=o||{};{let E=De(e,y);o[E.route.id]==null&&(o[E.route.id]=L)}l[y]=void 0,u||(u=!0,c=Xe(w.error)?w.error.status:500),w.headers&&(h[y]=w.headers)}else ge(w)?(n.set(y,w.deferredData),l[y]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(c=w.statusCode),w.headers&&(h[y]=w.headers)):(l[y]=w.data,w.statusCode&&w.statusCode!==200&&!u&&(c=w.statusCode),w.headers&&(h[y]=w.headers))}),p!==void 0&&r&&(o={[r[0]]:p},l[r[0]]=void 0),{loaderData:l,errors:o,statusCode:c||200,loaderHeaders:h}}function ar(e,t,r,n,a,l,o){let{loaderData:c,errors:u}=An(t,r,n,o);return a.forEach(h=>{let{key:p,match:f,controller:y}=h,w=l[p];if(_(w,"Did not find corresponding fetcher result"),!(y&&y.signal.aborted))if(ae(w)){let L=De(e.matches,f?.route.id);u&&u[L.route.id]||(u=H({},u,{[L.route.id]:w.error})),e.fetchers.delete(p)}else if(Ce(w))_(!1,"Unhandled fetcher revalidation redirect");else if(ge(w))_(!1,"Unhandled fetcher deferred data");else{let L=ve(w.data);e.fetchers.set(p,L)}}),{loaderData:c,errors:u}}function ir(e,t,r,n){let a=H({},t);for(let l of r){let o=l.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&l.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function or(e){return e?ae(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function De(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function lr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function re(e,t){let{pathname:r,routeId:n,method:a,type:l,message:o}=t===void 0?{}:t,c="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&r&&n?u="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":l==="defer-action"?u="defer() is not supported in actions":l==="invalid-body"&&(u="Unable to encode submission body")):e===403?(c="Forbidden",u='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",u='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?u="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(u='Invalid request method "'+a.toUpperCase()+'"')),new ht(e||500,c,new Error(u),!0)}function ct(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Ce(a))return{key:n,result:a}}}function Sr(e){let t=typeof e=="string"?we(e):e;return Me(H({},t,{hash:""}))}function Bn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function zn(e){return xr(e.result)&&Pn.has(e.result.status)}function ge(e){return e.type===B.deferred}function ae(e){return e.type===B.error}function Ce(e){return(e&&e.type)===B.redirect}function sr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function kn(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function xr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Hn(e){return xn.has(e.toLowerCase())}function oe(e){return En.has(e.toLowerCase())}async function Wn(e,t,r,n,a){let l=Object.entries(t);for(let o=0;o<l.length;o++){let[c,u]=l[o],h=e.find(y=>y?.route.id===c);if(!h)continue;let p=n.find(y=>y.route.id===h.route.id),f=p!=null&&!Rr(p,h)&&(a&&a[h.route.id])!==void 0;ge(u)&&f&&await Tt(u,r,!1).then(y=>{y&&(t[c]=y)})}}async function Vn(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:l,controller:o}=r[n],c=t[a];e.find(h=>h?.route.id===l)&&ge(c)&&(_(o,"Expected an AbortController for revalidating fetcher deferred result"),await Tt(c,o.signal,!0).then(h=>{h&&(t[a]=h)}))}}async function Tt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:B.data,data:e.deferredData.unwrappedData}}catch(a){return{type:B.error,error:a}}return{type:B.data,data:e.deferredData.data}}}function Ut(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ye(e,t){let r=typeof t=="string"?we(t).search:t.search;if(e[e.length-1].route.index&&Ut(r||""))return e[e.length-1];let n=yr(e);return n[n.length-1]}function ur(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:l,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(l!=null)return{formMethod:t,formAction:r,formEncType:n,formData:l,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Et(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function $n(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ke(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Kn(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ve(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Jn(e,t){try{let r=e.sessionStorage.getItem(br);if(r){let n=JSON.parse(r);for(let[a,l]of Object.entries(n||{}))l&&Array.isArray(l)&&t.set(a,new Set(l||[]))}}catch{}}function Yn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(br,JSON.stringify(r))}catch(n){ye(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mt.apply(this,arguments)}const pt=g.createContext(null),Pr=g.createContext(null),Te=g.createContext(null),Ft=g.createContext(null),he=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Lr=g.createContext(null);function Gn(e,t){let{relative:r}=t===void 0?{}:t;Ze()||_(!1);let{basename:n,navigator:a}=g.useContext(Te),{hash:l,pathname:o,search:c}=Mr(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:fe([n,o])),a.createHref({pathname:u,search:c,hash:l})}function Ze(){return g.useContext(Ft)!=null}function qe(){return Ze()||_(!1),g.useContext(Ft).location}function Dr(e){g.useContext(Te).static||g.useLayoutEffect(e)}function Cr(){let{isDataRoute:e}=g.useContext(he);return e?sa():Xn()}function Xn(){Ze()||_(!1);let e=g.useContext(pt),{basename:t,future:r,navigator:n}=g.useContext(Te),{matches:a}=g.useContext(he),{pathname:l}=qe(),o=JSON.stringify(Dt(a,r.v7_relativeSplatPath)),c=g.useRef(!1);return Dr(()=>{c.current=!0}),g.useCallback(function(h,p){if(p===void 0&&(p={}),!c.current)return;if(typeof h=="number"){n.go(h);return}let f=Ct(h,JSON.parse(o),l,p.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:fe([t,f.pathname])),(p.replace?n.replace:n.push)(f,p.state,p)},[t,n,o,l,e])}const Qn=g.createContext(null);function Zn(e){let t=g.useContext(he).outlet;return t&&g.createElement(Qn.Provider,{value:e},t)}function ja(){let{matches:e}=g.useContext(he),t=e[e.length-1];return t?t.params:{}}function Mr(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=g.useContext(Te),{matches:a}=g.useContext(he),{pathname:l}=qe(),o=JSON.stringify(Dt(a,n.v7_relativeSplatPath));return g.useMemo(()=>Ct(e,JSON.parse(o),l,r==="path"),[e,o,l,r])}function qn(e,t,r,n){Ze()||_(!1);let{navigator:a}=g.useContext(Te),{matches:l}=g.useContext(he),o=l[l.length-1],c=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let h=qe(),p;p=h;let f=p.pathname||"/",y=f;if(u!=="/"){let E=u.replace(/^\//,"").split("/");y="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=Le(e,{pathname:y});return aa(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},c,E.params),pathname:fe([u,a.encodeLocation?a.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:fe([u,a.encodeLocation?a.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),l,r,n)}function ea(){let e=la(),t=Xe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,null)}const ta=g.createElement(ea,null);class ra extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?g.createElement(he.Provider,{value:this.props.routeContext},g.createElement(Lr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function na(e){let{routeContext:t,match:r,children:n}=e,a=g.useContext(pt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(he.Provider,{value:t},n)}function aa(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if(!r)return null;if(r.errors)e=r.matches;else if((l=n)!=null&&l.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,c=(a=r)==null?void 0:a.errors;if(c!=null){let p=o.findIndex(f=>f.route.id&&c?.[f.route.id]!==void 0);p>=0||_(!1),o=o.slice(0,Math.min(o.length,p+1))}let u=!1,h=-1;if(r&&n&&n.v7_partialHydration)for(let p=0;p<o.length;p++){let f=o[p];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(h=p),f.route.id){let{loaderData:y,errors:w}=r,L=f.route.loader&&y[f.route.id]===void 0&&(!w||w[f.route.id]===void 0);if(f.route.lazy||L){u=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((p,f,y)=>{let w,L=!1,E=null,C=null;r&&(w=c&&f.route.id?c[f.route.id]:void 0,E=f.route.errorElement||ta,u&&(h<0&&y===0?(ua("route-fallback"),L=!0,C=null):h===y&&(L=!0,C=f.route.hydrateFallbackElement||null)));let A=t.concat(o.slice(0,y+1)),M=()=>{let z;return w?z=E:L?z=C:f.route.Component?z=g.createElement(f.route.Component,null):f.route.element?z=f.route.element:z=p,g.createElement(na,{match:f,routeContext:{outlet:p,matches:A,isDataRoute:r!=null},children:z})};return r&&(f.route.ErrorBoundary||f.route.errorElement||y===0)?g.createElement(ra,{location:r.location,revalidation:r.revalidation,component:E,error:w,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):M()},null)}var Tr=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Tr||{}),Ur=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Ur||{});function ia(e){let t=g.useContext(pt);return t||_(!1),t}function _t(e){let t=g.useContext(Pr);return t||_(!1),t}function oa(e){let t=g.useContext(he);return t||_(!1),t}function Fr(e){let t=oa(),r=t.matches[t.matches.length-1];return r.route.id||_(!1),r.route.id}function Ia(){return _t().navigation}function Na(){let{matches:e,loaderData:t}=_t();return g.useMemo(()=>e.map(r=>pr(r,t)),[e,t])}function la(){var e;let t=g.useContext(Lr),r=_t(),n=Fr();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function sa(){let{router:e}=ia(Tr.UseNavigateStable),t=Fr(Ur.UseNavigateStable),r=g.useRef(!1);return Dr(()=>{r.current=!0}),g.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,mt({fromRouteId:t},l)))},[e,t])}const cr={};function ua(e,t,r){cr[e]||(cr[e]=!0)}function ca(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function Aa(e){return Zn(e.context)}function da(e){let{basename:t="/",children:r=null,location:n,navigationType:a=X.Pop,navigator:l,static:o=!1,future:c}=e;Ze()&&_(!1);let u=t.replace(/^\/*/,"/"),h=g.useMemo(()=>({basename:u,navigator:l,static:o,future:mt({v7_relativeSplatPath:!1},c)}),[u,c,l,o]);typeof n=="string"&&(n=we(n));let{pathname:p="/",search:f="",hash:y="",state:w=null,key:L="default"}=n,E=g.useMemo(()=>{let C=Ae(p,u);return C==null?null:{location:{pathname:C,search:f,hash:y,state:w,key:L},navigationType:a}},[u,p,f,y,w,L,a]);return E==null?null:g.createElement(Te.Provider,{value:h},g.createElement(Ft.Provider,{children:r,value:E}))}new Promise(()=>{});function fa(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Qe(){return Qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qe.apply(this,arguments)}function ha(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,l;for(l=0;l<n.length;l++)a=n[l],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function ma(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pa(e,t){return e.button===0&&(!t||t==="_self")&&!ma(e)}function Lt(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function va(e,t){let r=Lt(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(l=>{r.append(a,l)})}),r}const ga=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ya="6";try{window.__reactRouterVersion=ya}catch{}function Ba(e,t){return Mn({basename:void 0,future:Qe({},void 0,{v7_prependBasename:!0}),history:Zr({window:void 0}),hydrationData:wa(),routes:e,mapRouteProperties:fa,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function wa(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Qe({},t,{errors:ba(t.errors)})),t}function ba(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new ht(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let l=window[a.__subType];if(typeof l=="function")try{let o=new l(a.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let l=new Error(a.message);l.stack="",r[n]=l}}else r[n]=a;return r}const Ra=g.createContext({isTransitioning:!1}),Ea=g.createContext(new Map),Sa="startTransition",dr=Xr[Sa],xa="flushSync",fr=Qr[xa];function Pa(e){dr?dr(e):e()}function Je(e){fr?fr(e):e()}class La{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function za(e){let{fallbackElement:t,router:r,future:n}=e,[a,l]=g.useState(r.state),[o,c]=g.useState(),[u,h]=g.useState({isTransitioning:!1}),[p,f]=g.useState(),[y,w]=g.useState(),[L,E]=g.useState(),C=g.useRef(new Map),{v7_startTransition:A}=n||{},M=g.useCallback(U=>{A?Pa(U):U()},[A]),z=g.useCallback((U,W)=>{let{deletedFetchers:O,flushSync:q,viewTransitionOpts:Y}=W;U.fetchers.forEach((te,se)=>{te.data!==void 0&&C.current.set(se,te.data)}),O.forEach(te=>C.current.delete(te));let ne=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!Y||ne){q?Je(()=>l(U)):M(()=>l(U));return}if(q){Je(()=>{y&&(p&&p.resolve(),y.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let te=r.window.document.startViewTransition(()=>{Je(()=>l(U))});te.finished.finally(()=>{Je(()=>{f(void 0),w(void 0),c(void 0),h({isTransitioning:!1})})}),Je(()=>w(te));return}y?(p&&p.resolve(),y.skipTransition(),E({state:U,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(c(U),h({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[r.window,y,p,C,M]);g.useLayoutEffect(()=>r.subscribe(z),[r,z]),g.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new La)},[u]),g.useEffect(()=>{if(p&&o&&r.window){let U=o,W=p.promise,O=r.window.document.startViewTransition(async()=>{M(()=>l(U)),await W});O.finished.finally(()=>{f(void 0),w(void 0),c(void 0),h({isTransitioning:!1})}),w(O)}},[M,o,p,r.window]),g.useEffect(()=>{p&&o&&a.location.key===o.location.key&&p.resolve()},[p,y,a.location,o]),g.useEffect(()=>{!u.isTransitioning&&L&&(c(L.state),h({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),E(void 0))},[u.isTransitioning,L]),g.useEffect(()=>{},[]);let K=g.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:U=>r.navigate(U),push:(U,W,O)=>r.navigate(U,{state:W,preventScrollReset:O?.preventScrollReset}),replace:(U,W,O)=>r.navigate(U,{replace:!0,state:W,preventScrollReset:O?.preventScrollReset})}),[r]),J=r.basename||"/",be=g.useMemo(()=>({router:r,navigator:K,static:!1,basename:J}),[r,K,J]),m=g.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return g.useEffect(()=>ca(n,r.future),[n,r.future]),g.createElement(g.Fragment,null,g.createElement(pt.Provider,{value:be},g.createElement(Pr.Provider,{value:a},g.createElement(Ea.Provider,{value:C.current},g.createElement(Ra.Provider,{value:u},g.createElement(da,{basename:J,location:a.location,navigationType:a.historyAction,navigator:K,future:m},a.initialized||r.future.v7_partialHydration?g.createElement(Da,{routes:r.routes,future:r.future,state:a}):t))))),null)}const Da=g.memo(Ca);function Ca(e){let{routes:t,future:r,state:n}=e;return qn(t,void 0,n,r)}const Ma=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ka=g.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:l,replace:o,state:c,target:u,to:h,preventScrollReset:p,viewTransition:f}=t,y=ha(t,ga),{basename:w}=g.useContext(Te),L,E=!1;if(typeof h=="string"&&Ta.test(h)&&(L=h,Ma))try{let z=new URL(window.location.href),K=h.startsWith("//")?new URL(z.protocol+h):new URL(h),J=Ae(K.pathname,w);K.origin===z.origin&&J!=null?h=J+K.search+K.hash:E=!0}catch{}let C=Gn(h,{relative:a}),A=Ua(h,{replace:o,state:c,target:u,preventScrollReset:p,relative:a,viewTransition:f});function M(z){n&&n(z),z.defaultPrevented||A(z)}return g.createElement("a",Qe({},y,{href:L||C,onClick:E||l?n:M,ref:r,target:u}))});var hr;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(hr||(hr={}));var mr;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mr||(mr={}));function Ua(e,t){let{target:r,replace:n,state:a,preventScrollReset:l,relative:o,viewTransition:c}=t===void 0?{}:t,u=Cr(),h=qe(),p=Mr(e,{relative:o});return g.useCallback(f=>{if(pa(f,r)){f.preventDefault();let y=n!==void 0?n:Me(h)===Me(p);u(e,{replace:y,state:a,preventScrollReset:l,relative:o,viewTransition:c})}},[h,u,p,n,a,r,e,l,o,c])}function Ha(e){let t=g.useRef(Lt(e)),r=g.useRef(!1),n=qe(),a=g.useMemo(()=>va(n.search,r.current?null:t.current),[n.search]),l=Cr(),o=g.useCallback((c,u)=>{const h=Lt(typeof c=="function"?c(a):c);r.current=!0,l("?"+h,u)},[l,a]);return[a,o]}export{ka as L,Aa as O,za as R,Cr as a,ja as b,Ha as c,Na as d,la as e,Ia as f,_a as g,Ba as h,Le as m,Oa as r,qe as u};
package/dist/index.html CHANGED
@@ -21,12 +21,12 @@
21
21
  opacity: 1;
22
22
  }
23
23
  </style>
24
- <script type="module" crossorigin src="/assets/index-Cxr1XnaG.js"></script>
25
- <link rel="modulepreload" crossorigin href="/assets/vendor-react-BVJTUrr9.js">
26
- <link rel="modulepreload" crossorigin href="/assets/vendor-chakra-KVZl8JWx.js">
27
- <link rel="modulepreload" crossorigin href="/assets/vendor-mobx-3H1Pbg0A.js">
28
- <link rel="modulepreload" crossorigin href="/assets/vendor-graphql-G4Xi1cXi.js">
29
- <link rel="stylesheet" crossorigin href="/assets/index-6HqKMu_R.css">
24
+ <script type="module" crossorigin src="/assets/index-BDW1amIL.js"></script>
25
+ <link rel="modulepreload" crossorigin href="/assets/vendor-chakra-81WUgB9u.js">
26
+ <link rel="modulepreload" crossorigin href="/assets/vendor-mobx-RTHsWS6u.js">
27
+ <link rel="modulepreload" crossorigin href="/assets/vendor-react-B-wSUMrZ.js">
28
+ <link rel="modulepreload" crossorigin href="/assets/vendor-graphql-BN0-5miB.js">
29
+ <link rel="stylesheet" crossorigin href="/assets/index-D4XFaIWw.css">
30
30
  </head>
31
31
  <body>
32
32
  <div id="root"></div>