!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).GraphiQL=t(e.React,e.ReactDOM)}(this,(function(e,t){"use strict";function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}function r(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const i=n(e),o=n(t);function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a,l,c={exports:{}},u={};var d,f,p=(l||(l=1,c.exports=function(){if(a)return u;a=1;var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var a,l={},c=null,u=null;for(a in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,a)&&!s.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===l[a]&&(l[a]=t[a]);return{$$typeof:n,type:e,key:c,ref:u,props:l,_owner:o.current}}return u.Fragment=r,u.jsx=l,u.jsxs=l,u}()),c.exports);
/**
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *
   * @lightSyntaxTransform
   * @noflow
   * @nolint
   * @preventMunge
   * @preserve-invariant-messages
   */var h=function(){if(f)return d;f=1;var t,n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,l=(e,t,n,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))a.call(e,l)||l===n||r(e,l,{get:()=>t[l],enumerable:!(s=i(t,l))||s.enumerable});return e},c={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(c,{$dispatcherGuard:()=>S,$makeReadOnly:()=>_,$reset:()=>k,$structuralCheck:()=>O,c:()=>E,clearRenderCounterRegistry:()=>D,renderCounterRegistry:()=>N,useRenderCounter:()=>A}),t=c,d=l(r({},"__esModule",{value:!0}),t);var u,p,h=((e,t,i)=>(i=null!=e?n(s(e)):{},l(e&&e.__esModule?i:r(i,"default",{value:e,enumerable:!0}),e)))(e),{useRef:m,useEffect:g,isValidElement:v}=h,y=null!=(u=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?u:h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.memo_cache_sentinel"),E="function"==typeof(null==(p=h.__COMPILER_RUNTIME)?void 0:p.c)?h.__COMPILER_RUNTIME.c:function(e){return h.useMemo((()=>{const t=new Array(e);for(let n=0;n<e;n++)t[n]=b;return t[b]=!0,t}),[])},x={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach((e=>{x[e]=()=>{throw new Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}}));var w=null;function T(e){return y.ReactCurrentDispatcher.current=e,y.ReactCurrentDispatcher.current}x.useMemoCache=e=>{if(null==w)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return w.useMemoCache(e)};var C=[];function S(e){const t=y.ReactCurrentDispatcher.current;if(0===e){if(C.push(t),1===C.length&&(w=t),t===x)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");T(x)}else if(1===e){const e=C.pop();if(null==e)throw new Error("React Compiler internal error: unexpected null in guard stack");0===C.length&&(w=null),T(e)}else if(2===e)C.push(t),T(w);else{if(3!==e)throw new Error("React Compiler internal error: unreachable block"+e);{const e=C.pop();if(null==e)throw new Error("React Compiler internal error: unexpected null in guard stack");T(e)}}}function k(e){for(let t=0;t<e.length;t++)e[t]=b}function _(){throw new Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var N=new Map;function D(){for(const e of N.values())e.forEach((e=>{e.count=0}))}function A(e){const t=m(null);null!=t.current&&(t.current.count+=1),g((()=>{if(null==t.current){const n={count:0};!function(e,t){let n=N.get(e);null==n&&(n=new Set,N.set(e,n)),n.add(t)}(e,n),t.current=n}return()=>{null!==t.current&&function(e,t){const n=N.get(e);null!=n&&n.delete(t)}(e,t.current)}}))}var I=new Set;function O(e,t,n,r,i,o){function s(e,t,s,a){const l=`${r}:${o} [${i}] ${n}${s} changed from ${e} to ${t} at depth ${a}`;I.has(l)||(I.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)&&t!==n)if(typeof t!=typeof n)s("type "+typeof t,"type "+typeof n,r,i);else if("object"==typeof t){const o=Array.isArray(t),a=Array.isArray(n);if(null===t&&null!==n)s("null","type "+typeof n,r,i);else if(null===n)s("type "+typeof t,"null",r,i);else if(t instanceof Map)if(n instanceof Map)if(t.size!==n.size)s(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(const[l,c]of t)n.has(l)?e(c,n.get(l),`${r}.get(${l})`,i+1):s(`Map instance with key ${l}`,`Map instance without key ${l}`,r,i);else s("Map instance","other value",r,i);else if(n instanceof Map)s("other value","Map instance",r,i);else if(t instanceof Set)if(n instanceof Set)if(t.size!==n.size)s(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(const e of n)t.has(e)||s(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i);else s("Set instance","other value",r,i);else if(n instanceof Set)s("other value","Set instance",r,i);else if(o||a)if(o!==a)s("type "+(o?"array":"object"),"type "+(a?"array":"object"),r,i);else if(t.length!==n.length)s(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let s=0;s<t.length;s++)e(t[s],n[s],`${r}[${s}]`,i+1);else if(v(t)||v(n))v(t)!==v(n)?s("type "+(v(t)?"React element":"object"),"type "+(v(n)?"React element":"object"),r,i):t.type!==n.type?s(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(const e in n)e in t||s(`object without key ${e}`,`object with key ${e}`,r,i);for(const o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):s(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&s(""+(isNaN(t)?"NaN":"non-NaN value"),""+(isNaN(n)?"NaN":"non-NaN value"),r,i):t!==n&&s(t,n,r,i)}}(e,t,"",0)}return d}(),m=Object.defineProperty,g=Object.defineProperties,v=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,x=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),w=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=(e,t)=>{for(var n in t||(t={}))b.call(t,n)&&w(e,n,t[n]);if(y)for(var n of y(t))E.call(t,n)&&w(e,n,t[n]);return e},C=(e,t)=>g(e,v(t)),S=function(e,t){this[0]=e,this[1]=t};function k(e){return"object"==typeof e&&null!==e&&"function"==typeof e.then}function _(e){return"object"==typeof e&&null!==e&&"subscribe"in e&&"function"==typeof e.subscribe}function N(e){return"object"==typeof e&&null!==e&&("AsyncGenerator"===e[Symbol.toStringTag]||Symbol.asyncIterator in e)}async function D(e){const t=await e;return N(t)?async function(e){var t;const n=null==(t=("return"in e?e:e[Symbol.asyncIterator]()).return)?void 0:t.bind(e),r=await("next"in e?e:e[Symbol.asyncIterator]()).next.bind(e)();return null==n||n(),r.value}(t):_(t)?(n=t,new Promise(((e,t)=>{const r=n.subscribe({next(t){e(t),r.unsubscribe()},error:t,complete(){t(new Error("no value resolved"))}})}))):t;var n}const A=Object.freeze({major:16,minor:11,patch:0,preReleaseTag:null});function I(e,t){if(!Boolean(e))throw new Error(t)}function O(e){return"function"==typeof(null==e?void 0:e.then)}function L(e){return"object"==typeof e&&null!==e}function M(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const R=/\r\n|[\n\r]/g;function F(e,t){let n=0,r=1;for(const i of e.body.matchAll(R)){if("number"==typeof i.index||M(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function P(e){return j(e.source,F(e.source,e.start))}function j(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?n:0,l=t.column+a,c=`${e.name}:${s}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let r=0;r<d.length;r+=80)n.push(d.slice(r,r+80));return c+V([[`${s} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+V([[s-1+" |",u[i-1]],[`${s} |`,d],["|","^".padStart(l)],[`${s+1} |`,u[i+1]]])}function V(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class B extends Error{constructor(e,...t){var n,r,i;const{nodes:o,source:s,positions:a,path:l,originalError:c,extensions:u}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=c?c:void 0,this.nodes=$(Array.isArray(o)?o:o?[o]:void 0);const d=$(null===(n=this.nodes)||void 0===n?void 0:n.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==d||null===(r=d[0])||void 0===r?void 0:r.source,this.positions=null!=a?a:null==d?void 0:d.map((e=>e.start)),this.locations=a&&s?a.map((e=>F(s,e))):null==d?void 0:d.map((e=>F(e.source,e.start)));const f=L(null==c?void 0:c.extensions)?null==c?void 0:c.extensions:void 0;this.extensions=null!==(i=null!=u?u:f)&&void 0!==i?i: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}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,B):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+P(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+j(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function $(e){return void 0===e||0===e.length?void 0:e}function U(e,t,n){return new B(`Syntax Error: ${n}`,{source:e,positions:[t]})}let H=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},q=class{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,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 W={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"]},z=new Set(Object.keys(W));function G(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&z.has(t)}var K,Y,Q,X,J,Z,ee,te;function ne(e){return 9===e||32===e}function re(e){return e>=48&&e<=57}function ie(e){return e>=97&&e<=122||e>=65&&e<=90}function oe(e){return ie(e)||95===e}function se(e){return ie(e)||re(e)||95===e}function ae(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<e.length;++s){var o;const t=e[s],a=le(t);a!==t.length&&(r=null!==(o=r)&&void 0!==o?o:s,i=s,0!==s&&a<n&&(n=a))}return e.map(((e,t)=>0===t?e:e.slice(n))).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function le(e){let t=0;for(;t<e.length&&ne(e.charCodeAt(t));)++t;return t}function ce(e){if(""===e)return!0;let t=!0,n=!1,r=!0,i=!1;for(let o=0;o<e.length;++o)switch(e.codePointAt(o)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:case 13:return!1;case 10:if(t&&!i)return!1;i=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!t&&(!r||!i)}function ue(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=1===r.length,o=r.length>1&&r.slice(1).every((e=>0===e.length||ne(e.charCodeAt(0)))),s=n.endsWith('\\"""'),a=e.endsWith('"')&&!s,l=e.endsWith("\\"),c=a||l,u=!(null!=t&&t.minimize)&&(!i||e.length>70||c||o||s);let d="";const f=i&&ne(e.charCodeAt(0));return(u&&!f||o)&&(d+="\n"),d+=n,(u||c)&&(d+="\n"),'"""'+d+'"""'}(Y=K||(K={})).QUERY="query",Y.MUTATION="mutation",Y.SUBSCRIPTION="subscription",(X=Q||(Q={})).QUERY="QUERY",X.MUTATION="MUTATION",X.SUBSCRIPTION="SUBSCRIPTION",X.FIELD="FIELD",X.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",X.FRAGMENT_SPREAD="FRAGMENT_SPREAD",X.INLINE_FRAGMENT="INLINE_FRAGMENT",X.VARIABLE_DEFINITION="VARIABLE_DEFINITION",X.SCHEMA="SCHEMA",X.SCALAR="SCALAR",X.OBJECT="OBJECT",X.FIELD_DEFINITION="FIELD_DEFINITION",X.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",X.INTERFACE="INTERFACE",X.UNION="UNION",X.ENUM="ENUM",X.ENUM_VALUE="ENUM_VALUE",X.INPUT_OBJECT="INPUT_OBJECT",X.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",(Z=J||(J={})).NAME="Name",Z.DOCUMENT="Document",Z.OPERATION_DEFINITION="OperationDefinition",Z.VARIABLE_DEFINITION="VariableDefinition",Z.SELECTION_SET="SelectionSet",Z.FIELD="Field",Z.ARGUMENT="Argument",Z.FRAGMENT_SPREAD="FragmentSpread",Z.INLINE_FRAGMENT="InlineFragment",Z.FRAGMENT_DEFINITION="FragmentDefinition",Z.VARIABLE="Variable",Z.INT="IntValue",Z.FLOAT="FloatValue",Z.STRING="StringValue",Z.BOOLEAN="BooleanValue",Z.NULL="NullValue",Z.ENUM="EnumValue",Z.LIST="ListValue",Z.OBJECT="ObjectValue",Z.OBJECT_FIELD="ObjectField",Z.DIRECTIVE="Directive",Z.NAMED_TYPE="NamedType",Z.LIST_TYPE="ListType",Z.NON_NULL_TYPE="NonNullType",Z.SCHEMA_DEFINITION="SchemaDefinition",Z.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Z.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Z.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Z.FIELD_DEFINITION="FieldDefinition",Z.INPUT_VALUE_DEFINITION="InputValueDefinition",Z.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Z.UNION_TYPE_DEFINITION="UnionTypeDefinition",Z.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Z.ENUM_VALUE_DEFINITION="EnumValueDefinition",Z.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Z.DIRECTIVE_DEFINITION="DirectiveDefinition",Z.SCHEMA_EXTENSION="SchemaExtension",Z.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Z.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Z.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Z.UNION_TYPE_EXTENSION="UnionTypeExtension",Z.ENUM_TYPE_EXTENSION="EnumTypeExtension",Z.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",(te=ee||(ee={})).SOF="<SOF>",te.EOF="<EOF>",te.BANG="!",te.DOLLAR="$",te.AMP="&",te.PAREN_L="(",te.PAREN_R=")",te.SPREAD="...",te.COLON=":",te.EQUALS="=",te.AT="@",te.BRACKET_L="[",te.BRACKET_R="]",te.BRACE_L="{",te.PIPE="|",te.BRACE_R="}",te.NAME="Name",te.INT="Int",te.FLOAT="Float",te.STRING="String",te.BLOCK_STRING="BlockString",te.COMMENT="Comment";class de{constructor(e){const t=new q(ee.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==ee.EOF)do{if(e.next)e=e.next;else{const t=be(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===ee.COMMENT);return e}}function fe(e){return e===ee.BANG||e===ee.DOLLAR||e===ee.AMP||e===ee.PAREN_L||e===ee.PAREN_R||e===ee.SPREAD||e===ee.COLON||e===ee.EQUALS||e===ee.AT||e===ee.BRACKET_L||e===ee.BRACKET_R||e===ee.BRACE_L||e===ee.PIPE||e===ee.BRACE_R}function pe(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function he(e,t){return me(e.charCodeAt(t))&&ge(e.charCodeAt(t+1))}function me(e){return e>=55296&&e<=56319}function ge(e){return e>=56320&&e<=57343}function ve(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return ee.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ye(e,t,n,r,i){const o=e.line,s=1+n-e.lineStart;return new q(t,n,r,o,s,i)}function be(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Ee(e,i);case 33:return ye(e,ee.BANG,i,i+1);case 36:return ye(e,ee.DOLLAR,i,i+1);case 38:return ye(e,ee.AMP,i,i+1);case 40:return ye(e,ee.PAREN_L,i,i+1);case 41:return ye(e,ee.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return ye(e,ee.SPREAD,i,i+3);break;case 58:return ye(e,ee.COLON,i,i+1);case 61:return ye(e,ee.EQUALS,i,i+1);case 64:return ye(e,ee.AT,i,i+1);case 91:return ye(e,ee.BRACKET_L,i,i+1);case 93:return ye(e,ee.BRACKET_R,i,i+1);case 123:return ye(e,ee.BRACE_L,i,i+1);case 124:return ye(e,ee.PIPE,i,i+1);case 125:return ye(e,ee.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?De(e,i):Te(e,i)}if(re(t)||45===t)return xe(e,i,t);if(oe(t))return Ae(e,i);throw U(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":pe(t)||he(n,i)?`Unexpected character: ${ve(e,i)}.`:`Invalid character: ${ve(e,i)}.`)}return ye(e,ee.EOF,r,r)}function Ee(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(pe(e))++i;else{if(!he(n,i))break;i+=2}}return ye(e,ee.COMMENT,t,i,n.slice(t+1,i))}function xe(e,t,n){const r=e.source.body;let i=t,o=n,s=!1;if(45===o&&(o=r.charCodeAt(++i)),48===o){if(o=r.charCodeAt(++i),re(o))throw U(e.source,i,`Invalid number, unexpected digit after 0: ${ve(e,i)}.`)}else i=we(e,i,o),o=r.charCodeAt(i);if(46===o&&(s=!0,o=r.charCodeAt(++i),i=we(e,i,o),o=r.charCodeAt(i)),69!==o&&101!==o||(s=!0,o=r.charCodeAt(++i),43!==o&&45!==o||(o=r.charCodeAt(++i)),i=we(e,i,o),o=r.charCodeAt(i)),46===o||oe(o))throw U(e.source,i,`Invalid number, expected digit but got: ${ve(e,i)}.`);return ye(e,s?ee.FLOAT:ee.INT,t,i,r.slice(t,i))}function we(e,t,n){if(!re(n))throw U(e.source,t,`Invalid number, expected digit but got: ${ve(e,t)}.`);const r=e.source.body;let i=t+1;for(;re(r.charCodeAt(i));)++i;return i}function Te(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,s="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return s+=n.slice(o,i),ye(e,ee.STRING,t,i+1,s);if(92!==r){if(10===r||13===r)break;if(pe(r))++i;else{if(!he(n,i))throw U(e.source,i,`Invalid character within String: ${ve(e,i)}.`);i+=2}}else{s+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Ce(e,i):Se(e,i):Ne(e,i);s+=t.value,i+=t.size,o=i}}throw U(e.source,i,"Unterminated string.")}function Ce(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!pe(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|_e(e),r<0)break}throw U(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Se(e,t){const n=e.source.body,r=ke(n,t+2);if(pe(r))return{value:String.fromCodePoint(r),size:6};if(me(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=ke(n,t+8);if(ge(e))return{value:String.fromCodePoint(r,e),size:12}}throw U(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ke(e,t){return _e(e.charCodeAt(t))<<12|_e(e.charCodeAt(t+1))<<8|_e(e.charCodeAt(t+2))<<4|_e(e.charCodeAt(t+3))}function _e(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ne(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:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw U(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function De(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,o=t+3,s=o,a="";const l=[];for(;o<r;){const r=n.charCodeAt(o);if(34===r&&34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)){a+=n.slice(s,o),l.push(a);const r=ye(e,ee.BLOCK_STRING,t,o+3,ae(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(o+1)||34!==n.charCodeAt(o+2)||34!==n.charCodeAt(o+3))if(10!==r&&13!==r)if(pe(r))++o;else{if(!he(n,o))throw U(e.source,o,`Invalid character within String: ${ve(e,o)}.`);o+=2}else a+=n.slice(s,o),l.push(a),13===r&&10===n.charCodeAt(o+1)?o+=2:++o,a="",s=o,i=o;else a+=n.slice(s,o),s=o+1,o+=4}throw U(e.source,o,"Unterminated string.")}function Ae(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){if(!se(n.charCodeAt(i)))break;++i}return ye(e,ee.NAME,t,i,n.slice(t,i))}const Ie=10,Oe=2;function Le(e){return Me(e,[])}function Me(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Me(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>Oe)return"[Array]";const n=Math.min(Ie,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(Me(e[o],t));1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`);return"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>Oe)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+Me(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}const Re=function(e,t){return e instanceof t};class Fe{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||I(!1,`Body must be a string. Received: ${Le(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||I(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||I(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Pe(e){return Re(e,Fe)}function je(e,t){const n=new Be(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}function Ve(e,t){const n=new Be(e,t);n.expectToken(ee.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(ee.EOF),r}class Be{constructor(e,t={}){const n=Pe(e)?e:new Fe(e);this._lexer=new de(n),this._options=t,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(ee.NAME);return this.node(e,{kind:J.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:J.DOCUMENT,definitions:this.many(ee.SOF,this.parseDefinition,ee.EOF)})}parseDefinition(){if(this.peek(ee.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===ee.NAME){switch(t.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(e)throw U(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(ee.BRACE_L))return this.node(e,{kind:J.OPERATION_DEFINITION,operation:K.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(ee.NAME)&&(n=this.parseName()),this.node(e,{kind:J.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(ee.NAME);switch(e.value){case"query":return K.QUERY;case"mutation":return K.MUTATION;case"subscription":return K.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(ee.PAREN_L,this.parseVariableDefinition,ee.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:J.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ee.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ee.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(ee.DOLLAR),this.node(e,{kind:J.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:J.SELECTION_SET,selections:this.many(ee.BRACE_L,this.parseSelection,ee.BRACE_R)})}parseSelection(){return this.peek(ee.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(ee.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:J.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ee.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ee.PAREN_L,t,ee.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(ee.COLON),this.node(t,{kind:J.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(ee.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(ee.NAME)?this.node(e,{kind:J.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:J.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:J.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:J.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case ee.BRACKET_L:return this.parseList(e);case ee.BRACE_L:return this.parseObject(e);case ee.INT:return this.advanceLexer(),this.node(t,{kind:J.INT,value:t.value});case ee.FLOAT:return this.advanceLexer(),this.node(t,{kind:J.FLOAT,value:t.value});case ee.STRING:case ee.BLOCK_STRING:return this.parseStringLiteral();case ee.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:J.BOOLEAN,value:!0});case"false":return this.node(t,{kind:J.BOOLEAN,value:!1});case"null":return this.node(t,{kind:J.NULL});default:return this.node(t,{kind:J.ENUM,value:t.value})}case ee.DOLLAR:if(e){if(this.expectToken(ee.DOLLAR),this._lexer.token.kind===ee.NAME){const e=this._lexer.token.value;throw U(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:J.STRING,value:e.value,block:e.kind===ee.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:J.LIST,values:this.any(ee.BRACKET_L,(()=>this.parseValueLiteral(e)),ee.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:J.OBJECT,fields:this.any(ee.BRACE_L,(()=>this.parseObjectField(e)),ee.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(ee.COLON),this.node(t,{kind:J.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(ee.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(ee.AT),this.node(t,{kind:J.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(ee.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(ee.BRACKET_R),t=this.node(e,{kind:J.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(ee.BANG)?this.node(e,{kind:J.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:J.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ee.STRING)||this.peek(ee.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(ee.BRACE_L,this.parseOperationTypeDefinition,ee.BRACE_R);return this.node(e,{kind:J.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(ee.COLON);const n=this.parseNamedType();return this.node(e,{kind:J.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:J.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:J.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ee.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ee.BRACE_L,this.parseFieldDefinition,ee.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ee.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:J.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(ee.PAREN_L,this.parseInputValueDef,ee.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(ee.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(ee.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:J.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:J.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:J.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(ee.EQUALS)?this.delimitedMany(ee.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:J.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(ee.BRACE_L,this.parseEnumValueDefinition,ee.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:J.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw U(this._lexer.source,this._lexer.token.start,`${$e(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:J.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(ee.BRACE_L,this.parseInputValueDef,ee.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===ee.NAME)switch(e.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(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(ee.BRACE_L,this.parseOperationTypeDefinition,ee.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:J.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:J.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:J.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:J.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:J.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:J.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:J.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ee.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:J.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(ee.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Q,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new H(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw U(this._lexer.source,t.start,`Expected ${Ue(e)}, found ${$e(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==ee.NAME||t.value!==e)throw U(this._lexer.source,t.start,`Expected "${e}", found ${$e(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===ee.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return U(this._lexer.source,t.start,`Unexpected ${$e(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==ee.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw U(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function $e(e){const t=e.value;return Ue(e.kind)+(null!=t?` "${t}"`:"")}function Ue(e){return fe(e)?`"${e}"`:e}const He=5;function qe(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const o=r.map((e=>`"${e}"`));switch(o.length){case 0:return"";case 1:return i+o[0]+"?";case 2:return i+o[0]+" or "+o[1]+"?"}const s=o.slice(0,He),a=s.pop();return i+s.join(", ")+", or "+a+"?"}function We(e){return e}function ze(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function Ge(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function Ke(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function Ye(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),o=t.charCodeAt(r);if(Je(i)&&Je(o)){let s=0;do{++n,s=10*s+i-Qe,i=e.charCodeAt(n)}while(Je(i)&&s>0);let a=0;do{++r,a=10*a+o-Qe,o=t.charCodeAt(r)}while(Je(o)&&a>0);if(s<a)return-1;if(s>a)return 1}else{if(i<o)return-1;if(i>o)return 1;++n,++r}}return e.length-t.length}const Qe=48,Xe=57;function Je(e){return!isNaN(e)&&Qe<=e&&e<=Xe}function Ze(e,t){const n=Object.create(null),r=new et(e),i=Math.floor(.4*e.length)+1;for(const o of t){const e=r.measure(o,i);void 0!==e&&(n[o]=e)}return Object.keys(n).sort(((e,t)=>{const r=n[e]-n[t];return 0!==r?r:Ye(e,t)}))}class et{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=tt(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;const n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let r=tt(n),i=this._inputArray;if(r.length<i.length){const e=r;r=i,i=e}const o=r.length,s=i.length;if(o-s>t)return;const a=this._rows;for(let c=0;c<=s;c++)a[0][c]=c;for(let c=1;c<=o;c++){const e=a[(c-1)%3],n=a[c%3];let o=n[0]=c;for(let t=1;t<=s;t++){const s=r[c-1]===i[t-1]?0:1;let l=Math.min(e[t]+1,n[t-1]+1,e[t-1]+s);if(c>1&&t>1&&r[c-1]===i[t-2]&&r[c-2]===i[t-1]){const e=a[(c-2)%3][t-2];l=Math.min(l,e+1)}l<o&&(o=l),n[t]=l}if(o>t)return}const l=a[o%3][s];return l<=t?l:void 0}}function tt(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function nt(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}const rt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function it(e){return ot[e.charCodeAt(0)]}const ot=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],st=Object.freeze({});function at(e,t,n=W){const r=new Map;for(const v of Object.values(J))r.set(v,ct(t,v));let i,o,s,a=Array.isArray(e),l=[e],c=-1,u=[],d=e;const f=[],p=[];do{c++;const e=c===l.length,v=e&&0!==u.length;if(e){if(o=0===p.length?void 0:f[f.length-1],d=s,s=p.pop(),v)if(a){d=d.slice();let e=0;for(const[t,n]of u){const r=t-e;null===n?(d.splice(r,1),e++):d[r]=n}}else{d={...d};for(const[e,t]of u)d[e]=t}c=i.index,l=i.keys,u=i.edits,a=i.inArray,i=i.prev}else if(s){if(o=a?c:l[c],d=s[o],null==d)continue;f.push(o)}let y;if(!Array.isArray(d)){var h,m;G(d)||I(!1,`Invalid AST Node: ${Le(d)}.`);const n=e?null===(h=r.get(d.kind))||void 0===h?void 0:h.leave:null===(m=r.get(d.kind))||void 0===m?void 0:m.enter;if(y=null==n?void 0:n.call(t,d,o,s,f,p),y===st)break;if(!1===y){if(!e){f.pop();continue}}else if(void 0!==y&&(u.push([o,y]),!e)){if(!G(y)){f.pop();continue}d=y}}var g;if(void 0===y&&v&&u.push([o,d]),e)f.pop();else i={inArray:a,index:c,keys:l,edits:u,prev:i},a=Array.isArray(d),l=a?d:null!==(g=n[d.kind])&&void 0!==g?g:[],c=-1,u=[],s&&p.push(s),s=d}while(void 0!==i);return 0!==u.length?u[u.length-1][1]:e}function lt(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(J)){let i=!1;const o=new Array(e.length).fill(void 0),s=new Array(e.length).fill(void 0);for(let t=0;t<e.length;++t){const{enter:n,leave:a}=ct(e[t],r);i||(i=null!=n||null!=a),o[t]=n,s[t]=a}if(!i)continue;const a={enter(...n){const r=n[0];for(let s=0;s<e.length;s++)if(null===t[s]){var i;const a=null===(i=o[s])||void 0===i?void 0:i.apply(e[s],n);if(!1===a)t[s]=r;else if(a===st)t[s]=st;else if(void 0!==a)return a}},leave(...n){const r=n[0];for(let o=0;o<e.length;o++)if(null===t[o]){var i;const r=null===(i=s[o])||void 0===i?void 0:i.apply(e[o],n);if(r===st)t[o]=st;else if(void 0!==r&&!1!==r)return r}else t[o]===r&&(t[o]=null)}};n[r]=a}return n}function ct(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function ut(e){return at(e,dt)}const dt={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ft(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=ht("(",ft(e.variableDefinitions,", "),")"),n=ft([e.operation,ft([e.name,t]),ft(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ht(" = ",n)+ht(" ",ft(r," "))},SelectionSet:{leave:({selections:e})=>pt(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=ht("",e,": ")+t;let s=o+ht("(",ft(n,", "),")");return s.length>80&&(s=o+ht("(\n",mt(ft(n,"\n")),"\n)")),ft([s,ft(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ht(" ",ft(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ft(["...",ht("on ",e),ft(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ht("(",ft(n,", "),")")} on ${t} ${ht("",ft(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?ue(e):`"${e.replace(rt,it)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ft(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ft(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ht("(",ft(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>ht("",e,"\n")+ft(["schema",ft(t," "),pt(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ht("",e,"\n")+ft(["scalar",t,ft(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ht("",e,"\n")+ft(["type",t,ht("implements ",ft(n," & ")),ft(r," "),pt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ht("",e,"\n")+t+(gt(n)?ht("(\n",mt(ft(n,"\n")),"\n)"):ht("(",ft(n,", "),")"))+": "+r+ht(" ",ft(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>ht("",e,"\n")+ft([t+": "+n,ht("= ",r),ft(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ht("",e,"\n")+ft(["interface",t,ht("implements ",ft(n," & ")),ft(r," "),pt(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ht("",e,"\n")+ft(["union",t,ft(n," "),ht("= ",ft(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>ht("",e,"\n")+ft(["enum",t,ft(n," "),pt(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ht("",e,"\n")+ft([t,ft(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>ht("",e,"\n")+ft(["input",t,ft(n," "),pt(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ht("",e,"\n")+"directive @"+t+(gt(n)?ht("(\n",mt(ft(n,"\n")),"\n)"):ht("(",ft(n,", "),")"))+(r?" repeatable":"")+" on "+ft(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ft(["extend schema",ft(e," "),pt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ft(["extend scalar",e,ft(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ft(["extend type",e,ht("implements ",ft(t," & ")),ft(n," "),pt(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ft(["extend interface",e,ht("implements ",ft(t," & ")),ft(n," "),pt(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ft(["extend union",e,ft(t," "),ht("= ",ft(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ft(["extend enum",e,ft(t," "),pt(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ft(["extend input",e,ft(t," "),pt(n)]," ")}};function ft(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function pt(e){return ht("{\n",mt(ft(e,"\n")),"\n}")}function ht(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function mt(e){return ht("  ",e.replace(/\n/g,"\n  "))}function gt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}function vt(e,t){switch(e.kind){case J.NULL:return null;case J.INT:return parseInt(e.value,10);case J.FLOAT:return parseFloat(e.value);case J.STRING:case J.ENUM:case J.BOOLEAN:return e.value;case J.LIST:return e.values.map((e=>vt(e,t)));case J.OBJECT:return Ge(e.fields,(e=>e.name.value),(e=>vt(e.value,t)));case J.VARIABLE:return null==t?void 0:t[e.name.value]}}function yt(e){if(null!=e||I(!1,"Must provide name."),"string"==typeof e||I(!1,"Expected name to be a string."),0===e.length)throw new B("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!se(e.charCodeAt(t)))throw new B(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!oe(e.charCodeAt(0)))throw new B(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function bt(e){if("true"===e||"false"===e||"null"===e)throw new B(`Enum values cannot be named: ${e}`);return yt(e)}function Et(e){return xt(e)||wt(e)||Ct(e)||kt(e)||_t(e)||Nt(e)||Dt(e)||At(e)}function xt(e){return Re(e,Gt)}function wt(e){return Re(e,Kt)}function Tt(e){if(!wt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL Object type.`);return e}function Ct(e){return Re(e,nn)}function St(e){if(!Ct(e))throw new Error(`Expected ${Le(e)} to be a GraphQL Interface type.`);return e}function kt(e){return Re(e,rn)}function _t(e){return Re(e,sn)}function Nt(e){return Re(e,cn)}function Dt(e){return Re(e,Pt)}function At(e){return Re(e,jt)}function It(e){return xt(e)||_t(e)||Nt(e)||Vt(e)&&It(e.ofType)}function Ot(e){return xt(e)||wt(e)||Ct(e)||kt(e)||_t(e)||Vt(e)&&Ot(e.ofType)}function Lt(e){return xt(e)||_t(e)}function Mt(e){return wt(e)||Ct(e)||kt(e)}function Rt(e){return Ct(e)||kt(e)}function Ft(e){if(!Rt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL abstract type.`);return e}class Pt{constructor(e){Et(e)||I(!1,`Expected ${Le(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class jt{constructor(e){Bt(e)||I(!1,`Expected ${Le(e)} to be a GraphQL nullable type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function Vt(e){return Dt(e)||At(e)}function Bt(e){return Et(e)&&!At(e)}function $t(e){if(!Bt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL nullable type.`);return e}function Ut(e){if(e)return At(e)?e.ofType:e}function Ht(e){return xt(e)||wt(e)||Ct(e)||kt(e)||_t(e)||Nt(e)}function qt(e){if(e){let t=e;for(;Vt(t);)t=t.ofType;return t}}function Wt(e){return"function"==typeof e?e():e}function zt(e){return"function"==typeof e?e():e}class Gt{constructor(e){var t,n,r,i;const o=null!==(t=e.parseValue)&&void 0!==t?t:We;this.name=yt(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:We,this.parseValue=o,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:(e,t)=>o(vt(e,t)),this.extensions=nt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(i=e.extensionASTNodes)&&void 0!==i?i:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||I(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${Le(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||I(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||I(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Kt{constructor(e){var t;this.name=yt(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=nt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=()=>Qt(e),this._interfaces=()=>Yt(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||I(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Le(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Zt(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Yt(e){var t;const n=Wt(null!==(t=e.interfaces)&&void 0!==t?t:[]);return Array.isArray(n)||I(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Qt(e){const t=zt(e.fields);return Jt(t)||I(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ke(t,((t,n)=>{var r;Jt(t)||I(!1,`${e.name}.${n} field config must be an object.`),null==t.resolve||"function"==typeof t.resolve||I(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${Le(t.resolve)}.`);const i=null!==(r=t.args)&&void 0!==r?r:{};return Jt(i)||I(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:yt(n),description:t.description,type:t.type,args:Xt(i),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:nt(t.extensions),astNode:t.astNode}}))}function Xt(e){return Object.entries(e).map((([e,t])=>({name:yt(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:nt(t.extensions),astNode:t.astNode})))}function Jt(e){return L(e)&&!Array.isArray(e)}function Zt(e){return Ke(e,(e=>({description:e.description,type:e.type,args:en(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function en(e){return Ge(e,(e=>e.name),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function tn(e){return At(e.type)&&void 0===e.defaultValue}class nn{constructor(e){var t;this.name=yt(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=nt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=Qt.bind(void 0,e),this._interfaces=Yt.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||I(!1,`${this.name} must provide "resolveType" as a function, but got: ${Le(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Zt(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class rn{constructor(e){var t;this.name=yt(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=nt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._types=on.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||I(!1,`${this.name} must provide "resolveType" as a function, but got: ${Le(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function on(e){const t=Wt(e.types);return Array.isArray(t)||I(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class sn{constructor(e){var t;this.name=yt(e.name),this.description=e.description,this.extensions=nt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._values="function"==typeof e.values?e.values:ln(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return"function"==typeof this._values&&(this._values=ln(this.name,this._values())),this._values}getValue(e){return null===this._nameLookup&&(this._nameLookup=ze(this.getValues(),(e=>e.name))),this._nameLookup[e]}serialize(e){null===this._valueLookup&&(this._valueLookup=new Map(this.getValues().map((e=>[e.value,e]))));const t=this._valueLookup.get(e);if(void 0===t)throw new B(`Enum "${this.name}" cannot represent value: ${Le(e)}`);return t.name}parseValue(e){if("string"!=typeof e){const t=Le(e);throw new B(`Enum "${this.name}" cannot represent non-string value: ${t}.`+an(this,t))}const t=this.getValue(e);if(null==t)throw new B(`Value "${e}" does not exist in "${this.name}" enum.`+an(this,e));return t.value}parseLiteral(e,t){if(e.kind!==J.ENUM){const t=ut(e);throw new B(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+an(this,t),{nodes:e})}const n=this.getValue(e.value);if(null==n){const t=ut(e);throw new B(`Value "${t}" does not exist in "${this.name}" enum.`+an(this,t),{nodes:e})}return n.value}toConfig(){const e=Ge(this.getValues(),(e=>e.name),(e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function an(e,t){return qe("the enum value",Ze(t,e.getValues().map((e=>e.name))))}function ln(e,t){return Jt(t)||I(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map((([t,n])=>(Jt(n)||I(!1,`${e}.${t} must refer to an object with a "value" key representing an internal value but got: ${Le(n)}.`),{name:bt(t),description:n.description,value:void 0!==n.value?n.value:t,deprecationReason:n.deprecationReason,extensions:nt(n.extensions),astNode:n.astNode})))}class cn{constructor(e){var t,n;this.name=yt(e.name),this.description=e.description,this.extensions=nt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this.isOneOf=null!==(n=e.isOneOf)&&void 0!==n&&n,this._fields=un.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=Ke(this.getFields(),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function un(e){const t=zt(e.fields);return Jt(t)||I(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ke(t,((t,n)=>(!("resolve"in t)||I(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:yt(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:nt(t.extensions),astNode:t.astNode})))}function dn(e){return At(e.type)&&void 0===e.defaultValue}function fn(e,t){return e===t||(At(e)&&At(t)||!(!Dt(e)||!Dt(t)))&&fn(e.ofType,t.ofType)}function pn(e,t,n){return t===n||(At(n)?!!At(t)&&pn(e,t.ofType,n.ofType):At(t)?pn(e,t.ofType,n):Dt(n)?!!Dt(t)&&pn(e,t.ofType,n.ofType):!Dt(t)&&(Rt(n)&&(Ct(t)||wt(t))&&e.isSubType(n,t)))}function hn(e,t,n){return t===n||(Rt(t)?Rt(n)?e.getPossibleTypes(t).some((t=>e.isSubType(n,t))):e.isSubType(t,n):!!Rt(n)&&e.isSubType(n,t))}const mn=2147483647,gn=-2147483648,vn=new Gt({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Cn(e);if("boolean"==typeof t)return t?1:0;let n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),"number"!=typeof n||!Number.isInteger(n))throw new B(`Int cannot represent non-integer value: ${Le(t)}`);if(n>mn||n<gn)throw new B("Int cannot represent non 32-bit signed integer value: "+Le(t));return n},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new B(`Int cannot represent non-integer value: ${Le(e)}`);if(e>mn||e<gn)throw new B(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==J.INT)throw new B(`Int cannot represent non-integer value: ${ut(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>mn||t<gn)throw new B(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),yn=new Gt({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=Cn(e);if("boolean"==typeof t)return t?1:0;let n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),"number"!=typeof n||!Number.isFinite(n))throw new B(`Float cannot represent non numeric value: ${Le(t)}`);return n},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new B(`Float cannot represent non numeric value: ${Le(e)}`);return e},parseLiteral(e){if(e.kind!==J.FLOAT&&e.kind!==J.INT)throw new B(`Float cannot represent non numeric value: ${ut(e)}`,e);return parseFloat(e.value)}}),bn=new Gt({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=Cn(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if("number"==typeof t&&Number.isFinite(t))return t.toString();throw new B(`String cannot represent value: ${Le(e)}`)},parseValue(e){if("string"!=typeof e)throw new B(`String cannot represent a non string value: ${Le(e)}`);return e},parseLiteral(e){if(e.kind!==J.STRING)throw new B(`String cannot represent a non string value: ${ut(e)}`,{nodes:e});return e.value}}),En=new Gt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=Cn(e);if("boolean"==typeof t)return t;if(Number.isFinite(t))return 0!==t;throw new B(`Boolean cannot represent a non boolean value: ${Le(t)}`)},parseValue(e){if("boolean"!=typeof e)throw new B(`Boolean cannot represent a non boolean value: ${Le(e)}`);return e},parseLiteral(e){if(e.kind!==J.BOOLEAN)throw new B(`Boolean cannot represent a non boolean value: ${ut(e)}`,{nodes:e});return e.value}}),xn=new Gt({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=Cn(e);if("string"==typeof t)return t;if(Number.isInteger(t))return String(t);throw new B(`ID cannot represent value: ${Le(e)}`)},parseValue(e){if("string"==typeof e)return e;if("number"==typeof e&&Number.isInteger(e))return e.toString();throw new B(`ID cannot represent value: ${Le(e)}`)},parseLiteral(e){if(e.kind!==J.STRING&&e.kind!==J.INT)throw new B("ID cannot represent a non-string and non-integer value: "+ut(e),{nodes:e});return e.value}}),wn=Object.freeze([bn,vn,yn,En,xn]);function Tn(e){return wn.some((({name:t})=>e.name===t))}function Cn(e){if(L(e)){if("function"==typeof e.valueOf){const t=e.valueOf();if(!L(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}function Sn(e){return Re(e,kn)}class kn{constructor(e){var t,n;this.name=yt(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(t=e.isRepeatable)&&void 0!==t&&t,this.extensions=nt(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||I(!1,`@${e.name} locations must be an Array.`);const r=null!==(n=e.args)&&void 0!==n?n:{};L(r)&&!Array.isArray(r)||I(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=Xt(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:en(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const _n=new kn({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Q.FIELD,Q.FRAGMENT_SPREAD,Q.INLINE_FRAGMENT],args:{if:{type:new jt(En),description:"Included when true."}}}),Nn=new kn({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Q.FIELD,Q.FRAGMENT_SPREAD,Q.INLINE_FRAGMENT],args:{if:{type:new jt(En),description:"Skipped when true."}}}),Dn="No longer supported",An=new kn({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Q.FIELD_DEFINITION,Q.ARGUMENT_DEFINITION,Q.INPUT_FIELD_DEFINITION,Q.ENUM_VALUE],args:{reason:{type:bn,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Dn}}}),In=new kn({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Q.SCALAR],args:{url:{type:new jt(bn),description:"The URL that specifies the behavior of this scalar."}}}),On=new kn({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Q.INPUT_OBJECT],args:{}}),Ln=Object.freeze([_n,Nn,An,In,On]);function Mn(e){return Ln.some((({name:t})=>t===e.name))}function Rn(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function Fn(e,t){if(At(t)){const n=Fn(e,t.ofType);return(null==n?void 0:n.kind)===J.NULL?null:n}if(null===e)return{kind:J.NULL};if(void 0===e)return null;if(Dt(t)){const n=t.ofType;if(Rn(e)){const t=[];for(const r of e){const e=Fn(r,n);null!=e&&t.push(e)}return{kind:J.LIST,values:t}}return Fn(e,n)}if(Nt(t)){if(!L(e))return null;const n=[];for(const r of Object.values(t.getFields())){const t=Fn(e[r.name],r.type);t&&n.push({kind:J.OBJECT_FIELD,name:{kind:J.NAME,value:r.name},value:t})}return{kind:J.OBJECT,fields:n}}if(Lt(t)){const n=t.serialize(e);if(null==n)return null;if("boolean"==typeof n)return{kind:J.BOOLEAN,value:n};if("number"==typeof n&&Number.isFinite(n)){const e=String(n);return Pn.test(e)?{kind:J.INT,value:e}:{kind:J.FLOAT,value:e}}if("string"==typeof n)return _t(t)?{kind:J.ENUM,value:n}:t===xn&&Pn.test(n)?{kind:J.INT,value:n}:{kind:J.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${Le(n)}.`)}M(!1,"Unexpected input type: "+Le(t))}const Pn=/^-?(?:0|[1-9][0-9]*)$/,jn=new Kt({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:bn,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new jt(new Pt(new jt($n))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new jt($n),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:$n,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:$n,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new jt(new Pt(new jt(Vn))),resolve:e=>e.getDirectives()}})}),Vn=new Kt({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new jt(bn),resolve:e=>e.name},description:{type:bn,resolve:e=>e.description},isRepeatable:{type:new jt(En),resolve:e=>e.isRepeatable},locations:{type:new jt(new Pt(new jt(Bn))),resolve:e=>e.locations},args:{type:new jt(new Pt(new jt(Hn))),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))}})}),Bn=new sn({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:Q.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Q.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Q.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Q.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Q.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Q.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Q.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Q.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Q.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Q.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Q.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Q.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Q.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Q.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Q.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Q.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Q.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Q.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Q.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),$n=new Kt({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new jt(Gn),resolve:e=>xt(e)?Wn.SCALAR:wt(e)?Wn.OBJECT:Ct(e)?Wn.INTERFACE:kt(e)?Wn.UNION:_t(e)?Wn.ENUM:Nt(e)?Wn.INPUT_OBJECT:Dt(e)?Wn.LIST:At(e)?Wn.NON_NULL:void M(!1,`Unexpected type: "${Le(e)}".`)},name:{type:bn,resolve:e=>"name"in e?e.name:void 0},description:{type:bn,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:bn,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Pt(new jt(Un)),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(wt(e)||Ct(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},interfaces:{type:new Pt(new jt($n)),resolve(e){if(wt(e)||Ct(e))return e.getInterfaces()}},possibleTypes:{type:new Pt(new jt($n)),resolve(e,t,n,{schema:r}){if(Rt(e))return r.getPossibleTypes(e)}},enumValues:{type:new Pt(new jt(qn)),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(_t(e)){const n=e.getValues();return t?n:n.filter((e=>null==e.deprecationReason))}}},inputFields:{type:new Pt(new jt(Hn)),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Nt(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},ofType:{type:$n,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:En,resolve:e=>{if(Nt(e))return e.isOneOf}}})}),Un=new Kt({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new jt(bn),resolve:e=>e.name},description:{type:bn,resolve:e=>e.description},args:{type:new jt(new Pt(new jt(Hn))),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))},type:{type:new jt($n),resolve:e=>e.type},isDeprecated:{type:new jt(En),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:bn,resolve:e=>e.deprecationReason}})}),Hn=new Kt({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new jt(bn),resolve:e=>e.name},description:{type:bn,resolve:e=>e.description},type:{type:new jt($n),resolve:e=>e.type},defaultValue:{type:bn,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=Fn(n,t);return r?ut(r):null}},isDeprecated:{type:new jt(En),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:bn,resolve:e=>e.deprecationReason}})}),qn=new Kt({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new jt(bn),resolve:e=>e.name},description:{type:bn,resolve:e=>e.description},isDeprecated:{type:new jt(En),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:bn,resolve:e=>e.deprecationReason}})});var Wn,zn;(zn=Wn||(Wn={})).SCALAR="SCALAR",zn.OBJECT="OBJECT",zn.INTERFACE="INTERFACE",zn.UNION="UNION",zn.ENUM="ENUM",zn.INPUT_OBJECT="INPUT_OBJECT",zn.LIST="LIST",zn.NON_NULL="NON_NULL";const Gn=new sn({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Wn.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Wn.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Wn.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Wn.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Wn.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Wn.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Wn.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Wn.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Kn={name:"__schema",type:new jt(jn),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Yn={name:"__type",type:$n,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new jt(bn),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Qn={name:"__typename",type:new jt(bn),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Xn=Object.freeze([jn,Vn,Bn,$n,Un,Hn,qn,Gn]);function Jn(e){return Xn.some((({name:t})=>e.name===t))}function Zn(e){return Re(e,tr)}function er(e){if(!Zn(e))throw new Error(`Expected ${Le(e)} to be a GraphQL schema.`);return e}class tr{constructor(e){var t,n;this.__validationErrors=!0===e.assumeValid?[]:void 0,L(e)||I(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||I(!1,`"types" must be Array if provided but got: ${Le(e.types)}.`),!e.directives||Array.isArray(e.directives)||I(!1,`"directives" must be Array if provided but got: ${Le(e.directives)}.`),this.description=e.description,this.extensions=nt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!==(n=e.directives)&&void 0!==n?n:Ln;const r=new Set(e.types);if(null!=e.types)for(const i of e.types)r.delete(i),nr(i,r);null!=this._queryType&&nr(this._queryType,r),null!=this._mutationType&&nr(this._mutationType,r),null!=this._subscriptionType&&nr(this._subscriptionType,r);for(const i of this._directives)if(Sn(i))for(const e of i.args)nr(e.type,r);nr(jn,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const i of r){if(null==i)continue;const e=i.name;if(e||I(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[e])throw new Error(`Schema must contain uniquely named types but contains multiple types named "${e}".`);if(this._typeMap[e]=i,Ct(i)){for(const t of i.getInterfaces())if(Ct(t)){let e=this._implementationsMap[t.name];void 0===e&&(e=this._implementationsMap[t.name]={objects:[],interfaces:[]}),e.interfaces.push(i)}}else if(wt(i))for(const t of i.getInterfaces())if(Ct(t)){let e=this._implementationsMap[t.name];void 0===e&&(e=this._implementationsMap[t.name]={objects:[],interfaces:[]}),e.objects.push(i)}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case K.QUERY:return this.getQueryType();case K.MUTATION:return this.getMutationType();case K.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return kt(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const t=this._implementationsMap[e.name];return null!=t?t:{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap[e.name];if(void 0===n){if(n=Object.create(null),kt(e))for(const t of e.getTypes())n[t.name]=!0;else{const t=this.getImplementations(e);for(const e of t.objects)n[e.name]=!0;for(const e of t.interfaces)n[e.name]=!0}this._subTypeMap[e.name]=n}return void 0!==n[t.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find((t=>t.name===e))}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function nr(e,t){const n=qt(e);if(!t.has(n))if(t.add(n),kt(n))for(const r of n.getTypes())nr(r,t);else if(wt(n)||Ct(n)){for(const e of n.getInterfaces())nr(e,t);for(const e of Object.values(n.getFields())){nr(e.type,t);for(const n of e.args)nr(n.type,t)}}else if(Nt(n))for(const r of Object.values(n.getFields()))nr(r.type,t);return t}function rr(e){if(er(e),e.__validationErrors)return e.__validationErrors;const t=new or(e);!function(e){const t=e.schema,n=t.getQueryType();if(n){if(!wt(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${Le(n)}.`,null!==(r=sr(t,K.QUERY))&&void 0!==r?r:n.astNode)}}else e.reportError("Query root type must be provided.",t.astNode);const i=t.getMutationType();var o;i&&!wt(i)&&e.reportError(`Mutation root type must be Object type if provided, it cannot be ${Le(i)}.`,null!==(o=sr(t,K.MUTATION))&&void 0!==o?o:i.astNode);const s=t.getSubscriptionType();var a;s&&!wt(s)&&e.reportError(`Subscription root type must be Object type if provided, it cannot be ${Le(s)}.`,null!==(a=sr(t,K.SUBSCRIPTION))&&void 0!==a?a:s.astNode)}(t),function(e){for(const n of e.schema.getDirectives())if(Sn(n)){ar(e,n),0===n.locations.length&&e.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(const r of n.args){var t;if(ar(e,r),It(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${Le(r.type)}.`,r.astNode),tn(r)&&null!=r.deprecationReason)e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[yr(r.astNode),null===(t=r.astNode)||void 0===t?void 0:t.type])}}else e.reportError(`Expected directive but got: ${Le(n)}.`,null==n?void 0:n.astNode)}(t),function(e){const t=function(e){const t=Object.create(null),n=[],r=Object.create(null);return i;function i(o){if(t[o.name])return;t[o.name]=!0,r[o.name]=n.length;const s=Object.values(o.getFields());for(const t of s)if(At(t.type)&&Nt(t.type.ofType)){const o=t.type.ofType,s=r[o.name];if(n.push(t),void 0===s)i(o);else{const t=n.slice(s),r=t.map((e=>e.name)).join(".");e.reportError(`Cannot reference Input Object "${o.name}" within itself through a series of non-null fields: "${r}".`,t.map((e=>e.astNode)))}n.pop()}r[o.name]=void 0}}(e),n=e.schema.getTypeMap();for(const r of Object.values(n))Ht(r)?(Jn(r)||ar(e,r),wt(r)||Ct(r)?(lr(e,r),cr(e,r)):kt(r)?fr(e,r):_t(r)?pr(e,r):Nt(r)&&(hr(e,r),t(r))):e.reportError(`Expected GraphQL named type but got: ${Le(r)}.`,r.astNode)}(t);const n=t.getErrors();return e.__validationErrors=n,n}function ir(e){const t=rr(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}class or{constructor(e){this._errors=[],this.schema=e}reportError(e,t){const n=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new B(e,{nodes:n}))}getErrors(){return this._errors}}function sr(e,t){var n;return null===(n=[e.astNode,...e.extensionASTNodes].flatMap((e=>{var t;return null!==(t=null==e?void 0:e.operationTypes)&&void 0!==t?t:[]})).find((e=>e.operation===t)))||void 0===n?void 0:n.type}function ar(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function lr(e,t){const n=Object.values(t.getFields());0===n.length&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of n){var r;if(ar(e,s),!Ot(s.type))e.reportError(`The type of ${t.name}.${s.name} must be Output Type but got: ${Le(s.type)}.`,null===(r=s.astNode)||void 0===r?void 0:r.type);for(const n of s.args){const r=n.name;var i,o;if(ar(e,n),!It(n.type))e.reportError(`The type of ${t.name}.${s.name}(${r}:) must be Input Type but got: ${Le(n.type)}.`,null===(i=n.astNode)||void 0===i?void 0:i.type);if(tn(n)&&null!=n.deprecationReason)e.reportError(`Required argument ${t.name}.${s.name}(${r}:) cannot be deprecated.`,[yr(n.astNode),null===(o=n.astNode)||void 0===o?void 0:o.type])}}}function cr(e,t){const n=Object.create(null);for(const r of t.getInterfaces())Ct(r)?t!==r?n[r.name]?e.reportError(`Type ${t.name} can only implement ${r.name} once.`,gr(t,r)):(n[r.name]=!0,dr(e,t,r),ur(e,t,r)):e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,gr(t,r)):e.reportError(`Type ${Le(t)} must only implement Interface types, it cannot implement ${Le(r)}.`,gr(t,r))}function ur(e,t,n){const r=t.getFields();for(const l of Object.values(n.getFields())){const c=l.name,u=r[c];if(u){var i,o;if(!pn(e.schema,u.type,l.type))e.reportError(`Interface field ${n.name}.${c} expects type ${Le(l.type)} but ${t.name}.${c} is type ${Le(u.type)}.`,[null===(i=l.astNode)||void 0===i?void 0:i.type,null===(o=u.astNode)||void 0===o?void 0:o.type]);for(const r of l.args){const i=r.name,o=u.args.find((e=>e.name===i));var s,a;if(o){if(!fn(r.type,o.type))e.reportError(`Interface field argument ${n.name}.${c}(${i}:) expects type ${Le(r.type)} but ${t.name}.${c}(${i}:) is type ${Le(o.type)}.`,[null===(s=r.astNode)||void 0===s?void 0:s.type,null===(a=o.astNode)||void 0===a?void 0:a.type])}else e.reportError(`Interface field argument ${n.name}.${c}(${i}:) expected but ${t.name}.${c} does not provide it.`,[r.astNode,u.astNode])}for(const r of u.args){const i=r.name;!l.args.find((e=>e.name===i))&&tn(r)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${i} that is missing from the Interface field ${n.name}.${c}.`,[r.astNode,l.astNode])}}else e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes])}}function dr(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...gr(n,i),...gr(t,n)])}function fr(e,t){const n=t.getTypes();0===n.length&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n)r[i.name]?e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,vr(t,i.name)):(r[i.name]=!0,wt(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${Le(i)}.`,vr(t,String(i))))}function pr(e,t){const n=t.getValues();0===n.length&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)ar(e,r)}function hr(e,t){const n=Object.values(t.getFields());0===n.length&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){var r,i;if(ar(e,o),!It(o.type))e.reportError(`The type of ${t.name}.${o.name} must be Input Type but got: ${Le(o.type)}.`,null===(r=o.astNode)||void 0===r?void 0:r.type);if(dn(o)&&null!=o.deprecationReason)e.reportError(`Required input field ${t.name}.${o.name} cannot be deprecated.`,[yr(o.astNode),null===(i=o.astNode)||void 0===i?void 0:i.type]);t.isOneOf&&mr(t,o,e)}}function mr(e,t,n){var r;At(t.type)&&n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,null===(r=t.astNode)||void 0===r?void 0:r.type);void 0!==t.defaultValue&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function gr(e,t){const{astNode:n,extensionASTNodes:r}=e;return(null!=n?[n,...r]:r).flatMap((e=>{var t;return null!==(t=e.interfaces)&&void 0!==t?t:[]})).filter((e=>e.name.value===t.name))}function vr(e,t){const{astNode:n,extensionASTNodes:r}=e;return(null!=n?[n,...r]:r).flatMap((e=>{var t;return null!==(t=e.types)&&void 0!==t?t:[]})).filter((e=>e.name.value===t))}function yr(e){var t;return null==e||null===(t=e.directives)||void 0===t?void 0:t.find((e=>e.name.value===An.name))}function br(e,t){switch(t.kind){case J.LIST_TYPE:{const n=br(e,t.type);return n&&new Pt(n)}case J.NON_NULL_TYPE:{const n=br(e,t.type);return n&&new jt(n)}case J.NAMED_TYPE:return e.getType(t.name.value)}}class Er{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=n?n:xr,t&&(It(t)&&this._inputTypeStack.push(t),Mt(t)&&this._parentTypeStack.push(t),Ot(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case J.SELECTION_SET:{const e=qt(this.getType());this._parentTypeStack.push(Mt(e)?e:void 0);break}case J.FIELD:{const n=this.getParentType();let r,i;n&&(r=this._getFieldDef(t,n,e),r&&(i=r.type)),this._fieldDefStack.push(r),this._typeStack.push(Ot(i)?i:void 0);break}case J.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case J.OPERATION_DEFINITION:{const n=t.getRootType(e.operation);this._typeStack.push(wt(n)?n:void 0);break}case J.INLINE_FRAGMENT:case J.FRAGMENT_DEFINITION:{const n=e.typeCondition,r=n?br(t,n):qt(this.getType());this._typeStack.push(Ot(r)?r:void 0);break}case J.VARIABLE_DEFINITION:{const n=br(t,e.type);this._inputTypeStack.push(It(n)?n:void 0);break}case J.ARGUMENT:{var n;let t,r;const i=null!==(n=this.getDirective())&&void 0!==n?n:this.getFieldDef();i&&(t=i.args.find((t=>t.name===e.name.value)),t&&(r=t.type)),this._argument=t,this._defaultValueStack.push(t?t.defaultValue:void 0),this._inputTypeStack.push(It(r)?r:void 0);break}case J.LIST:{const e=Ut(this.getInputType()),t=Dt(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(It(t)?t:void 0);break}case J.OBJECT_FIELD:{const t=qt(this.getInputType());let n,r;Nt(t)&&(r=t.getFields()[e.name.value],r&&(n=r.type)),this._defaultValueStack.push(r?r.defaultValue:void 0),this._inputTypeStack.push(It(n)?n:void 0);break}case J.ENUM:{const t=qt(this.getInputType());let n;_t(t)&&(n=t.getValue(e.value)),this._enumValue=n;break}}}leave(e){switch(e.kind){case J.SELECTION_SET:this._parentTypeStack.pop();break;case J.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case J.DIRECTIVE:this._directive=null;break;case J.OPERATION_DEFINITION:case J.INLINE_FRAGMENT:case J.FRAGMENT_DEFINITION:this._typeStack.pop();break;case J.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case J.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case J.LIST:case J.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case J.ENUM:this._enumValue=null}}}function xr(e,t,n){const r=n.name.value;return r===Kn.name&&e.getQueryType()===t?Kn:r===Yn.name&&e.getQueryType()===t?Yn:r===Qn.name&&Mt(t)?Qn:wt(t)||Ct(t)?t.getFields()[r]:void 0}function wr(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=ct(t,r.kind).enter;if(i){const o=i.apply(t,n);return void 0!==o&&(e.leave(r),G(o)&&e.enter(o)),o}},leave(...n){const r=n[0],i=ct(t,r.kind).leave;let o;return i&&(o=i.apply(t,n)),e.leave(r),o}}}function Tr(e){return e.kind===J.OPERATION_DEFINITION||e.kind===J.FRAGMENT_DEFINITION}function Cr(e){return e.kind===J.VARIABLE||e.kind===J.INT||e.kind===J.FLOAT||e.kind===J.STRING||e.kind===J.BOOLEAN||e.kind===J.NULL||e.kind===J.ENUM||e.kind===J.LIST||e.kind===J.OBJECT}function Sr(e){return e.kind===J.SCHEMA_DEFINITION||kr(e)||e.kind===J.DIRECTIVE_DEFINITION}function kr(e){return e.kind===J.SCALAR_TYPE_DEFINITION||e.kind===J.OBJECT_TYPE_DEFINITION||e.kind===J.INTERFACE_TYPE_DEFINITION||e.kind===J.UNION_TYPE_DEFINITION||e.kind===J.ENUM_TYPE_DEFINITION||e.kind===J.INPUT_OBJECT_TYPE_DEFINITION}function _r(e){return e.kind===J.SCHEMA_EXTENSION||Nr(e)}function Nr(e){return e.kind===J.SCALAR_TYPE_EXTENSION||e.kind===J.OBJECT_TYPE_EXTENSION||e.kind===J.INTERFACE_TYPE_EXTENSION||e.kind===J.UNION_TYPE_EXTENSION||e.kind===J.ENUM_TYPE_EXTENSION||e.kind===J.INPUT_OBJECT_TYPE_EXTENSION}function Dr(e){return{Document(t){for(const n of t.definitions)if(!Tr(n)){const t=n.kind===J.SCHEMA_DEFINITION||n.kind===J.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new B(`The ${t} definition is not executable.`,{nodes:n}))}return!1}}}function Ar(e){return{Field(t){const n=e.getParentType();if(n){if(!e.getFieldDef()){const r=e.getSchema(),i=t.name.value;let o=qe("to use an inline fragment on",function(e,t,n){if(!Rt(t))return[];const r=new Set,i=Object.create(null);for(const s of e.getPossibleTypes(t))if(s.getFields()[n]){r.add(s),i[s.name]=1;for(const e of s.getInterfaces()){var o;e.getFields()[n]&&(r.add(e),i[e.name]=(null!==(o=i[e.name])&&void 0!==o?o:0)+1)}}return[...r].sort(((t,n)=>{const r=i[n.name]-i[t.name];return 0!==r?r:Ct(t)&&e.isSubType(t,n)?-1:Ct(n)&&e.isSubType(n,t)?1:Ye(t.name,n.name)})).map((e=>e.name))}(r,n,i));""===o&&(o=qe(function(e,t){if(wt(e)||Ct(e)){return Ze(t,Object.keys(e.getFields()))}return[]}(n,i))),e.reportError(new B(`Cannot query field "${i}" on type "${n.name}".`+o,{nodes:t}))}}}}}function Ir(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const t=br(e.getSchema(),n);if(t&&!Mt(t)){const t=ut(n);e.reportError(new B(`Fragment cannot condition on non composite type "${t}".`,{nodes:n}))}}},FragmentDefinition(t){const n=br(e.getSchema(),t.typeCondition);if(n&&!Mt(n)){const n=ut(t.typeCondition);e.reportError(new B(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}function Or(e){return{...Lr(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const n=t.name.value,o=Ze(n,r.args.map((e=>e.name)));e.reportError(new B(`Unknown argument "${n}" on field "${i.name}.${r.name}".`+qe(o),{nodes:t}))}}}}function Lr(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Ln;for(const s of r)t[s.name]=s.args.map((e=>e.name));const i=e.getDocument().definitions;for(const s of i)if(s.kind===J.DIRECTIVE_DEFINITION){var o;const e=null!==(o=s.arguments)&&void 0!==o?o:[];t[s.name.value]=e.map((e=>e.name.value))}return{Directive(n){const r=n.name.value,i=t[r];if(n.arguments&&i)for(const t of n.arguments){const n=t.name.value;if(!i.includes(n)){const o=Ze(n,i);e.reportError(new B(`Unknown argument "${n}" on directive "@${r}".`+qe(o),{nodes:t}))}}return!1}}}function Mr(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Ln;for(const o of r)t[o.name]=o.locations;const i=e.getDocument().definitions;for(const o of i)o.kind===J.DIRECTIVE_DEFINITION&&(t[o.name.value]=o.locations.map((e=>e.value)));return{Directive(n,r,i,o,s){const a=n.name.value,l=t[a];if(!l)return void e.reportError(new B(`Unknown directive "@${a}".`,{nodes:n}));const c=function(e){const t=e[e.length-1];switch("kind"in t||M(!1),t.kind){case J.OPERATION_DEFINITION:return function(e){switch(e){case K.QUERY:return Q.QUERY;case K.MUTATION:return Q.MUTATION;case K.SUBSCRIPTION:return Q.SUBSCRIPTION}}(t.operation);case J.FIELD:return Q.FIELD;case J.FRAGMENT_SPREAD:return Q.FRAGMENT_SPREAD;case J.INLINE_FRAGMENT:return Q.INLINE_FRAGMENT;case J.FRAGMENT_DEFINITION:return Q.FRAGMENT_DEFINITION;case J.VARIABLE_DEFINITION:return Q.VARIABLE_DEFINITION;case J.SCHEMA_DEFINITION:case J.SCHEMA_EXTENSION:return Q.SCHEMA;case J.SCALAR_TYPE_DEFINITION:case J.SCALAR_TYPE_EXTENSION:return Q.SCALAR;case J.OBJECT_TYPE_DEFINITION:case J.OBJECT_TYPE_EXTENSION:return Q.OBJECT;case J.FIELD_DEFINITION:return Q.FIELD_DEFINITION;case J.INTERFACE_TYPE_DEFINITION:case J.INTERFACE_TYPE_EXTENSION:return Q.INTERFACE;case J.UNION_TYPE_DEFINITION:case J.UNION_TYPE_EXTENSION:return Q.UNION;case J.ENUM_TYPE_DEFINITION:case J.ENUM_TYPE_EXTENSION:return Q.ENUM;case J.ENUM_VALUE_DEFINITION:return Q.ENUM_VALUE;case J.INPUT_OBJECT_TYPE_DEFINITION:case J.INPUT_OBJECT_TYPE_EXTENSION:return Q.INPUT_OBJECT;case J.INPUT_VALUE_DEFINITION:{const t=e[e.length-3];return"kind"in t||M(!1),t.kind===J.INPUT_OBJECT_TYPE_DEFINITION?Q.INPUT_FIELD_DEFINITION:Q.ARGUMENT_DEFINITION}default:M(!1,"Unexpected kind: "+Le(t.kind))}}(s);c&&!l.includes(c)&&e.reportError(new B(`Directive "@${a}" may not be used on ${c}.`,{nodes:n}))}}}function Rr(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new B(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function Fr(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const o of e.getDocument().definitions)kr(o)&&(r[o.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(t,o,s,a,l){const c=t.name.value;if(!n[c]&&!r[c]){var u;const n=null!==(u=l[2])&&void 0!==u?u:s,r=null!=n&&("kind"in(d=n)&&(Sr(d)||_r(d)));if(r&&Pr.includes(c))return;const o=Ze(c,r?Pr.concat(i):i);e.reportError(new B(`Unknown type "${c}".`+qe(o),{nodes:t}))}var d}}}const Pr=[...wn,...Xn].map((e=>e.name));function jr(e){let t=0;return{Document(e){t=e.definitions.filter((e=>e.kind===J.OPERATION_DEFINITION)).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new B("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function Vr(e){var t,n,r;const i=e.getSchema(),o=null!==(t=null!==(n=null!==(r=null==i?void 0:i.astNode)&&void 0!==r?r:null==i?void 0:i.getQueryType())&&void 0!==n?n:null==i?void 0:i.getMutationType())&&void 0!==t?t:null==i?void 0:i.getSubscriptionType();let s=0;return{SchemaDefinition(t){o?e.reportError(new B("Cannot define a new schema within a schema extension.",{nodes:t})):(s>0&&e.reportError(new B("Must provide only one schema definition.",{nodes:t})),++s)}}}function Br(e){function t(n,r=Object.create(null),i=0){if(n.kind===J.FRAGMENT_SPREAD){const o=n.name.value;if(!0===r[o])return!1;const s=e.getFragment(o);if(!s)return!1;try{return r[o]=!0,t(s,r,i)}finally{r[o]=void 0}}if(n.kind===J.FIELD&&("fields"===n.name.value||"interfaces"===n.name.value||"possibleTypes"===n.name.value||"inputFields"===n.name.value)&&++i>=3)return!0;if("selectionSet"in n&&n.selectionSet)for(const e of n.selectionSet.selections)if(t(e,r,i))return!0;return!1}return{Field(n){if(("__schema"===n.name.value||"__type"===n.name.value)&&t(n))return e.reportError(new B("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function $r(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(i(e),!1)};function i(o){if(t[o.name.value])return;const s=o.name.value;t[s]=!0;const a=e.getFragmentSpreads(o.selectionSet);if(0!==a.length){r[s]=n.length;for(const t of a){const o=t.name.value,s=r[o];if(n.push(t),void 0===s){const t=e.getFragment(o);t&&i(t)}else{const t=n.slice(s),r=t.slice(0,-1).map((e=>'"'+e.name.value+'"')).join(", ");e.reportError(new B(`Cannot spread fragment "${o}" within itself`+(""!==r?` via ${r}.`:"."),{nodes:t}))}n.pop()}r[s]=void 0}}}function Ur(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const r=i.name.value;!0!==t[r]&&e.reportError(new B(n.name?`Variable "$${r}" is not defined by operation "${n.name.value}".`:`Variable "$${r}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(e){t[e.variable.name.value]=!0}}}function Hr(e){const t=[],n=[];return{OperationDefinition:e=>(t.push(e),!1),FragmentDefinition:e=>(n.push(e),!1),Document:{leave(){const r=Object.create(null);for(const n of t)for(const t of e.getRecursivelyReferencedFragments(n))r[t.name.value]=!0;for(const t of n){const n=t.name.value;!0!==r[n]&&e.reportError(new B(`Fragment "${n}" is never used.`,{nodes:t}))}}}}}function qr(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:e}of i)r[e.name.value]=!0;for(const o of t){const t=o.variable.name.value;!0!==r[t]&&e.reportError(new B(n.name?`Variable "$${t}" is never used in operation "${n.name.value}".`:`Variable "$${t}" is never used.`,{nodes:o}))}}},VariableDefinition(e){t.push(e)}}}function Wr(e){switch(e.kind){case J.OBJECT:return{...e,fields:(t=e.fields,t.map((e=>({...e,value:Wr(e.value)}))).sort(((e,t)=>Ye(e.name.value,t.name.value))))};case J.LIST:return{...e,values:e.values.map(Wr)};case J.INT:case J.FLOAT:case J.STRING:case J.BOOLEAN:case J.NULL:case J.ENUM:case J.VARIABLE:return e}var t}function zr(e){return Array.isArray(e)?e.map((([e,t])=>`subfields "${e}" conflict because `+zr(t))).join(" and "):e}function Gr(e){const t=new ri,n=new ii,r=new Map;return{SelectionSet(i){const o=function(e,t,n,r,i,o){const s=[],[a,l]=ei(e,t,i,o);if(function(e,t,n,r,i,o){for(const[s,a]of Object.entries(o))if(a.length>1)for(let o=0;o<a.length;o++)for(let l=o+1;l<a.length;l++){const c=Xr(e,n,r,i,!1,s,a[o],a[l]);c&&t.push(c)}}(e,s,t,n,r,a),0!==l.length)for(let c=0;c<l.length;c++){Kr(e,s,t,n,r,!1,a,l[c]);for(let i=c+1;i<l.length;i++)Yr(e,s,t,n,r,!1,l[c],l[i])}return s}(e,r,t,n,e.getParentType(),i);for(const[[t,n],r,s]of o){const i=zr(n);e.reportError(new B(`Fields "${t}" conflict because ${i}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:r.concat(s)}))}}}}function Kr(e,t,n,r,i,o,s,a){if(r.has(s,a,o))return;r.add(s,a,o);const l=e.getFragment(a);if(!l)return;const[c,u]=ti(e,n,l);if(s!==c){Qr(e,t,n,r,i,o,s,c);for(const a of u)Kr(e,t,n,r,i,o,s,a)}}function Yr(e,t,n,r,i,o,s,a){if(s===a)return;if(i.has(s,a,o))return;i.add(s,a,o);const l=e.getFragment(s),c=e.getFragment(a);if(!l||!c)return;const[u,d]=ti(e,n,l),[f,p]=ti(e,n,c);Qr(e,t,n,r,i,o,u,f);for(const h of p)Yr(e,t,n,r,i,o,s,h);for(const h of d)Yr(e,t,n,r,i,o,h,a)}function Qr(e,t,n,r,i,o,s,a){for(const[l,c]of Object.entries(s)){const s=a[l];if(s)for(const a of c)for(const c of s){const s=Xr(e,n,r,i,o,l,a,c);s&&t.push(s)}}}function Xr(e,t,n,r,i,o,s,a){const[l,c,u]=s,[d,f,p]=a,h=i||l!==d&&wt(l)&&wt(d);if(!h){const e=c.name.value,t=f.name.value;if(e!==t)return[[o,`"${e}" and "${t}" are different fields`],[c],[f]];if(!function(e,t){const n=e.arguments,r=t.arguments;if(void 0===n||0===n.length)return void 0===r||0===r.length;if(void 0===r||0===r.length)return!1;if(n.length!==r.length)return!1;const i=new Map(r.map((({name:e,value:t})=>[e.value,t])));return n.every((e=>{const t=e.value,n=i.get(e.name.value);return void 0!==n&&Jr(t)===Jr(n)}))}(c,f))return[[o,"they have differing arguments"],[c],[f]]}const m=null==u?void 0:u.type,g=null==p?void 0:p.type;if(m&&g&&Zr(m,g))return[[o,`they return conflicting types "${Le(m)}" and "${Le(g)}"`],[c],[f]];const v=c.selectionSet,y=f.selectionSet;if(v&&y){const i=function(e,t,n,r,i,o,s,a,l){const c=[],[u,d]=ei(e,t,o,s),[f,p]=ei(e,t,a,l);Qr(e,c,t,n,r,i,u,f);for(const h of p)Kr(e,c,t,n,r,i,u,h);for(const h of d)Kr(e,c,t,n,r,i,f,h);for(const h of d)for(const o of p)Yr(e,c,t,n,r,i,h,o);return c}(e,t,n,r,h,qt(m),v,qt(g),y);return function(e,t,n,r){if(e.length>0)return[[t,e.map((([e])=>e))],[n,...e.map((([,e])=>e)).flat()],[r,...e.map((([,,e])=>e)).flat()]]}(i,o,c,f)}}function Jr(e){return ut(Wr(e))}function Zr(e,t){return Dt(e)?!Dt(t)||Zr(e.ofType,t.ofType):!!Dt(t)||(At(e)?!At(t)||Zr(e.ofType,t.ofType):!!At(t)||!(!Lt(e)&&!Lt(t))&&e!==t)}function ei(e,t,n,r){const i=t.get(r);if(i)return i;const o=Object.create(null),s=Object.create(null);ni(e,n,r,o,s);const a=[o,Object.keys(s)];return t.set(r,a),a}function ti(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=br(e.getSchema(),n.typeCondition);return ei(e,t,i,n.selectionSet)}function ni(e,t,n,r,i){for(const o of n.selections)switch(o.kind){case J.FIELD:{const e=o.name.value;let n;(wt(t)||Ct(t))&&(n=t.getFields()[e]);const i=o.alias?o.alias.value:e;r[i]||(r[i]=[]),r[i].push([t,o,n]);break}case J.FRAGMENT_SPREAD:i[o.name.value]=!0;break;case J.INLINE_FRAGMENT:{const n=o.typeCondition,s=n?br(e.getSchema(),n):t;ni(e,s,o.selectionSet,r,i);break}}}class ri{constructor(){this._data=new Map}has(e,t,n){var r;const i=null===(r=this._data.get(e))||void 0===r?void 0:r.get(t);return void 0!==i&&(!!n||n===i)}add(e,t,n){const r=this._data.get(e);void 0===r?this._data.set(e,new Map([[t,n]])):r.set(t,n)}}class ii{constructor(){this._orderedPairSet=new ri}has(e,t,n){return e<t?this._orderedPairSet.has(e,t,n):this._orderedPairSet.has(t,e,n)}add(e,t,n){e<t?this._orderedPairSet.add(e,t,n):this._orderedPairSet.add(t,e,n)}}function oi(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(Mt(n)&&Mt(r)&&!hn(e.getSchema(),n,r)){const i=Le(r),o=Le(n);e.reportError(new B(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${o}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=function(e,t){const n=e.getFragment(t);if(n){const t=br(e.getSchema(),n.typeCondition);if(Mt(t))return t}}(e,n),i=e.getParentType();if(r&&i&&!hn(e.getSchema(),r,i)){const o=Le(i),s=Le(r);e.reportError(new B(`Fragment "${n}" cannot be spread here as objects of type "${o}" can never be of type "${s}".`,{nodes:t}))}}}}function si(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)kr(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(r){const i=r.name.value,o=n[i],s=null==t?void 0:t.getType(i);let a;if(o?a=ai[o.kind]:s&&(a=function(e){if(xt(e))return J.SCALAR_TYPE_EXTENSION;if(wt(e))return J.OBJECT_TYPE_EXTENSION;if(Ct(e))return J.INTERFACE_TYPE_EXTENSION;if(kt(e))return J.UNION_TYPE_EXTENSION;if(_t(e))return J.ENUM_TYPE_EXTENSION;if(Nt(e))return J.INPUT_OBJECT_TYPE_EXTENSION;M(!1,"Unexpected type: "+Le(e))}(s)),a){if(a!==r.kind){const t=function(e){switch(e){case J.SCALAR_TYPE_EXTENSION:return"scalar";case J.OBJECT_TYPE_EXTENSION:return"object";case J.INTERFACE_TYPE_EXTENSION:return"interface";case J.UNION_TYPE_EXTENSION:return"union";case J.ENUM_TYPE_EXTENSION:return"enum";case J.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:M(!1,"Unexpected kind: "+Le(e))}}(r.kind);e.reportError(new B(`Cannot extend non-${t} type "${i}".`,{nodes:o?[o,r]:r}))}}else{const o=Ze(i,Object.keys({...n,...null==t?void 0:t.getTypeMap()}));e.reportError(new B(`Cannot extend type "${i}" because it is not defined.`+qe(o),{nodes:r.name}))}}}const ai={[J.SCALAR_TYPE_DEFINITION]:J.SCALAR_TYPE_EXTENSION,[J.OBJECT_TYPE_DEFINITION]:J.OBJECT_TYPE_EXTENSION,[J.INTERFACE_TYPE_DEFINITION]:J.INTERFACE_TYPE_EXTENSION,[J.UNION_TYPE_DEFINITION]:J.UNION_TYPE_EXTENSION,[J.ENUM_TYPE_DEFINITION]:J.ENUM_TYPE_EXTENSION,[J.INPUT_OBJECT_TYPE_DEFINITION]:J.INPUT_OBJECT_TYPE_EXTENSION};function li(e){return{...ci(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set(null===(n=t.arguments)||void 0===n?void 0:n.map((e=>e.name.value)));for(const o of r.args)if(!i.has(o.name)&&tn(o)){const n=Le(o.type);e.reportError(new B(`Field "${r.name}" argument "${o.name}" of type "${n}" is required, but it was not provided.`,{nodes:t}))}}}}}function ci(e){var t;const n=Object.create(null),r=e.getSchema(),i=null!==(t=null==r?void 0:r.getDirectives())&&void 0!==t?t:Ln;for(const a of i)n[a.name]=ze(a.args.filter(tn),(e=>e.name));const o=e.getDocument().definitions;for(const a of o)if(a.kind===J.DIRECTIVE_DEFINITION){var s;const e=null!==(s=a.arguments)&&void 0!==s?s:[];n[a.name.value]=ze(e.filter(ui),(e=>e.name.value))}return{Directive:{leave(t){const r=t.name.value,i=n[r];if(i){var o;const n=null!==(o=t.arguments)&&void 0!==o?o:[],s=new Set(n.map((e=>e.name.value)));for(const[o,a]of Object.entries(i))if(!s.has(o)){const n=Et(a.type)?Le(a.type):ut(a.type);e.reportError(new B(`Directive "@${r}" argument "${o}" of type "${n}" is required, but it was not provided.`,{nodes:t}))}}}}}}function ui(e){return e.type.kind===J.NON_NULL_TYPE&&null==e.defaultValue}function di(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n)if(Lt(qt(n))){if(r){const i=t.name.value,o=Le(n);e.reportError(new B(`Field "${i}" must not have a selection since type "${o}" has no subfields.`,{nodes:r}))}}else if(r){if(0===r.selections.length){const r=t.name.value,i=Le(n);e.reportError(new B(`Field "${r}" of type "${i}" must have at least one field selected.`,{nodes:t}))}}else{const r=t.name.value,i=Le(n);e.reportError(new B(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:t}))}}}}function fi(e){return e.map((e=>"number"==typeof e?"["+e.toString()+"]":"."+e)).join("")}function pi(e,t,n){return{prev:e,key:t,typename:n}}function hi(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function mi(e,t,n=gi){return vi(e,t,n,void 0)}function gi(e,t,n){let r="Invalid value "+Le(t);throw e.length>0&&(r+=` at "value${fi(e)}"`),n.message=r+": "+n.message,n}function vi(e,t,n,r){if(At(t))return null!=e?vi(e,t.ofType,n,r):void n(hi(r),e,new B(`Expected non-nullable type "${Le(t)}" not to be null.`));if(null==e)return null;if(Dt(t)){const i=t.ofType;return Rn(e)?Array.from(e,((e,t)=>{const o=pi(r,t,void 0);return vi(e,i,n,o)})):[vi(e,i,n,r)]}if(Nt(t)){if(!L(e)||Array.isArray(e))return void n(hi(r),e,new B(`Expected type "${t.name}" to be an object.`));const i={},o=t.getFields();for(const s of Object.values(o)){const o=e[s.name];if(void 0!==o)i[s.name]=vi(o,s.type,n,pi(r,s.name,t.name));else if(void 0!==s.defaultValue)i[s.name]=s.defaultValue;else if(At(s.type)){const t=Le(s.type);n(hi(r),e,new B(`Field "${s.name}" of required type "${t}" was not provided.`))}}for(const s of Object.keys(e))if(!o[s]){const i=Ze(s,Object.keys(t.getFields()));n(hi(r),e,new B(`Field "${s}" is not defined by type "${t.name}".`+qe(i)))}if(t.isOneOf){const o=Object.keys(i);1!==o.length&&n(hi(r),e,new B(`Exactly one key must be specified for OneOf type "${t.name}".`));const s=o[0],a=i[s];null===a&&n(hi(r).concat(s),a,new B(`Field "${s}" must be non-null.`))}return i}if(Lt(t)){let o;try{o=t.parseValue(e)}catch(i){return void n(hi(r),e,i instanceof B?i:new B(`Expected type "${t.name}". `+i.message,{originalError:i}))}return void 0===o&&n(hi(r),e,new B(`Expected type "${t.name}".`)),o}M(!1,"Unexpected input type: "+Le(t))}function yi(e,t,n){if(e){if(e.kind===J.VARIABLE){const r=e.name.value;if(null==n||void 0===n[r])return;const i=n[r];if(null===i&&At(t))return;return i}if(At(t)){if(e.kind===J.NULL)return;return yi(e,t.ofType,n)}if(e.kind===J.NULL)return null;if(Dt(t)){const r=t.ofType;if(e.kind===J.LIST){const t=[];for(const i of e.values)if(bi(i,n)){if(At(r))return;t.push(null)}else{const e=yi(i,r,n);if(void 0===e)return;t.push(e)}return t}const i=yi(e,r,n);if(void 0===i)return;return[i]}if(Nt(t)){if(e.kind!==J.OBJECT)return;const r=Object.create(null),i=ze(e.fields,(e=>e.name.value));for(const e of Object.values(t.getFields())){const t=i[e.name];if(!t||bi(t.value,n)){if(void 0!==e.defaultValue)r[e.name]=e.defaultValue;else if(At(e.type))return;continue}const o=yi(t.value,e.type,n);if(void 0===o)return;r[e.name]=o}if(t.isOneOf){const e=Object.keys(r);if(1!==e.length)return;if(null===r[e[0]])return}return r}if(Lt(t)){let i;try{i=t.parseLiteral(e,n)}catch(r){return}if(void 0===i)return;return i}M(!1,"Unexpected input type: "+Le(t))}}function bi(e,t){return e.kind===J.VARIABLE&&(null==t||void 0===t[e.name.value])}function Ei(e,t,n,r){const i=[],o=null==r?void 0:r.maxErrors;try{const r=function(e,t,n,r){const i={};for(const o of t){const t=o.variable.name.value,s=br(e,o.type);if(!It(s)){const e=ut(o.type);r(new B(`Variable "$${t}" expected value of type "${e}" which cannot be used as an input type.`,{nodes:o.type}));continue}if(!Ti(n,t)){if(o.defaultValue)i[t]=yi(o.defaultValue,s);else if(At(s)){const e=Le(s);r(new B(`Variable "$${t}" of required type "${e}" was not provided.`,{nodes:o}))}continue}const a=n[t];if(null===a&&At(s)){const e=Le(s);r(new B(`Variable "$${t}" of non-null type "${e}" must not be null.`,{nodes:o}))}else i[t]=mi(a,s,((e,n,i)=>{let s=`Variable "$${t}" got invalid value `+Le(n);e.length>0&&(s+=` at "${t}${fi(e)}"`),r(new B(s+"; "+i.message,{nodes:o,originalError:i}))}))}return i}(e,t,n,(e=>{if(null!=o&&i.length>=o)throw new B("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)}));if(0===i.length)return{coerced:r}}catch(s){i.push(s)}return{errors:i}}function xi(e,t,n){var r;const i={},o=ze(null!==(r=t.arguments)&&void 0!==r?r:[],(e=>e.name.value));for(const s of e.args){const e=s.name,r=s.type,a=o[e];if(!a){if(void 0!==s.defaultValue)i[e]=s.defaultValue;else if(At(r))throw new B(`Argument "${e}" of required type "${Le(r)}" was not provided.`,{nodes:t});continue}const l=a.value;let c=l.kind===J.NULL;if(l.kind===J.VARIABLE){const t=l.name.value;if(null==n||!Ti(n,t)){if(void 0!==s.defaultValue)i[e]=s.defaultValue;else if(At(r))throw new B(`Argument "${e}" of required type "${Le(r)}" was provided the variable "$${t}" which was not provided a runtime value.`,{nodes:l});continue}c=null==n[t]}if(c&&At(r))throw new B(`Argument "${e}" of non-null type "${Le(r)}" must not be null.`,{nodes:l});const u=yi(l,r,n);if(void 0===u)throw new B(`Argument "${e}" has invalid value ${ut(l)}.`,{nodes:l});i[e]=u}return i}function wi(e,t,n){var r;const i=null===(r=t.directives)||void 0===r?void 0:r.find((t=>t.name.value===e.name));if(i)return xi(e,i,n)}function Ti(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ci(e,t,n,r,i){const o=new Map;return Si(e,t,n,r,i,o,new Set),o}function Si(e,t,n,r,i,o,s){for(const l of i.selections)switch(l.kind){case J.FIELD:{if(!ki(n,l))continue;const e=(a=l).alias?a.alias.value:a.name.value,t=o.get(e);void 0!==t?t.push(l):o.set(e,[l]);break}case J.INLINE_FRAGMENT:if(!ki(n,l)||!_i(e,l,r))continue;Si(e,t,n,r,l.selectionSet,o,s);break;case J.FRAGMENT_SPREAD:{const i=l.name.value;if(s.has(i)||!ki(n,l))continue;s.add(i);const a=t[i];if(!a||!_i(e,a,r))continue;Si(e,t,n,r,a.selectionSet,o,s);break}}var a}function ki(e,t){const n=wi(Nn,t,e);if(!0===(null==n?void 0:n.if))return!1;const r=wi(_n,t,e);return!1!==(null==r?void 0:r.if)}function _i(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=br(e,r);return i===n||!!Rt(i)&&e.isSubType(i,n)}function Ni(e){return{OperationDefinition(t){if("subscription"===t.operation){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,o=Object.create(null),s=e.getDocument(),a=Object.create(null);for(const e of s.definitions)e.kind===J.FRAGMENT_DEFINITION&&(a[e.name.value]=e);const l=Ci(n,a,o,r,t.selectionSet);if(l.size>1){const t=[...l.values()].slice(1).flat();e.reportError(new B(null!=i?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:t}))}for(const t of l.values()){t[0].name.value.startsWith("__")&&e.reportError(new B(null!=i?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:t}))}}}}}}function Di(e,t){const n=new Map;for(const r of e){const e=t(r),i=n.get(e);void 0===i?n.set(e,[r]):i.push(r)}return n}function Ai(e){return{DirectiveDefinition(e){var t;const r=null!==(t=e.arguments)&&void 0!==t?t:[];return n(`@${e.name.value}`,r)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(e){var t;const r=e.name.value,i=null!==(t=e.fields)&&void 0!==t?t:[];for(const s of i){var o;n(`${r}.${s.name.value}`,null!==(o=s.arguments)&&void 0!==o?o:[])}return!1}function n(t,n){const r=Di(n,(e=>e.name.value));for(const[i,o]of r)o.length>1&&e.reportError(new B(`Argument "${t}(${i}:)" can only be defined once.`,{nodes:o.map((e=>e.name))}));return!1}}function Ii(e){return{Field:t,Directive:t};function t(t){var n;const r=Di(null!==(n=t.arguments)&&void 0!==n?n:[],(e=>e.name.value));for(const[i,o]of r)o.length>1&&e.reportError(new B(`There can be only one argument named "${i}".`,{nodes:o.map((e=>e.name))}))}}function Oi(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(null==n||!n.getDirective(i))return t[i]?e.reportError(new B(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1;e.reportError(new B(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}))}}}function Li(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Ln;for(const a of r)t[a.name]=!a.isRepeatable;const i=e.getDocument().definitions;for(const a of i)a.kind===J.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const o=Object.create(null),s=Object.create(null);return{enter(n){if(!("directives"in n)||!n.directives)return;let r;if(n.kind===J.SCHEMA_DEFINITION||n.kind===J.SCHEMA_EXTENSION)r=o;else if(kr(n)||Nr(n)){const e=n.name.value;r=s[e],void 0===r&&(s[e]=r=Object.create(null))}else r=Object.create(null);for(const i of n.directives){const n=i.name.value;t[n]&&(r[n]?e.reportError(new B(`The directive "@${n}" can only be used once at this location.`,{nodes:[r[n],i]})):r[n]=i)}}}}function Mi(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(t){var i;const o=t.name.value;r[o]||(r[o]=Object.create(null));const s=null!==(i=t.values)&&void 0!==i?i:[],a=r[o];for(const r of s){const t=r.name.value,i=n[o];_t(i)&&i.getValue(t)?e.reportError(new B(`Enum value "${o}.${t}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:r.name})):a[t]?e.reportError(new B(`Enum value "${o}.${t}" can only be defined once.`,{nodes:[a[t],r.name]})):a[t]=r.name}return!1}}function Ri(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i;const o=t.name.value;r[o]||(r[o]=Object.create(null));const s=null!==(i=t.fields)&&void 0!==i?i:[],a=r[o];for(const r of s){const t=r.name.value;Fi(n[o],t)?e.reportError(new B(`Field "${o}.${t}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:r.name})):a[t]?e.reportError(new B(`Field "${o}.${t}" can only be defined once.`,{nodes:[a[t],r.name]})):a[t]=r.name}return!1}}function Fi(e,t){return!!(wt(e)||Ct(e)||Nt(e))&&null!=e.getFields()[t]}function Pi(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new B(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function ji(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const e=t.pop();e||M(!1),n=e}},ObjectField(t){const r=t.name.value;n[r]?e.reportError(new B(`There can be only one input field named "${r}".`,{nodes:[n[r],t.name]})):n[r]=t.name}}}function Vi(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new B(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Bi(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){var i;const o=null!==(i=t.operationTypes)&&void 0!==i?i:[];for(const s of o){const t=s.operation,i=n[t];r[t]?e.reportError(new B(`Type for ${t} already defined in the schema. It cannot be redefined.`,{nodes:s})):i?e.reportError(new B(`There can be only one ${t} type in schema.`,{nodes:[i,s]})):n[t]=s}return!1}}function $i(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){const i=r.name.value;if(null==n||!n.getType(i))return t[i]?e.reportError(new B(`There can be only one type named "${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1;e.reportError(new B(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:r.name}))}}function Ui(e){return{OperationDefinition(t){var n;const r=Di(null!==(n=t.variableDefinitions)&&void 0!==n?n:[],(e=>e.variable.name.value));for(const[i,o]of r)o.length>1&&e.reportError(new B(`There can be only one variable named "$${i}".`,{nodes:o.map((e=>e.variable.name))}))}}}function Hi(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(e){t[e.variable.name.value]=e},ListValue(t){if(!Dt(Ut(e.getParentInputType())))return qi(e,t),!1},ObjectValue(n){const r=qt(e.getInputType());if(!Nt(r))return qi(e,n),!1;const i=ze(n.fields,(e=>e.name.value));for(const t of Object.values(r.getFields())){if(!i[t.name]&&dn(t)){const i=Le(t.type);e.reportError(new B(`Field "${r.name}.${t.name}" of required type "${i}" was not provided.`,{nodes:n}))}}r.isOneOf&&function(e,t,n,r,i){var o;const s=Object.keys(r);if(1!==s.length)return void e.reportError(new B(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));const a=null===(o=r[s[0]])||void 0===o?void 0:o.value,l=!a||a.kind===J.NULL,c=(null==a?void 0:a.kind)===J.VARIABLE;if(l)return void e.reportError(new B(`Field "${n.name}.${s[0]}" must be non-null.`,{nodes:[t]}));if(c){const r=a.name.value;i[r].type.kind!==J.NON_NULL_TYPE&&e.reportError(new B(`Variable "${r}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}(e,n,r,i,t)},ObjectField(t){const n=qt(e.getParentInputType());if(!e.getInputType()&&Nt(n)){const r=Ze(t.name.value,Object.keys(n.getFields()));e.reportError(new B(`Field "${t.name.value}" is not defined by type "${n.name}".`+qe(r),{nodes:t}))}},NullValue(t){const n=e.getInputType();At(n)&&e.reportError(new B(`Expected value of type "${Le(n)}", found ${ut(t)}.`,{nodes:t}))},EnumValue:t=>qi(e,t),IntValue:t=>qi(e,t),FloatValue:t=>qi(e,t),StringValue:t=>qi(e,t),BooleanValue:t=>qi(e,t)}}function qi(e,t){const n=e.getInputType();if(!n)return;const r=qt(n);if(Lt(r))try{if(void 0===r.parseLiteral(t,void 0)){const r=Le(n);e.reportError(new B(`Expected value of type "${r}", found ${ut(t)}.`,{nodes:t}))}}catch(i){const r=Le(n);i instanceof B?e.reportError(i):e.reportError(new B(`Expected value of type "${r}", found ${ut(t)}; `+i.message,{nodes:t,originalError:i}))}else{const r=Le(n);e.reportError(new B(`Expected value of type "${r}", found ${ut(t)}.`,{nodes:t}))}}function Wi(e){return{VariableDefinition(t){const n=br(e.getSchema(),t.type);if(void 0!==n&&!It(n)){const n=t.variable.name.value,r=ut(t.type);e.reportError(new B(`Variable "$${n}" cannot be non-input type "${r}".`,{nodes:t.type}))}}}}function zi(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:o,defaultValue:s,parentType:a}of r){const n=i.name.value,r=t[n];if(r&&o){const t=e.getSchema(),l=br(t,r.type);if(l&&!Gi(t,l,r.defaultValue,o,s)){const t=Le(l),s=Le(o);e.reportError(new B(`Variable "$${n}" of type "${t}" used in position expecting type "${s}".`,{nodes:[r,i]}))}Nt(a)&&a.isOneOf&&Bt(l)&&e.reportError(new B(`Variable "$${n}" is of type "${l}" but must be non-nullable to be used for OneOf Input Object "${a}".`,{nodes:[r,i]}))}}}},VariableDefinition(e){t[e.variable.name.value]=e}}}function Gi(e,t,n,r,i){if(At(r)&&!At(t)){if(!(null!=n&&n.kind!==J.NULL)&&!(void 0!==i))return!1;return pn(e,t,r.ofType)}return pn(e,t,r)}const Ki=Object.freeze([Br]),Yi=Object.freeze([Dr,Vi,jr,Ni,Fr,Ir,Wi,di,Ar,Pi,Rr,Hr,oi,$r,Ui,Ur,qr,Mr,Li,Or,Ii,Hi,li,zi,Gr,ji,...Ki]),Qi=Object.freeze([Vr,Bi,$i,Mi,Ri,Ai,Oi,Fr,Mr,Li,si,Lr,Ii,ji,ci]);class Xi{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{t=Object.create(null);for(const e of this.getDocument().definitions)e.kind===J.FRAGMENT_DEFINITION&&(t[e.name.value]=e);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){t=[];const n=[e];let r;for(;r=n.pop();)for(const e of r.selections)e.kind===J.FRAGMENT_SPREAD?t.push(e):e.selectionSet&&n.push(e.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];const n=Object.create(null),r=[e.selectionSet];let i;for(;i=r.pop();)for(const e of this.getFragmentSpreads(i)){const i=e.name.value;if(!0!==n[i]){n[i]=!0;const e=this.getFragment(i);e&&(t.push(e),r.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}}class Ji extends Xi{constructor(e,t,n){super(e,n),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Zi extends Xi{constructor(e,t,n,r){super(t,r),this._schema=e,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){const n=[],r=new Er(this._schema);at(e,wr(r,{VariableDefinition:()=>!1,Variable(e){n.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue(),parentType:r.getParentInputType()})}})),t=n,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(const n of this.getRecursivelyReferencedFragments(e))t=t.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(e,t)}return t}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function eo(e,t,n=Yi,r,i=new Er(e)){var o;const s=null!==(o=null==r?void 0:r.maxErrors)&&void 0!==o?o:100;t||I(!1,"Must provide document."),ir(e);const a=Object.freeze({}),l=[],c=new Zi(e,t,i,(e=>{if(l.length>=s)throw l.push(new B("Too many validation errors, error limit reached. Validation aborted.")),a;l.push(e)})),u=lt(n.map((e=>e(c))));try{at(t,wr(i,u))}catch(nL){if(nL!==a)throw nL}return l}function to(e,t,n=Qi){const r=[],i=new Ji(e,t,(e=>{r.push(e)}));return at(e,lt(n.map((e=>e(i))))),r}function no(e){return Promise.all(Object.values(e)).then((t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n}))}class ro extends Error{constructor(e){super("Unexpected error value: "+Le(e)),this.name="NonErrorThrown",this.thrownValue=e}}function io(e,t,n){var r;const i=(o=e)instanceof Error?o:new ro(o);var o,s;return s=i,Array.isArray(s.path)?i:new B(i.message,{nodes:null!==(r=i.nodes)&&void 0!==r?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}const oo=function(e){let t;return function(n,r,i){void 0===t&&(t=new WeakMap);let o=t.get(n);void 0===o&&(o=new WeakMap,t.set(n,o));let s=o.get(r);void 0===s&&(s=new WeakMap,o.set(r,s));let a=s.get(i);return void 0===a&&(a=e(n,r,i),s.set(i,a)),a}}(((e,t,n)=>function(e,t,n,r,i){const o=new Map,s=new Set;for(const a of i)a.selectionSet&&Si(e,t,n,r,a.selectionSet,o,s);return o}(e.schema,e.fragments,e.variableValues,t,n)));function so(e){arguments.length<2||I(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;co(t,n,r);const o=uo(e);if(!("schema"in o))return{errors:o};try{const{operation:e}=o,t=function(e,t,n){const r=e.schema.getRootType(t.operation);if(null==r)throw new B(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=Ci(e.schema,e.fragments,e.variableValues,r,t.selectionSet),o=void 0;switch(t.operation){case K.QUERY:return fo(e,r,n,o,i);case K.MUTATION:return function(e,t,n,r,i){return function(e,t,n){let r=n;for(const i of e)r=O(r)?r.then((e=>t(e,i))):t(r,i);return r}(i.entries(),((i,[o,s])=>{const a=pi(r,o,t.name),l=po(e,t,n,s,a);return void 0===l?i:O(l)?l.then((e=>(i[o]=e,i))):(i[o]=l,i)}),Object.create(null))}(e,r,n,o,i);case K.SUBSCRIPTION:return fo(e,r,n,o,i)}}(o,e,i);return O(t)?t.then((e=>lo(e,o.errors)),(e=>(o.errors.push(e),lo(null,o.errors)))):lo(t,o.errors)}catch(s){return o.errors.push(s),lo(null,o.errors)}}function ao(e){const t=so(e);if(O(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function lo(e,t){return 0===t.length?{data:e}:{errors:t,data:e}}function co(e,t,n){t||I(!1,"Must provide document."),ir(e),null==n||L(n)||I(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function uo(e){var t,n,r;const{schema:i,document:o,rootValue:s,contextValue:a,variableValues:l,operationName:c,fieldResolver:u,typeResolver:d,subscribeFieldResolver:f,options:p}=e;let h;const m=Object.create(null);for(const v of o.definitions)switch(v.kind){case J.OPERATION_DEFINITION:if(null==c){if(void 0!==h)return[new B("Must provide operation name if query contains multiple operations.")];h=v}else(null===(t=v.name)||void 0===t?void 0:t.value)===c&&(h=v);break;case J.FRAGMENT_DEFINITION:m[v.name.value]=v}if(!h)return null!=c?[new B(`Unknown operation named "${c}".`)]:[new B("Must provide an operation.")];const g=Ei(i,null!==(n=h.variableDefinitions)&&void 0!==n?n:[],null!=l?l:{},{maxErrors:null!==(r=null==p?void 0:p.maxCoercionErrors)&&void 0!==r?r:50});return g.errors?g.errors:{schema:i,fragments:m,rootValue:s,contextValue:a,operation:h,variableValues:g.coerced,fieldResolver:null!=u?u:xo,typeResolver:null!=d?d:Eo,subscribeFieldResolver:null!=f?f:xo,errors:[]}}function fo(e,t,n,r,i){const o=Object.create(null);let s=!1;try{for(const[a,l]of i.entries()){const i=po(e,t,n,l,pi(r,a,t.name));void 0!==i&&(o[a]=i,O(i)&&(s=!0))}}catch(a){if(s)return no(o).finally((()=>{throw a}));throw a}return s?no(o):o}function po(e,t,n,r,i){var o;const s=wo(e.schema,t,r[0]);if(!s)return;const a=s.type,l=null!==(o=s.resolve)&&void 0!==o?o:e.fieldResolver,c=ho(e,s,r,t,i);try{const t=xi(s,r[0],e.variableValues),o=l(n,t,e.contextValue,c);let u;return u=O(o)?o.then((t=>go(e,a,r,c,i,t))):go(e,a,r,c,i,o),O(u)?u.then(void 0,(t=>mo(io(t,r,hi(i)),a,e))):u}catch(u){return mo(io(u,r,hi(i)),a,e)}}function ho(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function mo(e,t,n){if(At(t))throw e;return n.errors.push(e),null}function go(e,t,n,r,i,o){if(o instanceof Error)throw o;if(At(t)){const s=go(e,t.ofType,n,r,i,o);if(null===s)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return s}return null==o?null:Dt(t)?function(e,t,n,r,i,o){if(!Rn(o))throw new B(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const s=t.ofType;let a=!1;const l=Array.from(o,((t,o)=>{const l=pi(i,o,void 0);try{let i;return i=O(t)?t.then((t=>go(e,s,n,r,l,t))):go(e,s,n,r,l,t),O(i)?(a=!0,i.then(void 0,(t=>mo(io(t,n,hi(l)),s,e)))):i}catch(c){return mo(io(c,n,hi(l)),s,e)}}));return a?Promise.all(l):l}(e,t,n,r,i,o):Lt(t)?function(e,t){const n=e.serialize(t);if(null==n)throw new Error(`Expected \`${Le(e)}.serialize(${Le(t)})\` to return non-nullable value, returned: ${Le(n)}`);return n}(t,o):Rt(t)?function(e,t,n,r,i,o){var s;const a=null!==(s=t.resolveType)&&void 0!==s?s:e.typeResolver,l=e.contextValue,c=a(o,l,r,t);if(O(c))return c.then((s=>yo(e,vo(s,e,t,n,r,o),n,r,i,o)));return yo(e,vo(c,e,t,n,r,o),n,r,i,o)}(e,t,n,r,i,o):wt(t)?yo(e,t,n,r,i,o):void M(!1,"Cannot complete value of unexpected output type: "+Le(t))}function vo(e,t,n,r,i,o){if(null==e)throw new B(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(wt(e))throw new B("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new B(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${Le(o)}, received "${Le(e)}".`);const s=t.schema.getType(e);if(null==s)throw new B(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!wt(s))throw new B(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,s))throw new B(`Runtime Object type "${s.name}" is not a possible type for "${n.name}".`,{nodes:r});return s}function yo(e,t,n,r,i,o){const s=oo(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(o,e.contextValue,r);if(O(a))return a.then((r=>{if(!r)throw bo(t,o,n);return fo(e,t,o,i,s)}));if(!a)throw bo(t,o,n)}return fo(e,t,o,i,s)}function bo(e,t,n){return new B(`Expected value of type "${e.name}" but got: ${Le(t)}.`,{nodes:n})}const Eo=function(e,t,n,r){if(L(e)&&"string"==typeof e.__typename)return e.__typename;const i=n.schema.getPossibleTypes(r),o=[];for(let s=0;s<i.length;s++){const r=i[s];if(r.isTypeOf){const i=r.isTypeOf(e,t,n);if(O(i))o[s]=i;else if(i)return r.name}}return o.length?Promise.all(o).then((e=>{for(let t=0;t<e.length;t++)if(e[t])return i[t].name})):void 0},xo=function(e,t,n,r){if(L(e)||"function"==typeof e){const i=e[r.fieldName];return"function"==typeof i?e[r.fieldName](t,n,r):i}};function wo(e,t,n){const r=n.name.value;return r===Kn.name&&e.getQueryType()===t?Kn:r===Yn.name&&e.getQueryType()===t?Yn:r===Qn.name?Qn:t.getFields()[r]}function To(e){arguments.length<2||I(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:o,operationName:s,fieldResolver:a,typeResolver:l}=e,c=rr(t);if(c.length>0)return{errors:c};let u;try{u=je(n)}catch(f){return{errors:[f]}}const d=eo(t,u);return d.length>0?{errors:d}:so({schema:t,document:u,rootValue:r,contextValue:i,variableValues:o,operationName:s,fieldResolver:a,typeResolver:l})}function Co(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function So(...e){const t=function(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}(e),{schema:n,document:r,variableValues:i}=t;co(n,r,i);const o=uo(t);if(!("schema"in o))return{errors:o};try{const e=await async function(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:o}=e,s=t.getSubscriptionType();if(null==s)throw new B("Schema is not configured to execute subscription operation.",{nodes:r});const a=Ci(t,n,i,s,r.selectionSet),[l,c]=[...a.entries()][0],u=wo(t,s,c[0]);if(!u){const e=c[0].name.value;throw new B(`The subscription field "${e}" is not defined.`,{nodes:c})}const d=pi(void 0,l,s.name),f=ho(e,u,c,s,d);try{var p;const t=xi(u,c[0],i),n=e.contextValue,r=null!==(p=u.subscribe)&&void 0!==p?p:e.subscribeFieldResolver,s=await r(o,t,n,f);if(s instanceof Error)throw s;return s}catch(h){throw io(h,c,hi(d))}}(o);if(!Co(e))throw new Error(`Subscription field must return Async Iterable. Received: ${Le(e)}.`);return e}catch(s){if(s instanceof B)return{errors:[s]};throw s}}function ko(e){return{Field(t){const n=e.getFieldDef(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=e.getParentType();null!=i||M(!1),e.reportError(new B(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=e.getDirective();if(null!=i)e.reportError(new B(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const i=e.getParentType(),o=e.getFieldDef();null!=i&&null!=o||M(!1),e.reportError(new B(`Field "${i.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=qt(e.getParentInputType());if(Nt(n)){const r=n.getFields()[t.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new B(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=qt(e.getInputType());null!=i||M(!1),e.reportError(new B(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function _o(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",o=t.schemaDescription?n:"";function s(e){return t.inputValueDeprecation?e:""}const a=t.oneOf?"isOneOf":"";return`\n    query IntrospectionQuery {\n      __schema {\n        ${o}\n        queryType { name kind }\n        mutationType { name kind }\n        subscriptionType { name kind }\n        types {\n          ...FullType\n        }\n        directives {\n          name\n          ${n}\n          ${i}\n          locations\n          args${s("(includeDeprecated: true)")} {\n            ...InputValue\n          }\n        }\n      }\n    }\n\n    fragment FullType on __Type {\n      kind\n      name\n      ${n}\n      ${r}\n      ${a}\n      fields(includeDeprecated: true) {\n        name\n        ${n}\n        args${s("(includeDeprecated: true)")} {\n          ...InputValue\n        }\n        type {\n          ...TypeRef\n        }\n        isDeprecated\n        deprecationReason\n      }\n      inputFields${s("(includeDeprecated: true)")} {\n        ...InputValue\n      }\n      interfaces {\n        ...TypeRef\n      }\n      enumValues(includeDeprecated: true) {\n        name\n        ${n}\n        isDeprecated\n        deprecationReason\n      }\n      possibleTypes {\n        ...TypeRef\n      }\n    }\n\n    fragment InputValue on __InputValue {\n      name\n      ${n}\n      type { ...TypeRef }\n      defaultValue\n      ${s("isDeprecated")}\n      ${s("deprecationReason")}\n    }\n\n    fragment TypeRef on __Type {\n      kind\n      name\n      ofType {\n        kind\n        name\n        ofType {\n          kind\n          name\n          ofType {\n            kind\n            name\n            ofType {\n              kind\n              name\n              ofType {\n                kind\n                name\n                ofType {\n                  kind\n                  name\n                  ofType {\n                    kind\n                    name\n                    ofType {\n                      kind\n                      name\n                      ofType {\n                        kind\n                        name\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  `}function No(e,t){L(e)&&L(e.__schema)||I(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Le(e)}.`);const n=e.__schema,r=Ge(n.types,(e=>e.name),(e=>function(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case Wn.SCALAR:return new Gt({name:(r=e).name,description:r.description,specifiedByURL:r.specifiedByURL});case Wn.OBJECT:return new Kt({name:(n=e).name,description:n.description,interfaces:()=>f(n),fields:()=>p(n)});case Wn.INTERFACE:return new nn({name:(t=e).name,description:t.description,interfaces:()=>f(t),fields:()=>p(t)});case Wn.UNION:return function(e){if(!e.possibleTypes){const t=Le(e);throw new Error(`Introspection result missing possibleTypes: ${t}.`)}return new rn({name:e.name,description:e.description,types:()=>e.possibleTypes.map(u)})}(e);case Wn.ENUM:return function(e){if(!e.enumValues){const t=Le(e);throw new Error(`Introspection result missing enumValues: ${t}.`)}return new sn({name:e.name,description:e.description,values:Ge(e.enumValues,(e=>e.name),(e=>({description:e.description,deprecationReason:e.deprecationReason})))})}(e);case Wn.INPUT_OBJECT:return function(e){if(!e.inputFields){const t=Le(e);throw new Error(`Introspection result missing inputFields: ${t}.`)}return new cn({name:e.name,description:e.description,fields:()=>m(e.inputFields),isOneOf:e.isOneOf})}(e)}var t;var n;var r;const i=Le(e);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${i}.`)}(e)));for(const v of[...wn,...Xn])r[v.name]&&(r[v.name]=v);const i=n.queryType?u(n.queryType):null,o=n.mutationType?u(n.mutationType):null,s=n.subscriptionType?u(n.subscriptionType):null,a=n.directives?n.directives.map((function(e){if(!e.args){const t=Le(e);throw new Error(`Introspection result missing directive args: ${t}.`)}if(!e.locations){const t=Le(e);throw new Error(`Introspection result missing directive locations: ${t}.`)}return new kn({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:m(e.args)})})):[];return new tr({description:n.description,query:i,mutation:o,subscription:s,types:Object.values(r),directives:a,assumeValid:null==t?void 0:t.assumeValid});function l(e){if(e.kind===Wn.LIST){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return new Pt(l(t))}if(e.kind===Wn.NON_NULL){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");const n=l(t);return new jt($t(n))}return c(e)}function c(e){const t=e.name;if(!t)throw new Error(`Unknown type reference: ${Le(e)}.`);const n=r[t];if(!n)throw new Error(`Invalid or incomplete schema, unknown type: ${t}. Ensure that a full introspection query is used in order to build a client schema.`);return n}function u(e){return Tt(c(e))}function d(e){return St(c(e))}function f(e){if(null===e.interfaces&&e.kind===Wn.INTERFACE)return[];if(!e.interfaces){const t=Le(e);throw new Error(`Introspection result missing interfaces: ${t}.`)}return e.interfaces.map(d)}function p(e){if(!e.fields)throw new Error(`Introspection result missing fields: ${Le(e)}.`);return Ge(e.fields,(e=>e.name),h)}function h(e){const t=l(e.type);if(!Ot(t)){const e=Le(t);throw new Error(`Introspection must provide output type for fields, but received: ${e}.`)}if(!e.args){const t=Le(e);throw new Error(`Introspection result missing field args: ${t}.`)}return{description:e.description,deprecationReason:e.deprecationReason,type:t,args:m(e.args)}}function m(e){return Ge(e,(e=>e.name),g)}function g(e){const t=l(e.type);if(!It(t)){const e=Le(t);throw new Error(`Introspection must provide input type for arguments, but received: ${e}.`)}const n=null!=e.defaultValue?yi(Ve(e.defaultValue),t):void 0;return{description:e.description,type:t,defaultValue:n,deprecationReason:e.deprecationReason}}}function Do(e,t,n){var r,i,o,s;const a=[],l=Object.create(null),c=[];let u;const d=[];for(const A of t.definitions)if(A.kind===J.SCHEMA_DEFINITION)u=A;else if(A.kind===J.SCHEMA_EXTENSION)d.push(A);else if(kr(A))a.push(A);else if(Nr(A)){const e=A.name.value,t=l[e];l[e]=t?t.concat([A]):[A]}else A.kind===J.DIRECTIVE_DEFINITION&&c.push(A);if(0===Object.keys(l).length&&0===a.length&&0===c.length&&0===d.length&&null==u)return e;const f=Object.create(null);for(const A of e.types)f[A.name]=v(A);for(const A of a){var p;const e=A.name.value;f[e]=null!==(p=Ao[e])&&void 0!==p?p:D(A)}const h={query:e.query&&g(e.query),mutation:e.mutation&&g(e.mutation),subscription:e.subscription&&g(e.subscription),...u&&E([u]),...E(d)};return{description:null===(r=u)||void 0===r||null===(i=r.description)||void 0===i?void 0:i.value,...h,types:Object.values(f),directives:[...e.directives.map((function(e){const t=e.toConfig();return new kn({...t,args:Ke(t.args,b)})})),...c.map((function(e){var t;return new kn({name:e.name.value,description:null===(t=e.description)||void 0===t?void 0:t.value,locations:e.locations.map((({value:e})=>e)),isRepeatable:e.repeatable,args:C(e.arguments),astNode:e})}))],extensions:Object.create(null),astNode:null!==(o=u)&&void 0!==o?o:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:null!==(s=null==n?void 0:n.assumeValid)&&void 0!==s&&s};function m(e){return Dt(e)?new Pt(m(e.ofType)):At(e)?new jt(m(e.ofType)):g(e)}function g(e){return f[e.name]}function v(e){return Jn(e)||Tn(e)?e:xt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];let i=n.specifiedByURL;for(const s of r){var o;i=null!==(o=Oo(s))&&void 0!==o?o:i}return new Gt({...n,specifiedByURL:i,extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):wt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new Kt({...n,interfaces:()=>[...e.getInterfaces().map(g),..._(r)],fields:()=>({...Ke(n.fields,y),...T(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Ct(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new nn({...n,interfaces:()=>[...e.getInterfaces().map(g),..._(r)],fields:()=>({...Ke(n.fields,y),...T(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):kt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new rn({...n,types:()=>[...e.getTypes().map(g),...N(r)],extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):_t(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[e.name])&&void 0!==t?t:[];return new sn({...n,values:{...n.values,...k(r)},extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Nt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new cn({...n,fields:()=>({...Ke(n.fields,(e=>({...e,type:m(e.type)}))),...S(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):void M(!1,"Unexpected type: "+Le(e))}function y(e){return{...e,type:m(e.type),args:e.args&&Ke(e.args,b)}}function b(e){return{...e,type:m(e.type)}}function E(e){const t={};for(const r of e){var n;const e=null!==(n=r.operationTypes)&&void 0!==n?n:[];for(const n of e)t[n.operation]=x(n.type)}return t}function x(e){var t;const n=e.name.value,r=null!==(t=Ao[n])&&void 0!==t?t:f[n];if(void 0===r)throw new Error(`Unknown type: "${n}".`);return r}function w(e){return e.kind===J.LIST_TYPE?new Pt(w(e.type)):e.kind===J.NON_NULL_TYPE?new jt(w(e.type)):x(e)}function T(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.fields)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={type:w(n.type),description:null===(r=n.description)||void 0===r?void 0:r.value,args:C(n.arguments),deprecationReason:Io(n),astNode:n}}}return t}function C(e){const t=null!=e?e:[],n=Object.create(null);for(const i of t){var r;const e=w(i.type);n[i.name.value]={type:e,description:null===(r=i.description)||void 0===r?void 0:r.value,defaultValue:yi(i.defaultValue,e),deprecationReason:Io(i),astNode:i}}return n}function S(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.fields)&&void 0!==n?n:[];for(const n of e){var r;const e=w(n.type);t[n.name.value]={type:e,description:null===(r=n.description)||void 0===r?void 0:r.value,defaultValue:yi(n.defaultValue,e),deprecationReason:Io(n),astNode:n}}}return t}function k(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.values)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={description:null===(r=n.description)||void 0===r?void 0:r.value,deprecationReason:Io(n),astNode:n}}}return t}function _(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.interfaces)||void 0===n?void 0:n.map(x))&&void 0!==t?t:[]}))}function N(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.types)||void 0===n?void 0:n.map(x))&&void 0!==t?t:[]}))}function D(e){var t;const n=e.name.value,r=null!==(t=l[n])&&void 0!==t?t:[];switch(e.kind){case J.OBJECT_TYPE_DEFINITION:{var i;const t=[e,...r];return new Kt({name:n,description:null===(i=e.description)||void 0===i?void 0:i.value,interfaces:()=>_(t),fields:()=>T(t),astNode:e,extensionASTNodes:r})}case J.INTERFACE_TYPE_DEFINITION:{var o;const t=[e,...r];return new nn({name:n,description:null===(o=e.description)||void 0===o?void 0:o.value,interfaces:()=>_(t),fields:()=>T(t),astNode:e,extensionASTNodes:r})}case J.ENUM_TYPE_DEFINITION:{var s;const t=[e,...r];return new sn({name:n,description:null===(s=e.description)||void 0===s?void 0:s.value,values:k(t),astNode:e,extensionASTNodes:r})}case J.UNION_TYPE_DEFINITION:{var a;const t=[e,...r];return new rn({name:n,description:null===(a=e.description)||void 0===a?void 0:a.value,types:()=>N(t),astNode:e,extensionASTNodes:r})}case J.SCALAR_TYPE_DEFINITION:var c;return new Gt({name:n,description:null===(c=e.description)||void 0===c?void 0:c.value,specifiedByURL:Oo(e),astNode:e,extensionASTNodes:r});case J.INPUT_OBJECT_TYPE_DEFINITION:{var u;const t=[e,...r];return new cn({name:n,description:null===(u=e.description)||void 0===u?void 0:u.value,fields:()=>S(t),astNode:e,extensionASTNodes:r,isOneOf:(d=e,Boolean(wi(On,d)))})}}var d}}const Ao=ze([...wn,...Xn],(e=>e.name));function Io(e){const t=wi(An,e);return null==t?void 0:t.reason}function Oo(e){const t=wi(In,e);return null==t?void 0:t.url}function Lo(e,t){null!=e&&e.kind===J.DOCUMENT||I(!1,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&function(e){const t=to(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}(e);const n=Do({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(null==n.astNode)for(const i of n.types)switch(i.name){case"Query":n.query=i;break;case"Mutation":n.mutation=i;break;case"Subscription":n.subscription=i}const r=[...n.directives,...Ln.filter((e=>n.directives.every((t=>t.name!==e.name))))];return new tr({...n,directives:r})}function Mo(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(Ye))n[r]=t(e[r]);return n}function Ro(e){return Fo(e,(e=>e.name))}function Fo(e,t){return e.slice().sort(((e,n)=>Ye(t(e),t(n))))}function Po(e){return!Tn(e)&&!Jn(e)}function jo(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Vo(e),...r.map((e=>function(e){return Go(e)+"directive @"+e.name+qo(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}(e))),...i.map((e=>Bo(e)))].filter(Boolean).join("\n\n")}function Vo(e){if(null==e.description&&function(e){const t=e.getQueryType();if(t&&"Query"!==t.name)return!1;const n=e.getMutationType();if(n&&"Mutation"!==n.name)return!1;const r=e.getSubscriptionType();if(r&&"Subscription"!==r.name)return!1;return!0}(e))return;const t=[],n=e.getQueryType();n&&t.push(`  query: ${n.name}`);const r=e.getMutationType();r&&t.push(`  mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(`  subscription: ${i.name}`),Go(e)+`schema {\n${t.join("\n")}\n}`}function Bo(e){return xt(e)?function(e){return Go(e)+`scalar ${e.name}`+function(e){if(null==e.specifiedByURL)return"";return` @specifiedBy(url: ${ut({kind:J.STRING,value:e.specifiedByURL})})`}(e)}(e):wt(e)?function(e){return Go(e)+`type ${e.name}`+$o(e)+Uo(e)}(e):Ct(e)?function(e){return Go(e)+`interface ${e.name}`+$o(e)+Uo(e)}(e):kt(e)?function(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Go(e)+"union "+e.name+n}(e):_t(e)?function(e){const t=e.getValues().map(((e,t)=>Go(e,"  ",!t)+"  "+e.name+zo(e.deprecationReason)));return Go(e)+`enum ${e.name}`+Ho(t)}(e):Nt(e)?function(e){const t=Object.values(e.getFields()).map(((e,t)=>Go(e,"  ",!t)+"  "+Wo(e)));return Go(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Ho(t)}(e):void M(!1,"Unexpected type: "+Le(e))}function $o(e){const t=e.getInterfaces();return t.length?" implements "+t.map((e=>e.name)).join(" & "):""}function Uo(e){return Ho(Object.values(e.getFields()).map(((e,t)=>Go(e,"  ",!t)+"  "+e.name+qo(e.args,"  ")+": "+String(e.type)+zo(e.deprecationReason))))}function Ho(e){return 0!==e.length?" {\n"+e.join("\n")+"\n}":""}function qo(e,t=""){return 0===e.length?"":e.every((e=>!e.description))?"("+e.map(Wo).join(", ")+")":"(\n"+e.map(((e,n)=>Go(e,"  "+t,!n)+"  "+t+Wo(e))).join("\n")+"\n"+t+")"}function Wo(e){const t=Fn(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ut(t)}`),n+zo(e.deprecationReason)}function zo(e){if(null==e)return"";if(e!==Dn){return` @deprecated(reason: ${ut({kind:J.STRING,value:e})})`}return" @deprecated"}function Go(e,t="",n=!0){const{description:r}=e;if(null==r)return"";return(t&&!n?"\n"+t:t)+ut({kind:J.STRING,value:r,block:ce(r)}).replace(/\n/g,"\n"+t)+"\n"}function Ko(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(void 0!==r)for(const n of r)Ko(e,t,n)}}function Yo(e){const t=[];return at(e,{FragmentSpread(e){t.push(e.name.value)}}),t}function Qo(e){if("string"==typeof e||I(!1,"Expected name to be a string."),e.startsWith("__"))return new B(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{yt(e)}catch(t){return t}}var Xo,Jo,Zo,es;function ts(e,t){return[...rs(e,t),...ns(e,t)]}function ns(e,t){const n=[],r=hs(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:Xo.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,o]of r.persisted){const e=hs(i.args,o.args);for(const t of e.added)tn(t)&&n.push({type:Xo.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${t.name} on directive ${i.name} was added.`});for(const t of e.removed)n.push({type:Xo.DIRECTIVE_ARG_REMOVED,description:`${t.name} was removed from ${i.name}.`});i.isRepeatable&&!o.isRepeatable&&n.push({type:Xo.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const t of i.locations)o.locations.includes(t)||n.push({type:Xo.DIRECTIVE_LOCATION_REMOVED,description:`${t} was removed from ${i.name}.`})}return n}function rs(e,t){const n=[],r=hs(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:Xo.TYPE_REMOVED,description:Tn(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,o]of r.persisted)_t(i)&&_t(o)?n.push(...ss(i,o)):kt(i)&&kt(o)?n.push(...os(i,o)):Nt(i)&&Nt(o)?n.push(...is(i,o)):wt(i)&&wt(o)||Ct(i)&&Ct(o)?n.push(...ls(i,o),...as(i,o)):i.constructor!==o.constructor&&n.push({type:Xo.TYPE_CHANGED_KIND,description:`${i.name} changed from ${fs(i)} to ${fs(o)}.`});return n}function is(e,t){const n=[],r=hs(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)dn(i)?n.push({type:Xo.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:Zo.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:Xo.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted){ds(i.type,o.type)||n.push({type:Xo.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`})}return n}function os(e,t){const n=[],r=hs(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:Zo.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:Xo.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function ss(e,t){const n=[],r=hs(e.getValues(),t.getValues());for(const i of r.added)n.push({type:Zo.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:Xo.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function as(e,t){const n=[],r=hs(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:Zo.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:Xo.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function ls(e,t){const n=[],r=hs(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:Xo.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted){n.push(...cs(e,i,o));us(i.type,o.type)||n.push({type:Xo.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`})}return n}function cs(e,t,n){const r=[],i=hs(t.args,n.args);for(const o of i.removed)r.push({type:Xo.ARG_REMOVED,description:`${e.name}.${t.name} arg ${o.name} was removed.`});for(const[o,s]of i.persisted){if(ds(o.type,s.type)){if(void 0!==o.defaultValue)if(void 0===s.defaultValue)r.push({type:Zo.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} defaultValue was removed.`});else{const n=ps(o.defaultValue,o.type),i=ps(s.defaultValue,s.type);n!==i&&r.push({type:Zo.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} has changed defaultValue from ${n} to ${i}.`})}}else r.push({type:Xo.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${o.name} has changed type from ${String(o.type)} to ${String(s.type)}.`})}for(const o of i.added)tn(o)?r.push({type:Xo.REQUIRED_ARG_ADDED,description:`A required arg ${o.name} on ${e.name}.${t.name} was added.`}):r.push({type:Zo.OPTIONAL_ARG_ADDED,description:`An optional arg ${o.name} on ${e.name}.${t.name} was added.`});return r}function us(e,t){return Dt(e)?Dt(t)&&us(e.ofType,t.ofType)||At(t)&&us(e,t.ofType):At(e)?At(t)&&us(e.ofType,t.ofType):Ht(t)&&e.name===t.name||At(t)&&us(e,t.ofType)}function ds(e,t){return Dt(e)?Dt(t)&&ds(e.ofType,t.ofType):At(e)?At(t)&&ds(e.ofType,t.ofType)||!At(t)&&ds(e.ofType,t):Ht(t)&&e.name===t.name}function fs(e){return xt(e)?"a Scalar type":wt(e)?"an Object type":Ct(e)?"an Interface type":kt(e)?"a Union type":_t(e)?"an Enum type":Nt(e)?"an Input type":void M(!1,"Unexpected type: "+Le(e))}function ps(e,t){const n=Fn(e,t);return null!=n||M(!1),ut(Wr(n))}function hs(e,t){const n=[],r=[],i=[],o=ze(e,(({name:e})=>e)),s=ze(t,(({name:e})=>e));for(const a of e){const e=s[a.name];void 0===e?r.push(a):i.push([a,e])}for(const a of t)void 0===o[a.name]&&n.push(a);return{added:n,persisted:i,removed:r}}(Jo=Xo||(Xo={})).TYPE_REMOVED="TYPE_REMOVED",Jo.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",Jo.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",Jo.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",Jo.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",Jo.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",Jo.FIELD_REMOVED="FIELD_REMOVED",Jo.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",Jo.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",Jo.ARG_REMOVED="ARG_REMOVED",Jo.ARG_CHANGED_KIND="ARG_CHANGED_KIND",Jo.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",Jo.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",Jo.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",Jo.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",Jo.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED",(es=Zo||(Zo={})).VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",es.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",es.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",es.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",es.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",es.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE";const ms=Object.freeze(Object.defineProperty({__proto__:null,BREAK:st,get BreakingChangeType(){return Xo},DEFAULT_DEPRECATION_REASON:Dn,get DangerousChangeType(){return Zo},get DirectiveLocation(){return Q},ExecutableDefinitionsRule:Dr,FieldsOnCorrectTypeRule:Ar,FragmentsOnCompositeTypesRule:Ir,GRAPHQL_MAX_INT:mn,GRAPHQL_MIN_INT:gn,GraphQLBoolean:En,GraphQLDeprecatedDirective:An,GraphQLDirective:kn,GraphQLEnumType:sn,GraphQLError:B,GraphQLFloat:yn,GraphQLID:xn,GraphQLIncludeDirective:_n,GraphQLInputObjectType:cn,GraphQLInt:vn,GraphQLInterfaceType:nn,GraphQLList:Pt,GraphQLNonNull:jt,GraphQLObjectType:Kt,GraphQLOneOfDirective:On,GraphQLScalarType:Gt,GraphQLSchema:tr,GraphQLSkipDirective:Nn,GraphQLSpecifiedByDirective:In,GraphQLString:bn,GraphQLUnionType:rn,get Kind(){return J},KnownArgumentNamesRule:Or,KnownDirectivesRule:Mr,KnownFragmentNamesRule:Rr,KnownTypeNamesRule:Fr,Lexer:de,Location:H,LoneAnonymousOperationRule:jr,LoneSchemaDefinitionRule:Vr,MaxIntrospectionDepthRule:Br,NoDeprecatedCustomRule:ko,NoFragmentCyclesRule:$r,NoSchemaIntrospectionCustomRule:function(e){return{Field(t){const n=qt(e.getType());n&&Jn(n)&&e.reportError(new B(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}},NoUndefinedVariablesRule:Ur,NoUnusedFragmentsRule:Hr,NoUnusedVariablesRule:qr,get OperationTypeNode(){return K},OverlappingFieldsCanBeMergedRule:Gr,PossibleFragmentSpreadsRule:oi,PossibleTypeExtensionsRule:si,ProvidedRequiredArgumentsRule:li,ScalarLeafsRule:di,SchemaMetaFieldDef:Kn,SingleFieldSubscriptionsRule:Ni,Source:Fe,Token:q,get TokenKind(){return ee},TypeInfo:Er,get TypeKind(){return Wn},TypeMetaFieldDef:Yn,TypeNameMetaFieldDef:Qn,UniqueArgumentDefinitionNamesRule:Ai,UniqueArgumentNamesRule:Ii,UniqueDirectiveNamesRule:Oi,UniqueDirectivesPerLocationRule:Li,UniqueEnumValueNamesRule:Mi,UniqueFieldDefinitionNamesRule:Ri,UniqueFragmentNamesRule:Pi,UniqueInputFieldNamesRule:ji,UniqueOperationNamesRule:Vi,UniqueOperationTypesRule:Bi,UniqueTypeNamesRule:$i,UniqueVariableNamesRule:Ui,ValidationContext:Zi,ValuesOfCorrectTypeRule:Hi,VariablesAreInputTypesRule:Wi,VariablesInAllowedPositionRule:zi,__Directive:Vn,__DirectiveLocation:Bn,__EnumValue:qn,__Field:Un,__InputValue:Hn,__Schema:jn,__Type:$n,__TypeKind:Gn,assertAbstractType:Ft,assertCompositeType:function(e){if(!Mt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL composite type.`);return e},assertDirective:function(e){if(!Sn(e))throw new Error(`Expected ${Le(e)} to be a GraphQL directive.`);return e},assertEnumType:function(e){if(!_t(e))throw new Error(`Expected ${Le(e)} to be a GraphQL Enum type.`);return e},assertEnumValueName:bt,assertInputObjectType:function(e){if(!Nt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL Input Object type.`);return e},assertInputType:function(e){if(!It(e))throw new Error(`Expected ${Le(e)} to be a GraphQL input type.`);return e},assertInterfaceType:St,assertLeafType:function(e){if(!Lt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL leaf type.`);return e},assertListType:function(e){if(!Dt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL List type.`);return e},assertName:yt,assertNamedType:function(e){if(!Ht(e))throw new Error(`Expected ${Le(e)} to be a GraphQL named type.`);return e},assertNonNullType:function(e){if(!At(e))throw new Error(`Expected ${Le(e)} to be a GraphQL Non-Null type.`);return e},assertNullableType:$t,assertObjectType:Tt,assertOutputType:function(e){if(!Ot(e))throw new Error(`Expected ${Le(e)} to be a GraphQL output type.`);return e},assertScalarType:function(e){if(!xt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL Scalar type.`);return e},assertSchema:er,assertType:function(e){if(!Et(e))throw new Error(`Expected ${Le(e)} to be a GraphQL type.`);return e},assertUnionType:function(e){if(!kt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL Union type.`);return e},assertValidName:function(e){const t=Qo(e);if(t)throw t;return e},assertValidSchema:ir,assertWrappingType:function(e){if(!Vt(e))throw new Error(`Expected ${Le(e)} to be a GraphQL wrapping type.`);return e},astFromValue:Fn,buildASTSchema:Lo,buildClientSchema:No,buildSchema:function(e,t){return Lo(je(e,{noLocation:null==t?void 0:t.noLocation,allowLegacyFragmentVariables:null==t?void 0:t.allowLegacyFragmentVariables}),{assumeValidSDL:null==t?void 0:t.assumeValidSDL,assumeValid:null==t?void 0:t.assumeValid})},coerceInputValue:mi,concatAST:function(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:J.DOCUMENT,definitions:t}},createSourceEventStream:So,defaultFieldResolver:xo,defaultTypeResolver:Eo,doTypesOverlap:hn,execute:so,executeSync:ao,extendSchema:function(e,t,n){er(e),null!=t&&t.kind===J.DOCUMENT||I(!1,"Must provide valid Document AST."),!0!==(null==n?void 0:n.assumeValid)&&!0!==(null==n?void 0:n.assumeValidSDL)&&function(e,t){const n=to(e,t);if(0!==n.length)throw new Error(n.map((e=>e.message)).join("\n\n"))}(t,e);const r=e.toConfig(),i=Do(r,t,n);return r===i?e:new tr(i)},findBreakingChanges:function(e,t){return ts(e,t).filter((e=>e.type in Xo))},findDangerousChanges:function(e,t){return ts(e,t).filter((e=>e.type in Zo))},formatError:function(e){return e.toJSON()},getArgumentValues:xi,getDirectiveValues:wi,getEnterLeaveForKind:ct,getIntrospectionQuery:_o,getLocation:F,getNamedType:qt,getNullableType:Ut,getOperationAST:function(e,t){let n=null;for(const i of e.definitions){var r;if(i.kind===J.OPERATION_DEFINITION)if(null==t){if(n)return null;n=i}else if((null===(r=i.name)||void 0===r?void 0:r.value)===t)return i}return n},getOperationRootType:function(e,t){if("query"===t.operation){const n=e.getQueryType();if(!n)throw new B("Schema does not define the required query root type.",{nodes:t});return n}if("mutation"===t.operation){const n=e.getMutationType();if(!n)throw new B("Schema is not configured for mutations.",{nodes:t});return n}if("subscription"===t.operation){const n=e.getSubscriptionType();if(!n)throw new B("Schema is not configured for subscriptions.",{nodes:t});return n}throw new B("Can only have query, mutation and subscription operations.",{nodes:t})},getVariableValues:Ei,getVisitFn:function(e,t,n){const{enter:r,leave:i}=ct(e,t);return n?i:r},graphql:function(e){return new Promise((t=>t(To(e))))},graphqlSync:function(e){const t=To(e);if(O(t))throw new Error("GraphQL execution failed to complete synchronously.");return t},introspectionFromSchema:function(e,t){const n=ao({schema:e,document:je(_o({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...t}))});return!n.errors&&n.data||M(!1),n.data},introspectionTypes:Xn,isAbstractType:Rt,isCompositeType:Mt,isConstValueNode:function e(t){return Cr(t)&&(t.kind===J.LIST?t.values.some(e):t.kind===J.OBJECT?t.fields.some((t=>e(t.value))):t.kind!==J.VARIABLE)},isDefinitionNode:function(e){return Tr(e)||Sr(e)||_r(e)},isDirective:Sn,isEnumType:_t,isEqualType:fn,isExecutableDefinitionNode:Tr,isInputObjectType:Nt,isInputType:It,isInterfaceType:Ct,isIntrospectionType:Jn,isLeafType:Lt,isListType:Dt,isNamedType:Ht,isNonNullType:At,isNullableType:Bt,isObjectType:wt,isOutputType:Ot,isRequiredArgument:tn,isRequiredInputField:dn,isScalarType:xt,isSchema:Zn,isSelectionNode:function(e){return e.kind===J.FIELD||e.kind===J.FRAGMENT_SPREAD||e.kind===J.INLINE_FRAGMENT},isSpecifiedDirective:Mn,isSpecifiedScalarType:Tn,isType:Et,isTypeDefinitionNode:kr,isTypeExtensionNode:Nr,isTypeNode:function(e){return e.kind===J.NAMED_TYPE||e.kind===J.LIST_TYPE||e.kind===J.NON_NULL_TYPE},isTypeSubTypeOf:pn,isTypeSystemDefinitionNode:Sr,isTypeSystemExtensionNode:_r,isUnionType:kt,isValidNameError:Qo,isValueNode:Cr,isWrappingType:Vt,lexicographicSortSchema:function(e){const t=e.toConfig(),n=Ge(Ro(t.types),(e=>e.name),(function(e){if(xt(e)||Jn(e))return e;if(wt(e)){const t=e.toConfig();return new Kt({...t,interfaces:()=>l(t.interfaces),fields:()=>a(t.fields)})}if(Ct(e)){const t=e.toConfig();return new nn({...t,interfaces:()=>l(t.interfaces),fields:()=>a(t.fields)})}if(kt(e)){const t=e.toConfig();return new rn({...t,types:()=>l(t.types)})}if(_t(e)){const t=e.toConfig();return new sn({...t,values:Mo(t.values,(e=>e))})}if(Nt(e)){const t=e.toConfig();return new cn({...t,fields:()=>Mo(t.fields,(e=>({...e,type:r(e.type)})))})}M(!1,"Unexpected type: "+Le(e))}));return new tr({...t,types:Object.values(n),directives:Ro(t.directives).map((function(e){const t=e.toConfig();return new kn({...t,locations:Fo(t.locations,(e=>e)),args:s(t.args)})})),query:o(t.query),mutation:o(t.mutation),subscription:o(t.subscription)});function r(e){return Dt(e)?new Pt(r(e.ofType)):At(e)?new jt(r(e.ofType)):i(e)}function i(e){return n[e.name]}function o(e){return e&&i(e)}function s(e){return Mo(e,(e=>({...e,type:r(e.type)})))}function a(e){return Mo(e,(e=>({...e,type:r(e.type),args:e.args&&s(e.args)})))}function l(e){return Ro(e).map(i)}},locatedError:io,parse:je,parseConstValue:function(e,t){const n=new Be(e,t);n.expectToken(ee.SOF);const r=n.parseConstValueLiteral();return n.expectToken(ee.EOF),r},parseType:function(e,t){const n=new Be(e,t);n.expectToken(ee.SOF);const r=n.parseTypeReference();return n.expectToken(ee.EOF),r},parseValue:Ve,print:ut,printError:function(e){return e.toString()},printIntrospectionSchema:function(e){return jo(e,Mn,Jn)},printLocation:P,printSchema:function(e){return jo(e,(e=>!Mn(e)),Po)},printSourceLocation:j,printType:Bo,recommendedRules:Ki,resolveObjMapThunk:zt,resolveReadonlyArrayThunk:Wt,responsePathAsArray:hi,separateOperations:function(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case J.OPERATION_DEFINITION:t.push(i);break;case J.FRAGMENT_DEFINITION:n[i.name.value]=Yo(i.selectionSet)}const r=Object.create(null);for(const i of t){const t=new Set;for(const e of Yo(i.selectionSet))Ko(t,n,e);r[i.name?i.name.value:""]={kind:J.DOCUMENT,definitions:e.definitions.filter((e=>e===i||e.kind===J.FRAGMENT_DEFINITION&&t.has(e.name.value)))}}return r},specifiedDirectives:Ln,specifiedRules:Yi,specifiedScalarTypes:wn,stripIgnoredCharacters:function(e){const t=Pe(e)?e:new Fe(e),n=t.body,r=new de(t);let i="",o=!1;for(;r.advance().kind!==ee.EOF;){const e=r.token,t=e.kind,s=!fe(e.kind);o&&(s||e.kind===ee.SPREAD)&&(i+=" ");const a=n.slice(e.start,e.end);t===ee.BLOCK_STRING?i+=ue(e.value,{minimize:!0}):i+=a,o=s}return i},subscribe:async function(e){arguments.length<2||I(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await So(e);return Co(t)?function(e,t){const n=e[Symbol.asyncIterator]();async function r(e){if(e.done)return e;try{return{value:await t(e.value),done:!1}}catch(r){if("function"==typeof n.return)try{await n.return()}catch(i){}throw r}}return{next:async()=>r(await n.next()),return:async()=>"function"==typeof n.return?r(await n.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof n.throw)return r(await n.throw(e));throw e},[Symbol.asyncIterator](){return this}}}(t,(t=>so({...e,rootValue:t}))):t},syntaxError:U,typeFromAST:br,validate:eo,validateSchema:rr,valueFromAST:yi,valueFromASTUntyped:vt,version:"16.11.0",versionInfo:A,visit:at,visitInParallel:lt,visitWithTypeInfo:wr},Symbol.toStringTag,{value:"Module"}));var gs=new TextDecoder;function vs(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}const ys=Symbol(),bs=Symbol();const Es=e=>{const{pushValue:t,asyncIterableIterator:n}=function(){let e=!0;const t=[];let n=vs();const r=vs(),i=async function*(){for(;;)if(t.length>0)yield t.shift();else{const e=await Promise.race([n.promise,r.promise]);if(e===ys)break;if(e!==bs)throw e}}(),o=i.return.bind(i);i.return=(...t)=>(e=!1,r.resolve(ys),o(...t));const s=i.throw.bind(i);return i.throw=t=>(e=!1,r.resolve(t),s(t)),{pushValue:function(r){!1!==e&&(t.push(r),n.resolve(bs),n=vs())},asyncIterableIterator:i}}(),r=e({next:e=>{t(e)},complete:()=>{n.return()},error:e=>{n.throw(e)}}),i=n.return;let o;return n.return=()=>(void 0===o&&(r(),o=i()),o),n};const xs=e=>"object"==typeof e&&null!==e&&"code"in e;const ws=e=>t=>Es((n=>e.subscribe(t,C(T({},n),{error(e){e instanceof CloseEvent?n.error(new Error(`Socket closed with event ${e.code} ${e.reason||""}`.trim())):n.error(e)}})))),Ts=e=>t=>{const n=e.request(t);return Es((e=>n.subscribe(e).unsubscribe))},Cs=(e,t)=>function(n,r){return i=this,o=null,s=function*(){const i=yield new S(t(e.url,{method:"POST",body:JSON.stringify(n),headers:T(T({"content-type":"application/json",accept:"application/json, multipart/mixed"},e.headers),null==r?void 0:r.headers)}).then((e=>async function(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;let n=e.headers.get("content-type");if(!n||!~n.indexOf("multipart/"))return e;let r=n.indexOf("boundary="),i="-";if(~r){let e=r+9,t=n.indexOf(";",e);i=n.slice(e,t>-1?t:void 0).trim().replace(/"/g,"")}return async function*(e,t,n){let r,i,o,s=e.getReader(),a=!n||!1,l=t.length,c="",u=[];try{let e;e:for(;!(e=await s.read()).done;){let n=gs.decode(e.value);r=c.length,c+=n;let s=n.indexOf(t);for(~s?r+=s:r=c.indexOf(t),u=[];~r;){let e=c.slice(0,r),n=c.slice(r+l);if(i){let t=e.indexOf("\r\n\r\n")+4,r=e.lastIndexOf("\r\n",t),i=!1,s=e.slice(t,r>-1?void 0:r),l=String(e.slice(0,t)).trim().split("\r\n"),c={},f=l.length;for(;o=l[--f];o=o.split(": "),c[o.shift().toLowerCase()]=o.join(": "));if(o=c["content-type"],o&&~o.indexOf("application/json"))try{s=JSON.parse(s),i=!0}catch(d){}if(o={headers:c,body:s,json:i},a?yield o:u.push(o),"--"===n.slice(0,2))break e}else t="\r\n"+t,i=l+=2;c=n,r=c.indexOf(t)}u.length&&(yield u)}}finally{u.length&&(yield u),await s.cancel()}}(e.body,`--${i}`,t)}(e,{}))));if("object"!=typeof(o=i)||null===o||!("AsyncGenerator"===o[Symbol.toStringTag]||Symbol.asyncIterator&&Symbol.asyncIterator in o))return yield i.json();var o;try{for(var s,a,l,c=((e,t,n)=>(t=e[x("asyncIterator")])?t.call(e):(e=e[x("iterator")](),t={},(n=(n,r)=>(r=e[n])&&(t[n]=t=>new Promise(((n,i,o)=>(t=r.call(e,t),o=t.done,Promise.resolve(t.value).then((e=>n({value:e,done:o})),i))))))("next"),n("return"),t))(i);s=!(a=yield new S(c.next())).done;s=!1){const e=a.value;if(e.some((e=>!e.json))){const t=e.map((e=>`Headers::\n${e.headers}\n\nBody::\n${e.body}`));throw new Error(`Expected multipart chunks to be of json type. got:\n${t}`)}yield e.map((e=>e.body))}}catch(u){l=[u]}finally{try{s&&(a=c.return)&&(yield new S(a.call(c)))}finally{if(l)throw l[0]}}},a=(e,t,n,r)=>{try{var i=s[e](t),o=(t=i.value)instanceof S,l=i.done;Promise.resolve(o?t[0]:t).then((i=>o?a("return"===e?e:"next",t[1]?{done:i.done,value:i.value}:i,n,r):n({value:i,done:l}))).catch((e=>a("throw",e,n,r)))}catch(nL){r(nL)}},l=e=>c[e]=t=>new Promise(((n,r)=>a(e,t,n,r))),c={},s=s.apply(i,o),c[x("asyncIterator")]=()=>c,l("next"),l("throw"),l("return"),c;var i,o,s,a,l,c};async function Ss(e,t){if(e.wsClient)return ws(e.wsClient);if(e.subscriptionUrl)return async function(e,t){let n;try{const{createClient:r}=await Promise.resolve().then((()=>Vj));return n=r({url:e,connectionParams:t}),ws(n)}catch(r){if(xs(r)&&"MODULE_NOT_FOUND"===r.code)throw new Error("You need to install the 'graphql-ws' package to use websockets when passing a 'subscriptionUrl'");console.error(`Error creating websocket client for ${e}`,r)}}(e.subscriptionUrl,T(T({},e.wsConnectionParams),null==t?void 0:t.headers));const n=e.legacyClient||e.legacyWsClient;return n?Ts(n):void 0}function ks(e){return JSON.stringify(e,null,2)}function _s(e){return e instanceof Error?function(e){return C(T({},e),{message:e.message,stack:e.stack})}(e):e}function Ns(e){return Array.isArray(e)?ks({errors:e.map((e=>_s(e)))}):ks({errors:[_s(e)]})}function Ds(e){return ks(e)}function As(e,t,n){const r=[];if(!e||!t)return{insertions:r,result:t};let i;try{i=je(t)}catch(nL){return{insertions:r,result:t}}const o=n||Is,s=new Er(e);return at(i,{leave(e){s.leave(e)},enter(e){if(s.enter(e),"Field"===e.kind&&!e.selectionSet){const n=Os(function(e){if(e)return e}(s.getType()),o);if(n&&e.loc){const i=function(e,t){let n=t,r=t;for(;n;){const t=e.charCodeAt(n-1);if(10===t||13===t||8232===t||8233===t)break;n--,9!==t&&11!==t&&12!==t&&32!==t&&160!==t&&(r=n)}return e.slice(n,r)}(t,e.loc.start);r.push({index:e.loc.end,string:" "+ut(n).replaceAll("\n","\n"+i)})}}}}),{insertions:r,result:Ls(t,r)}}function Is(e){if(!("getFields"in e))return[];const t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];const n=[];for(const r of Object.keys(t))Lt(t[r].type)&&n.push(r);return n}function Os(e,t){const n=qt(e);if(!e||Lt(e))return;const r=t(n);return Array.isArray(r)&&0!==r.length&&"getFields"in n?{kind:J.SELECTION_SET,selections:r.map((e=>{const r=n.getFields()[e],i=r?r.type:null;return{kind:J.FIELD,name:{kind:J.NAME,value:e},selectionSet:Os(i,t)}}))}:void 0}function Ls(e,t){if(0===t.length)return e;let n="",r=0;for(const{index:i,string:o}of t)n+=e.slice(r,i)+o,r=i;return n+=e.slice(r),n}function Ms(e,t,n){var r;const i=n?qt(n).name:null,o=[],s=[];for(let a of t){if("FragmentSpread"===a.kind){const t=a.name.value;if(!a.directives||0===a.directives.length){if(s.includes(t))continue;s.push(t)}const n=e[a.name.value];if(n){const{typeCondition:e,directives:t,selectionSet:r}=n;a={kind:J.INLINE_FRAGMENT,typeCondition:e,directives:t,selectionSet:r}}}if(a.kind===J.INLINE_FRAGMENT&&(!a.directives||0===(null==(r=a.directives)?void 0:r.length))){const t=a.typeCondition?a.typeCondition.name.value:null;if(!t||t===i){o.push(...Ms(e,a.selectionSet.selections,n));continue}}o.push(a)}return o}function Rs(e,t){const n=t?new Er(t):null,r=Object.create(null);for(const s of e.definitions)s.kind===J.FRAGMENT_DEFINITION&&(r[s.name.value]=s);const i={SelectionSet(e){const t=n?n.getParentType():null;let{selections:i}=e;return i=Ms(r,i,t),C(T({},e),{selections:i})},FragmentDefinition:()=>null},o=at(e,n?wr(n,i):i);return at(o,{SelectionSet(e){let{selections:t}=e;return t=function(e,t){var n;const r=new Map,i=[];for(const o of e)if("Field"===o.kind){const e=t(o),s=r.get(e);if(null!=(n=o.directives)&&n.length){const e=T({},o);i.push(e)}else if(null!=s&&s.selectionSet&&o.selectionSet)s.selectionSet.selections=[...s.selectionSet.selections,...o.selectionSet.selections];else if(!s){const t=T({},o);r.set(e,t),i.push(t)}}else i.push(o);return i}(t,(e=>e.alias?e.alias.value:e.name.value)),C(T({},e),{selections:t})},FragmentDefinition:()=>null})}class Fs{constructor(e){e?this.storage=e:null===e||"undefined"==typeof window?this.storage=null:this.storage={getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),get length(){let e=0;for(const t in localStorage)0===t.indexOf(`${Ps}:`)&&(e+=1);return e},clear(){for(const e in localStorage)0===e.indexOf(`${Ps}:`)&&localStorage.removeItem(e)}}}get(e){if(!this.storage)return null;const t=`${Ps}:${e}`,n=this.storage.getItem(t);return"null"===n||"undefined"===n?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,r=null;if(this.storage){const i=`${Ps}:${e}`;if(t)try{this.storage.setItem(i,t)}catch(nL){r=nL instanceof Error?nL:new Error(`${nL}`),n=function(e,t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==e.length}(this.storage,nL)}else this.storage.removeItem(i)}return{isQuotaError:n,error:r}}clear(){this.storage&&this.storage.clear()}}const Ps="graphiql";class js{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName))}edit(e,t){if("number"==typeof t&&this.items[t]){const n=this.items[t];if(n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName)return this.items.splice(t,1,e),void this.save()}const n=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==n&&(this.items.splice(n,1,e),this.save())}delete(e){const t=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==t&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){const t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){const e=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(null!=e&&e.error){if(!e.isQuotaError||!this.maxSize)return;t.shift()}else this.items=t}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}class Vs{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:e,variables:t,headers:n,operationName:r})=>{if(!this.shouldSaveQuery(e,t,n,this.history.fetchRecent()))return;this.history.push({query:e,variables:t,headers:n,operationName:r});const i=this.history.items,o=this.favorite.items;this.queries=i.concat(o)},this.deleteHistory=({query:e,variables:t,headers:n,operationName:r,favorite:i},o=!1)=>{function s(i){const o=i.items.find((i=>i.query===e&&i.variables===t&&i.headers===n&&i.operationName===r));o&&i.delete(o)}(i||o)&&s(this.favorite),(!i||o)&&s(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new js("queries",this.storage,this.maxHistoryLength),this.favorite=new js("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,r){if(!e)return!1;try{je(e)}catch(nL){return!1}return!(e.length>1e5)&&(!r||!(JSON.stringify(e)===JSON.stringify(r.query)&&(JSON.stringify(t)===JSON.stringify(r.variables)&&(JSON.stringify(n)===JSON.stringify(r.headers)||n&&!r.headers)||t&&!r.variables)))}toggleFavorite({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o}){const s={query:e,variables:t,headers:n,operationName:r,label:i};o?(s.favorite=!1,this.favorite.delete(s),this.history.push(s)):(s.favorite=!0,this.favorite.push(s),this.history.delete(s)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o},s){const a={query:e,variables:t,headers:n,operationName:r,label:i};o?this.favorite.edit(C(T({},a),{favorite:o}),s):this.history.edit(a,s),this.queries=[...this.history.items,...this.favorite.items]}}function Bs(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=e[t[i]];return r}function $s(e,t){return function(e,t){if(!t||""===t.trim()||":"===t.trim()||"{"===t.trim())return Us(e,(e=>!e.isDeprecated));const n=e.map((e=>({proximity:qs(Hs(e.label),t),entry:e})));return Us(Us(n,(e=>e.proximity<=2)),(e=>!e.entry.isDeprecated)).sort(((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.label.length-t.entry.label.length)).map((e=>e.entry))}(t,Hs(e.string))}function Us(e,t){const n=e.filter(t);return 0===n.length?e:n}function Hs(e){return e.toLowerCase().replaceAll(/\W/g,"")}function qs(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,s=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=s;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=s;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][s]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}const Ws=(e,t,n)=>{if(!t)return null!=n?n:e;const r=qt(t);return wt(r)||Nt(r)||Dt(r)||Rt(r)?e+" {\n   $1\n}":null!=n?n:e},zs=(e,t,n)=>{if(Dt(t)){const n=qt(t.ofType);return e+`[${Ws("",n,"$1")}]`}return Ws(e,t,n)},Gs=e=>{const t=e.args.filter((e=>e.type.toString().endsWith("!")));if(t.length)return e.name+`(${t.map(((e,t)=>`${e.name}: $${t+1}`))}) ${Ws("",e.type,"\n")}`};var Ks,Ys,Qs,Xs,Js,Zs,ea,ta,na,ra,ia,oa,sa,aa,la,ca,ua,da,fa,pa,ha,ma,ga,va,ya,ba,Ea,xa,wa,Ta,Ca,Sa,ka,_a,Na,Da,Aa,Ia,Oa,La,Ma,Ra,Fa,Pa,ja,Va,Ba,$a,Ua,Ha,qa;(Ks||(Ks={})).is=function(e){return"string"==typeof e},(Ys||(Ys={})).is=function(e){return"string"==typeof e},(Xs=Qs||(Qs={})).MIN_VALUE=-2147483648,Xs.MAX_VALUE=2147483647,Xs.is=function(e){return"number"==typeof e&&Xs.MIN_VALUE<=e&&e<=Xs.MAX_VALUE},(Zs=Js||(Js={})).MIN_VALUE=0,Zs.MAX_VALUE=2147483647,Zs.is=function(e){return"number"==typeof e&&Zs.MIN_VALUE<=e&&e<=Zs.MAX_VALUE},(ta=ea||(ea={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=Js.MAX_VALUE),t===Number.MAX_VALUE&&(t=Js.MAX_VALUE),{line:e,character:t}},ta.is=function(e){var t=e;return hc.objectLiteral(t)&&hc.uinteger(t.line)&&hc.uinteger(t.character)},(ra=na||(na={})).create=function(e,t,n,r){if(hc.uinteger(e)&&hc.uinteger(t)&&hc.uinteger(n)&&hc.uinteger(r))return{start:ea.create(e,t),end:ea.create(n,r)};if(ea.is(e)&&ea.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},ra.is=function(e){var t=e;return hc.objectLiteral(t)&&ea.is(t.start)&&ea.is(t.end)},(oa=ia||(ia={})).create=function(e,t){return{uri:e,range:t}},oa.is=function(e){var t=e;return hc.objectLiteral(t)&&na.is(t.range)&&(hc.string(t.uri)||hc.undefined(t.uri))},(aa=sa||(sa={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},aa.is=function(e){var t=e;return hc.objectLiteral(t)&&na.is(t.targetRange)&&hc.string(t.targetUri)&&na.is(t.targetSelectionRange)&&(na.is(t.originSelectionRange)||hc.undefined(t.originSelectionRange))},(ca=la||(la={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},ca.is=function(e){var t=e;return hc.objectLiteral(t)&&hc.numberRange(t.red,0,1)&&hc.numberRange(t.green,0,1)&&hc.numberRange(t.blue,0,1)&&hc.numberRange(t.alpha,0,1)},(da=ua||(ua={})).create=function(e,t){return{range:e,color:t}},da.is=function(e){var t=e;return hc.objectLiteral(t)&&na.is(t.range)&&la.is(t.color)},(pa=fa||(fa={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},pa.is=function(e){var t=e;return hc.objectLiteral(t)&&hc.string(t.label)&&(hc.undefined(t.textEdit)||Da.is(t))&&(hc.undefined(t.additionalTextEdits)||hc.typedArray(t.additionalTextEdits,Da.is))},(ma=ha||(ha={})).Comment="comment",ma.Imports="imports",ma.Region="region",(va=ga||(ga={})).create=function(e,t,n,r,i,o){var s={startLine:e,endLine:t};return hc.defined(n)&&(s.startCharacter=n),hc.defined(r)&&(s.endCharacter=r),hc.defined(i)&&(s.kind=i),hc.defined(o)&&(s.collapsedText=o),s},va.is=function(e){var t=e;return hc.objectLiteral(t)&&hc.uinteger(t.startLine)&&hc.uinteger(t.startLine)&&(hc.undefined(t.startCharacter)||hc.uinteger(t.startCharacter))&&(hc.undefined(t.endCharacter)||hc.uinteger(t.endCharacter))&&(hc.undefined(t.kind)||hc.string(t.kind))},(ba=ya||(ya={})).create=function(e,t){return{location:e,message:t}},ba.is=function(e){var t=e;return hc.defined(t)&&ia.is(t.location)&&hc.string(t.message)},(xa=Ea||(Ea={})).Error=1,xa.Warning=2,xa.Information=3,xa.Hint=4,(Ta=wa||(wa={})).Unnecessary=1,Ta.Deprecated=2,(Ca||(Ca={})).is=function(e){var t=e;return hc.objectLiteral(t)&&hc.string(t.href)},(ka=Sa||(Sa={})).create=function(e,t,n,r,i,o){var s={range:e,message:t};return hc.defined(n)&&(s.severity=n),hc.defined(r)&&(s.code=r),hc.defined(i)&&(s.source=i),hc.defined(o)&&(s.relatedInformation=o),s},ka.is=function(e){var t,n=e;return hc.defined(n)&&na.is(n.range)&&hc.string(n.message)&&(hc.number(n.severity)||hc.undefined(n.severity))&&(hc.integer(n.code)||hc.string(n.code)||hc.undefined(n.code))&&(hc.undefined(n.codeDescription)||hc.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(hc.string(n.source)||hc.undefined(n.source))&&(hc.undefined(n.relatedInformation)||hc.typedArray(n.relatedInformation,ya.is))},(Na=_a||(_a={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return hc.defined(n)&&n.length>0&&(i.arguments=n),i},Na.is=function(e){var t=e;return hc.defined(t)&&hc.string(t.title)&&hc.string(t.command)},(Aa=Da||(Da={})).replace=function(e,t){return{range:e,newText:t}},Aa.insert=function(e,t){return{range:{start:e,end:e},newText:t}},Aa.del=function(e){return{range:e,newText:""}},Aa.is=function(e){var t=e;return hc.objectLiteral(t)&&hc.string(t.newText)&&na.is(t.range)},(Oa=Ia||(Ia={})).create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},Oa.is=function(e){var t=e;return hc.objectLiteral(t)&&hc.string(t.label)&&(hc.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(hc.string(t.description)||void 0===t.description)},(La||(La={})).is=function(e){var t=e;return hc.string(t)},(Ra=Ma||(Ma={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},Ra.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},Ra.del=function(e,t){return{range:e,newText:"",annotationId:t}},Ra.is=function(e){var t=e;return Da.is(t)&&(Ia.is(t.annotationId)||La.is(t.annotationId))},(Pa=Fa||(Fa={})).create=function(e,t){return{textDocument:e,edits:t}},Pa.is=function(e){var t=e;return hc.defined(t)&&Ya.is(t.textDocument)&&Array.isArray(t.edits)},(Va=ja||(ja={})).create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},Va.is=function(e){var t=e;return t&&"create"===t.kind&&hc.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||hc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||hc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||La.is(t.annotationId))},($a=Ba||(Ba={})).create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},$a.is=function(e){var t=e;return t&&"rename"===t.kind&&hc.string(t.oldUri)&&hc.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||hc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||hc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||La.is(t.annotationId))},(Ha=Ua||(Ua={})).create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},Ha.is=function(e){var t=e;return t&&"delete"===t.kind&&hc.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||hc.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||hc.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||La.is(t.annotationId))},(qa||(qa={})).is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return hc.string(e.kind)?ja.is(e)||Ba.is(e)||Ua.is(e):Fa.is(e)})))};var Wa,za,Ga,Ka,Ya,Qa,Xa,Ja,Za,el,tl,nl,rl,il,ol,sl,al,ll,cl,ul,dl,fl,pl,hl,ml,gl,vl,yl,bl,El,xl,wl,Tl,Cl,Sl,kl,_l,Nl,Dl,Al,Il,Ol,Ll,Ml,Rl,Fl,Pl,jl,Vl,Bl,$l,Ul,Hl,ql,Wl,zl,Gl,Kl,Yl,Ql,Xl,Jl,Zl,ec,tc,nc,rc,ic,oc,sc,ac,lc,cc,uc,dc,fc=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=Da.insert(e,t):La.is(n)?(i=n,r=Ma.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Ma.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=Da.replace(e,t):La.is(n)?(i=n,r=Ma.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Ma.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=Da.del(e):La.is(t)?(r=t,n=Ma.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=Ma.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),pc=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(La.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new pc(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Fa.is(e)){var n=new fc(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new fc(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(Ya.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new fc(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new fc(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new pc,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(Ia.is(t)||La.is(t)?r=t:n=t,void 0===r?i=ja.create(e,n):(o=La.is(r)?r:this._changeAnnotations.manage(r),i=ja.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(Ia.is(n)||La.is(n)?i=n:r=n,void 0===i?o=Ba.create(e,t,r):(s=La.is(i)?i:this._changeAnnotations.manage(i),o=Ba.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(Ia.is(t)||La.is(t)?r=t:n=t,void 0===r?i=Ua.create(e,n):(o=La.is(r)?r:this._changeAnnotations.manage(r),i=Ua.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}(),(za=Wa||(Wa={})).create=function(e){return{uri:e}},za.is=function(e){var t=e;return hc.defined(t)&&hc.string(t.uri)},(Ka=Ga||(Ga={})).create=function(e,t){return{uri:e,version:t}},Ka.is=function(e){var t=e;return hc.defined(t)&&hc.string(t.uri)&&hc.integer(t.version)},(Qa=Ya||(Ya={})).create=function(e,t){return{uri:e,version:t}},Qa.is=function(e){var t=e;return hc.defined(t)&&hc.string(t.uri)&&(null===t.version||hc.integer(t.version))},(Ja=Xa||(Xa={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},Ja.is=function(e){var t=e;return hc.defined(t)&&hc.string(t.uri)&&hc.string(t.languageId)&&hc.integer(t.version)&&hc.string(t.text)},(el=Za||(Za={})).PlainText="plaintext",el.Markdown="markdown",el.is=function(e){var t=e;return t===el.PlainText||t===el.Markdown},(tl||(tl={})).is=function(e){var t=e;return hc.objectLiteral(e)&&Za.is(t.kind)&&hc.string(t.value)},(rl=nl||(nl={})).Text=1,rl.Method=2,rl.Function=3,rl.Constructor=4,rl.Field=5,rl.Variable=6,rl.Class=7,rl.Interface=8,rl.Module=9,rl.Property=10,rl.Unit=11,rl.Value=12,rl.Enum=13,rl.Keyword=14,rl.Snippet=15,rl.Color=16,rl.File=17,rl.Reference=18,rl.Folder=19,rl.EnumMember=20,rl.Constant=21,rl.Struct=22,rl.Event=23,rl.Operator=24,rl.TypeParameter=25,(ol=il||(il={})).PlainText=1,ol.Snippet=2,(sl||(sl={})).Deprecated=1,(ll=al||(al={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},ll.is=function(e){var t=e;return t&&hc.string(t.newText)&&na.is(t.insert)&&na.is(t.replace)},(ul=cl||(cl={})).asIs=1,ul.adjustIndentation=2,(dl||(dl={})).is=function(e){var t=e;return t&&(hc.string(t.detail)||void 0===t.detail)&&(hc.string(t.description)||void 0===t.description)},(fl||(fl={})).create=function(e){return{label:e}},(pl||(pl={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(ml=hl||(hl={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},ml.is=function(e){var t=e;return hc.string(t)||hc.objectLiteral(t)&&hc.string(t.language)&&hc.string(t.value)},(gl||(gl={})).is=function(e){var t=e;return!!t&&hc.objectLiteral(t)&&(tl.is(t.contents)||hl.is(t.contents)||hc.typedArray(t.contents,hl.is))&&(void 0===e.range||na.is(e.range))},(vl||(vl={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(yl||(yl={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return hc.defined(t)&&(i.documentation=t),hc.defined(n)?i.parameters=n:i.parameters=[],i},(El=bl||(bl={})).Text=1,El.Read=2,El.Write=3,(xl||(xl={})).create=function(e,t){var n={range:e};return hc.number(t)&&(n.kind=t),n},(Tl=wl||(wl={})).File=1,Tl.Module=2,Tl.Namespace=3,Tl.Package=4,Tl.Class=5,Tl.Method=6,Tl.Property=7,Tl.Field=8,Tl.Constructor=9,Tl.Enum=10,Tl.Interface=11,Tl.Function=12,Tl.Variable=13,Tl.Constant=14,Tl.String=15,Tl.Number=16,Tl.Boolean=17,Tl.Array=18,Tl.Object=19,Tl.Key=20,Tl.Null=21,Tl.EnumMember=22,Tl.Struct=23,Tl.Event=24,Tl.Operator=25,Tl.TypeParameter=26,(Cl||(Cl={})).Deprecated=1,(Sl||(Sl={})).create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o},(kl||(kl={})).create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}},(Nl=_l||(_l={})).create=function(e,t,n,r,i,o){var s={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(s.children=o),s},Nl.is=function(e){var t=e;return t&&hc.string(t.name)&&hc.number(t.kind)&&na.is(t.range)&&na.is(t.selectionRange)&&(void 0===t.detail||hc.string(t.detail))&&(void 0===t.deprecated||hc.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(Al=Dl||(Dl={})).Empty="",Al.QuickFix="quickfix",Al.Refactor="refactor",Al.RefactorExtract="refactor.extract",Al.RefactorInline="refactor.inline",Al.RefactorRewrite="refactor.rewrite",Al.Source="source",Al.SourceOrganizeImports="source.organizeImports",Al.SourceFixAll="source.fixAll",(Ol=Il||(Il={})).Invoked=1,Ol.Automatic=2,(Ml=Ll||(Ll={})).create=function(e,t,n){var r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},Ml.is=function(e){var t=e;return hc.defined(t)&&hc.typedArray(t.diagnostics,Sa.is)&&(void 0===t.only||hc.typedArray(t.only,hc.string))&&(void 0===t.triggerKind||t.triggerKind===Il.Invoked||t.triggerKind===Il.Automatic)},(Fl=Rl||(Rl={})).create=function(e,t,n){var r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):_a.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},Fl.is=function(e){var t=e;return t&&hc.string(t.title)&&(void 0===t.diagnostics||hc.typedArray(t.diagnostics,Sa.is))&&(void 0===t.kind||hc.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||_a.is(t.command))&&(void 0===t.isPreferred||hc.boolean(t.isPreferred))&&(void 0===t.edit||qa.is(t.edit))},(jl=Pl||(Pl={})).create=function(e,t){var n={range:e};return hc.defined(t)&&(n.data=t),n},jl.is=function(e){var t=e;return hc.defined(t)&&na.is(t.range)&&(hc.undefined(t.command)||_a.is(t.command))},(Bl=Vl||(Vl={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},Bl.is=function(e){var t=e;return hc.defined(t)&&hc.uinteger(t.tabSize)&&hc.boolean(t.insertSpaces)},(Ul=$l||($l={})).create=function(e,t,n){return{range:e,target:t,data:n}},Ul.is=function(e){var t=e;return hc.defined(t)&&na.is(t.range)&&(hc.undefined(t.target)||hc.string(t.target))},(ql=Hl||(Hl={})).create=function(e,t){return{range:e,parent:t}},ql.is=function(e){var t=e;return hc.objectLiteral(t)&&na.is(t.range)&&(void 0===t.parent||ql.is(t.parent))},(zl=Wl||(Wl={})).namespace="namespace",zl.type="type",zl.class="class",zl.enum="enum",zl.interface="interface",zl.struct="struct",zl.typeParameter="typeParameter",zl.parameter="parameter",zl.variable="variable",zl.property="property",zl.enumMember="enumMember",zl.event="event",zl.function="function",zl.method="method",zl.macro="macro",zl.keyword="keyword",zl.modifier="modifier",zl.comment="comment",zl.string="string",zl.number="number",zl.regexp="regexp",zl.operator="operator",zl.decorator="decorator",(Kl=Gl||(Gl={})).declaration="declaration",Kl.definition="definition",Kl.readonly="readonly",Kl.static="static",Kl.deprecated="deprecated",Kl.abstract="abstract",Kl.async="async",Kl.modification="modification",Kl.documentation="documentation",Kl.defaultLibrary="defaultLibrary",(Yl||(Yl={})).is=function(e){var t=e;return hc.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(Xl=Ql||(Ql={})).create=function(e,t){return{range:e,text:t}},Xl.is=function(e){var t=e;return null!=t&&na.is(t.range)&&hc.string(t.text)},(Zl=Jl||(Jl={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Zl.is=function(e){var t=e;return null!=t&&na.is(t.range)&&hc.boolean(t.caseSensitiveLookup)&&(hc.string(t.variableName)||void 0===t.variableName)},(tc=ec||(ec={})).create=function(e,t){return{range:e,expression:t}},tc.is=function(e){var t=e;return null!=t&&na.is(t.range)&&(hc.string(t.expression)||void 0===t.expression)},(rc=nc||(nc={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},rc.is=function(e){var t=e;return hc.defined(t)&&na.is(e.stoppedLocation)},(oc=ic||(ic={})).Type=1,oc.Parameter=2,oc.is=function(e){return 1===e||2===e},(ac=sc||(sc={})).create=function(e){return{value:e}},ac.is=function(e){var t=e;return hc.objectLiteral(t)&&(void 0===t.tooltip||hc.string(t.tooltip)||tl.is(t.tooltip))&&(void 0===t.location||ia.is(t.location))&&(void 0===t.command||_a.is(t.command))},(cc=lc||(lc={})).create=function(e,t,n){var r={position:e,label:t};return void 0!==n&&(r.kind=n),r},cc.is=function(e){var t=e;return hc.objectLiteral(t)&&ea.is(t.position)&&(hc.string(t.label)||hc.typedArray(t.label,sc.is))&&(void 0===t.kind||ic.is(t.kind))&&void 0===t.textEdits||hc.typedArray(t.textEdits,Da.is)&&(void 0===t.tooltip||hc.string(t.tooltip)||tl.is(t.tooltip))&&(void 0===t.paddingLeft||hc.boolean(t.paddingLeft))&&(void 0===t.paddingRight||hc.boolean(t.paddingRight))},(uc||(uc={})).is=function(e){var t=e;return hc.objectLiteral(t)&&Ys.is(t.uri)&&hc.string(t.name)},function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,i=e.slice(0,r),o=e.slice(r);t(i,n),t(o,n);for(var s=0,a=0,l=0;s<i.length&&a<o.length;){var c=n(i[s],o[a]);e[l++]=c<=0?i[s++]:o[a++]}for(;s<i.length;)e[l++]=i[s++];for(;a<o.length;)e[l++]=o[a++];return e}e.create=function(e,t,n,r){return new vc(e,t,n,r)},e.is=function(e){var t=e;return!!(hc.defined(t)&&hc.string(t.uri)&&(hc.undefined(t.languageId)||hc.string(t.languageId))&&hc.uinteger(t.lineCount)&&hc.func(t.getText)&&hc.func(t.positionAt)&&hc.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),i=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=r.length,s=i.length-1;s>=0;s--){var a=i[s],l=e.offsetAt(a.range.start),c=e.offsetAt(a.range.end);if(!(c<=o))throw new Error("Overlapping edit");r=r.substring(0,l)+a.newText+r.substring(c,r.length),o=l}return r}}(dc||(dc={}));var hc,mc,gc,vc=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return ea.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var o=n-1;return ea.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();mc=hc||(hc={}),gc=Object.prototype.toString,mc.defined=function(e){return void 0!==e},mc.undefined=function(e){return void 0===e},mc.boolean=function(e){return!0===e||!1===e},mc.string=function(e){return"[object String]"===gc.call(e)},mc.number=function(e){return"[object Number]"===gc.call(e)},mc.numberRange=function(e,t,n){return"[object Number]"===gc.call(e)&&t<=e&&e<=n},mc.integer=function(e){return"[object Number]"===gc.call(e)&&-2147483648<=e&&e<=2147483647},mc.uinteger=function(e){return"[object Number]"===gc.call(e)&&0<=e&&e<=2147483647},mc.func=function(e){return"[object Function]"===gc.call(e)},mc.objectLiteral=function(e){return null!==e&&"object"==typeof e},mc.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)};class yc{constructor(e){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,t=!0,n=!1)=>{let r=null,i=null;if("string"==typeof e){i=new RegExp(e,n?"i":"g").test(this._sourceText.slice(this._pos,this._pos+e.length)),r=e}else e instanceof RegExp&&(i=this._sourceText.slice(this._pos).match(e),r=null==i?void 0:i[0]);return!(null==i||!("string"==typeof e||i instanceof Array&&this._sourceText.startsWith(i[0],this._pos)))&&(t&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),i)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0!==e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"==typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}function bc(e){return{ofRule:e}}function Ec(e,t){return{ofRule:e,isList:!0,separator:t}}function xc(e,t){return{style:t,match:t=>t.kind===e}}function wc(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const Tc=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,Cc={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},Sc={Document:[Ec("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return J.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[_c("query"),bc(Nc("def")),bc("VariableDefinitions"),Ec("Directive"),"SelectionSet"],Mutation:[_c("mutation"),bc(Nc("def")),bc("VariableDefinitions"),Ec("Directive"),"SelectionSet"],Subscription:[_c("subscription"),bc(Nc("def")),bc("VariableDefinitions"),Ec("Directive"),"SelectionSet"],VariableDefinitions:[wc("("),Ec("VariableDefinition"),wc(")")],VariableDefinition:["Variable",wc(":"),"Type",bc("DefaultValue")],Variable:[wc("$","variable"),Nc("variable")],DefaultValue:[wc("="),"Value"],SelectionSet:[wc("{"),Ec("Selection"),wc("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[Nc("property"),wc(":"),Nc("qualifier"),bc("Arguments"),Ec("Directive"),bc("SelectionSet")],Field:[Nc("property"),bc("Arguments"),Ec("Directive"),bc("SelectionSet")],Arguments:[wc("("),Ec("Argument"),wc(")")],Argument:[Nc("attribute"),wc(":"),"Value"],FragmentSpread:[wc("..."),Nc("def"),Ec("Directive")],InlineFragment:[wc("..."),bc("TypeCondition"),Ec("Directive"),"SelectionSet"],FragmentDefinition:[_c("fragment"),bc(function(e,t){const n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every((t=>t.match&&!t.match(e)))},e}(Nc("def"),[_c("on")])),"TypeCondition",Ec("Directive"),"SelectionSet"],TypeCondition:[_c("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[xc("Number","number")],StringValue:[{style:"string",match:e=>"String"===e.kind,update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[xc("Name","builtin")],NullValue:[xc("Name","keyword")],EnumValue:[Nc("string-2")],ListValue:[wc("["),Ec("Value"),wc("]")],ObjectValue:[wc("{"),Ec("ObjectField"),wc("}")],ObjectField:[Nc("attribute"),wc(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[wc("["),"Type",wc("]"),bc(wc("!"))],NonNullType:["NamedType",bc(wc("!"))],NamedType:[(kc="atom",{style:kc,match:e=>"Name"===e.kind,update(e,t){var n;(null===(n=e.prevState)||void 0===n?void 0:n.prevState)&&(e.name=t.value,e.prevState.prevState.type=t.value)}})],Directive:[wc("@","meta"),Nc("meta"),bc("Arguments")],DirectiveDef:[_c("directive"),wc("@","meta"),Nc("meta"),bc("ArgumentsDef"),_c("on"),Ec("DirectiveLocation",wc("|"))],InterfaceDef:[_c("interface"),Nc("atom"),bc("Implements"),Ec("Directive"),wc("{"),Ec("FieldDef"),wc("}")],Implements:[_c("implements"),Ec("NamedType",wc("&"))],DirectiveLocation:[Nc("string-2")],SchemaDef:[_c("schema"),Ec("Directive"),wc("{"),Ec("OperationTypeDef"),wc("}")],OperationTypeDef:[Nc("keyword"),wc(":"),Nc("atom")],ScalarDef:[_c("scalar"),Nc("atom"),Ec("Directive")],ObjectTypeDef:[_c("type"),Nc("atom"),bc("Implements"),Ec("Directive"),wc("{"),Ec("FieldDef"),wc("}")],FieldDef:[Nc("property"),bc("ArgumentsDef"),wc(":"),"Type",Ec("Directive")],ArgumentsDef:[wc("("),Ec("InputValueDef"),wc(")")],InputValueDef:[Nc("attribute"),wc(":"),"Type",bc("DefaultValue"),Ec("Directive")],UnionDef:[_c("union"),Nc("atom"),Ec("Directive"),wc("="),Ec("UnionMember",wc("|"))],UnionMember:["NamedType"],EnumDef:[_c("enum"),Nc("atom"),Ec("Directive"),wc("{"),Ec("EnumValueDef"),wc("}")],EnumValueDef:[Nc("string-2"),Ec("Directive")],InputDef:[_c("input"),Nc("atom"),Ec("Directive"),wc("{"),Ec("InputValueDef"),wc("}")],ExtendDef:[_c("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return J.SCHEMA_EXTENSION;case"scalar":return J.SCALAR_TYPE_EXTENSION;case"type":return J.OBJECT_TYPE_EXTENSION;case"interface":return J.INTERFACE_TYPE_EXTENSION;case"union":return J.UNION_TYPE_EXTENSION;case"enum":return J.ENUM_TYPE_EXTENSION;case"input":return J.INPUT_OBJECT_TYPE_EXTENSION}},[J.SCHEMA_EXTENSION]:["SchemaDef"],[J.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[J.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[J.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[J.UNION_TYPE_EXTENSION]:["UnionDef"],[J.ENUM_TYPE_EXTENSION]:["EnumDef"],[J.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};var kc;function _c(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function Nc(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function Dc(e={eatWhitespace:e=>e.eatWhile(Tc),lexRules:Cc,parseRules:Sc,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return Oc(e.parseRules,t,J.DOCUMENT),t},token:(t,n)=>function(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:i,parseRules:o,eatWhitespace:s,editorConfig:a}=n;t.rule&&0===t.rule.length?Lc(t):t.needsAdvance&&(t.needsAdvance=!1,Mc(t,!0));if(e.sol()){const n=(null==a?void 0:a.tabSize)||2;t.indentLevel=Math.floor(e.indentation()/n)}if(s(e))return"ws";const l=function(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=t.match(e[n[r]]);if(i&&i instanceof Array)return{kind:n[r],value:i[0]}}}(i,e);if(!l){return e.match(/\S+/)||e.match(/\s/),Oc(Ic,t,"Invalid"),"invalidchar"}if("Comment"===l.kind)return Oc(Ic,t,"Comment"),"comment";const c=Ac({},t);if("Punctuation"===l.kind)if(/^[{([]/.test(l.value))void 0!==t.indentLevel&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(l.value)){const e=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&e.length>0&&e.at(-1)<t.indentLevel&&(t.indentLevel=e.at(-1))}for(;t.rule;){let n="function"==typeof t.rule?0===t.step?t.rule(l,e):null:t.rule[t.step];if(t.needsSeparator&&(n=null==n?void 0:n.separator),n){if(n.ofRule&&(n=n.ofRule),"string"==typeof n){Oc(o,t,n);continue}if(null===(r=n.match)||void 0===r?void 0:r.call(n,l))return n.update&&n.update(t,l),"Punctuation"===l.kind?Mc(t,!0):t.needsAdvance=!0,n.style}Fc(t)}return Ac(t,c),Oc(Ic,t,"Invalid"),"invalidchar"}(t,n,e)}}function Ac(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}const Ic={Invalid:[],Comment:[]};function Oc(e,t,n){if(!e[n])throw new TypeError("Unknown rule: "+n);t.prevState=Object.assign({},t),t.kind=n,t.name=null,t.type=null,t.rule=e[n],t.step=0,t.needsSeparator=!1}function Lc(e){e.prevState&&(e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.needsSeparator=e.prevState.needsSeparator,e.prevState=e.prevState.prevState)}function Mc(e,t){var n;if(Rc(e)&&e.rule){const n=e.rule[e.step];if(n.separator){const{separator:t}=n;if(e.needsSeparator=!e.needsSeparator,!e.needsSeparator&&t.ofRule)return}if(t)return}for(e.needsSeparator=!1,e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)Lc(e),e.rule&&(Rc(e)?(null===(n=e.rule)||void 0===n?void 0:n[e.step].separator)&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function Rc(e){const t=Array.isArray(e.rule)&&"string"!=typeof e.rule[e.step]&&e.rule[e.step];return t&&t.isList}function Fc(e){for(;e.rule&&(!Array.isArray(e.rule)||!e.rule[e.step].ofRule);)Lc(e);e.rule&&Mc(e,!1)}function Pc(e,t){const n=e.split("\n"),r=Dc();let i=r.startState(),o="",s=new yc("");for(let a=0;a<n.length;a++){for(s=new yc(n[a]);!s.eol();){o=r.token(s,i);if("BREAK"===t(s,i,o,a))break}t(s,i,o,a),i.kind||(i=r.startState())}return{start:s.getStartOfToken(),end:s.getCurrentPosition(),string:s.current(),state:i,style:o}}var jc,Vc;(Vc=jc||(jc={})).TYPE_SYSTEM="TYPE_SYSTEM",Vc.EXECUTABLE="EXECUTABLE",Vc.UNKNOWN="UNKNOWN";const Bc=[J.SCHEMA_DEFINITION,J.OPERATION_TYPE_DEFINITION,J.SCALAR_TYPE_DEFINITION,J.OBJECT_TYPE_DEFINITION,J.INTERFACE_TYPE_DEFINITION,J.UNION_TYPE_DEFINITION,J.ENUM_TYPE_DEFINITION,J.INPUT_OBJECT_TYPE_DEFINITION,J.DIRECTIVE_DEFINITION,J.SCHEMA_EXTENSION,J.SCALAR_TYPE_EXTENSION,J.OBJECT_TYPE_EXTENSION,J.INTERFACE_TYPE_EXTENSION,J.UNION_TYPE_EXTENSION,J.ENUM_TYPE_EXTENSION,J.INPUT_OBJECT_TYPE_EXTENSION],$c=e=>{let t=jc.UNKNOWN;if(e)try{at(je(e),{enter(e){if("Document"!==e.kind)return!!Bc.includes(e.kind)&&(t=jc.TYPE_SYSTEM,st);t=jc.EXECUTABLE}})}catch(n){return t}return t};function Uc(e,t,n,r,i){const o=r||function(e,t,n=0){let r=null,i=null,o=null;const s=Pc(e,((e,s,a,l)=>{if(!(l!==t.line||e.getCurrentPosition()+n<t.character+1))return r=a,i=Object.assign({},s),o=e.current(),"BREAK"}));return{start:s.start,end:s.end,string:o||s.string,state:i||s.state,style:r||s.style}}(e,t,1);if(!o)return null;const s="Invalid"===o.state.kind?o.state.prevState:o.state;if(!s)return null;const a=function(e,t){let n,r,i,o,s,a,l,c,u,d,f;return qc(t,(t=>{var p;switch(t.kind){case Wc.QUERY:case"ShortQuery":d=e.getQueryType();break;case Wc.MUTATION:d=e.getMutationType();break;case Wc.SUBSCRIPTION:d=e.getSubscriptionType();break;case Wc.INLINE_FRAGMENT:case Wc.FRAGMENT_DEFINITION:t.type&&(d=e.getType(t.type));break;case Wc.FIELD:case Wc.ALIASED_FIELD:d&&t.name?(s=u?Hc(e,u,t.name):null,d=s?s.type:null):s=null;break;case Wc.SELECTION_SET:u=qt(d);break;case Wc.DIRECTIVE:i=t.name?e.getDirective(t.name):null;break;case Wc.INTERFACE_DEF:t.name&&(l=null,f=new nn({name:t.name,interfaces:[],fields:{}}));break;case Wc.OBJECT_TYPE_DEF:t.name&&(f=null,l=new Kt({name:t.name,interfaces:[],fields:{}}));break;case Wc.ARGUMENTS:if(t.prevState)switch(t.prevState.kind){case Wc.FIELD:r=s&&s.args;break;case Wc.DIRECTIVE:r=i&&i.args;break;case Wc.ALIASED_FIELD:{const n=null===(p=t.prevState)||void 0===p?void 0:p.name;if(!n){r=null;break}const i=u?Hc(e,u,n):null;if(!i){r=null;break}r=i.args;break}default:r=null}else r=null;break;case Wc.ARGUMENT:if(r)for(let e=0;e<r.length;e++)if(r[e].name===t.name){n=r[e];break}a=null==n?void 0:n.type;break;case Wc.VARIABLE_DEFINITION:case Wc.VARIABLE:d=a;break;case Wc.ENUM_VALUE:const h=qt(a);o=h instanceof sn?h.getValues().find((e=>e.value===t.name)):null;break;case Wc.LIST_VALUE:const m=Ut(a);a=m instanceof Pt?m.ofType:null;break;case Wc.OBJECT_VALUE:const g=qt(a);c=g instanceof cn?g.getFields():null;break;case Wc.OBJECT_FIELD:const v=t.name&&c?c[t.name]:null;a=null==v?void 0:v.type,s=v,d=s?s.type:null;break;case Wc.NAMED_TYPE:t.name&&(d=e.getType(t.name))}})),{argDef:n,argDefs:r,directiveDef:i,enumValue:o,fieldDef:s,inputType:a,objectFieldDefs:c,parentType:u,type:d,interfaceDef:f,objectTypeDef:l}}(n,o.state);var l,c;return{token:o,state:s,typeInfo:a,mode:(null==i?void 0:i.mode)||(l=e,(null==(c=null==i?void 0:i.uri)?void 0:c.endsWith(".graphqls"))?jc.TYPE_SYSTEM:$c(l))}}function Hc(e,t,n){return n===Kn.name&&e.getQueryType()===t?Kn:n===Yn.name&&e.getQueryType()===t?Yn:n===Qn.name&&Mt(t)?Qn:"getFields"in t?t.getFields()[n]:null}function qc(e,t){const n=[];let r=e;for(;null==r?void 0:r.kind;)n.push(r),r=r.prevState;for(let i=n.length-1;i>=0;i--)t(n[i])}const Wc=Object.assign(Object.assign({},J),{ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"});var zc;!function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(zc||(zc={}));const Gc={command:"editor.action.triggerSuggest",title:"Suggestions"};function Kc(e,t,n,r,i,o){var s;const a=Object.assign(Object.assign({},o),{schema:e}),l=Uc(t,n,e,r,o);if(!l)return[];const{state:c,typeInfo:u,mode:d,token:f}=l,{kind:p,step:h,prevState:m}=c;if(p===Wc.DOCUMENT)return d===jc.TYPE_SYSTEM?function(e){return $s(e,[{label:"extend",kind:zc.Function},...Yc])}(f):d===jc.EXECUTABLE?function(e){return $s(e,Qc)}(f):function(e){return $s(e,[{label:"extend",kind:zc.Function},...Qc,...Yc])}(f);if(p===Wc.EXTEND_DEF)return function(e){return $s(e,Yc)}(f);if((null===(s=null==m?void 0:m.prevState)||void 0===s?void 0:s.kind)===Wc.EXTENSION_DEFINITION&&c.name)return $s(f,[]);if((null==m?void 0:m.kind)===J.SCALAR_TYPE_EXTENSION)return $s(f,Object.values(e.getTypeMap()).filter(xt).map((e=>({label:e.name,kind:zc.Function}))));if((null==m?void 0:m.kind)===J.OBJECT_TYPE_EXTENSION)return $s(f,Object.values(e.getTypeMap()).filter((e=>wt(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:zc.Function}))));if((null==m?void 0:m.kind)===J.INTERFACE_TYPE_EXTENSION)return $s(f,Object.values(e.getTypeMap()).filter(Ct).map((e=>({label:e.name,kind:zc.Function}))));if((null==m?void 0:m.kind)===J.UNION_TYPE_EXTENSION)return $s(f,Object.values(e.getTypeMap()).filter(kt).map((e=>({label:e.name,kind:zc.Function}))));if((null==m?void 0:m.kind)===J.ENUM_TYPE_EXTENSION)return $s(f,Object.values(e.getTypeMap()).filter((e=>_t(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:zc.Function}))));if((null==m?void 0:m.kind)===J.INPUT_OBJECT_TYPE_EXTENSION)return $s(f,Object.values(e.getTypeMap()).filter(Nt).map((e=>({label:e.name,kind:zc.Function}))));if(p===Wc.IMPLEMENTS||p===Wc.NAMED_TYPE&&(null==m?void 0:m.kind)===Wc.IMPLEMENTS)return function(e,t,n,r,i){if(t.needsSeparator)return[];const o=n.getTypeMap(),s=Bs(o).filter(Ct),a=s.map((({name:e})=>e)),l=new Set;Pc(r,((e,t)=>{var r,o,s,c,u;if(t.name&&(t.kind!==Wc.INTERFACE_DEF||a.includes(t.name)||l.add(t.name),t.kind===Wc.NAMED_TYPE&&(null===(r=t.prevState)||void 0===r?void 0:r.kind)===Wc.IMPLEMENTS))if(i.interfaceDef){if(null===(o=i.interfaceDef)||void 0===o?void 0:o.getInterfaces().find((({name:e})=>e===t.name)))return;const e=n.getType(t.name),r=null===(s=i.interfaceDef)||void 0===s?void 0:s.toConfig();i.interfaceDef=new nn(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new nn({name:t.name,fields:{}})]}))}else if(i.objectTypeDef){if(null===(c=i.objectTypeDef)||void 0===c?void 0:c.getInterfaces().find((({name:e})=>e===t.name)))return;const e=n.getType(t.name),r=null===(u=i.objectTypeDef)||void 0===u?void 0:u.toConfig();i.objectTypeDef=new Kt(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new nn({name:t.name,fields:{}})]}))}}));const c=i.interfaceDef||i.objectTypeDef,u=((null==c?void 0:c.getInterfaces())||[]).map((({name:e})=>e)),d=s.concat([...l].map((e=>({name:e})))).filter((({name:e})=>e!==(null==c?void 0:c.name)&&!u.includes(e)));return $s(e,d.map((e=>{const t={label:e.name,kind:zc.Interface,type:e};return(null==e?void 0:e.description)&&(t.documentation=e.description),t})))}(f,c,e,t,u);if(p===Wc.SELECTION_SET||p===Wc.FIELD||p===Wc.ALIASED_FIELD)return function(e,t,n){var r;if(t.parentType){const{parentType:i}=t;let o=[];return"getFields"in i&&(o=Bs(i.getFields())),Mt(i)&&o.push(Qn),i===(null===(r=null==n?void 0:n.schema)||void 0===r?void 0:r.getQueryType())&&o.push(Kn,Yn),$s(e,o.map(((t,r)=>{var i;const o={sortText:String(r)+t.name,label:t.name,detail:String(t.type),documentation:null!==(i=t.description)&&void 0!==i?i:void 0,deprecated:Boolean(t.deprecationReason),isDeprecated:Boolean(t.deprecationReason),deprecationReason:t.deprecationReason,kind:zc.Field,labelDetails:{detail:" "+t.type.toString()},type:t.type};return(null==n?void 0:n.fillLeafsOnComplete)&&(o.insertText=Gs(t),o.insertText||(o.insertText=Ws(t.name,t.type,t.name+(e.state.needsAdvance?"":"\n"))),o.insertText&&(o.insertTextFormat=il.Snippet,o.insertTextMode=cl.adjustIndentation,o.command=Gc)),o})))}return[]}(f,u,a);if(p===Wc.ARGUMENTS||p===Wc.ARGUMENT&&0===h){const{argDefs:e}=u;if(e)return $s(f,e.map((e=>{var t;return{label:e.name,insertText:zs(e.name+": ",e.type),insertTextMode:cl.adjustIndentation,insertTextFormat:il.Snippet,command:Gc,labelDetails:{detail:" "+String(e.type)},documentation:null!==(t=e.description)&&void 0!==t?t:void 0,kind:zc.Variable,type:e.type}})))}if((p===Wc.OBJECT_VALUE||p===Wc.OBJECT_FIELD&&0===h)&&u.objectFieldDefs){const e=Bs(u.objectFieldDefs),t=p===Wc.OBJECT_VALUE?zc.Value:zc.Field;return $s(f,e.map((e=>{var n;return{label:e.name,detail:String(e.type),documentation:null!==(n=null==e?void 0:e.description)&&void 0!==n?n:void 0,kind:t,type:e.type,insertText:zs(e.name+": ",e.type),insertTextMode:cl.adjustIndentation,insertTextFormat:il.Snippet,command:Gc}})))}if(p===Wc.ENUM_VALUE||p===Wc.LIST_VALUE&&1===h||p===Wc.OBJECT_FIELD&&2===h||p===Wc.ARGUMENT&&2===h)return function(e,t,n,r){const i=qt(t.inputType),o=Jc(n,r,e).filter((e=>e.detail===(null==i?void 0:i.name)));if(i instanceof sn){return $s(e,i.getValues().map((e=>{var t;return{label:e.name,detail:String(i),documentation:null!==(t=e.description)&&void 0!==t?t:void 0,deprecated:Boolean(e.deprecationReason),isDeprecated:Boolean(e.deprecationReason),deprecationReason:e.deprecationReason,kind:zc.EnumMember,type:i}})).concat(o))}if(i===En)return $s(e,o.concat([{label:"true",detail:String(En),documentation:"Not false.",kind:zc.Variable,type:En},{label:"false",detail:String(En),documentation:"Not true.",kind:zc.Variable,type:En}]));return o}(f,u,t,e);if(p===Wc.VARIABLE&&1===h){const n=qt(u.inputType);return $s(f,Jc(t,e,f).filter((e=>e.detail===(null==n?void 0:n.name))))}if(p===Wc.TYPE_CONDITION&&1===h||p===Wc.NAMED_TYPE&&null!=m&&m.kind===Wc.TYPE_CONDITION)return function(e,t,n,r){let i;if(t.parentType)if(Rt(t.parentType)){const e=Ft(t.parentType),r=n.getPossibleTypes(e),o=Object.create(null);for(const t of r)for(const e of t.getInterfaces())o[e.name]=e;i=r.concat(Bs(o))}else i=[t.parentType];else{i=Bs(n.getTypeMap()).filter((e=>Mt(e)&&!e.name.startsWith("__")))}return $s(e,i.map((e=>{const t=qt(e);return{label:String(e),documentation:(null==t?void 0:t.description)||"",kind:zc.Field}})))}(f,u,e);if(p===Wc.FRAGMENT_SPREAD&&1===h)return function(e,t,n,r,i){if(!r)return[];const o=n.getTypeMap(),s=function(e){let t;return qc(e,(e=>{switch(e.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=e}})),t}(e.state),a=function(e){const t=[];return Pc(e,((e,n)=>{n.kind===Wc.FRAGMENT_DEFINITION&&n.name&&n.type&&t.push({kind:Wc.FRAGMENT_DEFINITION,name:{kind:J.NAME,value:n.name},selectionSet:{kind:Wc.SELECTION_SET,selections:[]},typeCondition:{kind:Wc.NAMED_TYPE,name:{kind:J.NAME,value:n.type}}})})),t}(r);i&&i.length>0&&a.push(...i);const l=a.filter((e=>o[e.typeCondition.name.value]&&!(s&&s.kind===Wc.FRAGMENT_DEFINITION&&s.name===e.name.value)&&Mt(t.parentType)&&Mt(o[e.typeCondition.name.value])&&hn(n,t.parentType,o[e.typeCondition.name.value])));return $s(e,l.map((e=>({label:e.name.value,detail:String(o[e.typeCondition.name.value]),documentation:`fragment ${e.name.value} on ${e.typeCondition.name.value}`,labelDetails:{detail:`fragment ${e.name.value} on ${e.typeCondition.name.value}`},kind:zc.Field,type:o[e.typeCondition.name.value]}))))}(f,u,e,t,Array.isArray(i)?i:(e=>{const t=[];if(e)try{at(je(e),{FragmentDefinition(e){t.push(e)}})}catch(s){return[]}return t})(i));const g=Zc(c);return g.kind===Wc.FIELD_DEF?$s(f,Object.values(e.getTypeMap()).filter((e=>Ot(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:zc.Function,insertText:(null==o?void 0:o.fillLeafsOnComplete)?e.name+"\n":e.name,insertTextMode:cl.adjustIndentation})))):g.kind===Wc.INPUT_VALUE_DEF&&2===h?$s(f,Object.values(e.getTypeMap()).filter((e=>It(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:zc.Function,insertText:(null==o?void 0:o.fillLeafsOnComplete)?e.name+"\n$1":e.name,insertTextMode:cl.adjustIndentation,insertTextFormat:il.Snippet})))):p===Wc.VARIABLE_DEFINITION&&2===h||p===Wc.LIST_TYPE&&1===h||p===Wc.NAMED_TYPE&&m&&(m.kind===Wc.VARIABLE_DEFINITION||m.kind===Wc.LIST_TYPE||m.kind===Wc.NON_NULL_TYPE)?function(e,t,n){const r=t.getTypeMap(),i=Bs(r).filter(It);return $s(e,i.map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:zc.Variable}))))}(f,e):p===Wc.DIRECTIVE?function(e,t,n,r){var i;if(null===(i=t.prevState)||void 0===i?void 0:i.kind){const r=n.getDirectives().filter((e=>function(e,t){if(!(null==e?void 0:e.kind))return!1;const{kind:n,prevState:r}=e,{locations:i}=t;switch(n){case Wc.QUERY:return i.includes(Q.QUERY);case Wc.MUTATION:return i.includes(Q.MUTATION);case Wc.SUBSCRIPTION:return i.includes(Q.SUBSCRIPTION);case Wc.FIELD:case Wc.ALIASED_FIELD:return i.includes(Q.FIELD);case Wc.FRAGMENT_DEFINITION:return i.includes(Q.FRAGMENT_DEFINITION);case Wc.FRAGMENT_SPREAD:return i.includes(Q.FRAGMENT_SPREAD);case Wc.INLINE_FRAGMENT:return i.includes(Q.INLINE_FRAGMENT);case Wc.SCHEMA_DEF:return i.includes(Q.SCHEMA);case Wc.SCALAR_DEF:return i.includes(Q.SCALAR);case Wc.OBJECT_TYPE_DEF:return i.includes(Q.OBJECT);case Wc.FIELD_DEF:return i.includes(Q.FIELD_DEFINITION);case Wc.INTERFACE_DEF:return i.includes(Q.INTERFACE);case Wc.UNION_DEF:return i.includes(Q.UNION);case Wc.ENUM_DEF:return i.includes(Q.ENUM);case Wc.ENUM_VALUE:return i.includes(Q.ENUM_VALUE);case Wc.INPUT_DEF:return i.includes(Q.INPUT_OBJECT);case Wc.INPUT_VALUE_DEF:switch(null==r?void 0:r.kind){case Wc.ARGUMENTS_DEF:return i.includes(Q.ARGUMENT_DEFINITION);case Wc.INPUT_DEF:return i.includes(Q.INPUT_FIELD_DEFINITION)}}return!1}(t.prevState,e)));return $s(e,r.map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:zc.Function}))))}return[]}(f,c,e):p===Wc.DIRECTIVE_DEF?function(e,t,n,r){const i=n.getDirectives().find((e=>e.name===t.name));return $s(e,(null==i?void 0:i.args.map((e=>({label:e.name,documentation:e.description||"",kind:zc.Field}))))||[])}(f,c,e):[]}const Yc=[{label:"type",kind:zc.Function},{label:"interface",kind:zc.Function},{label:"union",kind:zc.Function},{label:"input",kind:zc.Function},{label:"scalar",kind:zc.Function},{label:"schema",kind:zc.Function}],Qc=[{label:"query",kind:zc.Function},{label:"mutation",kind:zc.Function},{label:"subscription",kind:zc.Function},{label:"fragment",kind:zc.Function},{label:"{",kind:zc.Constructor}];const Xc=(e,t)=>{var n,r,i,o,s,a,l,c,u,d;return(null===(n=e.prevState)||void 0===n?void 0:n.kind)===t?e.prevState:(null===(i=null===(r=e.prevState)||void 0===r?void 0:r.prevState)||void 0===i?void 0:i.kind)===t?e.prevState.prevState:(null===(a=null===(s=null===(o=e.prevState)||void 0===o?void 0:o.prevState)||void 0===s?void 0:s.prevState)||void 0===a?void 0:a.kind)===t?e.prevState.prevState.prevState:(null===(d=null===(u=null===(c=null===(l=e.prevState)||void 0===l?void 0:l.prevState)||void 0===c?void 0:c.prevState)||void 0===u?void 0:u.prevState)||void 0===d?void 0:d.kind)===t?e.prevState.prevState.prevState.prevState:void 0};function Jc(e,t,n){let r,i=null;const o=Object.create({});return Pc(e,((e,s)=>{var a;if((null==s?void 0:s.kind)===Wc.VARIABLE&&s.name&&(i=s.name),(null==s?void 0:s.kind)===Wc.NAMED_TYPE&&i){const e=Xc(s,Wc.TYPE);(null==e?void 0:e.type)&&(r=t.getType(null==e?void 0:e.type))}if(i&&r&&!o[i]){const e="$"===n.string||"Variable"===(null===(a=null==n?void 0:n.state)||void 0===a?void 0:a.kind)?i:"$"+i;o[i]={detail:r.toString(),insertText:e,label:"$"+i,rawInsert:e,type:r,kind:zc.Variable},i=null,r=null}})),Bs(o)}function Zc(e){return e.prevState&&e.kind&&[Wc.NAMED_TYPE,Wc.LIST_TYPE,Wc.TYPE,Wc.NON_NULL_TYPE].includes(e.kind)?Zc(e.prevState):e}var eu,tu={exports:{}};const nu=s(function(){if(eu)return tu.exports;function e(e,t){if(null!=e)return e;var n=new Error(void 0!==t?t:"Got unexpected "+e);throw n.framesToPop=1,n}return eu=1,tu.exports=e,tu.exports.default=e,Object.defineProperty(tu.exports,"__esModule",{value:!0}),tu.exports}());class ru{constructor(e,t){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=t}setStart(e,t){this.start=new iu(e,t)}setEnd(e,t){this.end=new iu(e,t)}}class iu{constructor(e,t){this.lessThanOrEqualTo=e=>this.line<e.line||this.line===e.line&&this.character<=e.character,this.line=e,this.character=t}setLine(e){this.line=e}setCharacter(e){this.character=e}}function ou(e,t){const n=t?function(e,t){const n=Object.create(null);for(const r of t.definitions)if("OperationDefinition"===r.kind){const{variableDefinitions:t}=r;if(t)for(const{variable:r,type:i}of t){const t=br(e,i);t?n[r.name.value]=t:i.kind===J.NAMED_TYPE&&"Float"===i.name.value&&(n[r.name.value]=yn)}}return n}(t,e):void 0,r=[];return at(e,{OperationDefinition(e){r.push(e)}}),{variableToType:n,operations:r}}const su={["Error"]:1,["Warning"]:2},au=(e,t)=>{if(!e)throw new Error(t)};function lu(e,t=null,n,r,i){var o,s;let a=null,l="";i&&(l="string"==typeof i?i:i.reduce(((e,t)=>e+ut(t)+"\n\n"),""));const c=l?`${e}\n\n${l}`:e;try{a=je(c)}catch(u){if(u instanceof B){const e=function(e,t){const n=Dc(),r=n.startState(),i=t.split("\n");au(i.length>=e.line,"Query text must have more lines than where the error happened");let o=null;for(let c=0;c<e.line;c++)for(o=new yc(i[c]);!o.eol();){if("invalidchar"===n.token(o,r))break}au(o,"Expected Parser stream to be available.");const s=e.line-1,a=o.getStartOfToken(),l=o.getCurrentPosition();return new ru(new iu(s,a),new iu(s,l))}(null!==(s=null===(o=u.locations)||void 0===o?void 0:o[0])&&void 0!==s?s:{line:0},c);return[{severity:su.Error,message:u.message,source:"GraphQL: Syntax",range:e}]}throw u}return function(e,t=null,n,r){if(!t)return[];const i=function(e,t,n,r,i){const o=Yi.filter((e=>e!==Hr&&e!==Dr));return n&&Array.prototype.push.apply(o,n),eo(e,t,o).filter((e=>{if(e.message.includes("Unknown directive")&&e.nodes){const t=e.nodes[0];if(t&&t.kind===J.DIRECTIVE){const e=t.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0}))}(t,e,n).flatMap((e=>cu(e,su.Error,"Validation"))),o=eo(t,e,[ko]).flatMap((e=>cu(e,su.Warning,"Deprecation")));return i.concat(o)}(a,t,n)}function cu(e,t,n){if(!e.nodes)return[];const r=[];for(const[i,o]of e.nodes.entries()){const s="Variable"!==o.kind&&"name"in o&&void 0!==o.name?o.name:"variable"in o&&void 0!==o.variable?o.variable:o;if(s){au(e.locations,"GraphQL validation error requires locations.");const o=e.locations[i],a=uu(s),l=o.column+(a.end-a.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new ru(new iu(o.line-1,o.column-1),new iu(o.line-1,l))})}}return r}function uu(e){const t=e.loc;return au(t,"Expected ASTNode to have a location."),t}
/*!
   * is-primitive <https://github.com/jonschlinkert/is-primitive>
   *
   * Copyright (c) 2014-present, Jon Schlinkert.
   * Released under the MIT License.
   */var du,fu,pu,hu,mu,gu,vu,yu;function bu(){if(gu)return mu;gu=1;var e=hu?pu:(hu=1,pu=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)});function t(t){return!0===e(t)&&"[object Object]"===Object.prototype.toString.call(t)}return mu=function(e){var n,r;return!1!==t(e)&&("function"==typeof(n=e.constructor)&&(!1!==t(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")))}}
/*!
   * set-value <https://github.com/jonschlinkert/set-value>
   *
   * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
   * Released under the MIT License.
   */var Eu=function(){if(yu)return vu;yu=1;const{deleteProperty:e}=Reflect,t=fu?du:(fu=1,du=function(e){return"object"==typeof e?null===e:"function"!=typeof e}),n=bu(),r=e=>"object"==typeof e&&null!==e||"function"==typeof e,i=e=>{if(!t(e))throw new TypeError("Object keys must be strings or symbols");if((e=>"__proto__"===e||"constructor"===e||"prototype"===e)(e))throw new Error(`Cannot set unsafe key: "${e}"`)},o=(e,t,n)=>{const r=(e=>Array.isArray(e)?e.flat().map(String).join(","):e)(t?((e,t)=>{if("string"!=typeof e||!t)return e;let n=e+";";return void 0!==t.arrays&&(n+=`arrays=${t.arrays};`),void 0!==t.separator&&(n+=`separator=${t.separator};`),void 0!==t.split&&(n+=`split=${t.split};`),void 0!==t.merge&&(n+=`merge=${t.merge};`),void 0!==t.preservePaths&&(n+=`preservePaths=${t.preservePaths};`),n})(e,t):e);i(r);const o=l.cache.get(r)||n();return l.cache.set(r,o),o},s=(e,t)=>t&&"function"==typeof t.split?t.split(e):"symbol"==typeof e?[e]:Array.isArray(e)?e:o(e,t,(()=>((e,t={})=>{const n=t.separator||".",r="/"!==n&&t.preservePaths;if("string"==typeof e&&!1!==r&&/\//.test(e))return[e];const i=[];let o="";const s=e=>{let t;""!==e.trim()&&Number.isInteger(t=Number(e))?i.push(t):i.push(e)};for(let a=0;a<e.length;a++){const t=e[a];"\\"!==t?t!==n?o+=t:(s(o),o=""):o+=e[++a]}return o&&s(o),i})(e,t))),a=(t,r,o,s)=>{if(i(r),void 0===o)e(t,r);else if(s&&s.merge){const e="function"===s.merge?s.merge:Object.assign;e&&n(t[r])&&n(o)?t[r]=e(t[r],o):t[r]=o}else t[r]=o;return t},l=(e,t,n,o)=>{if(!t||!r(e))return e;const l=s(t,o);let c=e;for(let s=0;s<l.length;s++){const e=l[s],t=l[s+1];if(i(e),void 0===t){a(c,e,n,o);break}"number"!=typeof t||Array.isArray(c[e])?(r(c[e])||(c[e]={}),c=c[e]):c=c[e]=[]}return e};return l.split=s,l.cache=new Map,l.clear=()=>{l.cache=new Map},vu=l}();const xu=s(Eu);
/*!
   * isobject <https://github.com/jonschlinkert/isobject>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   */var wu,Tu,Cu,Su;var ku=function(){if(Su)return Cu;Su=1;const e=Tu?wu:(Tu=1,wu=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)});function t(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function n(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function r(t){return e(t)||Array.isArray(t)||"function"==typeof t}return Cu=function(i,o,s){if(e(s)||(s={default:s}),!r(i))return void 0!==s.default?s.default:i;"number"==typeof o&&(o=String(o));const a=Array.isArray(o),l="string"==typeof o,c=s.separator||".",u=s.joinChar||("string"==typeof c?c:".");if(!l&&!a)return i;if(l&&o in i)return n(o,i,s)?i[o]:s.default;let d=a?o:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(o,c,s),f=d.length,p=0;do{let e=d[p];for("number"==typeof e&&(e=String(e));e&&"\\"===e.slice(-1);)e=t([e.slice(0,-1),d[++p]||""],u,s);if(e in i){if(!n(e,i,s))return s.default;i=i[e]}else{let r=!1,o=p+1;for(;o<f;)if(e=t([e,d[o++]],u,s),r=e in i){if(!n(e,i,s))return s.default;i=i[e],p=o-1;break}if(!r)return s.default}}while(++p<f&&r(i));return p===f?i:s.default}}();const _u=s(ku);function Nu(t){const n=e.createContext(null);return n.displayName=t,n}function Du(t){function n(n){var r;const i=e.useContext(t);if(null===i&&(null==n?void 0:n.nonNull))throw new Error(`Tried to use \`${(null==(r=n.caller)?void 0:r.name)||"a component"}\` without the necessary context. Make sure to render the \`${t.displayName}Provider\` component higher up the tree.`);return i}return Object.defineProperty(n,"name",{value:`use${t.displayName}`}),n}const Au=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,i,o);return o},Iu=e=>e?Au(e):Au,Ou=e=>e;const Lu=t=>n=>function(t,n=Ou){const r=e.useSyncExternalStore(t.subscribe,(()=>n(t.getState())),(()=>n(t.getInitialState())));return e.useDebugValue(r),r}(t,n),Mu=Iu((()=>({storage:null}))),Ru=t=>{const n=h.c(3),{storage:r,children:i}=t,o=Fu(ju);let s,a;return n[0]!==r?(s=()=>{Mu.setState({storage:new Fs(r)})},a=[r],n[0]=r,n[1]=s,n[2]=a):(s=n[1],a=n[2]),e.useEffect(s,a),o?i:null},Fu=Lu(Mu),Pu=()=>Fu(Vu);function ju(e){return Boolean(e.storage)}function Vu(e){return e.storage}const Bu="undefined"!=typeof navigator&&navigator.userAgent.includes("Mac"),$u="graphiql",Uu="sublime",Hu={[Bu?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function qu(e,t){const n=await Promise.resolve().then((()=>Wj)).then((e=>"function"==typeof e?e:e.default));return await Promise.all(!1===(null==t?void 0:t.useCommonAddons)?e:[Promise.resolve().then((()=>Yj)),Promise.resolve().then((()=>eV)),Promise.resolve().then((()=>iV)),Promise.resolve().then((()=>lV)),Promise.resolve().then((()=>mV)),Promise.resolve().then((()=>bV)),Promise.resolve().then((()=>CV)),Promise.resolve().then((()=>IV)),Promise.resolve().then((()=>LV)),Promise.resolve().then((()=>PV)),...e]),n}var Wu,zu,Gu,Ku;var Yu=function(){if(Ku)return Gu;Ku=1;var e=zu?Wu:(zu=1,Wu=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}),t={"text/plain":"Text","text/html":"Url",default:"Text"};return Gu=function(n,r){var i,o,s,a,l,c,u=!1;r||(r={}),i=r.debug||!1;try{if(s=e(),a=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=n,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(e){if(e.stopPropagation(),r.format)if(e.preventDefault(),void 0===e.clipboardData){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=t[r.format]||t.default;window.clipboardData.setData(o,n)}else e.clipboardData.clearData(),e.clipboardData.setData(r.format,n);r.onCopy&&(e.preventDefault(),r.onCopy(e.clipboardData))})),document.body.appendChild(c),a.selectNodeContents(c),l.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){i&&console.error("unable to copy using execCommand: ",d),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(r.format||"text",n),r.onCopy&&r.onCopy(window.clipboardData),u=!0}catch(f){i&&console.error("unable to copy using clipboardData: ",f),i&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in r?r.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,n)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(a):l.removeAllRanges()),c&&document.body.removeChild(c),s()}return u}}();const Qu=s(Yu),Xu=Iu(((e,t)=>({plugins:[],visiblePlugin:null,referencePlugin:void 0,setVisiblePlugin(n){const{plugins:r,onTogglePluginVisibility:i}=t(),o="string"==typeof n,s=n&&r.find((e=>(o?e.title:e)===n))||null;e((({visiblePlugin:e})=>s===e?{visiblePlugin:e}:(null==i||i(s),{visiblePlugin:s})))}}))),Ju=t=>{const n=h.c(8),{onTogglePluginVisibility:r,children:i,visiblePlugin:o,plugins:s,referencePlugin:a}=t;let l;n[0]!==s?(l=void 0===s?[]:s,n[0]=s,n[1]=l):l=n[1];const c=l;let u,d;return n[2]!==r||n[3]!==c||n[4]!==a||n[5]!==o?(u=()=>{const e=new Set;for(const{title:t}of c){if("string"!=typeof t||!t)throw new Error("All GraphiQL plugins must have a unique title");if(e.has(t))throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${t}'`);e.add(t)}Xu.setState({plugins:c,onTogglePluginVisibility:r,referencePlugin:a}),Xu.getState().setVisiblePlugin(o??null)},d=[c,r,a,o],n[2]=r,n[3]=c,n[4]=a,n[5]=o,n[6]=u,n[7]=d):(u=n[6],d=n[7]),e.useEffect(u,d),i},Zu=Lu(Xu),ed=Iu(((e,t)=>({inputValueDeprecation:null,introspectionQueryName:null,schemaDescription:null,fetcher:null,onSchemaChange:void 0,fetchError:null,isFetching:!1,schema:null,validationErrors:[],schemaReference:null,setSchemaReference(t){e({schemaReference:t})},requestCounter:0,shouldIntrospect:!0,async introspect(){const{requestCounter:n,fetcher:r,onSchemaChange:i,shouldIntrospect:o,headerEditor:s,...a}=t();if(!o)return;const l=n+1;e({requestCounter:l});try{const n=function(e){let t=null,n=!0;try{e&&(t=JSON.parse(e))}catch{n=!1}return{headers:t,isValidJSON:n}}(null==s?void 0:s.getValue());if(!n.isValidJSON)return void e({fetchError:"Introspection failed as headers are invalid."});const o=n.headers?{headers:n.headers}:{},{introspectionQuery:c,introspectionQueryName:u,introspectionQuerySansSubscriptions:d}=function({inputValueDeprecation:e,introspectionQueryName:t,schemaDescription:n}){const r=_o({inputValueDeprecation:e,schemaDescription:n}),i="IntrospectionQuery"===t?r:r.replace("query IntrospectionQuery",`query ${t}`),o=r.replace("subscriptionType { name }","");return{introspectionQueryName:t,introspectionQuery:i,introspectionQuerySansSubscriptions:o}}(a),f=D(r({query:c,operationName:u},o));if(!k(f))return void e({fetchError:"Fetcher did not return a Promise for introspection."});e({isFetching:!0,fetchError:null});let p,h=await f;if("object"!=typeof h||null===h||!("data"in h)){const e=D(r({query:d,operationName:u},o));if(!k(e))throw new Error("Fetcher did not return a Promise for introspection.");h=await e}if(e({isFetching:!1}),(null==h?void 0:h.data)&&"__schema"in h.data)p=h.data;else{const t="string"==typeof h?h:Ds(h);e({fetchError:t})}if(l!==t().requestCounter||!p)return;const m=No(p);e({schema:m}),null==i||i(m)}catch(c){if(l!==t().requestCounter)return;e({fetchError:Ns(c),isFetching:!1})}}}))),td=t=>{const n=h.c(14),{fetcher:r,onSchemaChange:i,dangerouslyAssumeSchemaIsValid:o,children:s,schema:a,inputValueDeprecation:l,introspectionQueryName:c,schemaDescription:u}=t,d=void 0!==o&&o,f=void 0!==l&&l,p=void 0===c?"IntrospectionQuery":c,m=void 0!==u&&u;if(!r)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");let g;n[0]===Symbol.for("react.memo_cache_sentinel")?(g={nonNull:!0,caller:td},n[0]=g):g=n[0];const{headerEditor:v}=Qh(g);let y,b,E,x,w;return n[1]!==v?(y=()=>{v&&ed.setState({headerEditor:v})},b=[v],n[1]=v,n[2]=y,n[3]=b):(y=n[2],b=n[3]),e.useEffect(y,b),n[4]!==d||n[5]!==r||n[6]!==f||n[7]!==p||n[8]!==i||n[9]!==a||n[10]!==m?(E=()=>{const e=Zn(a)||null==a?a:void 0,t=!e||d?[]:rr(e);ed.setState((n=>{const{requestCounter:o}=n;return{fetcher:r,onSchemaChange:i,schema:e,shouldIntrospect:!Zn(a)&&null!==a,inputValueDeprecation:f,introspectionQueryName:p,schemaDescription:m,validationErrors:t,requestCounter:o+1}})),ed.getState().introspect()},x=[a,d,i,r,f,p,m],n[4]=d,n[5]=r,n[6]=f,n[7]=p,n[8]=i,n[9]=a,n[10]=m,n[11]=E,n[12]=x):(E=n[11],x=n[12]),e.useEffect(E,x),n[13]===Symbol.for("react.memo_cache_sentinel")?(w=[],n[13]=w):w=n[13],e.useEffect(rd,w),s},nd=Lu(ed);function rd(){const e=function(e){e.ctrlKey&&"R"===e.key&&ed.getState().introspect()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}const id={};function od(e,t){"string"!=typeof t&&(t=od.defaultChars);const n=function(e){let t=id[e];if(t)return t;t=id[e]=[];for(let n=0;n<128;n++){const e=String.fromCharCode(n);t.push(e)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,(function(e){let t="";for(let r=0,i=e.length;r<i;r+=3){const o=parseInt(e.slice(r+1,r+3),16);if(o<128)t+=n[o];else{if(192==(224&o)&&r+3<i){const n=parseInt(e.slice(r+4,r+6),16);if(128==(192&n)){const e=o<<6&1984|63&n;t+=e<128?"��":String.fromCharCode(e),r+=3;continue}}if(224==(240&o)&&r+6<i){const n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if(128==(192&n)&&128==(192&i)){const e=o<<12&61440|n<<6&4032|63&i;t+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),r+=6;continue}}if(240==(248&o)&&r+9<i){const n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),s=parseInt(e.slice(r+10,r+12),16);if(128==(192&n)&&128==(192&i)&&128==(192&s)){let e=o<<18&1835008|n<<12&258048|i<<6&4032|63&s;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="�"}}return t}))}od.defaultChars=";/?:@&=+$,#",od.componentChars="";const sd={};function ad(e,t,n){"string"!=typeof t&&(n=t,t=ad.defaultChars),void 0===n&&(n=!0);const r=function(e){let t=sd[e];if(t)return t;t=sd[e]=[];for(let n=0;n<128;n++){const e=String.fromCharCode(n);/^[0-9a-z]$/i.test(e)?t.push(e):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}(t);let i="";for(let o=0,s=e.length;o<s;o++){const t=e.charCodeAt(o);if(n&&37===t&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))i+=e.slice(o,o+3),o+=2;else if(t<128)i+=r[t];else if(t>=55296&&t<=57343){if(t>=55296&&t<=56319&&o+1<s){const t=e.charCodeAt(o+1);if(t>=56320&&t<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(e[o])}return i}function ld(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function cd(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}ad.defaultChars=";/?:@&=+$,-_.!~*'()#",ad.componentChars="-_.!~*'()";const ud=/^([a-z0-9.+-]+:)/i,dd=/:[0-9]*$/,fd=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,pd=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),hd=["'"].concat(pd),md=["%","/","?",";","#"].concat(hd),gd=["/","?","#"],vd=/^[+a-z0-9A-Z_-]{0,63}$/,yd=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,bd={javascript:!0,"javascript:":!0},Ed={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function xd(e,t){if(e&&e instanceof cd)return e;const n=new cd;return n.parse(e,t),n}cd.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&1===e.split("#").length){const e=fd.exec(o);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let s=ud.exec(o);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===o.substr(0,2),!i||s&&bd[s]||(o=o.substr(2),this.slashes=!0)),!bd[s]&&(i||s&&!Ed[s])){let e,t,n=-1;for(let a=0;a<gd.length;a++)r=o.indexOf(gd[a]),-1!==r&&(-1===n||r<n)&&(n=r);t=-1===n?o.lastIndexOf("@"):o.lastIndexOf("@",n),-1!==t&&(e=o.slice(0,t),o=o.slice(t+1),this.auth=e),n=-1;for(let a=0;a<md.length;a++)r=o.indexOf(md[a]),-1!==r&&(-1===n||r<n)&&(n=r);-1===n&&(n=o.length),":"===o[n-1]&&n--;const i=o.slice(0,n);o=o.slice(n),this.parseHost(i),this.hostname=this.hostname||"";const s="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!s){const e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){const n=e[t];if(n&&!n.match(vd)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(vd)){const r=e.slice(0,t),i=e.slice(t+1),s=n.match(yd);s&&(r.push(s[1]),i.unshift(s[2])),i.length&&(o=i.join(".")+o),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),s&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=o.indexOf("#");-1!==a&&(this.hash=o.substr(a),o=o.slice(0,a));const l=o.indexOf("?");return-1!==l&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),Ed[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},cd.prototype.parseHost=function(e){let t=dd.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const wd=Object.freeze(Object.defineProperty({__proto__:null,decode:od,encode:ad,format:ld,parse:xd},Symbol.toStringTag,{value:"Module"})),Td=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cd=/[\0-\x1F\x7F-\x9F]/,Sd=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,kd=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,_d=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Nd=Object.freeze(Object.defineProperty({__proto__:null,Any:Td,Cc:Cd,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:Sd,S:kd,Z:_d},Symbol.toStringTag,{value:"Module"})),Dd=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),Ad=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));var Id;const Od=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Ld=null!==(Id=String.fromCodePoint)&&void 0!==Id?Id:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};var Md,Rd;(Rd=Md||(Md={}))[Rd.NUM=35]="NUM",Rd[Rd.SEMI=59]="SEMI",Rd[Rd.EQUALS=61]="EQUALS",Rd[Rd.ZERO=48]="ZERO",Rd[Rd.NINE=57]="NINE",Rd[Rd.LOWER_A=97]="LOWER_A",Rd[Rd.LOWER_F=102]="LOWER_F",Rd[Rd.LOWER_X=120]="LOWER_X",Rd[Rd.LOWER_Z=122]="LOWER_Z",Rd[Rd.UPPER_A=65]="UPPER_A",Rd[Rd.UPPER_F=70]="UPPER_F",Rd[Rd.UPPER_Z=90]="UPPER_Z";var Fd,Pd,jd,Vd,Bd,$d;function Ud(e){return e>=Md.ZERO&&e<=Md.NINE}function Hd(e){return e===Md.EQUALS||function(e){return e>=Md.UPPER_A&&e<=Md.UPPER_Z||e>=Md.LOWER_A&&e<=Md.LOWER_Z||Ud(e)}(e)}(Pd=Fd||(Fd={}))[Pd.VALUE_LENGTH=49152]="VALUE_LENGTH",Pd[Pd.BRANCH_LENGTH=16256]="BRANCH_LENGTH",Pd[Pd.JUMP_TABLE=127]="JUMP_TABLE",(Vd=jd||(jd={}))[Vd.EntityStart=0]="EntityStart",Vd[Vd.NumericStart=1]="NumericStart",Vd[Vd.NumericDecimal=2]="NumericDecimal",Vd[Vd.NumericHex=3]="NumericHex",Vd[Vd.NamedEntity=4]="NamedEntity",($d=Bd||(Bd={}))[$d.Legacy=0]="Legacy",$d[$d.Strict=1]="Strict",$d[$d.Attribute=2]="Attribute";class qd{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=jd.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bd.Strict}startEntity(e){this.decodeMode=e,this.state=jd.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case jd.EntityStart:return e.charCodeAt(t)===Md.NUM?(this.state=jd.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=jd.NamedEntity,this.stateNamedEntity(e,t));case jd.NumericStart:return this.stateNumericStart(e,t);case jd.NumericDecimal:return this.stateNumericDecimal(e,t);case jd.NumericHex:return this.stateNumericHex(e,t);case jd.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Md.LOWER_X?(this.state=jd.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=jd.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const i=e.charCodeAt(t);if(!(Ud(i)||(r=i,r>=Md.UPPER_A&&r<=Md.UPPER_F||r>=Md.LOWER_A&&r<=Md.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!Ud(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Md.SEMI)this.consumed+=1;else if(this.decodeMode===Bd.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Od.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Md.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&Fd.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=zd(n,r,this.treeIndex+Math.max(1,i),o),this.treeIndex<0)return 0===this.result||this.decodeMode===Bd.Attribute&&(0===i||Hd(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Fd.VALUE_LENGTH)>>14,0!==i){if(o===Md.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Bd.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&Fd.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~Fd.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case jd.NamedEntity:return 0===this.result||this.decodeMode===Bd.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case jd.NumericDecimal:return this.emitNumericEntity(0,2);case jd.NumericHex:return this.emitNumericEntity(0,3);case jd.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case jd.EntityStart:return 0}}}function Wd(e){let t="";const n=new qd(e,(e=>t+=Ld(e)));return function(e,r){let i=0,o=0;for(;(o=e.indexOf("&",o))>=0;){t+=e.slice(i,o),n.startEntity(r);const s=n.write(e,o+1);if(s<0){i=o+n.end();break}i=o+s,o=0===s?i+1:i}const s=t+e.slice(i);return t="",s}}function zd(e,t,n,r){const i=(t&Fd.BRANCH_LENGTH)>>7,o=t&Fd.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=i?-1:e[n+t]-1}let s=n,a=s+i-1;for(;s<=a;){const t=s+a>>>1,n=e[t];if(n<r)s=t+1;else{if(!(n>r))return e[t+i];a=t-1}}return-1}const Gd=Wd(Dd);function Kd(e,t=Bd.Legacy){return Gd(e,t)}function Yd(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}Wd(Ad);const Qd=Object.prototype.hasOwnProperty;function Xd(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e}function Jd(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Zd(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function ef(e){if(e>65535){const t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const tf=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,nf=new RegExp(tf.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),rf=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function of(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(nf,(function(e,t,n){return t||function(e,t){if(35===t.charCodeAt(0)&&rf.test(t)){const n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Zd(n)?ef(n):e}const n=Kd(e);return n!==e?n:e}(e,n)}))}const sf=/[&<>"]/,af=/[&<>"]/g,lf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function cf(e){return lf[e]}function uf(e){return sf.test(e)?e.replace(af,cf):e}const df=/[.?*+^$[\]\\(){}|-]/g;function ff(e){switch(e){case 9:case 32:return!0}return!1}function pf(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function hf(e){return Sd.test(e)||kd.test(e)}function mf(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function gf(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const vf={mdurl:wd,ucmicro:Nd},yf=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Jd,assign:Xd,escapeHtml:uf,escapeRE:function(e){return e.replace(df,"\\$&")},fromCodePoint:ef,has:function(e,t){return Qd.call(e,t)},isMdAsciiPunct:mf,isPunctChar:hf,isSpace:ff,isString:Yd,isValidEntityCode:Zd,isWhiteSpace:pf,lib:vf,normalizeReference:gf,unescapeAll:of,unescapeMd:function(e){return e.indexOf("\\")<0?e:e.replace(tf,"$1")}},Symbol.toStringTag,{value:"Module"}));const bf=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:function(e,t,n){let r,i=t;const o={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i<n;){if(r=e.charCodeAt(i),10===r)return o;if(60===r)return o;if(62===r)return o.pos=i+1,o.str=of(e.slice(t+1,i)),o.ok=!0,o;92===r&&i+1<n?i+=2:i++}return o}let s=0;for(;i<n&&(r=e.charCodeAt(i),32!==r)&&!(r<32||127===r);)if(92===r&&i+1<n){if(32===e.charCodeAt(i+1))break;i+=2}else{if(40===r&&(s++,s>32))return o;if(41===r){if(0===s)break;s--}i++}return t===i||0!==s||(o.str=of(e.slice(t,i)),o.pos=i,o.ok=!0),o},parseLinkLabel:function(e,t,n){let r,i,o,s;const a=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),93===o&&(r--,0===r)){i=!0;break}if(s=e.pos,e.md.inline.skipToken(e),91===o)if(s===e.pos-1)r++;else if(n)return e.pos=l,-1}let c=-1;return i&&(c=e.pos),e.pos=l,c},parseLinkTitle:function(e,t,n,r){let i,o=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(o>=n)return s;let r=e.charCodeAt(o);if(34!==r&&39!==r&&40!==r)return s;t++,o++,40===r&&(r=41),s.marker=r}for(;o<n;){if(i=e.charCodeAt(o),i===s.marker)return s.pos=o+1,s.str+=of(e.slice(t,o)),s.ok=!0,s;if(40===i&&41===s.marker)return s;92===i&&o+1<n&&o++,o++}return s.can_continue=!0,s.str+=of(e.slice(t,o)),s}},Symbol.toStringTag,{value:"Module"})),Ef={};function xf(){this.rules=Xd({},Ef)}function wf(){this.__rules__=[],this.__cache__=null}function Tf(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function Cf(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Ef.code_inline=function(e,t,n,r,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+uf(o.content)+"</code>"},Ef.code_block=function(e,t,n,r,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+uf(e[t].content)+"</code></pre>\n"},Ef.fence=function(e,t,n,r,i){const o=e[t],s=o.info?of(o.info).trim():"";let a,l="",c="";if(s){const e=s.split(/(\s+)/g);l=e[0],c=e.slice(2).join("")}if(a=n.highlight&&n.highlight(o.content,l,c)||uf(o.content),0===a.indexOf("<pre"))return a+"\n";if(s){const e=o.attrIndex("class"),t=o.attrs?o.attrs.slice():[];e<0?t.push(["class",n.langPrefix+l]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+l);const r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${a}</code></pre>\n`}return`<pre><code${i.renderAttrs(o)}>${a}</code></pre>\n`},Ef.image=function(e,t,n,r,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},Ef.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},Ef.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},Ef.text=function(e,t){return uf(e[t].content)},Ef.html_block=function(e,t){return e[t].content},Ef.html_inline=function(e,t){return e[t].content},xf.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+uf(e.attrs[t][0])+'="'+uf(e.attrs[t][1])+'"';return r},xf.prototype.renderToken=function(e,t,n){const r=e[t];let i="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===r.nesting?"</":"<")+r.tag,i+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(i+=" /");let o=!1;if(r.block&&(o=!0,1===r.nesting&&t+1<e.length)){const n=e[t+1];("inline"===n.type||n.hidden||-1===n.nesting&&n.tag===r.tag)&&(o=!1)}return i+=o?">\n":">",i},xf.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,s=e.length;o<s;o++){const s=e[o].type;void 0!==i[s]?r+=i[s](e,o,t,n,this):r+=this.renderToken(e,o,t)}return r},xf.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":case"html_inline":case"html_block":r+=e[i].content;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},xf.prototype.render=function(e,t,n){let r="";const i=this.rules;for(let o=0,s=e.length;o<s;o++){const s=e[o].type;"inline"===s?r+=this.renderInline(e[o].children,t,n):void 0!==i[s]?r+=i[s](e,o,t,n,this):r+=this.renderToken(e,o,t,n)}return r},wf.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},wf.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},wf.prototype.at=function(e,t,n){const r=this.__find__(e),i=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},wf.prototype.before=function(e,t,n,r){const i=this.__find__(e),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},wf.prototype.after=function(e,t,n,r){const i=this.__find__(e),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},wf.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},wf.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach((function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},wf.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},wf.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach((function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},wf.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},Tf.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},Tf.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Tf.prototype.attrSet=function(e,t){const n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},Tf.prototype.attrGet=function(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n},Tf.prototype.attrJoin=function(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},Cf.prototype.Token=Tf;const Sf=/\r\n?|\n/g,kf=/\0/g;function _f(e){return/^<\/a\s*>/i.test(e)}const Nf=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Df=/\((c|tm|r)\)/i,Af=/\((c|tm|r)\)/gi,If={c:"©",r:"®",tm:"™"};function Of(e,t){return If[t.toLowerCase()]}function Lf(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||(r.content=r.content.replace(Af,Of)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}function Mf(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||Nf.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}const Rf=/['"]/,Ff=/['"]/g,Pf="’";function jf(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Vf(e,t){let n;const r=[];for(let i=0;i<e.length;i++){const o=e[i],s=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,"text"!==o.type)continue;let a=o.content,l=0,c=a.length;e:for(;l<c;){Ff.lastIndex=l;const u=Ff.exec(a);if(!u)break;let d=!0,f=!0;l=u.index+1;const p="'"===u[0];let h=32;if(u.index-1>=0)h=a.charCodeAt(u.index-1);else for(n=i-1;n>=0&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l<c)m=a.charCodeAt(l);else for(n=i+1;n<e.length&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}const g=mf(h)||hf(String.fromCharCode(h)),v=mf(m)||hf(String.fromCharCode(m)),y=pf(h),b=pf(m);if(b?d=!1:v&&(y||g||(d=!1)),y?f=!1:g&&(b||v||(f=!1)),34===m&&'"'===u[0]&&h>=48&&h<=57&&(f=d=!1),d&&f&&(d=g,f=v),d||f){if(f)for(n=r.length-1;n>=0;n--){let d=r[n];if(r[n].level<s)break;if(d.single===p&&r[n].level===s){let s,f;d=r[n],p?(s=t.md.options.quotes[2],f=t.md.options.quotes[3]):(s=t.md.options.quotes[0],f=t.md.options.quotes[1]),o.content=jf(o.content,u.index,f),e[d.token].content=jf(e[d.token].content,d.pos,s),l+=f.length-1,d.token===i&&(l+=s.length-1),a=o.content,c=a.length,r.length=n;continue e}}d?r.push({token:i,pos:u.index,single:p,level:s}):f&&p&&(o.content=jf(o.content,u.index,Pf))}else p&&(o.content=jf(o.content,u.index,Pf))}}}const Bf=[["normalize",function(e){let t;t=e.src.replace(Sf,"\n"),t=t.replace(kf,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}],["linkify",function(e){const t=e.tokens;var n;if(e.md.options.linkify)for(let r=0,i=t.length;r<i;r++){if("inline"!==t[r].type||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,o=0;for(let s=i.length-1;s>=0;s--){const a=i[s];if("link_close"!==a.type){if("html_inline"===a.type&&(n=a.content,/^<a[>\s]/i.test(n)&&o>0&&o--,_f(a.content)&&o++),!(o>0)&&"text"===a.type&&e.md.linkify.test(a.content)){const n=a.content;let o=e.md.linkify.match(n);const l=[];let c=a.level,u=0;o.length>0&&0===o[0].index&&s>0&&"text_special"===i[s-1].type&&(o=o.slice(1));for(let t=0;t<o.length;t++){const r=o[t].url,i=e.md.normalizeLink(r);if(!e.md.validateLink(i))continue;let s=o[t].text;s=o[t].schema?"mailto:"!==o[t].schema||/^mailto:/i.test(s)?e.md.normalizeLinkText(s):e.md.normalizeLinkText("mailto:"+s).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+s).replace(/^http:\/\//,"");const a=o[t].index;if(a>u){const t=new e.Token("text","",0);t.content=n.slice(u,a),t.level=c,l.push(t)}const d=new e.Token("link_open","a",1);d.attrs=[["href",i]],d.level=c++,d.markup="linkify",d.info="auto",l.push(d);const f=new e.Token("text","",0);f.content=s,f.level=c,l.push(f);const p=new e.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",l.push(p),u=o[t].lastIndex}if(u<n.length){const t=new e.Token("text","",0);t.content=n.slice(u),t.level=c,l.push(t)}t[r].children=i=Jd(i,s,l)}}else for(s--;i[s].level!==a.level&&"link_open"!==i[s].type;)s--}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(Df.test(e.tokens[t].content)&&Lf(e.tokens[t].children),Nf.test(e.tokens[t].content)&&Mf(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&Rf.test(e.tokens[t].content)&&Vf(e.tokens[t].children,e)}],["text_join",function(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o<i;o++){if("inline"!==r[o].type)continue;const e=r[o].children,i=e.length;for(t=0;t<i;t++)"text_special"===e[t].type&&(e[t].type="text");for(t=n=0;t<i;t++)"text"===e[t].type&&t+1<i&&"text"===e[t+1].type?e[t+1].content=e[t].content+e[t+1].content:(t!==n&&(e[n]=e[t]),n++);t!==n&&(e.length=n)}}]];function $f(){this.ruler=new wf;for(let e=0;e<Bf.length;e++)this.ruler.push(Bf[e][0],Bf[e][1])}function Uf(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,s=0,a=0,l=0,c=i.length,u=!1;s<c;s++){const e=i.charCodeAt(s);if(!u){if(ff(e)){a++,9===e?l+=4-l%4:l++;continue}u=!0}10!==e&&s!==c-1||(10!==e&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),u=!1,a=0,l=0,o=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}$f.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},$f.prototype.State=Cf,Uf.prototype.push=function(e,t,n){const r=new Tf(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},Uf.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},Uf.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},Uf.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){if(!ff(this.src.charCodeAt(e)))break}return e},Uf.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!ff(this.src.charCodeAt(--e)))return e+1;return e},Uf.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},Uf.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},Uf.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const i=new Array(t-e);for(let o=0,s=e;s<t;s++,o++){let e=0;const a=this.bMarks[s];let l,c=a;for(l=s+1<t||r?this.eMarks[s]+1:this.eMarks[s];c<l&&e<n;){const t=this.src.charCodeAt(c);if(ff(t))9===t?e+=4-(e+this.bsCount[s])%4:e++;else{if(!(c-a<this.tShift[s]))break;e++}c++}i[o]=e>n?new Array(e-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},Uf.prototype.Token=Tf;function Hf(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function qf(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,s=0,a="";for(;r<n;)124===i&&(o?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),o=92===i,r++,i=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function Wf(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(r++);if(42!==i&&45!==i&&43!==i)return-1;if(r<n){if(!ff(e.src.charCodeAt(r)))return-1}return r}function zf(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let i=n;if(i+1>=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),!(o>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-n>=10)return-1}return i<r&&(o=e.src.charCodeAt(i),!ff(o))?-1:i}const Gf="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Kf="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Yf=new RegExp("^(?:"+Gf+"|"+Kf+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),Qf=new RegExp("^(?:"+Gf+"|"+Kf+")"),Xf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Qf.source+"\\s*$"),/^$/,!1]];const Jf=[["table",function(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent)return!1;if(e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(124!==s&&45!==s&&58!==s)return!1;if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a&&!ff(a))return!1;if(45===s&&ff(a))return!1;for(;o<e.eMarks[i];){const t=e.src.charCodeAt(o);if(124!==t&&45!==t&&58!==t&&!ff(t))return!1;o++}let l=Hf(e,t+1),c=l.split("|");const u=[];for(let v=0;v<c.length;v++){const e=c[v].trim();if(!e){if(0===v||v===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(e))return!1;58===e.charCodeAt(e.length-1)?u.push(58===e.charCodeAt(0)?"center":"right"):58===e.charCodeAt(0)?u.push("left"):u.push("")}if(l=Hf(e,t).trim(),-1===l.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;c=qf(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const d=c.length;if(0===d||d!==u.length)return!1;if(r)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),h=[t,0];e.push("table_open","table",1).map=h,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let v=0;v<c.length;v++){const t=e.push("th_open","th",1);u[v]&&(t.attrs=[["style","text-align:"+u[v]]]);const n=e.push("inline","",0);n.content=c[v].trim(),n.children=[],e.push("th_close","th",-1)}let m;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let g=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,o=p.length;t<o;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r)break;if(l=Hf(e,i).trim(),!l)break;if(e.sCount[i]-e.blkIndent>=4)break;if(c=qf(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=d-c.length,g>65536)break;if(i===t+2){e.push("tbody_open","tbody",1).map=m=[t+2,0]}e.push("tr_open","tr",1).map=[i,i+1];for(let t=0;t<d;t++){const n=e.push("td_open","td",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);const r=e.push("inline","",0);r.content=c[t]?c[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return m&&(e.push("tbody_close","tbody",-1),m[1]=i),e.push("table_close","table",-1),h[1]=i,e.parentType=f,e.line=i,!0},["paragraph","reference"]],["code",function(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;r++,i=r}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}],["fence",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(i+3>o)return!1;const s=e.src.charCodeAt(i);if(126!==s&&96!==s)return!1;let a=i;i=e.skipChars(i,s);let l=i-a;if(l<3)return!1;const c=e.src.slice(a,i),u=e.src.slice(i,o);if(96===s&&u.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;(d++,!(d>=n))&&(i=a=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],!(i<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===s&&!(e.sCount[d]-e.blkIndent>=4||(i=e.skipChars(i,s),i-a<l||(i=e.skipSpaces(i),i<o)))){f=!0;break}l=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=u,p.content=e.getLines(t+1,d,l,!0),p.markup=c,p.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(i))return!1;if(r)return!0;const a=[],l=[],c=[],u=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p,h=!1;for(p=t;p<n;p++){const t=e.sCount[p]<e.blkIndent;if(i=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],i>=o)break;if(62===e.src.charCodeAt(i++)&&!t){let t,n,r=e.sCount[p]+1;32===e.src.charCodeAt(i)?(i++,r++,n=!1,t=!0):9===e.src.charCodeAt(i)?(t=!0,(e.bsCount[p]+r)%4==3?(i++,r++,n=!1):n=!0):t=!1;let s=r;for(a.push(e.bMarks[p]),e.bMarks[p]=i;i<o;){const t=e.src.charCodeAt(i);if(!ff(t))break;9===t?s+=4-(s+e.bsCount[p]+(n?1:0))%4:s++,i++}h=i>=o,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(t?1:0),c.push(e.sCount[p]),e.sCount[p]=s-r,u.push(e.tShift[p]),e.tShift[p]=i-e.bMarks[p];continue}if(h)break;let r=!1;for(let i=0,o=d.length;i<o;i++)if(d[i](e,p,n,!0)){r=!0;break}if(r){e.lineMax=p,0!==e.blkIndent&&(a.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}a.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}const m=e.blkIndent;e.blkIndent=0;const g=e.push("blockquote_open","blockquote",1);g.markup=">";const v=[t,0];g.map=v,e.md.block.tokenize(e,t,p),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=s,e.parentType=f,v[1]=e.line;for(let y=0;y<u.length;y++)e.bMarks[y+t]=a[y],e.tShift[y+t]=u[y],e.sCount[y+t]=c[y],e.bsCount[y+t]=l[y];return e.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(o++);if(42!==s&&45!==s&&95!==s)return!1;let a=1;for(;o<i;){const t=e.src.charCodeAt(o++);if(t!==s&&!ff(t))return!1;t===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){let i,o,s,a,l=t,c=!0;if(e.sCount[l]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u,d,f,p=!1;if(r&&"paragraph"===e.parentType&&e.sCount[l]>=e.blkIndent&&(p=!0),(f=zf(e,l))>=0){if(u=!0,s=e.bMarks[l]+e.tShift[l],d=Number(e.src.slice(s,f-1)),p&&1!==d)return!1}else{if(!((f=Wf(e,l))>=0))return!1;u=!1}if(p&&e.skipSpaces(f)>=e.eMarks[l])return!1;if(r)return!0;const h=e.src.charCodeAt(f-1),m=e.tokens.length;u?(a=e.push("ordered_list_open","ol",1),1!==d&&(a.attrs=[["start",d]])):a=e.push("bullet_list_open","ul",1);const g=[l,0];a.map=g,a.markup=String.fromCharCode(h);let v=!1;const y=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";l<n;){o=f,i=e.eMarks[l];const t=e.sCount[l]+f-(e.bMarks[l]+e.tShift[l]);let r=t;for(;o<i;){const t=e.src.charCodeAt(o);if(9===t)r+=4-(r+e.bsCount[l])%4;else{if(32!==t)break;r++}o++}const d=o;let p;p=d>=i?1:r-t,p>4&&(p=1);const m=t+p;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);const g=[l,0];a.map=g,u&&(a.info=e.src.slice(s,f-1));const b=e.tight,E=e.tShift[l],x=e.sCount[l],w=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=m,e.tight=!0,e.tShift[l]=d-e.bMarks[l],e.sCount[l]=r,d>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),e.tight&&!v||(c=!1),v=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[l]=E,e.sCount[l]=x,e.tight=b,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),l=e.line,g[1]=l,l>=n)break;if(e.sCount[l]<e.blkIndent)break;if(e.sCount[l]-e.blkIndent>=4)break;let T=!1;for(let i=0,o=y.length;i<o;i++)if(y[i](e,l,n,!0)){T=!0;break}if(T)break;if(u){if(f=zf(e,l),f<0)break;s=e.bMarks[l]+e.tShift[l]}else if(f=Wf(e,l),f<0)break;if(h!==e.src.charCodeAt(f-1))break}return a=u?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(h),g[1]=l,e.line=l,e.parentType=b,c&&function(e,t){const n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,m),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(i))return!1;function a(t){const n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){const r=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let o=!1;for(let s=0,a=r.length;s<a;s++)if(r[s](e,t,n,!0)){o=!0;break}if(e.parentType=i,o)return null}const i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(i,o+1)}let l=e.src.slice(i,o+1);o=l.length;let c=-1;for(i=1;i<o;i++){const e=l.charCodeAt(i);if(91===e)return!1;if(93===e){c=i;break}if(10===e){const e=a(s);null!==e&&(l+=e,o=l.length,s++)}else if(92===e&&(i++,i<o&&10===l.charCodeAt(i))){const e=a(s);null!==e&&(l+=e,o=l.length,s++)}}if(c<0||58!==l.charCodeAt(c+1))return!1;for(i=c+2;i<o;i++){const e=l.charCodeAt(i);if(10===e){const e=a(s);null!==e&&(l+=e,o=l.length,s++)}else if(!ff(e))break}const u=e.md.helpers.parseLinkDestination(l,i,o);if(!u.ok)return!1;const d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;const f=i,p=s,h=i;for(;i<o;i++){const e=l.charCodeAt(i);if(10===e){const e=a(s);null!==e&&(l+=e,o=l.length,s++)}else if(!ff(e))break}let m,g=e.md.helpers.parseLinkTitle(l,i,o);for(;g.can_continue;){const t=a(s);if(null===t)break;l+=t,i=o,o=l.length,s++,g=e.md.helpers.parseLinkTitle(l,i,o,g)}for(i<o&&h!==i&&g.ok?(m=g.str,i=g.pos):(m="",i=f,s=p);i<o;){if(!ff(l.charCodeAt(i)))break;i++}if(i<o&&10!==l.charCodeAt(i)&&m)for(m="",i=f,s=p;i<o;){if(!ff(l.charCodeAt(i)))break;i++}if(i<o&&10!==l.charCodeAt(i))return!1;const v=gf(l.slice(1,c));return!!v&&(r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[v]&&(e.env.references[v]={title:m,href:d}),e.line=s),!0)}],["html_block",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(i))return!1;let s=e.src.slice(i,o),a=0;for(;a<Xf.length&&!Xf[a][0].test(s);a++);if(a===Xf.length)return!1;if(r)return Xf[a][2];let l=t+1;if(!Xf[a][1].test(s))for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],s=e.src.slice(i,o),Xf[a][1].test(s)){0!==s.length&&l++;break}e.line=l;const c=e.push("html_block","",0);return c.map=[t,l],c.content=e.getLines(t,l,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(i);if(35!==s||i>=o)return!1;let a=1;for(s=e.src.charCodeAt(++i);35===s&&i<o&&a<=6;)a++,s=e.src.charCodeAt(++i);if(a>6||i<o&&!ff(s))return!1;if(r)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&ff(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const u=e.push("inline","",0);return u.content=e.src.slice(i,o).trim(),u.map=[t,e.line],u.children=[],e.push("heading_close","h"+String(a),-1).markup="########".slice(0,a),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o,s=0,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let t=e.bMarks[a]+e.tShift[a];const n=e.eMarks[a];if(t<n&&(o=e.src.charCodeAt(t),(45===o||61===o)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){s=61===o?1:2;break}}if(e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}if(!s)return!1;const l=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a+1;const c=e.push("heading_open","h"+String(s),1);c.markup=String.fromCharCode(o),c.map=[t,e.line];const u=e.push("inline","",0);return u.content=l,u.map=[t,e.line-1],u.children=[],e.push("heading_close","h"+String(s),-1).markup=String.fromCharCode(o),e.parentType=i,!0}],["paragraph",function(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]<0)continue;let t=!1;for(let i=0,s=r.length;i<s;i++)if(r[i](e,o,n,!0)){t=!0;break}if(t)break}const s=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o,e.push("paragraph_open","p",1).map=[t,e.line];const a=e.push("inline","",0);return a.content=s,a.map=[t,e.line],a.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}]];function Zf(){this.ruler=new wf;for(let e=0;e<Jf.length;e++)this.ruler.push(Jf[e][0],Jf[e][1],{alt:(Jf[e][2]||[]).slice()})}function ep(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}function tp(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}Zf.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),i=r.length,o=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n))&&!(e.sCount[s]<e.blkIndent);){if(e.level>=o){e.line=n;break}const t=e.line;let l=!1;for(let o=0;o<i;o++)if(l=r[o](e,s,n,!1),l){if(t>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}},Zf.prototype.parse=function(e,t,n,r){if(!e)return;const i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},Zf.prototype.State=Uf,ep.prototype.pushPending=function(){const e=new Tf("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},ep.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new Tf(e,t,n);let i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},ep.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o<n&&this.src.charCodeAt(o)===r;)o++;const s=o-e,a=o<n?this.src.charCodeAt(o):32,l=mf(i)||hf(String.fromCharCode(i)),c=mf(a)||hf(String.fromCharCode(a)),u=pf(i),d=pf(a),f=!d&&(!c||u||l),p=!u&&(!l||d||c);return{can_open:f&&(t||!p||l),can_close:p&&(t||!f||c),length:s}},ep.prototype.Token=Tf;const np=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;const rp=[];for(let l$=0;l$<256;l$++)rp.push(0);function ip(e,t){let n;const r=[],i=t.length;for(let o=0;o<i;o++){const i=t[o];if(126!==i.marker)continue;if(-1===i.end)continue;const s=t[i.end];n=e.tokens[i.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[s.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&r.push(s.token-1)}for(;r.length;){const t=r.pop();let i=t+1;for(;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){rp[e.charCodeAt(0)]=1}));const op={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(126!==r)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const s=String.fromCharCode(r);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;ip(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ip(e,t[r].delimiters)}};function sp(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(95!==r.marker&&42!==r.marker)continue;if(-1===r.end)continue;const i=t[r.end],o=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1,s=String.fromCharCode(r.marker),a=e.tokens[r.token];a.type=o?"strong_open":"em_open",a.tag=o?"strong":"em",a.nesting=1,a.markup=o?s+s:s,a.content="";const l=e.tokens[i.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?s+s:s,l.content="",o&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--)}}const ap={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(95!==r&&42!==r)return!1;const i=e.scanDelims(e.pos,42===r);for(let o=0;o<i.length;o++){e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;sp(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&sp(e,t[r].delimiters)}};const lp=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,cp=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const up=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,dp=/^&([a-z][a-z0-9]{1,31});/i;function fp(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let s=0;s<n;s++){const n=e[s];if(o.push(0),e[r].marker===n.marker&&i===n.token-1||(r=s),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[n.marker][(n.open?3:0)+n.length%3];let l=r-o[r]-1,c=l;for(;l>a;l-=o[l]+1){const t=e[l];if(t.marker===n.marker&&(t.open&&t.end<0)){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3==0&&n.length%3==0||(r=!0)),!r){const r=l>0&&!e[l-1].open?o[l-1]+1:0;o[s]=s-l+r,o[l]=r,n.open=!1,t.end=s,t.close=!1,c=-1,i=-2;break}}}-1!==c&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}const pp=[["text",function(e,t){let n=e.pos;for(;n<e.posMax&&!tp(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const n=e.pos;if(n+3>e.posMax)return!1;if(58!==e.src.charCodeAt(n))return!1;if(47!==e.src.charCodeAt(n+1))return!1;if(47!==e.src.charCodeAt(n+2))return!1;const r=e.pending.match(np);if(!r)return!1;const i=r[1],o=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!o)return!1;let s=o.url;if(s.length<=i.length)return!1;s=s.replace(/\*+$/,"");const a=e.md.normalizeLink(s);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const t=e.push("link_open","a",1);t.attrs=[["href",a]],t.markup="linkify",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(s);const n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=s.length-i.length,!0}],["newline",function(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){let t=r-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<i&&ff(e.src.charCodeAt(n));)n++;return e.pos=n,!0}],["escape",function(e,t){let n=e.pos;const r=e.posMax;if(92!==e.src.charCodeAt(n))return!1;if(n++,n>=r)return!1;let i=e.src.charCodeAt(n);if(10===i){for(t||e.push("hardbreak","br",0),n++;n<r&&(i=e.src.charCodeAt(n),ff(i));)n++;return e.pos=n,!0}let o=e.src[n];if(i>=55296&&i<=56319&&n+1<r){const t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(o+=e.src[n+1],n++)}const s="\\"+o;if(!t){const t=e.push("text_special","",0);i<256&&0!==rp[i]?t.content=o:t.content=s,t.markup=s,t.info="escape"}return e.pos=n+1,!0}],["backticks",function(e,t){let n=e.pos;if(96!==e.src.charCodeAt(n))return!1;const r=n;n++;const i=e.posMax;for(;n<i&&96===e.src.charCodeAt(n);)n++;const o=e.src.slice(r,n),s=o.length;if(e.backticksScanned&&(e.backticks[s]||0)<=r)return t||(e.pending+=o),e.pos+=s,!0;let a,l=n;for(;-1!==(a=e.src.indexOf("`",l));){for(l=a+1;l<i&&96===e.src.charCodeAt(l);)l++;const r=l-a;if(r===s){if(!t){const t=e.push("code_inline","code",0);t.markup=o,t.content=e.src.slice(n,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[r]=a}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=s,!0}],["strikethrough",op.tokenize],["emphasis",ap.tokenize],["link",function(e,t){let n,r,i,o,s="",a="",l=e.pos,c=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let h=p+1;if(h<d&&40===e.src.charCodeAt(h)){for(c=!1,h++;h<d&&(n=e.src.charCodeAt(h),ff(n)||10===n);h++);if(h>=d)return!1;if(l=h,i=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),i.ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?h=i.pos:s="",l=h;h<d&&(n=e.src.charCodeAt(h),ff(n)||10===n);h++);if(i=e.md.helpers.parseLinkTitle(e.src,h,e.posMax),h<d&&l!==h&&i.ok)for(a=i.str,h=i.pos;h<d&&(n=e.src.charCodeAt(h),ff(n)||10===n);h++);}(h>=d||41!==e.src.charCodeAt(h))&&(c=!0),h++}if(c){if(void 0===e.env.references)return!1;if(h<d&&91===e.src.charCodeAt(h)?(l=h+1,h=e.md.helpers.parseLinkLabel(e,h),h>=0?r=e.src.slice(l,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),o=e.env.references[gf(r)],!o)return e.pos=u,!1;s=o.href,a=o.title}if(!t){e.pos=f,e.posMax=p;const t=[["href",s]];e.push("link_open","a",1).attrs=t,a&&t.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}],["image",function(e,t){let n,r,i,o,s,a,l,c,u="";const d=e.pos,f=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(o=h+1,o<f&&40===e.src.charCodeAt(o)){for(o++;o<f&&(n=e.src.charCodeAt(o),ff(n)||10===n);o++);if(o>=f)return!1;for(c=o,a=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),a.ok&&(u=e.md.normalizeLink(a.str),e.md.validateLink(u)?o=a.pos:u=""),c=o;o<f&&(n=e.src.charCodeAt(o),ff(n)||10===n);o++);if(a=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<f&&c!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(n=e.src.charCodeAt(o),ff(n)||10===n);o++);else l="";if(o>=f||41!==e.src.charCodeAt(o))return e.pos=d,!1;o++}else{if(void 0===e.env.references)return!1;if(o<f&&91===e.src.charCodeAt(o)?(c=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(c,o++):o=h+1):o=h+1,i||(i=e.src.slice(p,h)),s=e.env.references[gf(i)],!s)return e.pos=d,!1;u=s.href,l=s.title}if(!t){r=e.src.slice(p,h);const t=[];e.md.inline.parse(r,e.md,e.env,t);const n=e.push("image","img",0),i=[["src",u],["alt",""]];n.attrs=i,n.children=t,n.content=r,l&&i.push(["title",l])}return e.pos=o,e.posMax=f,!0}],["autolink",function(e,t){let n=e.pos;if(60!==e.src.charCodeAt(n))return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}const o=e.src.slice(r+1,n);if(cp.test(o)){const n=e.md.normalizeLink(o);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(o);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}if(lp.test(o)){const n=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(o);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}return!1}],["html_inline",function(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(60!==e.src.charCodeAt(r)||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(33!==i&&63!==i&&47!==i&&!function(e){const t=32|e;return t>=97&&t<=122}(i))return!1;const o=e.src.slice(r).match(Yf);if(!o)return!1;if(!t){const t=e.push("html_inline","",0);t.content=o[0],s=t.content,/^<a[>\s]/i.test(s)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(t.content)&&e.linkLevel--}var s;return e.pos+=o[0].length,!0}],["entity",function(e,t){const n=e.pos,r=e.posMax;if(38!==e.src.charCodeAt(n))return!1;if(n+1>=r)return!1;if(35===e.src.charCodeAt(n+1)){const r=e.src.slice(n).match(up);if(r){if(!t){const t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=Zd(t)?ef(t):ef(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(dp);if(r){const n=Kd(r[0]);if(n!==r[0]){if(!t){const t=e.push("text_special","",0);t.content=n,t.markup=r[0],t.info="entity"}return e.pos+=r[0].length,!0}}}return!1}]],hp=[["balance_pairs",function(e){const t=e.tokens_meta,n=e.tokens_meta.length;fp(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&fp(t[r].delimiters)}],["strikethrough",op.postProcess],["emphasis",ap.postProcess],["fragments_join",function(e){let t,n,r=0;const i=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}]];function mp(){this.ruler=new wf;for(let e=0;e<pp.length;e++)this.ruler.push(pp[e][0],pp[e][1]);this.ruler2=new wf;for(let e=0;e<hp.length;e++)this.ruler2.push(hp[e][0],hp[e][1])}function gp(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function vp(e){return Object.prototype.toString.call(e)}function yp(e){return"[object Function]"===vp(e)}function bp(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}mp.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,i=e.md.options.maxNesting,o=e.cache;if(void 0!==o[t])return void(e.pos=o[t]);let s=!1;if(e.level<i){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,o[t]=e.pos},mp.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){const o=e.pos;let s=!1;if(e.level<i)for(let r=0;r<n;r++)if(s=t[r](e,!1),s){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(s){if(e.pos>=r)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},mp.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](i)},mp.prototype.State=ep;const Ep={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const xp={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},wp="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Tp="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Cp(e){const t=e.re=function(e){const t={};e=e||{},t.src_Any=Td.source,t.src_Cc=Cd.source,t.src_Z=_d.source,t.src_P=Sd.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><｜]";return t.src_pseudo_letter="(?:(?![><｜]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><｜]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><｜]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+t.src_ZPCc+"))((?![$+<=>^`|｜])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+t.src_ZPCc+"))((?![$+<=>^`|｜])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(wp),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];function o(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===vp(n))return!function(e){return"[object RegExp]"===vp(e)}(n.validate)?yp(n.validate)?r.validate=n.validate:o(t,n):r.validate=function(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(yp(n.normalize)?r.normalize=n.normalize:n.normalize?o(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===vp(e)}(n)?o(t,n):i.push(t)})),i.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};const s=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(bp).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><｜]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><｜]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function Sp(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function kp(e,t){const n=new Sp(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function _p(e,t){if(!(this instanceof _p))return new _p(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||Ep.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=gp({},Ep,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=gp({},xp,e),this.__compiled__={},this.__tlds__=Tp,this.__tlds_replaced__=!1,this.re={},Cp(this)}_p.prototype.add=function(e,t){return this.__schemas__[e]=t,Cp(this),this},_p.prototype.set=function(e){return this.__opts__=gp(this.__opts__,e),this},_p.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,o,s,a,l,c;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(i=this.testSchemaAt(e,t[2],a.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s))),this.__index__>=0},_p.prototype.pretest=function(e){return this.re.pretest.test(e)},_p.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},_p.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(kp(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(kp(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},_p.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,kp(this,0)):null},_p.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),Cp(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Cp(this),this)},_p.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},_p.prototype.onCompile=function(){};const Np=2147483647,Dp=36,Ap=/^xn--/,Ip=/[^\0-\x7F]/,Op=/[\x2E\u3002\uFF0E\uFF61]/g,Lp={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Mp=Math.floor,Rp=String.fromCharCode;function Fp(e){throw new RangeError(Lp[e])}function Pp(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const i=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(Op,".")).split("."),t).join(".");return r+i}function jp(e){const t=[];let n=0;const r=e.length;for(;n<r;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}const Vp=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},Bp=function(e,t,n){let r=0;for(e=n?Mp(e/700):e>>1,e+=Mp(e/t);e>455;r+=Dp)e=Mp(e/35);return Mp(r+36*e/(e+38))},$p=function(e){const t=[],n=e.length;let r=0,i=128,o=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let l=0;l<s;++l)e.charCodeAt(l)>=128&&Fp("not-basic"),t.push(e.charCodeAt(l));for(let l=s>0?s+1:0;l<n;){const s=r;for(let t=1,i=Dp;;i+=Dp){l>=n&&Fp("invalid-input");const s=(a=e.charCodeAt(l++))>=48&&a<58?a-48+26:a>=65&&a<91?a-65:a>=97&&a<123?a-97:Dp;s>=Dp&&Fp("invalid-input"),s>Mp((Np-r)/t)&&Fp("overflow"),r+=s*t;const c=i<=o?1:i>=o+26?26:i-o;if(s<c)break;const u=Dp-c;t>Mp(Np/u)&&Fp("overflow"),t*=u}const c=t.length+1;o=Bp(r-s,c,0==s),Mp(r/c)>Np-i&&Fp("overflow"),i+=Mp(r/c),r%=c,t.splice(r++,0,i)}var a;return String.fromCodePoint(...t)},Up=function(e){const t=[],n=(e=jp(e)).length;let r=128,i=0,o=72;for(const l of e)l<128&&t.push(Rp(l));const s=t.length;let a=s;for(s&&t.push("-");a<n;){let n=Np;for(const t of e)t>=r&&t<n&&(n=t);const l=a+1;n-r>Mp((Np-i)/l)&&Fp("overflow"),i+=(n-r)*l,r=n;for(const c of e)if(c<r&&++i>Np&&Fp("overflow"),c===r){let e=i;for(let n=Dp;;n+=Dp){const r=n<=o?1:n>=o+26?26:n-o;if(e<r)break;const i=e-r,s=Dp-r;t.push(Rp(Vp(r+i%s,0))),e=Mp(i/s)}t.push(Rp(Vp(e,0))),o=Bp(i,l,a===s),i=0,++a}++i,++r}return t.join("")},Hp={version:"2.3.1",ucs2:{decode:jp,encode:e=>String.fromCodePoint(...e)},decode:$p,encode:Up,toASCII:function(e){return Pp(e,(function(e){return Ip.test(e)?"xn--"+Up(e):e}))},toUnicode:function(e){return Pp(e,(function(e){return Ap.test(e)?$p(e.slice(4).toLowerCase()):e}))}},qp={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Wp=/^(vbscript|javascript|file|data):/,zp=/^data:image\/(gif|png|jpeg|webp);/;function Gp(e){const t=e.trim().toLowerCase();return!Wp.test(t)||zp.test(t)}const Kp=["http:","https:","mailto:"];function Yp(e){const t=xd(e,!0);if(t.hostname&&(!t.protocol||Kp.indexOf(t.protocol)>=0))try{t.hostname=Hp.toASCII(t.hostname)}catch(n){}return ad(ld(t))}function Qp(e){const t=xd(e,!0);if(t.hostname&&(!t.protocol||Kp.indexOf(t.protocol)>=0))try{t.hostname=Hp.toUnicode(t.hostname)}catch(n){}return od(ld(t),od.defaultChars+"%")}function Xp(e,t){if(!(this instanceof Xp))return new Xp(e,t);t||Yd(e)||(t=e||{},e="default"),this.inline=new mp,this.block=new Zf,this.core=new $f,this.renderer=new xf,this.linkify=new _p,this.validateLink=Gp,this.normalizeLink=Yp,this.normalizeLinkText=Qp,this.utils=yf,this.helpers=Xd({},bf),this.options={},this.configure(e),t&&this.set(t)}Xp.prototype.set=function(e){return Xd(this.options,e),this},Xp.prototype.configure=function(e){const t=this;if(Yd(e)){const t=e;if(!(e=qp[t]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)})),this},Xp.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Xp.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Xp.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Xp.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Xp.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Xp.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Xp.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const Jp=new Xp({breaks:!1,linkify:!0});function Zp(e,t){let n;return function(...r){n&&clearTimeout(n),n=setTimeout((()=>{n=null,t(...r)}),e)}}function eh(t,n){const r=h.c(4);let i,o;r[0]!==t||r[1]!==n?(i=()=>{t&&"string"==typeof n&&n!==t.getValue()&&t.setValue(n)},o=[t,n],r[0]=t,r[1]=n,r[2]=i,r[3]=o):(i=r[2],o=r[3]),e.useEffect(i,o)}function th(t,n,r){const i=h.c(5);let o,s;i[0]!==t||i[1]!==n||i[2]!==r?(o=()=>{null==t||t.setOption(n,r)},s=[t,n,r],i[0]=t,i[1]=n,i[2]=r,i[3]=o,i[4]=s):(o=i[3],s=i[4]),e.useEffect(o,s)}function nh(t,n,r,i,o){const s=h.c(9);let a;s[0]!==o?(a={nonNull:!0,caller:o},s[0]=o,s[1]=a):a=s[1];const{updateActiveTabValues:l}=Qh(a);let c,u;s[2]!==n||s[3]!==t||s[4]!==r||s[5]!==i||s[6]!==l?(c=()=>{if(!t)return;const{storage:e}=Mu.getState(),o=Zp(500,(t=>{null!==r&&e.set(r,t)})),s=Zp(100,(e=>{l({[i]:e})})),a=(e,t)=>{if(!t)return;const r=e.getValue();o(r),s(r),null==n||n(r)};return t.on("change",a),()=>t.off("change",a)},u=[n,t,r,i,l],s[2]=n,s[3]=t,s[4]=r,s[5]=i,s[6]=l,s[7]=c,s[8]=u):(c=s[7],u=s[8]),e.useEffect(c,u)}function rh(t,n){const r=h.c(7),{schema:i,setSchemaReference:o}=nd(),s=Zu();let a,l;r[0]!==n||r[1]!==t||r[2]!==s||r[3]!==i||r[4]!==o?(a=()=>{if(!t)return;const e=(e,t)=>{!function(e,t,{schema:n,setSchemaReference:r},i,o){function s(e){const t=null==i?void 0:i.referencePlugin;if(!(n&&t&&e.currentTarget instanceof HTMLElement))return;const s=e.currentTarget.textContent||"",a=n.getType(s);a&&(i.setVisiblePlugin(t),r({kind:"Type",type:a}),null==o||o(a))}qu([],{useCommonAddons:!1}).then((e=>{let n,r,i,o,a,l,c,u,d;e.on(t,"select",((e,t)=>{if(!n){const e=t.parentNode;n=document.createElement("div"),n.className="CodeMirror-hint-information",e.append(n);const f=document.createElement("header");f.className="CodeMirror-hint-information-header",n.append(f),r=document.createElement("span"),r.className="CodeMirror-hint-information-field-name",f.append(r),i=document.createElement("span"),i.className="CodeMirror-hint-information-type-name-pill",f.append(i),o=document.createElement("span"),i.append(o),a=document.createElement("a"),a.className="CodeMirror-hint-information-type-name",a.href="javascript:void 0",a.addEventListener("click",s),i.append(a),l=document.createElement("span"),i.append(l),c=document.createElement("div"),c.className="CodeMirror-hint-information-description",n.append(c),u=document.createElement("div"),u.className="CodeMirror-hint-information-deprecation",n.append(u);const p=document.createElement("span");p.className="CodeMirror-hint-information-deprecation-label",p.textContent="Deprecated",u.append(p),d=document.createElement("div"),d.className="CodeMirror-hint-information-deprecation-reason",u.append(d);const h=parseInt(window.getComputedStyle(n).paddingBottom.replace(/px$/,""),10)||0,m=parseInt(window.getComputedStyle(n).maxHeight.replace(/px$/,""),10)||0,g=()=>{n&&(n.style.paddingTop=e.scrollTop+h+"px",n.style.maxHeight=e.scrollTop+m+"px")};let v;e.addEventListener("scroll",g),e.addEventListener("DOMNodeRemoved",v=t=>{t.target===e&&(e.removeEventListener("scroll",g),e.removeEventListener("DOMNodeRemoved",v),null==n||n.removeEventListener("click",s),n=null,r=null,i=null,o=null,a=null,l=null,c=null,u=null,d=null,v=null)})}if(r&&(r.textContent=e.text),i&&o&&a&&l)if(e.type){i.style.display="inline";const t=e=>{At(e)?(l.textContent="!"+l.textContent,t(e.ofType)):Dt(e)?(o.textContent+="[",l.textContent="]"+l.textContent,t(e.ofType)):a.textContent=e.name};o.textContent="",l.textContent="",t(e.type)}else o.textContent="",a.textContent="",l.textContent="",i.style.display="none";c&&(e.description?(c.style.display="block",c.innerHTML=Jp.render(e.description)):(c.style.display="none",c.innerHTML="")),u&&d&&(e.deprecationReason?(u.style.display="block",d.innerHTML=Jp.render(e.deprecationReason)):(u.style.display="none",d.innerHTML=""))}))}))}(0,t,{schema:i,setSchemaReference:o},s,(e=>{null==n||n({kind:"Type",type:e,schema:i||void 0})}))};return t.on("hasCompletion",e),()=>t.off("hasCompletion",e)},l=[n,t,s,i,o],r[0]=n,r[1]=t,r[2]=s,r[3]=i,r[4]=o,r[5]=a,r[6]=l):(a=r[5],l=r[6]),e.useEffect(a,l)}function ih(t,n,r){const i=h.c(5);let o,s;i[0]!==r||i[1]!==t||i[2]!==n?(o=()=>{if(t){for(const e of n)t.removeKeyMap(e);if(r){const e={};for(const t of n)e[t]=()=>r();t.addKeyMap(e)}}},s=[t,n,r],i[0]=r,i[1]=t,i[2]=n,i[3]=o,i[4]=s):(o=i[3],s=i[4]),e.useEffect(o,s)}const oh=ch,sh=uh,ah=fh,lh=ph;function ch(e){const t=h.c(7);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{caller:r,onCopyQuery:i}=n,o=r||oh;let s;t[2]!==o?(s={nonNull:!0,caller:o},t[2]=o,t[3]=s):s=t[3];const{queryEditor:a}=Qh(s);let l;return t[4]!==i||t[5]!==a?(l=()=>{if(!a)return;const e=a.getValue();Qu(e),null==i||i(e)},t[4]=i,t[5]=a,t[6]=l):l=t[6],l}function uh(e){const t=h.c(7);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{caller:r}=n,i=r||sh;let o;t[2]!==i?(o={nonNull:!0,caller:i},t[2]=i,t[3]=o):o=t[3];const{queryEditor:s}=Qh(o),{schema:a}=nd();let l;return t[4]!==s||t[5]!==a?(l=()=>{const e=null==s?void 0:s.documentAST,t=null==s?void 0:s.getValue();e&&t&&s.setValue(ut(Rs(e,a)))},t[4]=s,t[5]=a,t[6]=l):l=t[6],l}function dh(e){return ut(je(e))}function fh(e){const t=h.c(9);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{caller:r,onPrettifyQuery:i}=n,o=void 0===i?dh:i,s=r||ah;let a;t[2]!==s?(a={nonNull:!0,caller:s},t[2]=s,t[3]=a):a=t[3];const{queryEditor:l,headerEditor:c,variableEditor:u}=Qh(a);let d;return t[4]!==c||t[5]!==o||t[6]!==l||t[7]!==u?(d=async()=>{if(u){const e=u.getValue();try{const t=JSON.stringify(JSON.parse(e),null,2);t!==e&&u.setValue(t)}catch{}}if(c){const e=c.getValue();try{const t=JSON.stringify(JSON.parse(e),null,2);t!==e&&c.setValue(t)}catch{}}if(l){const e=l.getValue();try{const t=await o(e);t!==e&&l.setValue(t)}catch{}}},t[4]=c,t[5]=o,t[6]=l,t[7]=u,t[8]=d):d=t[8],d}function ph(e){const t=h.c(8);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{getDefaultFieldNames:r,caller:i}=n,{schema:o}=nd(),s=i||lh;let a;t[2]!==s?(a={nonNull:!0,caller:s},t[2]=s,t[3]=a):a=t[3];const{queryEditor:l}=Qh(a);let c;return t[4]!==r||t[5]!==l||t[6]!==o?(c=()=>{if(!l)return;const e=l.getValue(),{insertions:t,result:n}=As(o,e,r);return t&&t.length>0&&l.operation((()=>{const e=l.getCursor(),r=l.indexFromPos(e);let i;l.setValue(n||""),i=0;const o=t.map((e=>{const{index:t,string:n}=e;return i+=n.length,l.markText(l.posFromIndex(t+i),l.posFromIndex(t+i),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"})}));setTimeout((()=>{for(const e of o)e.clear()}),7e3);let s=r;for(const{index:n,string:a}of t)n<r&&(s+=a.length);l.setCursor(l.posFromIndex(s))})),n},t[4]=r,t[5]=l,t[6]=o,t[7]=c):c=t[7],c}const hh=t=>{const n=Qh({nonNull:!0})[`${t}Editor`];let r="";const i=(null==n?void 0:n.getValue())??!1;i&&i.length>0&&(r=i);const o=e.useCallback((e=>null==n?void 0:n.setValue(e)),[n]);return e.useMemo((()=>[r,o]),[r,o])};const mh=gh;function gh(t,n){const r=h.c(17);let i;r[0]!==t?(i=void 0===t?{}:t,r[0]=t,r[1]=i):i=r[1];const{editorTheme:o,keyMap:s,onEdit:a,readOnly:l}=i,c=void 0===o?$u:o,u=void 0===s?Uu:s,d=void 0!==l&&l,f=n||mh;let p;r[2]!==f?(p={nonNull:!0,caller:f},r[2]=f,r[3]=p):p=r[3];const{initialHeaders:m,headerEditor:g,setHeaderEditor:v,shouldPersistHeaders:y}=Qh(p),b=em(),E=n||mh;let x;r[4]!==E?(x={caller:E},r[4]=E,r[5]=x):x=r[5];const w=uh(x),T=n||mh;let C;r[6]!==T?(C={caller:T},r[6]=T,r[7]=C):C=r[7];const S=fh(C),k=e.useRef(null);let _,N,D,A,I;return r[8]!==c||r[9]!==m||r[10]!==d||r[11]!==v?(_=()=>{let e;return e=!0,qu([Promise.resolve().then((()=>UV))]).then((t=>{if(!e)return;const n=k.current;if(!n)return;const r=t(n,{value:m,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:c,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!d&&"nocursor",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:Hu});r.addKeyMap({"Cmd-Space"(){r.showHint({completeSingle:!1,container:n})},"Ctrl-Space"(){r.showHint({completeSingle:!1,container:n})},"Alt-Space"(){r.showHint({completeSingle:!1,container:n})},"Shift-Space"(){r.showHint({completeSingle:!1,container:n})}}),r.on("keyup",vh),v(r)})),()=>{e=!1}},N=[c,m,d,v],r[8]=c,r[9]=m,r[10]=d,r[11]=v,r[12]=_,r[13]=N):(_=r[12],N=r[13]),e.useEffect(_,N),th(g,"keyMap",u),nh(g,a,y?yh:null,"headers",mh),r[14]===Symbol.for("react.memo_cache_sentinel")?(D=["Cmd-Enter","Ctrl-Enter"],r[14]=D):D=r[14],ih(g,D,null==b?void 0:b.run),r[15]===Symbol.for("react.memo_cache_sentinel")?(A=["Shift-Ctrl-P"],r[15]=A):A=r[15],ih(g,A,S),r[16]===Symbol.for("react.memo_cache_sentinel")?(I=["Shift-Ctrl-M"],r[16]=I):I=r[16],ih(g,I,w),k}function vh(e,t){const{code:n,key:r,shiftKey:i}=t,o=n.startsWith("Key"),s=!i&&n.startsWith("Digit");(o||s||"_"===r||'"'===r)&&e.execCommand("autocomplete")}const yh="headers",bh=Array.from({length:11},((e,t)=>String.fromCharCode(8192+t))).concat(["\u2028","\u2029"," "," "]),Eh=new RegExp("["+bh.join("")+"]","g");function xh(e){return e.replace(Eh," ")}const wh=Th;function Th(t,n){const r=h.c(40);let i;r[0]!==t?(i=void 0===t?{}:t,r[0]=t,r[1]=i):i=r[1];const{editorTheme:o,keyMap:s,onClickReference:a,onCopyQuery:l,onEdit:c,onPrettifyQuery:u,readOnly:d}=i,f=void 0===o?$u:o,p=void 0===s?Uu:s,m=void 0!==d&&d,{schema:g,setSchemaReference:v}=nd(),y=n||wh;let b;r[2]!==y?(b={nonNull:!0,caller:y},r[2]=y,r[3]=b):b=r[3];const{externalFragments:E,initialQuery:x,queryEditor:w,setOperationName:T,setQueryEditor:C,validationRules:S,variableEditor:k,updateActiveTabValues:_}=Qh(b),N=em(),D=Pu(),A=Zu(),I=n||wh;let O;r[4]!==l||r[5]!==I?(O={caller:I,onCopyQuery:l},r[4]=l,r[5]=I,r[6]=O):O=r[6];const L=ch(O),M=n||wh;let R;r[7]!==M?(R={caller:M},r[7]=M,r[8]=R):R=r[8];const F=uh(R),P=n||wh;let j;r[9]!==u||r[10]!==P?(j={caller:P,onPrettifyQuery:u},r[9]=u,r[10]=P,r[11]=j):j=r[11];const V=fh(j),B=e.useRef(null),$=e.useRef(void 0),U=e.useRef(_h);let H,q,W,z,G,K;r[12]!==a||r[13]!==A||r[14]!==v?(H=()=>{U.current=e=>{const t=null==A?void 0:A.referencePlugin;t&&(A.setVisiblePlugin(t),v(e),null==a||a(e))}},q=[a,A,v],r[12]=a,r[13]=A,r[14]=v,r[15]=H,r[16]=q):(H=r[15],q=r[16]),e.useEffect(H,q),r[17]!==f||r[18]!==x||r[19]!==m||r[20]!==C?(W=()=>{let e;return e=!0,qu([Promise.resolve().then((()=>zV)),Promise.resolve().then((()=>QV)),Promise.resolve().then((()=>XV)),Promise.resolve().then((()=>eB)),Promise.resolve().then((()=>gB)),Promise.resolve().then((()=>TB)),Promise.resolve().then((()=>SB))]).then((t=>{if(!e)return;$.current=t;const n=B.current;if(!n)return;const r=t(n,{value:x,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:f,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!m&&"nocursor",lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:n,externalFragments:void 0,autocompleteOptions:{mode:jc.EXECUTABLE}},info:{schema:void 0,renderDescription:kh,onClick(e){U.current(e)}},jump:{schema:void 0,onClick(e){U.current(e)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...Hu,"Cmd-S"(){},"Ctrl-S"(){}}}),i=function(){r.showHint({completeSingle:!0,container:n})};let o;r.addKeyMap({"Cmd-Space":i,"Ctrl-Space":i,"Alt-Space":i,"Shift-Space":i,"Shift-Alt-Space":i}),r.on("keyup",Sh),o=!1,r.on("startCompletion",(()=>{o=!0})),r.on("endCompletion",(()=>{o=!1})),r.on("keydown",((e,t)=>{"Escape"===t.key&&o&&t.stopPropagation()})),r.on("beforeChange",Ch),r.documentAST=null,r.operationName=null,r.operations=null,r.variableToType=null,C(r)})),()=>{e=!1}},z=[f,x,m,C],r[17]=f,r[18]=x,r[19]=m,r[20]=C,r[21]=W,r[22]=z):(W=r[21],z=r[22]),e.useEffect(W,z),th(w,"keyMap",p),r[23]!==c||r[24]!==w||r[25]!==g||r[26]!==T||r[27]!==D||r[28]!==_||r[29]!==k?(G=()=>{if(!w)return;const e=function(e){var t;const n=function(e,n){if(n)try{const t=je(n);return Object.assign(Object.assign({},ou(t,e)),{documentAST:t})}catch(t){return}}(g,e.getValue()),r=function(e,t,n){if(!n||n.length<1)return;const r=n.map((e=>{var t;return null==(t=e.name)?void 0:t.value}));if(t&&r.includes(t))return t;if(t&&e){const n=e.map((e=>{var t;return null==(t=e.name)?void 0:t.value})).indexOf(t);if(-1!==n&&n<r.length)return r[n]}return r[0]}(e.operations??void 0,e.operationName??void 0,null==n?void 0:n.operations);return e.documentAST=(null==n?void 0:n.documentAST)??null,e.operationName=r??null,e.operations=(null==n?void 0:n.operations)??null,k&&(!function(e,t){e.state.lint.linterOptions.variableToType=null==t?void 0:t.variableToType,e.options.lint.variableToType=null==t?void 0:t.variableToType,e.options.hintOptions.variableToType=null==t?void 0:t.variableToType}(k,n),null==(t=$.current)||t.signal(k,"change",k)),n?{...n,operationName:r}:null},t=Zp(100,(t=>{const n=t.getValue();D.set(Dh,n);const r=t.operationName,i=e(t);void 0!==(null==i?void 0:i.operationName)&&D.set(Ah,i.operationName),null==c||c(n,null==i?void 0:i.documentAST),(null==i?void 0:i.operationName)&&r!==i.operationName&&T(i.operationName),_({query:n,operationName:(null==i?void 0:i.operationName)??null})}));return e(w),w.on("change",t),()=>w.off("change",t)},K=[c,w,g,T,D,k,_],r[23]=c,r[24]=w,r[25]=g,r[26]=T,r[27]=D,r[28]=_,r[29]=k,r[30]=G,r[31]=K):(G=r[30],K=r[31]),e.useEffect(G,K),function(t,n,r){const i=h.c(5);let o,s;i[0]!==r||i[1]!==t||i[2]!==n?(o=()=>{if(!t)return;const e=t.options.lint.schema!==n;!function(e,t){e.state.lint.linterOptions.schema=t,e.options.lint.schema=t,e.options.hintOptions.schema=t,e.options.info.schema=t,e.options.jump.schema=t}(t,n),e&&r.current&&r.current.signal(t,"change",t)},s=[t,n,r],i[0]=r,i[1]=t,i[2]=n,i[3]=o,i[4]=s):(o=i[3],s=i[4]);e.useEffect(o,s)}(w,g??null,$),function(t,n,r){const i=h.c(5);let o,s;i[0]!==r||i[1]!==t||i[2]!==n?(o=()=>{if(!t)return;const e=t.options.lint.validationRules!==n;!function(e,t){e.state.lint.linterOptions.validationRules=t,e.options.lint.validationRules=t}(t,n),e&&r.current&&r.current.signal(t,"change",t)},s=[t,n,r],i[0]=r,i[1]=t,i[2]=n,i[3]=o,i[4]=s):(o=i[3],s=i[4]);e.useEffect(o,s)}(w,S??null,$),function(t,n,r){const i=h.c(7);let o;i[0]!==n?(o=[...n.values()],i[0]=n,i[1]=o):o=i[1];const s=o;let a,l;i[2]!==r||i[3]!==t||i[4]!==s?(a=()=>{if(!t)return;const e=t.options.lint.externalFragments!==s;!function(e,t){e.state.lint.linterOptions.externalFragments=t,e.options.lint.externalFragments=t,e.options.hintOptions.externalFragments=t}(t,s),e&&r.current&&r.current.signal(t,"change",t)},l=[t,s,r],i[2]=r,i[3]=t,i[4]=s,i[5]=a,i[6]=l):(a=i[5],l=i[6]);e.useEffect(a,l)}(w,E,$),rh(w,a);const Y=null==N?void 0:N.run;let Q;r[32]!==w||r[33]!==Y||r[34]!==T?(Q=()=>{var e;if(!(Y&&w&&w.operations&&w.hasFocus()))return void(null==Y||Y());const t=w.indexFromPos(w.getCursor());let n;for(const r of w.operations)r.loc&&r.loc.start<=t&&r.loc.end>=t&&(n=null==(e=r.name)?void 0:e.value);n&&n!==w.operationName&&T(n),Y()},r[32]=w,r[33]=Y,r[34]=T,r[35]=Q):Q=r[35];const X=Q;let J,Z,ee,te;return r[36]===Symbol.for("react.memo_cache_sentinel")?(J=["Cmd-Enter","Ctrl-Enter"],r[36]=J):J=r[36],ih(w,J,X),r[37]===Symbol.for("react.memo_cache_sentinel")?(Z=["Shift-Ctrl-C"],r[37]=Z):Z=r[37],ih(w,Z,L),r[38]===Symbol.for("react.memo_cache_sentinel")?(ee=["Shift-Ctrl-P","Shift-Ctrl-F"],r[38]=ee):ee=r[38],ih(w,ee,V),r[39]===Symbol.for("react.memo_cache_sentinel")?(te=["Shift-Ctrl-M"],r[39]=te):te=r[39],ih(w,te,F),B}function Ch(e,t){var n;if("paste"===t.origin){const e=t.text.map(xh);null==(n=t.update)||n.call(t,t.from,t.to,e)}}function Sh(e,t){Nh.test(t.key)&&e.execCommand("autocomplete")}function kh(e){return Jp.render(e)}function _h(){}const Nh=/^[a-zA-Z0-9_@(]$/,Dh="query",Ah="operationName";function Ih({defaultQuery:e,defaultHeaders:t,headers:n,defaultTabs:r,query:i,variables:o,shouldPersistHeaders:s}){const{storage:a}=Mu.getState(),l=a.get(Uh);try{if(!l)throw new Error("Storage for tabs is empty");const e=JSON.parse(l),t=s?n:void 0;if((c=e)&&"object"==typeof c&&!Array.isArray(c)&&function(e,t){return t in e&&"number"==typeof e[t]}(c,"activeTabIndex")&&"tabs"in c&&Array.isArray(c.tabs)&&c.tabs.every(Oh)){const r=Vh({query:i,variables:o,headers:t});let s=-1;for(let t=0;t<e.tabs.length;t++){const n=e.tabs[t];n.hash=Vh({query:n.query,variables:n.variables,headers:n.headers}),n.hash===r&&(s=t)}if(s>=0)e.activeTabIndex=s;else{const t=i?Bh(i):null;e.tabs.push({id:jh(),hash:r,title:t||$h,query:i,variables:o,headers:n,operationName:t,response:null}),e.activeTabIndex=e.tabs.length-1}return e}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(r||[{query:i??e,variables:o,headers:n??t}]).map(Fh)}}var c}function Oh(e){return e&&"object"==typeof e&&!Array.isArray(e)&&Lh(e,"id")&&Lh(e,"title")&&Mh(e,"query")&&Mh(e,"variables")&&Mh(e,"headers")&&Mh(e,"operationName")&&Mh(e,"response")}function Lh(e,t){return t in e&&"string"==typeof e[t]}function Mh(e,t){return t in e&&("string"==typeof e[t]||null===e[t])}function Rh(e,t=!1){return JSON.stringify(e,((e,n)=>"hash"===e||"response"===e||!t&&"headers"===e?null:n))}function Fh({query:e=null,variables:t=null,headers:n=null}={}){const r=e?Bh(e):null;return{id:jh(),hash:Vh({query:e,variables:t,headers:n}),title:r||$h,query:e,variables:t,headers:n,operationName:r,response:null}}function Ph(e,t){return{...e,tabs:e.tabs.map(((n,r)=>{if(r!==e.activeTabIndex)return n;const i={...n,...t};return{...i,hash:Vh(i),title:i.operationName||(i.query?Bh(i.query):void 0)||$h}}))}}function jh(){const e=()=>Math.floor(65536*(1+Math.random())).toString(16).slice(1);return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}function Vh(e){return[e.query??"",e.variables??"",e.headers??""].join("|")}function Bh(e){const t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);return(null==t?void 0:t[2])??null}const $h="<untitled>",Uh="tabState";const Hh=qh;function qh(t,n){const r=h.c(17);let i;r[0]!==t?(i=void 0===t?{}:t,r[0]=t,r[1]=i):i=r[1];const{editorTheme:o,keyMap:s,onClickReference:a,onEdit:l,readOnly:c}=i,u=void 0===o?$u:o,d=void 0===s?Uu:s,f=void 0!==c&&c,p=n||Hh;let m;r[2]!==p?(m={nonNull:!0,caller:p},r[2]=p,r[3]=m):m=r[3];const{initialVariables:g,variableEditor:v,setVariableEditor:y}=Qh(m),b=em(),E=n||Hh;let x;r[4]!==E?(x={caller:E},r[4]=E,r[5]=x):x=r[5];const w=uh(x),T=n||Hh;let C;r[6]!==T?(C={caller:T},r[6]=T,r[7]=C):C=r[7];const S=fh(C),k=e.useRef(null);let _,N,D,A,I;return r[8]!==u||r[9]!==g||r[10]!==f||r[11]!==y?(_=()=>{let e;return e=!0,qu([Promise.resolve().then((()=>AB)),Promise.resolve().then((()=>ZB)),Promise.resolve().then((()=>r$))]).then((t=>{if(!e)return;const n=k.current;if(!n)return;const r=t(n,{value:g,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!f&&"nocursor",foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:n,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:Hu});r.addKeyMap({"Cmd-Space"(){r.showHint({completeSingle:!1,container:n})},"Ctrl-Space"(){r.showHint({completeSingle:!1,container:n})},"Alt-Space"(){r.showHint({completeSingle:!1,container:n})},"Shift-Space"(){r.showHint({completeSingle:!1,container:n})}}),r.on("keyup",Wh),y(r)})),()=>{e=!1}},N=[u,g,f,y],r[8]=u,r[9]=g,r[10]=f,r[11]=y,r[12]=_,r[13]=N):(_=r[12],N=r[13]),e.useEffect(_,N),th(v,"keyMap",d),nh(v,l,zh,"variables",Hh),rh(v,a),r[14]===Symbol.for("react.memo_cache_sentinel")?(D=["Cmd-Enter","Ctrl-Enter"],r[14]=D):D=r[14],ih(v,D,null==b?void 0:b.run),r[15]===Symbol.for("react.memo_cache_sentinel")?(A=["Shift-Ctrl-P"],r[15]=A):A=r[15],ih(v,A,S),r[16]===Symbol.for("react.memo_cache_sentinel")?(I=["Shift-Ctrl-M"],r[16]=I):I=r[16],ih(v,I,w),k}function Wh(e,t){const{code:n,key:r,shiftKey:i}=t,o=n.startsWith("Key"),s=!i&&n.startsWith("Digit");(o||s||"_"===r||'"'===r)&&e.execCommand("autocomplete")}const zh="variables",Gh='# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a "{" character. Lines that start\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n#     {\n#       field(arg: "value") {\n#         subField\n#       }\n#     }\n#\n# Keyboard shortcuts:\n#\n#   Prettify query:  Shift-Ctrl-P (or press the prettify button)\n#\n#  Merge fragments:  Shift-Ctrl-M (or press the merge button)\n#\n#        Run Query:  Ctrl-Enter (or press the play button)\n#\n#    Auto Complete:  Ctrl-Space (or just start typing)\n#\n\n',Kh=Nu("EditorContext"),Yh=t=>{const n=h.c(88),r=Pu(),[i,o]=e.useState(null),[s,a]=e.useState(null),[l,c]=e.useState(null),[u,d]=e.useState(null);let f;n[0]!==t.shouldPersistHeaders||n[1]!==r?(f=()=>{const e=null!==r.get(Xh);return!1!==t.shouldPersistHeaders&&e?"true"===r.get(Xh):Boolean(t.shouldPersistHeaders)},n[0]=t.shouldPersistHeaders,n[1]=r,n[2]=f):f=n[2];const[m,g]=e.useState(f);let v;eh(i,t.headers),eh(s,t.query),eh(l,t.response),eh(u,t.variables),n[3]!==m?(v={shouldPersistHeaders:m},n[3]=m,n[4]=v):v=n[4];const y=function({shouldPersistHeaders:t}){return e.useCallback((e=>{const{storage:n}=Mu.getState();Zp(500,(e=>{n.set(Uh,e)}))(Rh(e,t))}),[t])}(v);let b;n[5]!==t.defaultHeaders||n[6]!==t.defaultQuery||n[7]!==t.defaultTabs||n[8]!==t.headers||n[9]!==t.query||n[10]!==t.response||n[11]!==t.variables||n[12]!==m||n[13]!==r||n[14]!==y?(b=()=>{const e=t.query??r.get(Dh)??null,n=t.variables??r.get(zh)??null,i=t.headers??r.get(yh)??null,o=t.response??"",s=Ih({query:e,variables:n,headers:i,defaultTabs:t.defaultTabs,defaultQuery:t.defaultQuery||Gh,defaultHeaders:t.defaultHeaders,shouldPersistHeaders:m});return y(s),{query:e??(0===s.activeTabIndex?s.tabs[0].query:null)??"",variables:n??"",headers:i??t.defaultHeaders??"",response:o,tabState:s}},n[5]=t.defaultHeaders,n[6]=t.defaultQuery,n[7]=t.defaultTabs,n[8]=t.headers,n[9]=t.query,n[10]=t.response,n[11]=t.variables,n[12]=m,n[13]=r,n[14]=y,n[15]=b):b=n[15];const[E]=e.useState(b),[x,w]=e.useState(E.tabState);let T;n[16]!==i||n[17]!==r||n[18]!==x?(T=e=>{if(e){r.set(yh,(null==i?void 0:i.getValue())??"");const e=Rh(x,!0);r.set(Uh,e)}else r.set(yh,""),function(){const{storage:e}=Mu.getState(),t=e.get(Uh);if(t){const n=JSON.parse(t);e.set(Uh,JSON.stringify(n,((e,t)=>"headers"===e?null:t)))}}();g(e),r.set(Xh,e.toString())},n[16]=i,n[17]=r,n[18]=x,n[19]=T):T=n[19];const C=T,S=e.useRef(void 0);let k,_,N;n[20]!==t.shouldPersistHeaders||n[21]!==C?(k=()=>{const e=Boolean(t.shouldPersistHeaders);(null==S?void 0:S.current)!==e&&(C(e),S.current=e)},_=[t.shouldPersistHeaders,C],n[20]=t.shouldPersistHeaders,n[21]=C,n[22]=k,n[23]=_):(k=n[22],_=n[23]),e.useEffect(k,_),n[24]!==i||n[25]!==s||n[26]!==l||n[27]!==u?(N={queryEditor:s,variableEditor:u,headerEditor:i,responseEditor:l},n[24]=i,n[25]=s,n[26]=l,n[27]=u,n[28]=N):N=n[28];const D=function({queryEditor:t,variableEditor:n,headerEditor:r,responseEditor:i}){return e.useCallback((e=>{const o=(null==t?void 0:t.getValue())??null,s=(null==n?void 0:n.getValue())??null,a=(null==r?void 0:r.getValue())??null,l=(null==t?void 0:t.operationName)??null;return Ph(e,{query:o,variables:s,headers:a,response:(null==i?void 0:i.getValue())??null,operationName:l})}),[t,n,r,i])}(N),{onTabChange:A,defaultHeaders:I,defaultQuery:O,children:L}=t;let M;n[29]!==I||n[30]!==i||n[31]!==s||n[32]!==l||n[33]!==u?(M={queryEditor:s,variableEditor:u,headerEditor:i,responseEditor:l,defaultHeaders:I},n[29]=I,n[30]=i,n[31]=s,n[32]=l,n[33]=u,n[34]=M):M=n[34];const R=function({queryEditor:t,variableEditor:n,headerEditor:r,responseEditor:i,defaultHeaders:o}){return e.useCallback((({query:e,variables:s,headers:a,response:l})=>{null==t||t.setValue(e??""),null==n||n.setValue(s??""),null==r||r.setValue(a??o??""),null==i||i.setValue(l??"")}),[r,t,i,n,o])}(M);let F;n[35]!==I||n[36]!==O||n[37]!==A||n[38]!==R||n[39]!==y||n[40]!==D?(F=()=>{w((e=>{const t=D(e),n={tabs:[...t.tabs,Fh({headers:I,query:O??Gh})],activeTabIndex:t.tabs.length};return y(n),R(n.tabs[n.activeTabIndex]),null==A||A(n),n}))},n[35]=I,n[36]=O,n[37]=A,n[38]=R,n[39]=y,n[40]=D,n[41]=F):F=n[41];const P=F;let j;n[42]!==A||n[43]!==R||n[44]!==y?(j=e=>{w((t=>{const n={...t,activeTabIndex:e};return y(n),R(n.tabs[n.activeTabIndex]),null==A||A(n),n}))},n[42]=A,n[43]=R,n[44]=y,n[45]=j):j=n[45];const V=j;let B;n[46]!==A||n[47]!==R||n[48]!==y?(B=e=>{w((t=>{const n=t.tabs[t.activeTabIndex],r={tabs:e,activeTabIndex:e.indexOf(n)};return y(r),R(r.tabs[r.activeTabIndex]),null==A||A(r),r}))},n[46]=A,n[47]=R,n[48]=y,n[49]=B):B=n[49];const $=B;let U;n[50]!==A||n[51]!==R||n[52]!==y?(U=e=>{w((t=>{const n={tabs:t.tabs.filter(((t,n)=>e!==n)),activeTabIndex:Math.max(t.activeTabIndex-1,0)};return y(n),R(n.tabs[n.activeTabIndex]),null==A||A(n),n}))},n[50]=A,n[51]=R,n[52]=y,n[53]=U):U=n[53];const H=U;let q;n[54]!==A||n[55]!==y?(q=e=>{w((t=>{const n=Ph(t,e);return y(n),null==A||A(n),n}))},n[54]=A,n[55]=y,n[56]=q):q=n[56];const W=q,{onEditOperationName:z}=t;let G;n[57]!==z||n[58]!==s||n[59]!==W?(G=e=>{s&&(!function(e,t){e.operationName=t}(s,e),W({operationName:e}),null==z||z(e))},n[57]=z,n[58]=s,n[59]=W,n[60]=G):G=n[60];const K=G;let Y,Q;if(n[61]!==t.externalFragments){if(Q=new Map,Array.isArray(t.externalFragments))for(const e of t.externalFragments)Q.set(e.name.value,e);else if("string"==typeof t.externalFragments)at(je(t.externalFragments,{}),{FragmentDefinition(e){Q.set(e.name.value,e)}});else if(t.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");n[61]=t.externalFragments,n[62]=Q}else Q=n[62];Y=Q;const X=Y;let J;n[63]!==t.validationRules?(J=t.validationRules||[],n[63]=t.validationRules,n[64]=J):J=n[64];const Z=J;let ee;n[65]!==P||n[66]!==V||n[67]!==H||n[68]!==X||n[69]!==i||n[70]!==E.headers||n[71]!==E.query||n[72]!==E.response||n[73]!==E.variables||n[74]!==$||n[75]!==s||n[76]!==l||n[77]!==K||n[78]!==C||n[79]!==m||n[80]!==x||n[81]!==W||n[82]!==Z||n[83]!==u?(ee={...x,addTab:P,changeTab:V,moveTab:$,closeTab:H,updateActiveTabValues:W,headerEditor:i,queryEditor:s,responseEditor:l,variableEditor:u,setHeaderEditor:o,setQueryEditor:a,setResponseEditor:c,setVariableEditor:d,setOperationName:K,initialQuery:E.query,initialVariables:E.variables,initialHeaders:E.headers,initialResponse:E.response,externalFragments:X,validationRules:Z,shouldPersistHeaders:m,setShouldPersistHeaders:C},n[65]=P,n[66]=V,n[67]=H,n[68]=X,n[69]=i,n[70]=E.headers,n[71]=E.query,n[72]=E.response,n[73]=E.variables,n[74]=$,n[75]=s,n[76]=l,n[77]=K,n[78]=C,n[79]=m,n[80]=x,n[81]=W,n[82]=Z,n[83]=u,n[84]=ee):ee=n[84];const te=ee;let ne;return n[85]!==L||n[86]!==te?(ne=p.jsx(Kh.Provider,{value:te,children:L}),n[85]=L,n[86]=te,n[87]=ne):ne=n[87],ne};const Qh=Du(Kh),Xh="shouldPersistHeaders",Jh=Nu("ExecutionContext"),Zh=t=>{const n=h.c(26),{fetcher:r,getDefaultFieldNames:i,children:o,operationName:s}=t;if("function"!=typeof r)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a={nonNull:!0,caller:Zh},n[0]=a):a=n[0];const{externalFragments:l,headerEditor:c,queryEditor:u,responseEditor:d,variableEditor:f,updateActiveTabValues:m}=Qh(a);let g;n[1]!==i?(g={getDefaultFieldNames:i,caller:Zh},n[1]=i,n[2]=g):g=n[2];const v=ph(g),[y,b]=e.useState(!1),[E,x]=e.useState(null),w=e.useRef(0);let T;n[3]!==E?(T=()=>{null==E||E.unsubscribe(),b(!1),x(null)},n[3]=E,n[4]=T):T=n[4];const C=T;let S;n[5]!==v||n[6]!==l||n[7]!==r||n[8]!==c||n[9]!==s||n[10]!==u||n[11]!==d||n[12]!==C||n[13]!==E||n[14]!==m||n[15]!==f?(S=async()=>{if(!u||!d)return;if(E)return void C();const e=e=>{d.setValue(e),m({response:e})};w.current=w.current+1;const t=w.current;let n=v()||u.getValue();const i=null==f?void 0:f.getValue();let o;try{o=tm({json:i,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(T){const t=T;return void e(t instanceof Error?t.message:`${t}`)}const a=null==c?void 0:c.getValue();let p;try{p=tm({json:a,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(S){const t=S;return void e(t instanceof Error?t.message:`${t}`)}if(l){const e=u.documentAST?((e,t)=>{if(!t)return[];const n=new Map,r=new Set;at(e,{FragmentDefinition(e){n.set(e.name.value,!0)},FragmentSpread(e){r.has(e.name.value)||r.add(e.name.value)}});const i=new Set;for(const s of r)!n.has(s)&&t.has(s)&&i.add(nu(t.get(s)));const o=[];for(const s of i)at(s,{FragmentSpread(e){!r.has(e.name.value)&&t.get(e.name.value)&&(i.add(nu(t.get(e.name.value))),r.add(e.name.value))}}),n.has(s.name.value)||o.push(s);return o})(u.documentAST,l):[];e.length>0&&(n=n+"\n"+e.map(im).join("\n"))}e(""),b(!0);const h=s??u.operationName??void 0,g=p??void 0,y=u.documentAST??void 0;try{const i={},s=n=>{if(t!==w.current)return;let r=!!Array.isArray(n)&&n;if(!r&&"object"==typeof n&&null!==n&&"hasNext"in n&&(r=[n]),r){for(const e of r)rm(i,e);b(!1),e(Ds(i))}else{const t=Ds(n);b(!1),e(t)}},a=r({query:n,variables:o,operationName:h},{headers:g,documentAST:y}),l=await a;_(l)?x(l.subscribe({next(e){s(e)},error(t){b(!1),t&&e(Ns(t)),x(null)},complete(){b(!1),x(null)}})):N(l)?(x({unsubscribe:()=>{var e,t;return null==(t=(e=l[Symbol.asyncIterator]()).return)?void 0:t.call(e)}}),await async function(e,t){for await(const n of t)e(n)}(s,l),b(!1),x(null)):s(l)}catch(k){const t=k;b(!1),e(Ns(t)),x(null)}},n[5]=v,n[6]=l,n[7]=r,n[8]=c,n[9]=s,n[10]=u,n[11]=d,n[12]=C,n[13]=E,n[14]=m,n[15]=f,n[16]=S):S=n[16];const k=S,D=Boolean(E),A=s??null;let I;n[17]!==y||n[18]!==k||n[19]!==C||n[20]!==D||n[21]!==A?(I={isFetching:y,isSubscribed:D,operationName:A,run:k,stop:C},n[17]=y,n[18]=k,n[19]=C,n[20]=D,n[21]=A,n[22]=I):I=n[22];const O=I;let L;return n[23]!==o||n[24]!==O?(L=p.jsx(Jh.Provider,{value:O,children:o}),n[23]=o,n[24]=O,n[25]=L):L=n[25],L};const em=Du(Jh);function tm({json:e,errorMessageParse:t,errorMessageType:n}){let r;try{r=e&&""!==e.trim()?JSON.parse(e):void 0}catch(o){throw new Error(`${t}: ${o instanceof Error?o.message:o}.`)}const i="object"==typeof r&&null!==r&&!Array.isArray(r);if(void 0!==r&&!i)throw new Error(n);return r}const nm=new WeakMap;function rm(e,t){var n,r,i;let o=["data",...t.path??[]];for(const l of[e,t])if(l.pending){let t=nm.get(e);void 0===t&&(t=new Map,nm.set(e,t));for(const{id:e,path:n}of l.pending)t.set(e,["data",...n])}const{items:s}=t;if(s){const{id:r}=t;if(r){if(o=null==(n=nm.get(e))?void 0:n.get(r),void 0===o)throw new Error("Invalid incremental delivery format.");_u(e,o.join(".")).push(...s)}else{o=["data",...t.path??[]];for(const t of s)xu(e,o.join("."),t),o[o.length-1]++}}const{data:a}=t;if(a){const{id:n}=t;if(n){if(o=null==(r=nm.get(e))?void 0:r.get(n),void 0===o)throw new Error("Invalid incremental delivery format.");const{subPath:i}=t;void 0!==i&&(o=[...o,...i])}xu(e,o.join("."),a,{merge:!0})}if(t.errors&&(e.errors||(e.errors=[]),e.errors.push(...t.errors)),t.extensions&&xu(e,"extensions",t.extensions,{merge:!0}),t.incremental)for(const l of t.incremental)rm(e,l);if(t.completed)for(const{id:l,errors:c}of t.completed)null==(i=nm.get(e))||i.delete(l),c&&(e.errors||(e.errors=[]),e.errors.push(...c))}function im(e){return ut(e)}const om=e=>{const t=h.c(45),{children:n,dangerouslyAssumeSchemaIsValid:r,defaultQuery:i,defaultHeaders:o,defaultTabs:s,externalFragments:a,fetcher:l,getDefaultFieldNames:c,headers:u,inputValueDeprecation:d,introspectionQueryName:f,onEditOperationName:m,onSchemaChange:g,onTabChange:v,onTogglePluginVisibility:y,operationName:b,plugins:E,referencePlugin:x,query:w,response:T,schema:C,schemaDescription:S,shouldPersistHeaders:k,storage:_,validationRules:N,variables:D,visiblePlugin:A}=e;let I;t[0]!==o||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==u||t[5]!==m||t[6]!==v||t[7]!==w||t[8]!==T||t[9]!==k||t[10]!==N||t[11]!==D?(I={defaultQuery:i,defaultHeaders:o,defaultTabs:s,externalFragments:a,headers:u,onEditOperationName:m,onTabChange:v,query:w,response:T,shouldPersistHeaders:k,validationRules:N,variables:D},t[0]=o,t[1]=i,t[2]=s,t[3]=a,t[4]=u,t[5]=m,t[6]=v,t[7]=w,t[8]=T,t[9]=k,t[10]=N,t[11]=D,t[12]=I):I=t[12];const O=I;let L;t[13]!==r||t[14]!==l||t[15]!==d||t[16]!==f||t[17]!==g||t[18]!==C||t[19]!==S?(L={dangerouslyAssumeSchemaIsValid:r,fetcher:l,inputValueDeprecation:d,introspectionQueryName:f,onSchemaChange:g,schema:C,schemaDescription:S},t[13]=r,t[14]=l,t[15]=d,t[16]=f,t[17]=g,t[18]=C,t[19]=S,t[20]=L):L=t[20];const M=L;let R;t[21]!==l||t[22]!==c||t[23]!==b?(R={getDefaultFieldNames:c,fetcher:l,operationName:b},t[21]=l,t[22]=c,t[23]=b,t[24]=R):R=t[24];const F=R;let P;t[25]!==y||t[26]!==E||t[27]!==x||t[28]!==A?(P={onTogglePluginVisibility:y,plugins:E,visiblePlugin:A,referencePlugin:x},t[25]=y,t[26]=E,t[27]=x,t[28]=A,t[29]=P):P=t[29];const j=P;let V,B,$,U,H;return t[30]!==n||t[31]!==j?(V=p.jsx(Ju,{...j,children:n}),t[30]=n,t[31]=j,t[32]=V):V=t[32],t[33]!==F||t[34]!==V?(B=p.jsx(Zh,{...F,children:V}),t[33]=F,t[34]=V,t[35]=B):B=t[35],t[36]!==M||t[37]!==B?($=p.jsx(td,{...M,children:B}),t[36]=M,t[37]=B,t[38]=$):$=t[38],t[39]!==O||t[40]!==$?(U=p.jsx(Yh,{...O,children:$}),t[39]=O,t[40]=$,t[41]=U):U=t[41],t[42]!==_||t[43]!==U?(H=p.jsx(Ru,{storage:_,children:U}),t[42]=_,t[43]=U,t[44]=H):H=t[44],H};function sm(t){const n=h.c(11),r=void 0===t?null:t,i=Pu();let o;n[0]!==r||n[1]!==i?(o=()=>{const e=i.get(am);switch(e){case"light":return"light";case"dark":return"dark";default:return"string"==typeof e&&i.set(am,""),r}},n[0]=r,n[1]=i,n[2]=o):o=n[2];const[s,a]=e.useState(o);let l,c,u;n[3]!==s?(l=()=>{document.body.classList.remove("graphiql-light","graphiql-dark"),s&&document.body.classList.add(`graphiql-${s}`)},c=[s],n[3]=s,n[4]=l,n[5]=c):(l=n[4],c=n[5]),e.useEffect(l,c),n[6]!==i?(u=e=>{i.set(am,e||""),a(e)},n[6]=i,n[7]=u):u=n[7];const d=u;let f;return n[8]!==d||n[9]!==s?(f={theme:s,setTheme:d},n[8]=d,n[9]=s,n[10]=f):f=n[10],f}const am="theme",lm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),i.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})))),cm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})))),um=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})))),dm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})))),fm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",stroke:"currentColor",strokeWidth:3,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1 1L12.9998 12.9997"}),i.createElement("path",{d:"M13 1L1.00079 13.0003"})))),pm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),i.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})))),hm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})))),mm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})))),gm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})))),vm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})))),ym=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})))),bm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),i.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})))),Em=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})))),xm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),i.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})))),wm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),i.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),i.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})))),Tm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5 6 6)"}),i.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})))),Cm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})))),Sm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),i.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})))),km=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})))),_m=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),i.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})))),Nm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})))),Dm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z"})))),Am=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),i.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),i.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),i.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),i.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})))),Im=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),i.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),i.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),i.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})))),Om=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})))),Lm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})))),Mm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})))),Rm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})))),Fm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})))),Pm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})))),jm=Vm((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),i.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"}))));function Vm(e){const t=e.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon",n=n=>{const r=h.c(2);let i;return r[0]!==n?(i=p.jsx(e,{title:t,...n}),r[0]=n,r[1]=i):i=r[1],i};return n.displayName=e.name,n}function Bm(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Bm(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $m(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Bm(e))&&(r&&(r+=" "),r+=t);return r}const Um=t=>{const n=h.c(13);let r,i,o;n[0]!==t?(({isHidden:i,...r}=t),n[0]=t,n[1]=r,n[2]=i):(r=n[1],i=n[2]),n[3]===Symbol.for("react.memo_cache_sentinel")?(o={nonNull:!0,caller:Um},n[3]=o):o=n[3];const{headerEditor:s}=Qh(o),a=gh(r,Um);let l,c;n[4]!==s||n[5]!==i?(l=()=>{i||null==s||s.refresh()},c=[s,i],n[4]=s,n[5]=i,n[6]=l,n[7]=c):(l=n[6],c=n[7]),e.useEffect(l,c);const u=i&&"hidden";let d,f;return n[8]!==u?(d=$m("graphiql-editor",u),n[8]=u,n[9]=d):d=n[9],n[10]!==a||n[11]!==d?(f=p.jsx("div",{className:d,ref:a}),n[10]=a,n[11]=d,n[12]=f):f=n[12],f},Hm=Object.assign((t=>{var n;const r=h.c(14);let i;r[0]===Symbol.for("react.memo_cache_sentinel")?(i={width:null,height:null},r[0]=i):i=r[0];const[o,s]=e.useState(i),[a,l]=e.useState(null),c=e.useRef(null),u=null==(n=qm(t.token))?void 0:n.href;let d,f,m;r[1]!==u?(d=()=>{if(c.current)return u?void fetch(u,{method:"HEAD"}).then((e=>{l(e.headers.get("Content-Type"))})).catch((()=>{l(null)})):(s({width:null,height:null}),void l(null))},f=[u],r[1]=u,r[2]=d,r[3]=f):(d=r[2],f=r[3]),e.useEffect(d,f),r[4]!==o.height||r[5]!==o.width||r[6]!==a?(m=null!==o.width&&null!==o.height?p.jsxs("div",{children:[o.width,"x",o.height,null===a?null:" "+a]}):null,r[4]=o.height,r[5]=o.width,r[6]=a,r[7]=m):m=r[7];const g=m;let v,y,b;return r[8]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{var e,t;s({width:(null==(e=c.current)?void 0:e.naturalWidth)??null,height:(null==(t=c.current)?void 0:t.naturalHeight)??null})},r[8]=v):v=r[8],r[9]!==u?(y=p.jsx("img",{onLoad:v,ref:c,src:u}),r[9]=u,r[10]=y):y=r[10],r[11]!==g||r[12]!==y?(b=p.jsxs("div",{children:[y,g]}),r[11]=g,r[12]=y,r[13]=b):b=r[13],b}),{shouldRender(e){const t=qm(e);return!!t&&function(e){return/\.(bmp|gif|jpe?g|png|svg|webp)$/.test(e.pathname)}(t)}});function qm(e){if("string"!==e.type)return;const t=e.string.slice(1).slice(0,-1).trim();try{return new URL(t,location.protocol+"//"+location.host)}catch{}}const Wm=e=>{const t=h.c(2),n=Th(e,Wm);let r;return t[0]!==n?(r=p.jsx("div",{className:"graphiql-editor",ref:n}),t[0]=n,t[1]=r):r=t[1],r};var zm,Gm={};var Km=function(){if(zm)return Gm;zm=1;var e=t;return Gm.createRoot=e.createRoot,Gm.hydrateRoot=e.hydrateRoot,Gm}();const Ym=Qm;function Qm(t,n){const r=h.c(17);let i;r[0]!==t?(i=void 0===t?{}:t,r[0]=t,r[1]=i):i=r[1];const{responseTooltip:o,editorTheme:s,keyMap:a}=i,l=void 0===s?$u:s,c=void 0===a?Uu:a,{fetchError:u,validationErrors:d}=nd(),f=n||Ym;let m;r[2]!==f?(m={nonNull:!0,caller:f},r[2]=f,r[3]=m):m=r[3];const{initialResponse:g,responseEditor:v,setResponseEditor:y}=Qh(m),b=e.useRef(null),E=e.useRef(o);let x,w,T,C,S,k;return r[4]!==o?(x=()=>{E.current=o},w=[o],r[4]=o,r[5]=x,r[6]=w):(x=r[5],w=r[6]),e.useEffect(x,w),r[7]!==l||r[8]!==g||r[9]!==y?(T=()=>{let e;return e=!0,qu([Promise.resolve().then((()=>mV)),Promise.resolve().then((()=>lV)),Promise.resolve().then((()=>LV)),Promise.resolve().then((()=>QV)),Promise.resolve().then((()=>CV)),Promise.resolve().then((()=>IV)),Promise.resolve().then((()=>PV)),Promise.resolve().then((()=>s$)),Promise.resolve().then((()=>dB))],{useCommonAddons:!1}).then((t=>{if(!e)return;const n=document.createElement("div"),r=Km.createRoot(n);t.registerHelper("info","graphql-results",((e,t,i,o)=>{const s=E.current,a=[s&&p.jsx(s,{pos:o,token:e}),Hm.shouldRender(e)&&p.jsx(Hm,{token:e},"image-preview")].filter(Xm);if(a.length)return r.render(a),n;r.unmount()}));const i=b.current;if(!i)return;const o=t(i,{value:g,lineWrapping:!0,readOnly:!0,theme:l,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:Hu});y(o)})),()=>{e=!1}},C=[l,g,y],r[7]=l,r[8]=g,r[9]=y,r[10]=T,r[11]=C):(T=r[10],C=r[11]),e.useEffect(T,C),th(v,"keyMap",c),r[12]!==u||r[13]!==v||r[14]!==d?(S=()=>{u&&(null==v||v.setValue(u)),d.length&&(null==v||v.setValue(Ns(d)))},k=[v,u,d],r[12]=u,r[13]=v,r[14]=d,r[15]=S,r[16]=k):(S=r[15],k=r[16]),e.useEffect(S,k),b}function Xm(e){return Boolean(e)}const Jm=e=>{const t=h.c(2),n=Qm(e,Jm);let r;return t[0]!==n?(r=p.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:n}),t[0]=n,t[1]=r):r=t[1],r},Zm=t=>{const n=h.c(13);let r,i,o;n[0]!==t?(({isHidden:i,...r}=t),n[0]=t,n[1]=r,n[2]=i):(r=n[1],i=n[2]),n[3]===Symbol.for("react.memo_cache_sentinel")?(o={nonNull:!0,caller:Zm},n[3]=o):o=n[3];const{variableEditor:s}=Qh(o),a=qh(r,Zm);let l,c;n[4]!==i||n[5]!==s?(l=()=>{i||null==s||s.refresh()},c=[s,i],n[4]=i,n[5]=s,n[6]=l,n[7]=c):(l=n[6],c=n[7]),e.useEffect(l,c);const u=i&&"hidden";let d,f;return n[8]!==u?(d=$m("graphiql-editor",u),n[8]=u,n[9]=d):d=n[9],n[10]!==a||n[11]!==d?(f=p.jsx("div",{className:d,ref:a}),n[10]=a,n[11]=d,n[12]=f):f=n[12],f};function eg(t){const n=h.c(31),{defaultSizeRelation:r,direction:i,initiallyHidden:o,onHiddenElementChange:s,sizeThresholdFirst:a,sizeThresholdSecond:l,storageKey:c}=t,u=void 0===r?1:r,d=void 0===a?100:a,f=void 0===l?100:l,p=Pu();let m;n[0]!==p||n[1]!==c?(m=Zp(500,(e=>{c&&p.set(c,e)})),n[0]=p,n[1]=c,n[2]=m):m=n[2];const g=m;let v;n[3]!==o||n[4]!==p||n[5]!==c?(v=()=>{const e=c&&p.get(c);return e===tg||"first"===o?"first":e===ng||"second"===o?"second":null},n[3]=o,n[4]=p,n[5]=c,n[6]=v):v=n[6];const[y,b]=e.useState(v);let E;n[7]!==y||n[8]!==s?(E=e=>{e!==y&&(b(e),null==s||s(e))},n[7]=y,n[8]=s,n[9]=E):E=n[9];const x=E,w=e.useRef(null),T=e.useRef(null),C=e.useRef(null),S=e.useRef(`${u}`);let k,_,N,D,A,I,O;return n[10]!==p||n[11]!==c?(k=()=>{const e=c&&p.get(c)||S.current;w.current&&(w.current.style.flex=e===tg||e===ng?S.current:e),C.current&&(C.current.style.flex="1")},n[10]=p,n[11]=c,n[12]=k):k=n[12],n[13]!==i||n[14]!==p||n[15]!==c?(_=[i,p,c],n[13]=i,n[14]=p,n[15]=c,n[16]=_):_=n[16],e.useEffect(k,_),n[17]!==y||n[18]!==p||n[19]!==c?(D=()=>{const e=e=>{const t="first"===e?w.current:C.current;if(t&&(t.style.left="-1000px",t.style.position="absolute",t.style.opacity="0",t.style.height="500px",t.style.width="500px",w.current)){const e=parseFloat(w.current.style.flex);(!Number.isFinite(e)||e<1)&&(w.current.style.flex="1")}},t=e=>{const t="first"===e?w.current:C.current;if(t&&(t.style.width="",t.style.height="",t.style.opacity="",t.style.position="",t.style.left="",c)){const e=p.get(c);w.current&&e!==tg&&e!==ng&&(w.current.style.flex=e||S.current)}};"first"===y?e("first"):t("first"),"second"===y?e("second"):t("second")},N=[y,p,c],n[17]=y,n[18]=p,n[19]=c,n[20]=N,n[21]=D):(N=n[20],D=n[21]),e.useEffect(D,N),n[22]!==i||n[23]!==x||n[24]!==d||n[25]!==f||n[26]!==g?(A=()=>{if(!T.current||!w.current||!C.current)return;const e=T.current,t=w.current,n=t.parentElement,r="horizontal"===i?"clientX":"clientY",o="horizontal"===i?"left":"top",s="horizontal"===i?"right":"bottom",a="horizontal"===i?"clientWidth":"clientHeight",l=function(i){if(!(i.target===i.currentTarget))return;i.preventDefault();const l=i[r]-e.getBoundingClientRect()[o],c=function(i){if(0===i.buttons)return u();const c=i[r]-n.getBoundingClientRect()[o]-l,p=n.getBoundingClientRect()[s]-i[r]+l-e[a];if(c<d)x("first"),g(tg);else if(p<f)x("second"),g(ng);else{x(null);const e=""+c/p;t.style.flex=e,g(e)}};function u(){document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)}document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)};e.addEventListener("mousedown",l);const c=function(){w.current&&(w.current.style.flex=S.current),g(S.current),x(null)};return e.addEventListener("dblclick",c),()=>{e.removeEventListener("mousedown",l),e.removeEventListener("dblclick",c)}},I=[i,x,d,f,g],n[22]=i,n[23]=x,n[24]=d,n[25]=f,n[26]=g,n[27]=A,n[28]=I):(A=n[27],I=n[28]),e.useEffect(A,I),n[29]!==y?(O={dragBarRef:T,hiddenElement:y,firstRef:w,setHiddenElement:b,secondRef:C},n[29]=y,n[30]=O):O=n[30],O}const tg="hide-first",ng="hide-second",rg=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=$m("graphiql-un-styled",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=p.jsx("button",{...e,ref:t,className:r}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));rg.displayName="UnStyledButton";const ig=e.forwardRef(((e,t)=>{const n=h.c(7);let r,i;return n[0]!==e.className||n[1]!==e.state?(r=$m("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[e.state],e.className),n[0]=e.className,n[1]=e.state,n[2]=r):r=n[2],n[3]!==e||n[4]!==t||n[5]!==r?(i=p.jsx("button",{...e,ref:t,className:r}),n[3]=e,n[4]=t,n[5]=r,n[6]=i):i=n[6],i}));ig.displayName="Button";const og=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=$m("graphiql-button-group",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=p.jsx("div",{...e,ref:t,className:r}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));function sg(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function ag(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function lg(...e){return t=>{let n=!1;const r=e.map((e=>{const r=ag(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():ag(e[t],null)}}}}function cg(...e){return i.useCallback(lg(...e),e)}function ug(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>i.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=i.createContext(r),s=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...l}=t,c=(null==(n=null==r?void 0:r[e])?void 0:n[s])||o,u=i.useMemo((()=>l),Object.values(l));return p.jsx(c.Provider,{value:u,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var l;const c=(null==(l=null==a?void 0:a[e])?void 0:l[s])||o,u=i.useContext(c);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},dg(r,...t)]}function dg(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}og.displayName="ButtonGroup";var fg=(null==globalThis?void 0:globalThis.document)?i.useLayoutEffect:()=>{},pg=i[" useId ".trim().toString()]||(()=>{}),hg=0;function mg(e){const[t,n]=i.useState(pg());return fg((()=>{n((e=>e??String(hg++)))}),[e]),e||(t?`radix-${t}`:"")}var gg=i[" useInsertionEffect ".trim().toString()]||fg;function vg({prop:e,defaultProp:t,onChange:n=(()=>{}),caller:r}){const[o,s,a]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),s=i.useRef(t);return gg((()=>{s.current=t}),[t]),i.useEffect((()=>{var e;o.current!==n&&(null==(e=s.current)||e.call(s,n),o.current=n)}),[n,o]),[n,r,s]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{const t=i.useRef(void 0!==e);i.useEffect((()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l}),[l,r])}const u=i.useCallback((t=>{var n;if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=a.current)||n.call(a,r))}else s(t)}),[l,e,s,a]);return[c,u]}function yg(e){const t=bg(e),n=i.forwardRef(((e,n)=>{const{children:r,...o}=e,s=i.Children.toArray(r),a=s.find(wg);if(a){const e=a.props.children,r=s.map((t=>t===a?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return p.jsx(t,{...o,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return p.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function bg(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,i=r&&"isReactWarning"in r&&r.isReactWarning;if(i)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,i=r&&"isReactWarning"in r&&r.isReactWarning,i)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?lg(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Eg=Symbol("radix.slottable");function xg(e){const t=({children:e})=>p.jsx(p.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Eg,t}function wg(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Eg}var Tg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=yg(`Primitive.${t}`),r=i.forwardRef(((e,r)=>{const{asChild:i,...o}=e,s=i?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),p.jsx(s,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Cg(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}function Sg(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}var kg,_g="dismissableLayer.update",Ng="dismissableLayer.pointerDownOutside",Dg="dismissableLayer.focusOutside",Ag=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ig=i.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=i.useContext(Ag),[d,f]=i.useState(null),h=(null==d?void 0:d.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,m]=i.useState({}),g=cg(t,(e=>f(e))),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),E=d?v.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=E>=b,T=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Sg(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Lg(Ng,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));w&&!n&&(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())}),h),C=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Sg(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Lg(Dg,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(null==s||s(e),null==a||a(e),e.defaultPrevented||null==l||l())}),h);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Sg(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{E===u.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),h),i.useEffect((()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(kg=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Og(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=kg)}}),[d,h,n,u]),i.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Og())}),[d,u]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(_g,e),()=>document.removeEventListener(_g,e)}),[]),p.jsx(Tg.div,{...c,ref:g,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:sg(e.onFocusCapture,C.onFocusCapture),onBlurCapture:sg(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:sg(e.onPointerDownCapture,T.onPointerDownCapture)})}));Ig.displayName="DismissableLayer";function Og(){const e=new CustomEvent(_g);document.dispatchEvent(e)}function Lg(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Cg(i,o):i.dispatchEvent(o)}i.forwardRef(((e,t)=>{const n=i.useContext(Ag),r=i.useRef(null),o=cg(t,r);return i.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),p.jsx(Tg.div,{...e,ref:o})})).displayName="DismissableLayerBranch";var Mg="focusScope.autoFocusOnMount",Rg="focusScope.autoFocusOnUnmount",Fg={bubbles:!1,cancelable:!0},Pg=i.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[l,c]=i.useState(null),u=Sg(o),d=Sg(s),f=i.useRef(null),h=cg(t,(e=>c(e))),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect((()=>{if(r){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:$g(f.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||$g(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&$g(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,m.paused]),i.useEffect((()=>{if(l){Ug.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Mg,Fg);l.addEventListener(Mg,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($g(r,{select:t}),document.activeElement!==n)return}((e=jg(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&$g(l))}return()=>{l.removeEventListener(Mg,u),setTimeout((()=>{const e=new CustomEvent(Rg,Fg);l.addEventListener(Rg,d),l.dispatchEvent(e),e.defaultPrevented||$g(t??document.body,{select:!0}),l.removeEventListener(Rg,d),Ug.remove(m)}),0)}}var e}),[l,u,d,m]);const g=i.useCallback((e=>{if(!n&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){const t=e.currentTarget,[r,o]=function(e){const t=jg(e),n=Vg(t,e),r=Vg(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||i!==o?e.shiftKey&&i===r&&(e.preventDefault(),n&&$g(o,{select:!0})):(e.preventDefault(),n&&$g(r,{select:!0})):i===t&&e.preventDefault()}}),[n,r,m.paused]);return p.jsx(Tg.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})}));function jg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vg(e,t){for(const n of e)if(!Bg(n,{upTo:t}))return n}function Bg(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function $g(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Pg.displayName="FocusScope";var Ug=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Hg(e,t),e.unshift(t)},remove(t){var n;e=Hg(e,t),null==(n=e[0])||n.resume()}}}();function Hg(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var qg=i.forwardRef(((e,n)=>{var r;const{container:o,...s}=e,[a,l]=i.useState(!1);fg((()=>l(!0)),[]);const c=o||a&&(null==(r=null==globalThis?void 0:globalThis.document)?void 0:r.body);return c?t.createPortal(p.jsx(Tg.div,{...s,ref:n}),c):null}));qg.displayName="Portal";var Wg=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[l,c]=function(e,t){return i.useReducer(((e,n)=>t[e][n]??e),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect((()=>{const e=zg(r.current);s.current="mounted"===l?e:"none"}),[l]),fg((()=>{const t=r.current,n=o.current;if(n!==e){const r=s.current,i=zg(t);if(e)c("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),fg((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const s=zg(r.current).includes(i.animationName);if(i.target===t&&s&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},a=e=>{e.target===t&&(s.current=zg(r.current))};return t.addEventListener("animationstart",a),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",a),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),s=cg(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,i=r&&"isReactWarning"in r&&r.isReactWarning;if(i)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,i=r&&"isReactWarning"in r&&r.isReactWarning,i)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:s}):null};function zg(e){return(null==e?void 0:e.animationName)||"none"}Wg.displayName="Presence";var Gg=0;function Kg(){i.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Yg()),document.body.insertAdjacentElement("beforeend",e[1]??Yg()),Gg++,()=>{1===Gg&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Gg--}}),[])}function Yg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Qg=function(){return Qg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qg.apply(this,arguments)};function Xg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}"function"==typeof SuppressedError&&SuppressedError;var Jg="right-scroll-bar-position",Zg="width-before-scroll-bar";function ev(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var tv="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,nv=new WeakMap;function rv(t,n){var r,i,o,s=(r=null,i=function(e){return t.forEach((function(t){return ev(t,e)}))},(o=e.useState((function(){return{value:r,callback:i,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=i,o.facade);return tv((function(){var e=nv.get(s);if(e){var n=new Set(e),r=new Set(t),i=s.current;n.forEach((function(e){r.has(e)||ev(e,null)})),r.forEach((function(e){n.has(e)||ev(e,i)}))}nv.set(s,t)}),[t]),s}function iv(e){return e}var ov=function(e){var t=e.sideCar,n=Xg(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,Qg({},n))};ov.isSideCarExport=!0;var sv=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=iv);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(o)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=Qg({async:!0,ssr:!1},e),t}(),av=function(){},lv=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:av,onWheelCapture:av,onTouchMoveCapture:av}),o=r[0],s=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,E=Xg(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=rv([n,t]),T=Qg(Qg({},E),o);return i.createElement(i.Fragment,null,d&&i.createElement(x,{sideCar:sv,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(l),Qg(Qg({},T),{ref:w})):i.createElement(y,Qg({},T,{className:c,ref:w}),l))}));lv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},lv.classNames={fullWidth:Zg,zeroRight:Jg};function cv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var uv=function(){var e=0,t=null;return{add:function(n){var r,i;0==e&&(t=cv())&&(i=n,(r=t).styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dv=function(){var e,t=(e=uv(),function(t,n){i.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},fv={left:0,top:0,right:0,gap:0},pv=function(e){return parseInt(e||"",10)||0},hv=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return fv;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[pv(n),pv(r),pv(i)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mv=dv(),gv="data-scroll-locked",vv=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(a,"px ").concat(r,";\n  }\n  body[").concat(gv,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(o,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(a,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(Jg," {\n    right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(Zg," {\n    margin-right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(Jg," .").concat(Jg," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(Zg," .").concat(Zg," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(gv,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n  }\n")},yv=function(){var e=parseInt(document.body.getAttribute(gv)||"0",10);return isFinite(e)?e:0},bv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect((function(){return document.body.setAttribute(gv,(yv()+1).toString()),function(){var e=yv()-1;e<=0?document.body.removeAttribute(gv):document.body.setAttribute(gv,e.toString())}}),[]);var s=i.useMemo((function(){return hv(o)}),[o]);return i.createElement(mv,{styles:vv(s,!t,o,n?"":"!important")})},Ev=!1;if("undefined"!=typeof window)try{var xv=Object.defineProperty({},"passive",{get:function(){return Ev=!0,!0}});window.addEventListener("test",xv,xv),window.removeEventListener("test",xv,xv)}catch(a$){Ev=!1}var wv=!!Ev&&{passive:!1},Tv=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Cv=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Sv(e,r)){var i=kv(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Sv=function(e,t){return"v"===e?function(e){return Tv(e,"overflowY")}(t):function(e){return Tv(e,"overflowX")}(t)},kv=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},_v=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Nv=function(e){return[e.deltaX,e.deltaY]},Dv=function(e){return e&&"current"in e?e.current:e},Av=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Iv=0,Ov=[];function Lv(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Mv=(Rv=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(Iv++)[0],s=i.useState(dv)[0],a=i.useRef(e);i.useEffect((function(){a.current=e}),[e]),i.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Dv),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var i,o=_v(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Cv(d,u);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=Cv(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=i),!i)return!0;var p=r.current||i;return function(e,t,n,r,i){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,l=t.contains(a),c=!1,u=s>0,d=0,f=0;do{var p=kv(e,a),h=p[0],m=p[1]-p[2]-o*h;(h||m)&&Sv(e,a)&&(d+=m,f+=h),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(c=!0),c}(p,t,e,"h"===p?l:c)}),[]),c=i.useCallback((function(e){var n=e;if(Ov.length&&Ov[Ov.length-1]===s){var r="deltaY"in n?Nv(n):_v(n),i=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,i=r,t[0]===i[0]&&t[1]===i[1]);var t,i}))[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var o=(a.current.shards||[]).map(Dv).filter(Boolean).filter((function(e){return e.contains(n.target)}));(o.length>0?l(n,o[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=i.useCallback((function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:Lv(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),d=i.useCallback((function(e){n.current=_v(e),r.current=void 0}),[]),f=i.useCallback((function(t){u(t.type,Nv(t),t.target,l(t,e.lockRef.current))}),[]),p=i.useCallback((function(t){u(t.type,_v(t),t.target,l(t,e.lockRef.current))}),[]);i.useEffect((function(){return Ov.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,wv),document.addEventListener("touchmove",c,wv),document.addEventListener("touchstart",d,wv),function(){Ov=Ov.filter((function(e){return e!==s})),document.removeEventListener("wheel",c,wv),document.removeEventListener("touchmove",c,wv),document.removeEventListener("touchstart",d,wv)}}),[]);var h=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(s,{styles:Av(o)}):null,h?i.createElement(bv,{gapMode:e.gapMode}):null)},sv.useMedium(Rv),ov);var Rv,Fv=i.forwardRef((function(e,t){return i.createElement(lv,Qg({},e,{ref:t,sideCar:Mv}))}));Fv.classNames=lv.classNames;var Pv=new WeakMap,jv=new WeakMap,Vv={},Bv=0,$v=function(e){return e&&(e.host||$v(e.parentNode))},Uv=function(e,t,n,r){var i=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=$v(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Vv[n]||(Vv[n]=new WeakMap);var o=Vv[n],s=[],a=new Set,l=new Set(i),c=function(e){e&&!a.has(e)&&(a.add(e),c(e.parentNode))};i.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))u(e);else try{var t=e.getAttribute(r),i=null!==t&&"false"!==t,l=(Pv.get(e)||0)+1,c=(o.get(e)||0)+1;Pv.set(e,l),o.set(e,c),s.push(e),1===l&&i&&jv.set(e,!0),1===c&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}catch(nL){console.error("aria-hidden: cannot operate on ",e,nL)}}))};return u(t),a.clear(),Bv++,function(){s.forEach((function(e){var t=Pv.get(e)-1,i=o.get(e)-1;Pv.set(e,t),o.set(e,i),t||(jv.has(e)||e.removeAttribute(r),jv.delete(e)),i||e.removeAttribute(n)})),--Bv||(Pv=new WeakMap,Pv=new WeakMap,jv=new WeakMap,Vv={})}},Hv=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Uv(r,i,n,"aria-hidden")):function(){return null}},qv="Dialog",[Wv,zv]=ug(qv),[Gv,Kv]=Wv(qv),Yv=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,l=i.useRef(null),c=i.useRef(null),[u,d]=vg({prop:r,defaultProp:o??!1,onChange:s,caller:qv});return p.jsx(Gv,{scope:t,triggerRef:l,contentRef:c,contentId:mg(),titleId:mg(),descriptionId:mg(),open:u,onOpenChange:d,onOpenToggle:i.useCallback((()=>d((e=>!e))),[d]),modal:a,children:n})};Yv.displayName=qv;var Qv="DialogTrigger",Xv=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Kv(Qv,n),o=cg(t,i.triggerRef);return p.jsx(Tg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vy(i.open),...r,ref:o,onClick:sg(e.onClick,i.onOpenToggle)})}));Xv.displayName=Qv;var Jv="DialogPortal",[Zv,ey]=Wv(Jv,{forceMount:void 0}),ty=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Kv(Jv,t);return p.jsx(Zv,{scope:t,forceMount:n,children:i.Children.map(r,(e=>p.jsx(Wg,{present:n||s.open,children:p.jsx(qg,{asChild:!0,container:o,children:e})})))})};ty.displayName=Jv;var ny="DialogOverlay",ry=i.forwardRef(((e,t)=>{const n=ey(ny,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Kv(ny,e.__scopeDialog);return o.modal?p.jsx(Wg,{present:r||o.open,children:p.jsx(oy,{...i,ref:t})}):null}));ry.displayName=ny;var iy=yg("DialogOverlay.RemoveScroll"),oy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Kv(ny,n);return p.jsx(Fv,{as:iy,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(Tg.div,{"data-state":vy(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),sy="DialogContent",ay=i.forwardRef(((e,t)=>{const n=ey(sy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Kv(sy,e.__scopeDialog);return p.jsx(Wg,{present:r||o.open,children:o.modal?p.jsx(ly,{...i,ref:t}):p.jsx(cy,{...i,ref:t})})}));ay.displayName=sy;var ly=i.forwardRef(((e,t)=>{const n=Kv(sy,e.__scopeDialog),r=i.useRef(null),o=cg(t,n.contentRef,r);return i.useEffect((()=>{const e=r.current;if(e)return Hv(e)}),[]),p.jsx(uy,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:sg(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:sg(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:sg(e.onFocusOutside,(e=>e.preventDefault()))})})),cy=i.forwardRef(((e,t)=>{const n=Kv(sy,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return p.jsx(uy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,s;null==(i=e.onCloseAutoFocus)||i.call(e,t),t.defaultPrevented||(r.current||null==(s=n.triggerRef.current)||s.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var i,s;null==(i=e.onInteractOutside)||i.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target;(null==(s=n.triggerRef.current)?void 0:s.contains(a))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),uy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,l=Kv(sy,n),c=i.useRef(null),u=cg(t,c);return Kg(),p.jsxs(p.Fragment,{children:[p.jsx(Pg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(Ig,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":vy(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(xy,{titleId:l.titleId}),p.jsx(wy,{contentRef:c,descriptionId:l.descriptionId})]})]})})),dy="DialogTitle",fy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Kv(dy,n);return p.jsx(Tg.h2,{id:i.titleId,...r,ref:t})}));fy.displayName=dy;var py="DialogDescription",hy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Kv(py,n);return p.jsx(Tg.p,{id:i.descriptionId,...r,ref:t})}));hy.displayName=py;var my="DialogClose",gy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Kv(my,n);return p.jsx(Tg.button,{type:"button",...r,ref:t,onClick:sg(e.onClick,(()=>i.onOpenChange(!1)))})}));function vy(e){return e?"open":"closed"}gy.displayName=my;var yy="DialogTitleWarning",[by,Ey]=function(e,t){const n=i.createContext(t),r=e=>{const{children:t,...r}=e,o=i.useMemo((()=>r),Object.values(r));return p.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=i.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(yy,{contentName:sy,titleName:dy,docsSlug:"dialog"}),xy=({titleId:e})=>{const t=Ey(yy),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect((()=>{if(e){document.getElementById(e)||console.error(n)}}),[n,e]),null},wy=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ey("DialogDescriptionWarning").contentName}}.`;return i.useEffect((()=>{var r;const i=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");if(t&&i){document.getElementById(t)||console.warn(n)}}),[n,e,t]),null},Ty=Yv,Cy=Xv,Sy=ty,ky=ry,_y=ay,Ny=fy,Dy=hy,Ay=gy,Iy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Oy=i.forwardRef(((e,t)=>p.jsx(Tg.span,{...e,ref:t,style:{...Iy,...e.style}})));Oy.displayName="VisuallyHidden";var Ly=Oy;const My=e.forwardRef(((e,t)=>{const n=h.c(8);let r,i,o,s;return n[0]!==e.className?(r=$m("graphiql-dialog-close",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]===Symbol.for("react.memo_cache_sentinel")?(i=p.jsx(Ly,{children:"Close dialog"}),o=p.jsx(fm,{}),n[2]=i,n[3]=o):(i=n[2],o=n[3]),n[4]!==e||n[5]!==t||n[6]!==r?(s=p.jsx(Ay,{asChild:!0,children:p.jsxs(rg,{...e,ref:t,type:"button",className:r,children:[i,o]})}),n[4]=e,n[5]=t,n[6]=r,n[7]=s):s=n[7],s}));My.displayName="Dialog.Close";const Ry=e=>{const t=h.c(9);let n,r,i,o,s;return t[0]!==e?(({children:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]===Symbol.for("react.memo_cache_sentinel")?(i=p.jsx(ky,{className:"graphiql-dialog-overlay"}),t[3]=i):i=t[3],t[4]!==n?(o=p.jsxs(Sy,{children:[i,p.jsx(_y,{className:"graphiql-dialog",children:n})]}),t[4]=n,t[5]=o):o=t[5],t[6]!==r||t[7]!==o?(s=p.jsx(Ty,{...r,children:o}),t[6]=r,t[7]=o,t[8]=s):s=t[8],s},Fy=Object.assign(Ry,{Close:My,Title:Ny,Trigger:Cy,Description:Dy});function Py(t){const n=t+"CollectionProvider",[r,i]=ug(n),[o,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=t=>{const{scope:n,children:r}=t,i=e.useRef(null),s=e.useRef(new Map).current;return p.jsx(o,{scope:n,itemMap:s,collectionRef:i,children:r})};a.displayName=n;const l=t+"CollectionSlot",c=yg(l),u=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,i=cg(t,s(l,n).collectionRef);return p.jsx(c,{ref:i,children:r})}));u.displayName=l;const d=t+"CollectionItemSlot",f="data-radix-collection-item",h=yg(d),m=e.forwardRef(((t,n)=>{const{scope:r,children:i,...o}=t,a=e.useRef(null),l=cg(n,a),c=s(d,r);return e.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),p.jsx(h,{[f]:"",ref:l,children:i})}));return m.displayName=d,[{Provider:a,Slot:u,ItemSlot:m},function(n){const r=s(t+"CollectionConsumer",n);return e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}var jy=i.createContext(void 0);function Vy(e){const t=i.useContext(jy);return e||t||"ltr"}function By(e){return e.split("-")[1]}function $y(e){return"y"===e?"height":"width"}function Uy(e){return e.split("-")[0]}function Hy(e){return["top","bottom"].includes(Uy(e))?"x":"y"}function qy(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,s=r.y+r.height/2-i.height/2,a=Hy(t),l=$y(a),c=r[l]/2-i[l]/2,u="x"===a;let d;switch(Uy(t)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-i.width,y:s};break;default:d={x:r.x,y:r.y}}switch(By(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}function Wy(e,t){return"function"==typeof e?e(t):e}function zy(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function Gy(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Ky(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Wy(t,e),h=zy(p),m=a[f?"floating"===d?"reference":"floating":d],g=Gy(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{...s.floating,x:r,y:i}:s.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),b=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},E=Gy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-E.top+h.top)/b.y,bottom:(E.bottom-g.bottom+h.bottom)/b.y,left:(g.left-E.left+h.left)/b.x,right:(E.right-g.right+h.right)/b.x}}const Yy=Math.min,Qy=Math.max;function Xy(e,t,n){return Qy(e,Yy(t,n))}const Jy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a}=t,{element:l,padding:c=0}=Wy(e,t)||{};if(null==l)return{};const u=zy(c),d={x:n,y:r},f=Hy(i),p=$y(f),h=await s.getDimensions(l),m="y"===f,g=m?"top":"left",v=m?"bottom":"right",y=m?"clientHeight":"clientWidth",b=o.reference[p]+o.reference[f]-d[f]-o.floating[p],E=d[f]-o.reference[f],x=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let w=x?x[y]:0;w&&await(null==s.isElement?void 0:s.isElement(x))||(w=a.floating[y]||o.floating[p]);const T=b/2-E/2,C=w/2-h[p]/2-1,S=Yy(u[g],C),k=Yy(u[v],C),_=S,N=w-h[p]-k,D=w/2-h[p]/2+T,A=Xy(_,D,N),I=null!=By(i)&&D!=A&&o.reference[p]/2-(D<_?S:k)-h[p]/2<0;return{[f]:d[f]-(I?D<_?_-D:N-D:0),data:{[f]:A,centerOffset:D-A}}}}),Zy=["top","right","bottom","left"];Zy.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const eb={left:"right",right:"left",bottom:"top",top:"bottom"};function tb(e){return e.replace(/left|right|bottom|top/g,(e=>eb[e]))}const nb={start:"end",end:"start"};function rb(e){return e.replace(/start|end/g,(e=>nb[e]))}const ib=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:a,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...m}=Wy(e,t),g=Uy(r),v=Uy(s)===s,y=await(null==a.isRTL?void 0:a.isRTL(l.floating)),b=d||(v||!h?[tb(s)]:function(e){const t=tb(e);return[rb(e),t,rb(t)]}(s));d||"none"===p||b.push(...function(e,t,n,r){const i=By(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}(Uy(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(rb)))),o}(s,h,p,y));const E=[s,...b],x=await Ky(t,m),w=[];let T=(null==(n=i.flip)?void 0:n.overflows)||[];if(c&&w.push(x[g]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=By(e),i=Hy(e),o=$y(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=tb(s)),{main:s,cross:tb(s)}}(r,o,y);w.push(x[e],x[t])}if(T=[...T,{placement:r,overflows:w}],!w.every((e=>e<=0))){var C,S;const e=((null==(C=i.flip)?void 0:C.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n=null==(S=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!n)switch(f){case"bestFit":{var k;const e=null==(k=T.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}};function ob(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sb(e){return Zy.some((t=>e[t]>=0))}const ab=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Wy(e,t);switch(r){case"referenceHidden":{const e=ob(await Ky(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:sb(e)}}}case"escaped":{const e=ob(await Ky(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:sb(e)}}}default:return{}}}}};function lb(e){return"x"===e?"y":"x"}const cb=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Wy(e,t),c={x:n,y:r},u=await Ky(t,l),d=Hy(Uy(i)),f=lb(d);let p=c[d],h=c[f];if(o){const e="y"===d?"bottom":"right";p=Xy(p+u["y"===d?"top":"left"],p,p-u[e])}if(s){const e="y"===f?"bottom":"right";h=Xy(h+u["y"===f?"top":"left"],h,h-u[e])}const m=a.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},ub=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:s=(()=>{}),...a}=Wy(e,t),l=await Ky(t,a),c=Uy(n),u=By(n),d="x"===Hy(n),{width:f,height:p}=r.floating;let h,m;"top"===c||"bottom"===c?(h=c,m=u===(await(null==i.isRTL?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=c,h="end"===u?"top":"bottom");const g=p-l[h],v=f-l[m],y=!t.middlewareData.shift;let b=g,E=v;if(d){const e=f-l.left-l.right;E=u||y?Yy(v,e):e}else{const e=p-l.top-l.bottom;b=u||y?Yy(g,e):e}if(y&&!u){const e=Qy(l.left,0),t=Qy(l.right,0),n=Qy(l.top,0),r=Qy(l.bottom,0);d?E=f-2*(0!==e||0!==t?e+t:Qy(l.left,l.right)):b=p-2*(0!==n||0!==r?n+r:Qy(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:b});const x=await i.getDimensions(o.floating);return f!==x.width||p!==x.height?{reset:{rects:!0}}:{}}}};function db(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function fb(e){return db(e).getComputedStyle(e)}function pb(e){return e instanceof db(e).Node}function hb(e){return pb(e)?(e.nodeName||"").toLowerCase():""}function mb(e){return e instanceof db(e).HTMLElement}function gb(e){return e instanceof db(e).Element}function vb(e){return"undefined"!=typeof ShadowRoot&&(e instanceof db(e).ShadowRoot||e instanceof ShadowRoot)}function yb(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=fb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function bb(e){return["table","td","th"].includes(hb(e))}function Eb(e){const t=xb(),n=fb(e);return"none"!==n.transform||"none"!==n.perspective||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function xb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function wb(e){return["html","body","#document"].includes(hb(e))}const Tb=Math.min,Cb=Math.max,Sb=Math.round;function kb(e){const t=fb(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=mb(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Sb(n)!==o||Sb(r)!==s;return a&&(n=o,r=s),{width:n,height:r,fallback:a}}function _b(e){return gb(e)?e:e.contextElement}const Nb={x:1,y:1};function Db(e){const t=_b(e);if(!mb(t))return Nb;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=kb(t);let s=(o?Sb(n.width):n.width)/r,a=(o?Sb(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ab={x:0,y:0};function Ib(e,t,n){var r,i;if(void 0===t&&(t=!0),!xb())return Ab;const o=e?db(e):window;return!n||t&&n!==o?Ab:{x:(null==(r=o.visualViewport)?void 0:r.offsetLeft)||0,y:(null==(i=o.visualViewport)?void 0:i.offsetTop)||0}}function Ob(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=_b(e);let s=Nb;t&&(r?gb(r)&&(s=Db(r)):s=Db(e));const a=Ib(o,n,r);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){const e=db(o),t=r&&gb(r)?db(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Db(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=t.x,c+=t.y,n=db(n).frameElement}}return Gy({width:u,height:d,x:l,y:c})}function Lb(e){return((pb(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mb(e){return gb(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Rb(e){return Ob(Lb(e)).left+Mb(e).scrollLeft}function Fb(e){if("html"===hb(e))return e;const t=e.assignedSlot||e.parentNode||vb(e)&&e.host||Lb(e);return vb(t)?t.host:t}function Pb(e){const t=Fb(e);return wb(t)?t.ownerDocument.body:mb(t)&&yb(t)?t:Pb(t)}function jb(e,t){var n;void 0===t&&(t=[]);const r=Pb(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=db(r);return i?t.concat(o,o.visualViewport||[],yb(r)?r:[]):t.concat(r,jb(r))}function Vb(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=db(e),r=Lb(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const e=xb();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Lb(e),n=Mb(e),r=e.ownerDocument.body,i=Cb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Cb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Rb(e);const a=-n.scrollTop;return"rtl"===fb(r).direction&&(s+=Cb(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(Lb(e));else if(gb(t))r=function(e,t){const n=Ob(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=mb(e)?Db(e):{x:1,y:1};return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=Ib(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Gy(r)}function Bb(e,t){const n=Fb(e);return!(n===t||!gb(n)||wb(n))&&("fixed"===fb(n).position||Bb(n,t))}function $b(e,t){return mb(e)&&"fixed"!==fb(e).position?t?t(e):e.offsetParent:null}function Ub(e,t){const n=db(e);if(!mb(e))return n;let r=$b(e,t);for(;r&&bb(r)&&"static"===fb(r).position;)r=$b(r,t);return r&&("html"===hb(r)||"body"===hb(r)&&"static"===fb(r).position&&!Eb(r))?n:r||function(e){let t=Fb(e);for(;mb(t)&&!wb(t);){if(Eb(t))return t;t=Fb(t)}return null}(e)||n}function Hb(e,t,n){const r=mb(t),i=Lb(t),o="fixed"===n,s=Ob(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&!o)if(("body"!==hb(t)||yb(i))&&(a=Mb(t)),mb(t)){const e=Ob(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Rb(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}const qb={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=jb(e).filter((e=>gb(e)&&"body"!==hb(e))),i=null;const o="fixed"===fb(e).position;let s=o?Fb(e):e;for(;gb(s)&&!wb(s);){const t=fb(s),n=Eb(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||yb(s)&&!n&&Bb(e,s))?r=r.filter((e=>e!==s)):i=t,s=Fb(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=Vb(t,n,i);return e.top=Cb(r.top,e.top),e.right=Tb(r.right,e.right),e.bottom=Tb(r.bottom,e.bottom),e.left=Cb(r.left,e.left),e}),Vb(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=mb(n),o=Lb(n);if(n===o)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==hb(n)||yb(o))&&(s=Mb(n)),mb(n))){const e=Ob(n);a=Db(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:gb,getDimensions:function(e){return kb(e)},getOffsetParent:Ub,getDocumentElement:Lb,getScale:Db,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||Ub,o=this.getDimensions;return{reference:Hb(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===fb(e).direction};const Wb=(e,t,n)=>{const r=new Map,i={platform:qb,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=qy(c,r,l),f=r,p={},h=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:g,y:v,data:y,reset:b}=await o({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[n]:{...p[n],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:u,y:d}=qy(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})};var zb="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Gb(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Gb(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Gb(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Kb(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yb(e,t){const n=Kb(e);return Math.round(t*n)/n}function Qb(e){const t=i.useRef(e);return zb((()=>{t.current=e})),t}var Xb=i.forwardRef(((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return p.jsx(Tg.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Xb.displayName="Arrow";var Jb=Xb;var Zb="Popper",[eE,tE]=ug(Zb),[nE,rE]=eE(Zb),iE=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return p.jsx(nE,{scope:t,anchor:r,onAnchorChange:o,children:n})};iE.displayName=Zb;var oE="PopperAnchor",sE=i.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=rE(oE,n),a=i.useRef(null),l=cg(t,a);return i.useEffect((()=>{s.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:p.jsx(Tg.div,{...o,ref:l})}));sE.displayName=oE;var aE="PopperContent",[lE,cE]=eE(aE),uE=i.forwardRef(((e,t)=>{var n,r,s,a,l,c;const{__scopePopper:u,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:E="partial",hideWhenDetached:x=!1,updatePositionStrategy:w="optimized",onPlaced:T,...C}=e,S=rE(aE,u),[k,_]=i.useState(null),N=cg(t,(e=>_(e))),[D,A]=i.useState(null),I=function(e){const[t,n]=i.useState(void 0);return fg((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let i,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,o=t.blockSize}else i=e.offsetWidth,o=e.offsetHeight;n({width:i,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(D),O=(null==I?void 0:I.width)??0,L=(null==I?void 0:I.height)??0,M=d+("center"!==h?"-"+h:""),R="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},F=Array.isArray(y)?y:[y],P=F.length>0,j={padding:R,boundary:F.filter(hE),altBoundary:P},{refs:V,floatingStyles:B,placement:$,isPositioned:U,middlewareData:H}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=i.useState(r);Gb(h,r)||m(r);const[g,v]=i.useState(null),[y,b]=i.useState(null),E=i.useCallback((e=>{e!=C.current&&(C.current=e,v(e))}),[v]),x=i.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[b]),w=a||g,T=l||y,C=i.useRef(null),S=i.useRef(null),k=i.useRef(f),_=Qb(u),N=Qb(s),D=i.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};N.current&&(e.platform=N.current),Wb(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};A.current&&!Gb(k.current,t)&&(k.current=t,o.flushSync((()=>{p(t)})))}))}),[h,t,n,N]);zb((()=>{!1===d&&k.current.isPositioned&&(k.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const A=i.useRef(!1);zb((()=>(A.current=!0,()=>{A.current=!1})),[]),zb((()=>{if(w&&(C.current=w),T&&(S.current=T),w&&T){if(_.current)return _.current(w,T,D);D()}}),[w,T,D,_]);const I=i.useMemo((()=>({reference:C,floating:S,setReference:E,setFloating:x})),[E,x]),O=i.useMemo((()=>({reference:w,floating:T})),[w,T]),L=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Yb(O.floating,f.x),r=Yb(O.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Kb(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,O.floating,f.x,f.y]);return i.useMemo((()=>({...f,update:D,refs:I,elements:O,floatingStyles:L})),[f,D,I,O,L])}({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=i||o?[...gb(e)?jb(e):e.contextElement?jb(e.contextElement):[],...jb(t)]:[];l.forEach((e=>{const t=!gb(e)&&e.toString().includes("V");!i||a&&!t||e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));let c,u=null;s&&(u=new ResizeObserver((()=>{n()})),gb(e)&&!a&&u.observe(e),gb(e)||!e.contextElement||a||u.observe(e.contextElement),u.observe(t));let d=a?Ob(e):null;return a&&function t(){const r=Ob(e);!d||r.x===d.x&&r.y===d.y&&r.width===d.width&&r.height===d.height||n(),d=r,c=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==(e=u)||e.disconnect(),u=null,a&&cancelAnimationFrame(c)}}(...e,{animationFrame:"always"===w}),elements:{reference:S.anchor},middleware:[(z={mainAxis:f+L,alignmentAxis:m},void 0===z&&(z=0),{name:"offset",options:z,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Uy(n),a=By(n),l="x"===Hy(n),c=["left","top"].includes(s)?-1:1,u=o&&l?-1:1,d=Wy(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(e,z);return{x:t+r.x,y:n+r.y,data:r}}}),v&&cb({mainAxis:!0,crossAxis:!1,limiter:"partial"===E?(void 0===W&&(W={}),{options:W,fn(e){const{x:t,y:n,placement:r,rects:i,middlewareData:o}=e,{offset:s=0,mainAxis:a=!0,crossAxis:l=!0}=Wy(W,e),c={x:t,y:n},u=Hy(r),d=lb(u);let f=c[u],p=c[d];const h=Wy(s,e),m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){const e="y"===u?"height":"width",t=i.reference[u]-i.floating[e]+m.mainAxis,n=i.reference[u]+i.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var g,v;const e="y"===u?"width":"height",t=["top","left"].includes(Uy(r)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=o.offset)?void 0:g[d])||0)+(t?0:m.crossAxis),s=i.reference[d]+i.reference[e]+(t?0:(null==(v=o.offset)?void 0:v[d])||0)-(t?m.crossAxis:0);p<n?p=n:p>s&&(p=s)}return{[u]:f,[d]:p}}}):void 0,...j}),v&&ib({...j}),ub({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:i,height:o}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${i}px`),s.setProperty("--radix-popper-anchor-height",`${o}px`)}}),D&&(q={element:D,padding:g},{name:"arrow",options:q,fn(e){const{element:t,padding:n}="function"==typeof q?q(e):q;return t&&(r=t,{}.hasOwnProperty.call(r,"current"))?null!=t.current?Jy({element:t.current,padding:n}).fn(e):{}:t?Jy({element:t,padding:n}).fn(e):{};var r}}),mE({arrowWidth:O,arrowHeight:L}),x&&ab({strategy:"referenceHidden",...j})]});var q,W,z;const[G,K]=gE($),Y=Sg(T);fg((()=>{U&&(null==Y||Y())}),[U,Y]);const Q=null==(n=H.arrow)?void 0:n.x,X=null==(r=H.arrow)?void 0:r.y,J=0!==(null==(s=H.arrow)?void 0:s.centerOffset),[Z,ee]=i.useState();return fg((()=>{k&&ee(window.getComputedStyle(k).zIndex)}),[k]),p.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:U?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[null==(a=H.transformOrigin)?void 0:a.x,null==(l=H.transformOrigin)?void 0:l.y].join(" "),...(null==(c=H.hide)?void 0:c.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(lE,{scope:u,placedSide:G,onArrowChange:A,arrowX:Q,arrowY:X,shouldHideArrow:J,children:p.jsx(Tg.div,{"data-side":G,"data-align":K,...C,ref:N,style:{...C.style,animation:U?void 0:"none"}})})})}));uE.displayName=aE;var dE="PopperArrow",fE={top:"bottom",right:"left",bottom:"top",left:"right"},pE=i.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,i=cE(dE,n),o=fE[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Jb,{...r,ref:t,style:{...r.style,display:"block"}})})}));function hE(e){return null!==e}pE.displayName=dE;var mE=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i;const{placement:o,rects:s,middlewareData:a}=t,l=0!==(null==(n=a.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,f]=gE(o),p={start:"0%",center:"50%",end:"100%"}[f],h=((null==(r=a.arrow)?void 0:r.x)??0)+c/2,m=((null==(i=a.arrow)?void 0:i.y)??0)+u/2;let g="",v="";return"bottom"===d?(g=l?p:`${h}px`,v=-u+"px"):"top"===d?(g=l?p:`${h}px`,v=`${s.floating.height+u}px`):"right"===d?(g=-u+"px",v=l?p:`${m}px`):"left"===d&&(g=`${s.floating.width+u}px`,v=l?p:`${m}px`),{data:{x:g,y:v}}}});function gE(e){const[t,n="center"]=e.split("-");return[t,n]}var vE=iE,yE=sE,bE=uE,EE=pE,xE="rovingFocusGroup.onEntryFocus",wE={bubbles:!1,cancelable:!0},TE="RovingFocusGroup",[CE,SE,kE]=Py(TE),[_E,NE]=ug(TE,[kE]),[DE,AE]=_E(TE),IE=i.forwardRef(((e,t)=>p.jsx(CE.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(CE.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(OE,{...e,ref:t})})})));IE.displayName=TE;var OE=i.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=i.useRef(null),m=cg(t,h),g=Vy(s),[v,y]=vg({prop:a,defaultProp:l??null,onChange:c,caller:TE}),[b,E]=i.useState(!1),x=Sg(u),w=SE(n),T=i.useRef(!1),[C,S]=i.useState(0);return i.useEffect((()=>{const e=h.current;if(e)return e.addEventListener(xE,x),()=>e.removeEventListener(xE,x)}),[x]),p.jsx(DE,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:v,onItemFocus:i.useCallback((e=>y(e)),[y]),onItemShiftTab:i.useCallback((()=>E(!0)),[]),onFocusableItemAdd:i.useCallback((()=>S((e=>e+1))),[]),onFocusableItemRemove:i.useCallback((()=>S((e=>e-1))),[]),children:p.jsx(Tg.div,{tabIndex:b||0===C?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:sg(e.onMouseDown,(()=>{T.current=!0})),onFocus:sg(e.onFocus,(e=>{const t=!T.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(xE,wE);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));FE([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}T.current=!1})),onBlur:sg(e.onBlur,(()=>E(!1)))})})})),LE="RovingFocusGroupItem",ME=i.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...l}=e,c=mg(),u=s||c,d=AE(LE,n),f=d.currentTabStopId===u,h=SE(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:v}=d;return i.useEffect((()=>{if(r)return m(),()=>g()}),[r,m,g]),p.jsx(CE.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:p.jsx(Tg.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:sg(e.onMouseDown,(e=>{r?d.onItemFocus(u):e.preventDefault()})),onFocus:sg(e.onFocus,(()=>d.onItemFocus(u))),onKeyDown:sg(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:RE[r]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=h().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)i.reverse();else if("prev"===t||"next"===t){"prev"===t&&i.reverse();const o=i.indexOf(e.currentTarget);i=d.loop?(r=o+1,(n=i).map(((e,t)=>n[(r+t)%n.length]))):i.slice(o+1)}setTimeout((()=>FE(i)))}var n,r})),children:"function"==typeof a?a({isCurrentTabStop:f,hasTabStop:null!=v}):a})})}));ME.displayName=LE;var RE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function FE(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var PE=IE,jE=ME,VE=["Enter"," "],BE=["ArrowUp","PageDown","End"],$E=["ArrowDown","PageUp","Home",...BE],UE={ltr:[...VE,"ArrowRight"],rtl:[...VE,"ArrowLeft"]},HE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},qE="Menu",[WE,zE,GE]=Py(qE),[KE,YE]=ug(qE,[GE,tE,NE]),QE=tE(),XE=NE(),[JE,ZE]=KE(qE),[ex,tx]=KE(qE),nx=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,l=QE(t),[c,u]=i.useState(null),d=i.useRef(!1),f=Sg(s),h=Vy(o);return i.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),p.jsx(vE,{...l,children:p.jsx(JE,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:p.jsx(ex,{scope:t,onClose:i.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:r})})})};nx.displayName=qE;var rx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,i=QE(n);return p.jsx(yE,{...i,...r,ref:t})}));rx.displayName="MenuAnchor";var ix="MenuPortal",[ox,sx]=KE(ix,{forceMount:void 0}),ax=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=ZE(ix,t);return p.jsx(ox,{scope:t,forceMount:n,children:p.jsx(Wg,{present:n||o.open,children:p.jsx(qg,{asChild:!0,container:i,children:r})})})};ax.displayName=ix;var lx="MenuContent",[cx,ux]=KE(lx),dx=i.forwardRef(((e,t)=>{const n=sx(lx,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=ZE(lx,e.__scopeMenu),s=tx(lx,e.__scopeMenu);return p.jsx(WE.Provider,{scope:e.__scopeMenu,children:p.jsx(Wg,{present:r||o.open,children:p.jsx(WE.Slot,{scope:e.__scopeMenu,children:s.modal?p.jsx(fx,{...i,ref:t}):p.jsx(px,{...i,ref:t})})})})})),fx=i.forwardRef(((e,t)=>{const n=ZE(lx,e.__scopeMenu),r=i.useRef(null),o=cg(t,r);return i.useEffect((()=>{const e=r.current;if(e)return Hv(e)}),[]),p.jsx(mx,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:sg(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),px=i.forwardRef(((e,t)=>{const n=ZE(lx,e.__scopeMenu);return p.jsx(mx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),hx=yg("MenuContent.ScrollLock"),mx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:g,...v}=e,y=ZE(lx,n),b=tx(lx,n),E=QE(n),x=XE(n),w=zE(n),[T,C]=i.useState(null),S=i.useRef(null),k=cg(t,S,y.onContentChange),_=i.useRef(0),N=i.useRef(""),D=i.useRef(0),A=i.useRef(null),I=i.useRef("right"),O=i.useRef(0),L=g?Fv:i.Fragment,M=g?{as:hx,allowPinchZoom:!0}:void 0,R=e=>{var t,n;const r=N.current+e,i=w().filter((e=>!e.disabled)),o=document.activeElement,s=null==(t=i.find((e=>e.ref.current===o)))?void 0:t.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),i=r?t[0]:t,o=n?e.indexOf(n):-1;let s=(a=e,l=Math.max(o,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===i.length&&(s=s.filter((e=>e!==n)));const c=s.find((e=>e.toLowerCase().startsWith(i.toLowerCase())));return c!==n?c:void 0}(i.map((e=>e.textValue)),r,s),l=null==(n=i.find((e=>e.textValue===a)))?void 0:n.ref.current;!function e(t){N.current=t,window.clearTimeout(_.current),""!==t&&(_.current=window.setTimeout((()=>e("")),1e3))}(r),l&&setTimeout((()=>l.focus()))};i.useEffect((()=>()=>window.clearTimeout(_.current)),[]),Kg();const F=i.useCallback((e=>{var t,n;return I.current===(null==(t=A.current)?void 0:t.side)&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const e=t[o],a=t[s],l=e.x,c=e.y,u=a.x,d=a.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(i=!i)}return i}(n,t)}(e,null==(n=A.current)?void 0:n.area)}),[]);return p.jsx(cx,{scope:n,searchRef:N,onItemEnter:i.useCallback((e=>{F(e)&&e.preventDefault()}),[F]),onItemLeave:i.useCallback((e=>{var t;F(e)||(null==(t=S.current)||t.focus(),C(null))}),[F]),onTriggerLeave:i.useCallback((e=>{F(e)&&e.preventDefault()}),[F]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback((e=>{A.current=e}),[]),children:p.jsx(L,{...M,children:p.jsx(Pg,{asChild:!0,trapped:o,onMountAutoFocus:sg(s,(e=>{var t;e.preventDefault(),null==(t=S.current)||t.focus({preventScroll:!0})})),onUnmountAutoFocus:a,children:p.jsx(Ig,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:p.jsx(PE,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:C,onEntryFocus:sg(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:p.jsx(bE,{role:"menu","aria-orientation":"vertical","data-state":$x(y.open),"data-radix-menu-content":"",dir:b.dir,...E,...v,ref:k,style:{outline:"none",...v.style},onKeyDown:sg(v.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&R(e.key));const i=S.current;if(e.target!==i)return;if(!$E.includes(e.key))return;e.preventDefault();const o=w().filter((e=>!e.disabled)).map((e=>e.ref.current));BE.includes(e.key)&&o.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(o)})),onBlur:sg(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(_.current),N.current="")})),onPointerMove:sg(e.onPointerMove,qx((e=>{const t=e.target,n=O.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>O.current?"right":"left";I.current=t,O.current=e.clientX}})))})})})})})})}));dx.displayName=lx;var gx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Tg.div,{role:"group",...r,ref:t})}));gx.displayName="MenuGroup";var vx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Tg.div,{...r,ref:t})}));vx.displayName="MenuLabel";var yx="MenuItem",bx="menu.itemSelect",Ex=i.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=i.useRef(null),a=tx(yx,e.__scopeMenu),l=ux(yx,e.__scopeMenu),c=cg(t,s),u=i.useRef(!1);return p.jsx(xx,{...o,ref:c,disabled:n,onClick:sg(e.onClick,(()=>{const e=s.current;if(!n&&e){const t=new CustomEvent(bx,{bubbles:!0,cancelable:!0});e.addEventListener(bx,(e=>null==r?void 0:r(e)),{once:!0}),Cg(e,t),t.defaultPrevented?u.current=!1:a.onClose()}})),onPointerDown:t=>{var n;null==(n=e.onPointerDown)||n.call(e,t),u.current=!0},onPointerUp:sg(e.onPointerUp,(e=>{var t;u.current||null==(t=e.currentTarget)||t.click()})),onKeyDown:sg(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||VE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));Ex.displayName=yx;var xx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=ux(yx,n),l=XE(n),c=i.useRef(null),u=cg(t,c),[d,f]=i.useState(!1),[h,m]=i.useState("");return i.useEffect((()=>{const e=c.current;e&&m((e.textContent??"").trim())}),[s.children]),p.jsx(WE.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(jE,{asChild:!0,...l,focusable:!r,children:p.jsx(Tg.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:sg(e.onPointerMove,qx((e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:sg(e.onPointerLeave,qx((e=>a.onItemLeave(e)))),onFocus:sg(e.onFocus,(()=>f(!0))),onBlur:sg(e.onBlur,(()=>f(!1)))})})})})),wx=i.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return p.jsx(Ax,{scope:e.__scopeMenu,checked:n,children:p.jsx(Ex,{role:"menuitemcheckbox","aria-checked":Ux(n)?"mixed":n,...i,ref:t,"data-state":Hx(n),onSelect:sg(i.onSelect,(()=>null==r?void 0:r(!!Ux(n)||!n)),{checkForDefaultPrevented:!1})})})}));wx.displayName="MenuCheckboxItem";var Tx="MenuRadioGroup",[Cx,Sx]=KE(Tx,{value:void 0,onValueChange:()=>{}}),kx=i.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Sg(r);return p.jsx(Cx,{scope:e.__scopeMenu,value:n,onValueChange:o,children:p.jsx(gx,{...i,ref:t})})}));kx.displayName=Tx;var _x="MenuRadioItem",Nx=i.forwardRef(((e,t)=>{const{value:n,...r}=e,i=Sx(_x,e.__scopeMenu),o=n===i.value;return p.jsx(Ax,{scope:e.__scopeMenu,checked:o,children:p.jsx(Ex,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Hx(o),onSelect:sg(r.onSelect,(()=>{var e;return null==(e=i.onValueChange)?void 0:e.call(i,n)}),{checkForDefaultPrevented:!1})})})}));Nx.displayName=_x;var Dx="MenuItemIndicator",[Ax,Ix]=KE(Dx,{checked:!1}),Ox=i.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=Ix(Dx,n);return p.jsx(Wg,{present:r||Ux(o.checked)||!0===o.checked,children:p.jsx(Tg.span,{...i,ref:t,"data-state":Hx(o.checked)})})}));Ox.displayName=Dx;var Lx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(Tg.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));Lx.displayName="MenuSeparator";var Mx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,i=QE(n);return p.jsx(EE,{...i,...r,ref:t})}));Mx.displayName="MenuArrow";var[Rx,Fx]=KE("MenuSub"),Px="MenuSubTrigger",jx=i.forwardRef(((e,t)=>{const n=ZE(Px,e.__scopeMenu),r=tx(Px,e.__scopeMenu),o=Fx(Px,e.__scopeMenu),s=ux(Px,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},d=i.useCallback((()=>{a.current&&window.clearTimeout(a.current),a.current=null}),[]);return i.useEffect((()=>d),[d]),i.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),p.jsx(rx,{asChild:!0,...u,children:p.jsx(xx,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":$x(n.open),...e,ref:lg(t,o.onTriggerChange),onClick:t=>{var r;null==(r=e.onClick)||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:sg(e.onPointerMove,qx((t=>{s.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||a.current||(s.onPointerGraceIntentChange(null),a.current=window.setTimeout((()=>{n.onOpenChange(!0),d()}),100))}))),onPointerLeave:sg(e.onPointerLeave,qx((e=>{var t,r;d();const i=null==(t=n.content)?void 0:t.getBoundingClientRect();if(i){const t=null==(r=n.content)?void 0:r.dataset.side,o="right"===t,a=o?-5:5,c=i[o?"left":"right"],u=i[o?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:c,y:i.top},{x:u,y:i.top},{x:u,y:i.bottom},{x:c,y:i.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>s.onPointerGraceIntentChange(null)),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}}))),onKeyDown:sg(e.onKeyDown,(t=>{var i;const o=""!==s.searchRef.current;e.disabled||o&&" "===t.key||UE[r.dir].includes(t.key)&&(n.onOpenChange(!0),null==(i=n.content)||i.focus(),t.preventDefault())}))})})}));jx.displayName=Px;var Vx="MenuSubContent",Bx=i.forwardRef(((e,t)=>{const n=sx(lx,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=ZE(lx,e.__scopeMenu),a=tx(lx,e.__scopeMenu),l=Fx(Vx,e.__scopeMenu),c=i.useRef(null),u=cg(t,c);return p.jsx(WE.Provider,{scope:e.__scopeMenu,children:p.jsx(Wg,{present:r||s.open,children:p.jsx(WE.Slot,{scope:e.__scopeMenu,children:p.jsx(mx,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;a.isUsingKeyboardRef.current&&(null==(t=c.current)||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:sg(e.onFocusOutside,(e=>{e.target!==l.trigger&&s.onOpenChange(!1)})),onEscapeKeyDown:sg(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:sg(e.onKeyDown,(e=>{var t;const n=e.currentTarget.contains(e.target),r=HE[a.dir].includes(e.key);n&&r&&(s.onOpenChange(!1),null==(t=l.trigger)||t.focus(),e.preventDefault())}))})})})})}));function $x(e){return e?"open":"closed"}function Ux(e){return"indeterminate"===e}function Hx(e){return Ux(e)?"indeterminate":e?"checked":"unchecked"}function qx(e){return t=>"mouse"===t.pointerType?e(t):void 0}Bx.displayName=Vx;var Wx=nx,zx=rx,Gx=ax,Kx=dx,Yx=gx,Qx=vx,Xx=Ex,Jx=wx,Zx=kx,ew=Nx,tw=Ox,nw=Lx,rw=Mx,iw=jx,ow=Bx,sw="DropdownMenu",[aw,lw]=ug(sw,[YE]),cw=YE(),[uw,dw]=aw(sw),fw=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=cw(t),u=i.useRef(null),[d,f]=vg({prop:o,defaultProp:s??!1,onChange:a,caller:sw});return p.jsx(uw,{scope:t,triggerId:mg(),triggerRef:u,contentId:mg(),open:d,onOpenChange:f,onOpenToggle:i.useCallback((()=>f((e=>!e))),[f]),modal:l,children:p.jsx(Wx,{...c,open:d,onOpenChange:f,dir:r,modal:l,children:n})})};fw.displayName=sw;var pw="DropdownMenuTrigger",hw=i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=dw(pw,n),s=cw(n);return p.jsx(zx,{asChild:!0,...s,children:p.jsx(Tg.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:lg(t,o.triggerRef),onPointerDown:sg(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(o.onOpenToggle(),o.open||e.preventDefault())})),onKeyDown:sg(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));hw.displayName=pw;var mw=e=>{const{__scopeDropdownMenu:t,...n}=e,r=cw(t);return p.jsx(Gx,{...r,...n})};mw.displayName="DropdownMenuPortal";var gw="DropdownMenuContent",vw=i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dw(gw,n),s=cw(n),a=i.useRef(!1);return p.jsx(Kx,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:sg(e.onCloseAutoFocus,(e=>{var t;a.current||null==(t=o.triggerRef.current)||t.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:sg(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(a.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));vw.displayName=gw;i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(Yx,{...i,...r,ref:t})})).displayName="DropdownMenuGroup";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(Qx,{...i,...r,ref:t})})).displayName="DropdownMenuLabel";var yw=i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(Xx,{...i,...r,ref:t})}));yw.displayName="DropdownMenuItem";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(Jx,{...i,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(Zx,{...i,...r,ref:t})})).displayName="DropdownMenuRadioGroup";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(ew,{...i,...r,ref:t})})).displayName="DropdownMenuRadioItem";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(tw,{...i,...r,ref:t})})).displayName="DropdownMenuItemIndicator";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(nw,{...i,...r,ref:t})})).displayName="DropdownMenuSeparator";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(rw,{...i,...r,ref:t})})).displayName="DropdownMenuArrow";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(iw,{...i,...r,ref:t})})).displayName="DropdownMenuSubTrigger";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=cw(n);return p.jsx(ow,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})})).displayName="DropdownMenuSubContent";var bw=fw,Ew=hw,xw=mw,ww=vw,Tw=yw;const Cw=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=$m("graphiql-un-styled",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=p.jsx(Ew,{asChild:!0,children:p.jsx("button",{...e,ref:t,className:r})}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));Cw.displayName="DropdownMenuButton";const Sw=Object.assign(bw,{Button:Cw,Item:e=>{const t=h.c(10);let n,r,i,o,s;return t[0]!==e?(({className:r,children:n,...i}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]),t[4]!==r?(o=$m("graphiql-dropdown-item",r),t[4]=r,t[5]=o):o=t[5],t[6]!==n||t[7]!==i||t[8]!==o?(s=p.jsx(Tw,{className:o,...i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=s):s=t[9],s},Content:e=>{const t=h.c(14);let n,r,i,o,s;t[0]!==e?(({children:n,align:o,sideOffset:s,className:r,...i}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s):(n=t[1],r=t[2],i=t[3],o=t[4],s=t[5]);const a=void 0===o?"start":o,l=void 0===s?5:s;let c,u;return t[6]!==r?(c=$m("graphiql-dropdown-content",r),t[6]=r,t[7]=c):c=t[7],t[8]!==a||t[9]!==n||t[10]!==i||t[11]!==l||t[12]!==c?(u=p.jsx(xw,{children:p.jsx(ww,{align:a,sideOffset:l,className:c,...i,children:n})}),t[8]=a,t[9]=n,t[10]=i,t[11]=l,t[12]=c,t[13]=u):u=t[13],u}}),kw=e.forwardRef(((e,t)=>{const n=h.c(18);let r,i,o,s;n[0]!==e?(({children:r,onlyShowFirstChild:i,type:s,...o}=e),n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s):(r=n[1],i=n[2],o=n[3],s=n[4]);const a=`graphiql-markdown-${s}`,l=i&&"graphiql-markdown-preview";let c,u,d,f;return n[5]!==o.className||n[6]!==a||n[7]!==l?(c=$m(a,l,o.className),n[5]=o.className,n[6]=a,n[7]=l,n[8]=c):c=n[8],n[9]!==r?(u=Jp.render(r),n[9]=r,n[10]=u):u=n[10],n[11]!==u?(d={__html:u},n[11]=u,n[12]=d):d=n[12],n[13]!==o||n[14]!==t||n[15]!==c||n[16]!==d?(f=p.jsx("div",{...o,ref:t,className:c,dangerouslySetInnerHTML:d}),n[13]=o,n[14]=t,n[15]=c,n[16]=d,n[17]=f):f=n[17],f}));kw.displayName="MarkdownContent";const _w=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=$m("graphiql-spinner",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=p.jsx("div",{...e,ref:t,className:r}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));_w.displayName="Spinner";const Nw=e.createContext({});function Dw(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const Aw="undefined"!=typeof window,Iw=Aw?e.useLayoutEffect:e.useEffect,Ow=e.createContext(null),Lw=e.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Mw(e,t){-1===e.indexOf(t)&&e.push(t)}function Rw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Fw=(e,t,n)=>n>t?t:n<e?e:n;let Pw=()=>{};const jw={},Vw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Bw=e=>/^0[^.\s]+$/u.test(e);function $w(e){let t;return()=>(void 0===t&&(t=e()),t)}const Uw=e=>e,Hw=(e,t)=>n=>t(e(n)),qw=(...e)=>e.reduce(Hw),Ww=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class zw{constructor(){this.subscriptions=[]}add(e){return Mw(this.subscriptions,e),()=>Rw(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Gw=e=>1e3*e,Kw=e=>e/1e3;function Yw(e,t){return t?e*(1e3/t):0}const Qw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Xw=1e-7,Jw=12;function Zw(e,t,n,r){if(e===t&&n===r)return Uw;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=Qw(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>Xw&&++a<Jw);return s}(t,0,1,e,n);return e=>0===e||1===e?e:Qw(i(e),t,r)}const eT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tT=e=>t=>1-e(1-t),nT=Zw(.33,1.53,.69,.99),rT=tT(nT),iT=eT(rT),oT=e=>(e*=2)<1?.5*rT(e):.5*(2-Math.pow(2,-10*(e-1))),sT=e=>1-Math.sin(Math.acos(e)),aT=tT(sT),lT=eT(sT),cT=Zw(.42,0,1,1),uT=Zw(0,0,.58,1),dT=Zw(.42,0,.58,1),fT=e=>Array.isArray(e)&&"number"==typeof e[0],pT={linear:Uw,easeIn:cT,easeInOut:dT,easeOut:uT,circIn:sT,circInOut:lT,circOut:aT,backIn:rT,backInOut:iT,backOut:nT,anticipate:oT},hT=e=>{if(fT(e)){Pw(4===e.length);const[t,n,r,i]=e;return Zw(t,n,r,i)}return"string"==typeof e?pT[e]:e},mT=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gT(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=mT.reduce(((e,t)=>(e[t]=function(e,t){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(t){s.has(t)&&(c.schedule(t),e()),t(a)}const c={schedule:(e,t=!1,o=!1)=>{const a=o&&i?n:r;return t&&s.add(e),a.has(e)||a.add(e),e},cancel:e=>{r.delete(e),s.delete(e)},process:e=>{a=e,i?o=!0:(i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(e)))}};return c}(o),e)),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=s,m=()=>{const o=jw.useManualTiming?i.timestamp:performance.now();n=!1,jw.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),p.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:mT.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(m)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<mT.length;t++)s[mT[t]].cancel(e)},state:i,steps:s}}const{schedule:vT,cancel:yT,state:bT,steps:ET}=gT("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Uw,!0);let xT;function wT(){xT=void 0}const TT={now:()=>(void 0===xT&&TT.set(bT.isProcessing||jw.useManualTiming?bT.timestamp:performance.now()),xT),set:e=>{xT=e,queueMicrotask(wT)}},CT=e=>t=>"string"==typeof t&&t.startsWith(e),ST=CT("--"),kT=CT("var(--"),_T=e=>!!kT(e)&&NT.test(e.split("/*")[0].trim()),NT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,DT={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},AT={...DT,transform:e=>Fw(0,1,e)},IT={...DT,default:1},OT=e=>Math.round(1e5*e)/1e5,LT=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const MT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,RT=(e,t)=>n=>Boolean("string"==typeof n&&MT.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),FT=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,o,s,a]=r.match(LT);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},PT={...DT,transform:e=>Math.round((e=>Fw(0,255,e))(e))},jT={test:RT("rgb","red"),parse:FT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PT.transform(e)+", "+PT.transform(t)+", "+PT.transform(n)+", "+OT(AT.transform(r))+")"};const VT={test:RT("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:jT.transform},BT=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),$T=BT("deg"),UT=BT("%"),HT=BT("px"),qT=BT("vh"),WT=BT("vw"),zT=(()=>({...UT,parse:e=>UT.parse(e)/100,transform:e=>UT.transform(100*e)}))(),GT={test:RT("hsl","hue"),parse:FT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+UT.transform(OT(t))+", "+UT.transform(OT(n))+", "+OT(AT.transform(r))+")"},KT={test:e=>jT.test(e)||VT.test(e)||GT.test(e),parse:e=>jT.test(e)?jT.parse(e):GT.test(e)?GT.parse(e):VT.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?jT.transform(e):GT.transform(e)},YT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const QT="number",XT="color",JT="var",ZT="var(",eC="${}",tC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nC(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(tC,(e=>(KT.test(e)?(r.color.push(o),i.push(XT),n.push(KT.parse(e))):e.startsWith(ZT)?(r.var.push(o),i.push(JT),n.push(e)):(r.number.push(o),i.push(QT),n.push(parseFloat(e))),++o,eC))).split(eC);return{values:n,split:s,indexes:r,types:i}}function rC(e){return nC(e).values}function iC(e){const{split:t,types:n}=nC(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){const t=n[o];i+=t===QT?OT(e[o]):t===XT?KT.transform(e[o]):e[o]}return i}}const oC=e=>"number"==typeof e?0:e;const sC={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(LT))?void 0:t.length)||0)+((null==(n=e.match(YT))?void 0:n.length)||0)>0},parse:rC,createTransformer:iC,getAnimatableNone:function(e){const t=rC(e);return iC(e)(t.map(oC))}};function aC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function lC(e,t){return n=>n>0?t:e}const cC=(e,t,n)=>e+(t-e)*n,uC=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},dC=[VT,jT,GT];function fC(e){const t=(n=e,dC.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===GT&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=aC(a,r,e+1/3),o=aC(a,r,e),s=aC(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const pC=(e,t)=>{const n=fC(e),r=fC(t);if(!n||!r)return lC(e,t);const i={...n};return e=>(i.red=uC(n.red,r.red,e),i.green=uC(n.green,r.green,e),i.blue=uC(n.blue,r.blue,e),i.alpha=cC(n.alpha,r.alpha,e),jT.transform(i))},hC=new Set(["none","hidden"]);function mC(e,t){return n=>cC(e,t,n)}function gC(e){return"number"==typeof e?mC:"string"==typeof e?_T(e)?lC:KT.test(e)?pC:bC:Array.isArray(e)?vC:"object"==typeof e?KT.test(e)?pC:yC:lC}function vC(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>gC(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function yC(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=gC(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const bC=(e,t)=>{const n=sC.createTransformer(t),r=nC(e),i=nC(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?hC.has(e)&&!i.values.length||hC.has(t)&&!r.values.length?function(e,t){return hC.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):qw(vC(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}(r,i),i.values),n):lC(e,t)};function EC(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return cC(e,t,n);return gC(e)(e,t)}const xC=e=>{const t=({timestamp:t})=>e(t);return{start:()=>vT.update(t,!0),stop:()=>yT(t),now:()=>bT.isProcessing?bT.timestamp:TT.now()}},wC=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=e(o/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},TC=2e4;function CC(e){let t=0;let n=e.next(t);for(;!n.done&&t<TC;)t+=50,n=e.next(t);return t>=TC?1/0:t}const SC=5;function kC(e,t,n){const r=Math.max(t-SC,0);return Yw(n-e(r),t-r)}const _C={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},NC=.001;function DC({duration:e=_C.duration,bounce:t=_C.bounce,velocity:n=_C.velocity,mass:r=_C.mass}){let i,o,s=1-t;s=Fw(_C.minDamping,_C.maxDamping,s),e=Fw(_C.minDuration,_C.maxDuration,Kw(e)),s<1?(i=t=>{const r=t*s,i=r*e,o=r-n,a=IC(t,s),l=Math.exp(-i);return NC-o/a*l},o=t=>{const r=t*s*e,o=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=IC(Math.pow(t,2),s);return(-i(t)+NC>0?-1:1)*((o-a)*l)/c}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let i=1;i<AC;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=Gw(e),isNaN(a))return{stiffness:_C.stiffness,damping:_C.damping,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const AC=12;function IC(e,t){return e*Math.sqrt(1-t*t)}const OC=["duration","bounce"],LC=["stiffness","damping","mass"];function MC(e,t){return t.some((t=>void 0!==e[t]))}function RC(e=_C.visualDuration,t=_C.bounce){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=function(e){let t={velocity:_C.velocity,stiffness:_C.stiffness,damping:_C.damping,mass:_C.mass,isResolvedFromDuration:!1,...e};if(!MC(e,LC)&&MC(e,OC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*Fw(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:_C.mass,stiffness:i,damping:o}}else{const n=DC(e);t={...t,...n,mass:_C.mass},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Kw(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),g=s-o,v=Kw(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?_C.restSpeed.granular:_C.restSpeed.default),i||(i=y?_C.restDelta.granular:_C.restDelta.default),m<1){const e=IC(v,m);b=t=>{const n=Math.exp(-m*v*t);return s-n*((h+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>s-Math.exp(-v*e)*(g+(h+v*g)*e);else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return s-n*((h+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const E={calculatedDuration:p&&d||null,next:e=>{const t=b(e);if(p)a.done=e>=d;else{let n=0===e?h:0;m<1&&(n=0===e?Gw(h):kC(b,e,t));const o=Math.abs(n)<=r,l=Math.abs(s-t)<=i;a.done=o&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(CC(E),TC),t=wC((t=>E.next(e*t).value),e,30);return e+"ms "+t},toTransition:()=>{}};return E}function FC({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let h=n*t;const m=d+h,g=void 0===s?m:s(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let E,x;const w=e=>{var t;(t=f.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(E=e,x=RC({keyframes:[f.value,p(f.value)],velocity:kC(y,e,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==E||(t=!0,b(e),w(e)),void 0!==E&&e>=E?x.next(e-E):(!t&&b(e),f)}}}function PC(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Pw(o===t.length),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],i=n||jw.mix||EC,o=e.length-1;for(let s=0;s<o;s++){let n=i(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||Uw:t;n=qw(e,n)}r.push(n)}return r}(t,r,i),l=a.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=Ww(e[r],e[r+1],n);return a[r](i)};return n?t=>c(Fw(e[0],e[o-1],t)):c}function jC(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ww(0,t,r);e.push(cC(n,1,i))}}(t,e.length-1),t}function VC({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(hT):hT(r),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:jC(t),e),a=PC(s,t,{ease:Array.isArray(i)?i:(l=t,c=i,l.map((()=>c||dT)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}RC.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(CC(r),TC);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:Kw(i)}}(e,100,RC);return e.ease=t.ease,e.duration=Gw(t.duration),e.type="keyframes",e};const BC=e=>null!==e;function $C(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(BC),s=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return s&&void 0!==r?r:o[s]}const UC={decay:FC,inertia:FC,tween:VC,keyframes:VC,spring:RC};function HC(e){"string"==typeof e.type&&(e.type=UC[e.type])}class qC{constructor(){this.count=0,this.updateFinished()}get finished(){return this._finished}updateFinished(){this.count++,this._finished=new Promise((e=>{this.resolve=e}))}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const WC=e=>e/100;class zC extends qC{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;if(e&&e.updatedAt!==TT.now()&&this.tick(TT.now()),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;HC(e);const{type:t=VC,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e;let{keyframes:s}=e;const a=t||VC;a!==VC&&"number"!=typeof s[0]&&(this.mixKeyframes=qw(WC,EC(s[0],s[1])),s=[0,100]);const l=a({...e,keyframes:s});"mirror"===i&&(this.mirroredGenerator=a({...e,keyframes:[...s].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=CC(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let y=this.currentTime,b=n;if(u){const e=Math.min(this.currentTime,r)/s;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/s)):"mirror"===d&&(b=o)),y=Fw(0,1,n)*s}const E=v?{done:!1,value:c[0]}:b.next(y);i&&(E.value=i(E.value));let{done:x}=E;v||null===a||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const w=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return w&&p!==FC&&(E.value=$C(c,this.options,m,this.speed)),h&&h(E.value),w&&this.finish(),E}then(e,t){return this.finished.then(e,t)}get duration(){return Kw(this.calculatedDuration)}get time(){return Kw(this.currentTime)}set time(e){e=Gw(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(TT.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Kw(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=xC,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=r):null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(TT.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown()}teardown(){this.notifyFinished(),this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),e.observe(this)}}const GC=e=>180*e/Math.PI,KC=e=>{const t=GC(Math.atan2(e[1],e[0]));return QC(t)},YC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:KC,rotateZ:KC,skewX:e=>GC(Math.atan(e[1])),skewY:e=>GC(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},QC=e=>((e%=360)<0&&(e+=360),e),XC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),JC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ZC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:XC,scaleY:JC,scale:e=>(XC(e)+JC(e))/2,rotateX:e=>QC(GC(Math.atan2(e[6],e[5]))),rotateY:e=>QC(GC(Math.atan2(-e[2],e[0]))),rotateZ:KC,rotate:KC,skewX:e=>GC(Math.atan(e[4])),skewY:e=>GC(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eS(e){return e.includes("scale")?1:0}function tS(e,t){if(!e||"none"===e)return eS(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=ZC,i=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=YC,i=t}if(!i)return eS(t);const o=r[t],s=i[1].split(",").map(nS);return"function"==typeof o?o(s):s[o]}function nS(e){return parseFloat(e.trim())}const rS=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],iS=(()=>new Set(rS))(),oS=e=>e===DT||e===HT,sS=new Set(["x","y","z"]),aS=rS.filter((e=>!sS.has(e)));const lS={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>tS(t,"x"),y:(e,{transform:t})=>tS(t,"y")};lS.translateX=lS.x,lS.translateY=lS.y;const cS=new Set;let uS=!1,dS=!1,fS=!1;function pS(){if(dS){const e=Array.from(cS).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return aS.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null==(r=e.getValue(t))||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}dS=!1,uS=!1,cS.forEach((e=>e.complete(fS))),cS.clear()}function hS(){cS.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(dS=!0)}))}class mS{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(cS.add(this),uS||(uS=!0,vT.read(hS),vT.resolveKeyframes(pS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),cS.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,cS.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const gS=$w((()=>void 0!==window.ScrollTimeline)),vS={};function yS(e,t){const n=$w(e);return()=>vS[t]??n()}const bS=yS((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(nL){return!1}return!0}),"linearEasing"),ES=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ES([0,.65,.55,1]),circOut:ES([.55,0,1,.45]),backIn:ES([.31,.01,.66,-.59]),backOut:ES([.33,1.53,.69,.99])};function wS(e,t){return e?"function"==typeof e?bS()?wC(e,t):"ease-out":fT(e)?ES(e):Array.isArray(e)?e.map((e=>wS(e,t)||xS.easeOut)):xS[e]:void 0}function TS(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=wS(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function CS(e){return"function"==typeof e&&"applyToOptions"in e}class SS extends qC{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:a}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=o,this.options=e,Pw("string"!=typeof e.type);const l=function({type:e,...t}){return CS(e)&&bS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=TS(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=$C(r,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}null==a||a(),this.notifyFinished()},this.animation.oncancel=()=>this.notifyFinished()}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(nL){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||null==(t=(e=this.animation).commitStyles)||t.call(e)}get duration(){var e,t;const n=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return Kw(Number(n))}get time(){return Kw(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Gw(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var n;return this.allowFlatten&&(null==(n=this.animation.effect)||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&gS()?(this.animation.timeline=e,Uw):t(this)}}const kS={anticipate:oT,backInOut:iT,circInOut:lT};function _S(e){"string"==typeof e.ease&&e.ease in kS&&(e.ease=kS[e.ease])}class NS extends SS{constructor(e){_S(e),HC(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const s=new zC({...o,autoplay:!1}),a=Gw(this.finishedTime??this.time);t.setWithVelocity(s.sample(a-10).value,s.sample(a).value,10),s.stop()}}const DS=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!sC.test(e)&&"0"!==e||e.startsWith("url(")));const AS=new Set(["opacity","clipPath","filter","transform"]),IS=$w((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class OS extends qC{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:s,name:a,motionValue:l,element:c,...u}){var d;super(),this.stop=()=>{var e,t;this._animation?(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)):null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=TT.now();const f={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:a,motionValue:l,element:c,...u},p=(null==c?void 0:c.KeyframeResolver)||mS;this.keyframeResolver=new p(s,((e,t,n)=>this.onKeyframesResolved(e,t,f,!n)),a,l,c),null==(d=this.keyframeResolver)||d.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:s,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=TT.now(),function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=DS(i,t),a=DS(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||CS(n))&&r)}(e,i,o,s)||(!jw.instantAnimations&&a||null==c||c($C(e,n,t)),e[0]=e[e.length-1],n.duration=0,n.repeat=0);const u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return IS()&&n&&AS.has(n)&&("transform"!==n||!l)&&!a&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}(u)?new NS({...u,element:u.motionValue.owner.current}):new zC(u);d.finished.then((()=>this.notifyFinished())).catch(Uw),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then((()=>{}))}get animation(){return this._animation||(fS=!0,hS(),pS(),fS=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this.animation.cancel()}}const LS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function MS(e,t,n=1){const[r,i]=function(e){const t=LS.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return Vw(e)?parseFloat(e):e}return _T(i)?MS(i,t,n+1):i}function RS(e,t){return(null==e?void 0:e[t])??(null==e?void 0:e.default)??e}const FS=new Set(["width","height","top","left","right","bottom",...rS]),PS=e=>t=>t.test(e),jS=[DT,HT,UT,$T,WT,qT,{test:e=>"auto"===e,parse:e=>e}],VS=e=>jS.find(PS(e));const BS=new Set(["brightness","contrast","saturate","opacity"]);function $S(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(LT)||[];if(!r)return e;const i=n.replace(r,"");let o=BS.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const US=/\b([a-z-]*)\(.*?\)/gu,HS={...sC,getAnimatableNone:e=>{const t=e.match(US);return t?t.map($S).join(" "):e}},qS={...DT,transform:Math.round},WS={borderWidth:HT,borderTopWidth:HT,borderRightWidth:HT,borderBottomWidth:HT,borderLeftWidth:HT,borderRadius:HT,radius:HT,borderTopLeftRadius:HT,borderTopRightRadius:HT,borderBottomRightRadius:HT,borderBottomLeftRadius:HT,width:HT,maxWidth:HT,height:HT,maxHeight:HT,top:HT,right:HT,bottom:HT,left:HT,padding:HT,paddingTop:HT,paddingRight:HT,paddingBottom:HT,paddingLeft:HT,margin:HT,marginTop:HT,marginRight:HT,marginBottom:HT,marginLeft:HT,backgroundPositionX:HT,backgroundPositionY:HT,...{rotate:$T,rotateX:$T,rotateY:$T,rotateZ:$T,scale:IT,scaleX:IT,scaleY:IT,scaleZ:IT,skew:$T,skewX:$T,skewY:$T,distance:HT,translateX:HT,translateY:HT,translateZ:HT,x:HT,y:HT,z:HT,perspective:HT,transformPerspective:HT,opacity:AT,originX:zT,originY:zT,originZ:HT},zIndex:qS,fillOpacity:AT,strokeOpacity:AT,numOctaves:qS},zS={...WS,color:KT,backgroundColor:KT,outlineColor:KT,fill:KT,stroke:KT,borderColor:KT,borderTopColor:KT,borderRightColor:KT,borderBottomColor:KT,borderLeftColor:KT,filter:HS,WebkitFilter:HS},GS=e=>zS[e];function KS(e,t){let n=GS(e);return n!==HS&&(n=sC),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const YS=new Set(["auto","none","0"]);class QS extends mS{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),_T(n))){const r=MS(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!FS.has(n)||2!==e.length)return;const[r,i]=e,o=VS(r),s=VS(i);if(o!==s)if(oS(o)&&oS(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)(null===e[i]||("number"==typeof(r=e[i])?0===r:null===r||"none"===r||"0"===r||Bw(r)))&&n.push(i);var r;n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!YS.has(t)&&nC(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=KS(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lS[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=lS[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const{schedule:XS}=gT(queueMicrotask,!1),JS={x:!1,y:!1};function ZS(){return JS.x||JS.y}function ek(e,t){const n=function(e,t,n){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=(null==n?void 0:n[e])??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function tk(e){return!("touch"===e.pointerType||ZS())}const nk=(e,t)=>!!t&&(e===t||nk(e,t.parentElement)),rk=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,ik=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const ok=new WeakSet;function sk(e){return t=>{"Enter"===t.key&&e(t)}}function ak(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function lk(e){return rk(e)&&!ZS()}function ck(e,t,n={}){const[r,i,o]=ek(e,n),s=e=>{const r=e.currentTarget;if(!lk(e)||ok.has(r))return;ok.add(r);const o=t(r,e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),lk(e)&&ok.has(r)&&(ok.delete(r),"function"==typeof o&&o(e,{success:t}))},a=e=>{s(e,r===window||r===document||n.useGlobalTarget||nk(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return r.forEach((e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,i),e instanceof HTMLElement&&(e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=sk((()=>{if(ok.has(n))return;ak(n,"down");const e=sk((()=>{ak(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>ak(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,i))),t=e,ik.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))})),o}const uk={current:void 0};class dk{constructor(e,t={}){this.version="__VERSION__",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{var n,r;const i=TT.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(n=this.events.change)||n.notify(this.current)),t&&(null==(r=this.events.renderRequest)||r.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=TT.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new zw);const n=this.events[e].add(t);return"change"===e?()=>{n(),vT.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return uk.current&&uk.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=TT.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Yw(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e;null==(e=this.events.destroy)||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fk(e,t){return new dk(e,t)}const pk=[...jS,KT,sC],hk=(e,t)=>t&&"number"==typeof e?t.transform(e):e,mk=e.createContext({strict:!1}),gk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vk={};for(const l$ in gk)vk[l$]={isEnabled:e=>gk[l$].some((t=>!!e[t]))};const yk=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function bk(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||yk.has(e)}let Ek=e=>!bk(e);try{(xk=require("@emotion/is-prop-valid").default)&&(Ek=e=>e.startsWith("on")?!bk(e):xk(e))}catch{}var xk;function wk(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Tk=e.createContext({});function Ck(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Sk(e){return"string"==typeof e||Array.isArray(e)}const kk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_k=["initial",...kk];function Nk(e){return Ck(e.animate)||_k.some((t=>Sk(e[t])))}function Dk(e){return Boolean(Nk(e)||e.variants)}function Ak(t){const{initial:n,animate:r}=function(e,t){if(Nk(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Sk(t)?t:void 0,animate:Sk(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(Tk));return e.useMemo((()=>({initial:n,animate:r})),[Ik(n),Ik(r)])}function Ik(e){return Array.isArray(e)?e.join(" "):e}const Ok=Symbol.for("motionComponentSymbol");function Lk(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Mk(t,n,r){return e.useCallback((e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):Lk(r)&&(r.current=e))}),[n])}const Rk=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Fk="data-"+Rk("framerAppearId"),Pk=e.createContext({});function jk(t,n,r,i,o){var s,a;const{visualElement:l}=e.useContext(Tk),c=e.useContext(mk),u=e.useContext(Ow),d=e.useContext(Lw).reducedMotion,f=e.useRef(null);i=i||c.renderer,!f.current&&i&&(f.current=i(t,{visualState:n,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=f.current,h=e.useContext(Pk);!p||p.projection||!o||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Vk(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Lk(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(f.current,r,o,h);const m=e.useRef(!1);e.useInsertionEffect((()=>{p&&m.current&&p.update(r,u)}));const g=r[Fk],v=e.useRef(Boolean(g)&&!(null==(s=window.MotionHandoffIsComplete)?void 0:s.call(window,g))&&(null==(a=window.MotionHasOptimisedAnimation)?void 0:a.call(window,g)));return Iw((()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),XS.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())})),e.useEffect((()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,g)})),v.current=!1))})),p}function Vk(e){if(e)return!1!==e.options.allowProjection?e.projection:Vk(e.parent)}function Bk({preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:i,Component:o}){function s(t,s){let a;const l={...e.useContext(Lw),...t,layoutId:$k(t)},{isStatic:c}=l,u=Ak(t),d=i(t,c);if(!c&&Aw){e.useContext(mk).strict;const t=function(e){const{drag:t,layout:n}=vk;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);a=t.MeasureLayout,u.visualElement=jk(o,d,l,n,t.ProjectionNode)}return p.jsxs(Tk.Provider,{value:u,children:[a&&u.visualElement?p.jsx(a,{visualElement:u.visualElement,...l}):null,r(o,t,Mk(d,u.visualElement,s),d,c,u.visualElement)]})}t&&function(e){for(const t in e)vk[t]={...vk[t],...e[t]}}(t),s.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const a=e.forwardRef(s);return a[Ok]=o,a}function $k({layoutId:t}){const n=e.useContext(Nw).id;return n&&void 0!==t?n+"-"+t:t}const Uk={};function Hk(e,{layout:t,layoutId:n}){return iS.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Uk[e]||"opacity"===e)}const qk=e=>Boolean(e&&e.getVelocity),Wk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zk=rS.length;function Gk(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(iS.has(l))s=!0;else if(ST(l))i[l]=e;else{const t=hk(e,WS[l]);l.startsWith("origin")?(a=!0,o[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<zk;o++){const s=rS[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=hk(a,WS[s]);l||(i=!1,r+=`${Wk[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}const Kk=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yk(e,t,n){for(const r in t)qk(t[r])||Hk(r,n)||(e[r]=t[r])}function Qk(t,n){const r={};return Yk(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return e.useMemo((()=>{const e=Kk();return Gk(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),r}function Xk(e,t){const n={},r=Qk(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Jk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Zk(e){return"string"==typeof e&&!e.includes("-")&&!!(Jk.indexOf(e)>-1||/[A-Z]/u.test(e))}const e_={offset:"stroke-dashoffset",array:"stroke-dasharray"},t_={offset:"strokeDashoffset",array:"strokeDasharray"};function n_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,c){if(Gk(e,a,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:u,style:d}=e;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox="fill-box",delete u.transformBox),void 0!==t&&(u.x=t),void 0!==n&&(u.y=n),void 0!==r&&(u.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?e_:t_;e[o.offset]=HT.transform(-r);const s=HT.transform(t),a=HT.transform(n);e[o.array]=`${s} ${a}`}(u,i,o,s,!1)}const r_=()=>({...Kk(),attrs:{}}),i_=e=>"string"==typeof e&&"svg"===e.toLowerCase();function o_(t,n,r,i){const o=e.useMemo((()=>{const e=r_();return n_(e,n,i_(i),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};Yk(e,t.style,t),o.style={...e,...o.style}}return o}function s_(t=!1){return(n,r,i,{latestValues:o},s)=>{const a=(Zk(n)?o_:Xk)(r,o,s,n),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Ek(i)||!0===n&&bk(i)||!t&&!bk(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(r,"string"==typeof n,t),c=n!==e.Fragment?{...l,...a,ref:i}:{},{children:u}=r,d=e.useMemo((()=>qk(u)?u.get():u),[u]);return e.createElement(n,{...c,children:d})}}function a_(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function l_(e,t,n,r){if("function"==typeof t){const[i,o]=a_(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=a_(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function c_(e){return qk(e)?e.get():e}const u_=t=>(n,r)=>{const i=e.useContext(Tk),o=e.useContext(Ow),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:d_(n,r,i,e),renderState:t()}}(t,n,i,o);return r?s():Dw(s)};function d_(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=c_(o[f]);let{initial:s,animate:a}=e;const l=Nk(e),c=Dk(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!Ck(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=l_(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(i[r]=e)}for(const r in e)i[r]=e[r]}}}return i}function f_(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(qk(i[s])||t.style&&qk(t.style[s])||Hk(s,e)||void 0!==(null==(r=null==n?void 0:n.getValue(s))?void 0:r.liveStyle))&&(o[s]=i[s]);return o}const p_={useVisualState:u_({scrapeMotionValuesFromProps:f_,createRenderState:Kk})};function h_(e,t,n){const r=f_(e,t,n);for(const i in e)if(qk(e[i])||qk(t[i])){r[-1!==rS.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}const m_={useVisualState:u_({scrapeMotionValuesFromProps:h_,createRenderState:r_})};function g_(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Bk({...Zk(n)?m_:p_,preloadedFeatures:e,useRender:s_(r),createVisualElement:t,Component:n})}}function v_(e,t,n){const r=e.getProps();return l_(r,t,void 0!==n?n:r.custom,e)}const y_=e=>Array.isArray(e);function b_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fk(n))}function E_(e,t){const n=e.getValue("willChange");if(r=n,Boolean(qk(r)&&r.add))return n.add(t);if(!n&&jw.WillChange){const n=new jw.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function x_(e){return e.props[Fk]}const w_=e=>null!==e;const T_={type:"spring",stiffness:500,damping:25,restSpeed:10},C_={type:"keyframes",duration:.8},S_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},k_=(e,{keyframes:t})=>t.length>2?C_:iS.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:T_:S_;const __=(e,t,n,r={},i,o)=>s=>{const a=RS(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=Gw(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||Object.assign(u,k_(e,u)),u.duration&&(u.duration=Gw(u.duration)),u.repeatDelay&&(u.repeatDelay=Gw(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),(jw.instantAnimations||jw.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(w_);return i[t&&"loop"!==n&&t%2==1?0:i.length-1]}(u.keyframes,a);if(void 0!==e)return void vT.update((()=>{u.onUpdate(e),u.onComplete()}))}return new OS(u)};function N_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function D_(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(o=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const u in a){const t=e.getValue(u,e.latestValues[u]??null),r=a[u];if(void 0===r||c&&N_(c,u))continue;const i={delay:n,...RS(o||{},u)},s=t.get();if(void 0!==s&&!t.isAnimating&&!Array.isArray(r)&&r===s&&!i.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const t=x_(e);if(t){const e=window.MotionHandoffAnimation(t,u,vT);null!==e&&(i.startTime=e,d=!0)}}E_(e,u),t.start(__(u,t,r,e.shouldReduceMotion&&FS.has(u)?{type:!1}:i,e,d));const f=t.animation;f&&l.push(f)}return s&&Promise.all(l).then((()=>{vT.update((()=>{s&&function(e,t){const n=v_(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o)b_(e,a,(s=o[a],y_(s)?s[s.length-1]||0:s));var s}(e,s)}))})),l}function A_(e,t,n={}){var r;const i=v_(e,t,"exit"===n.type?null==(r=e.presenceContext)?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(D_(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(I_).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(A_(e,t,{...o,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function I_(e,t){return e.sortNodePosition(t)}function O_(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const L_=_k.length;function M_(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&M_(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<L_;n++){const r=_k[n],i=e.props[r];(Sk(i)||!1===i)&&(t[r]=i)}return t}const R_=[...kk].reverse(),F_=kk.length;function P_(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>A_(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=A_(e,t,n);else{const i="function"==typeof t?v_(e,t,n.custom):t;r=Promise.all(D_(e,i,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function j_(e){let t=P_(e),n=$_(),r=!0;const i=t=>(n,r)=>{var i;const o=v_(e,r,"exit"===t?null==(i=e.presenceContext)?void 0:i.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function o(o){const{props:s}=e,a=M_(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<F_;t++){const f=R_[t],p=n[f],h=void 0!==s[f]?s[f]:a[f],m=Sk(h),g=f===o?p.isActive:null;!1===g&&(d=t);let v=h===a[f]&&h!==s[f]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...u},!p.isActive&&null===g||!h&&!p.prevProp||Ck(h)||"boolean"==typeof h)continue;const y=V_(p.prevProp,h);let b=y||f===o&&p.isActive&&!v&&m||t>d&&m,E=!1;const x=Array.isArray(h)?h:[h];let w=x.reduce(i(f),{});!1===g&&(w={});const{prevResolvedValues:T={}}=p,C={...T,...w},S=t=>{b=!0,c.has(t)&&(E=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in C){const t=w[e],n=T[e];if(u.hasOwnProperty(e))continue;let r=!1;r=y_(t)&&y_(n)?!O_(t,n):t!==n,r?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):p.protectedKeys[e]=!0}p.prevProp=h,p.prevResolvedValues=w,p.isActive&&(u={...u,...w}),r&&e.blockInitialAnimation&&(b=!1);b&&(!(v&&y)||E)&&l.push(...x.map((e=>({animation:e,options:{type:f}}))))}if(c.size){const t={};if("boolean"!=typeof s.initial){const n=v_(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach((n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null})),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null==(i=e.variantChildren)||i.forEach((e=>{var n;return null==(n=e.animationState)?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=$_(),r=!0}}}function V_(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!O_(t,e)}function B_(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $_(){return{animate:B_(!0),whileInView:B_(),whileHover:B_(),whileTap:B_(),whileDrag:B_(),whileFocus:B_(),exit:B_()}}class U_{constructor(e){this.isMounted=!1,this.node=e}update(){}}let H_=0;const q_={animation:{Feature:class extends U_{constructor(e){super(e),e.animationState||(e.animationState=j_(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ck(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends U_{constructor(){super(...arguments),this.id=H_++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function W_(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function z_(e){return{point:{x:e.pageX,y:e.pageY}}}function G_(e,t,n,r){return W_(e,t,(e=>t=>rk(t)&&e(t,z_(t)))(n),r)}function K_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}const Y_=.9999,Q_=1.0001,X_=-.01,J_=.01;function Z_(e){return e.max-e.min}function eN(e,t,n,r=.5){e.origin=r,e.originPoint=cC(t.min,t.max,e.origin),e.scale=Z_(n)/Z_(t),e.translate=cC(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Y_&&e.scale<=Q_||isNaN(e.scale))&&(e.scale=1),(e.translate>=X_&&e.translate<=J_||isNaN(e.translate))&&(e.translate=0)}function tN(e,t,n,r){eN(e.x,t.x,n.x,r?r.originX:void 0),eN(e.y,t.y,n.y,r?r.originY:void 0)}function nN(e,t,n){e.min=n.min+t.min,e.max=e.min+Z_(t)}function rN(e,t,n){e.min=t.min-n.min,e.max=e.min+Z_(t)}function iN(e,t,n){rN(e.x,t.x,n.x),rN(e.y,t.y,n.y)}const oN=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),sN=()=>({x:{min:0,max:0},y:{min:0,max:0}});function aN(e){return[e("x"),e("y")]}function lN(e){return void 0===e||1===e}function cN({scale:e,scaleX:t,scaleY:n}){return!lN(e)||!lN(t)||!lN(n)}function uN(e){return cN(e)||dN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dN(e){return fN(e.x)||fN(e.y)}function fN(e){return e&&"0%"!==e}function pN(e,t,n){return n+t*(e-n)}function hN(e,t,n,r,i){return void 0!==i&&(e=pN(e,i,r)),pN(e,n,r)+t}function mN(e,t=0,n=1,r,i){e.min=hN(e.min,t,n,r,i),e.max=hN(e.max,t,n,r,i)}function gN(e,{x:t,y:n}){mN(e.x,t.translate,t.scale,t.originPoint),mN(e.y,n.translate,n.scale,n.originPoint)}const vN=.999999999999,yN=1.0000000000001;function bN(e,t){e.min=e.min+t,e.max=e.max+t}function EN(e,t,n,r,i=.5){mN(e,t,n,cC(e.min,e.max,i),r)}function xN(e,t){EN(e.x,t.x,t.scaleX,t.scale,t.originX),EN(e.y,t.y,t.scaleY,t.scale,t.originY)}function wN(e,t){return K_(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const TN=({current:e})=>e?e.ownerDocument.defaultView:null,CN=(e,t)=>Math.abs(e-t);class SN{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=NN(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=CN(e.x,t.x),r=CN(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=bT;this.history.push({...r,timestamp:i});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=kN(t,this.transformPagePoint),vT.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=NN("pointercancel"===e.type?this.lastMoveEventInfo:kN(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!rk(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=kN(z_(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=bT;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,NN(o,this.history)),this.removeListeners=qw(G_(this.contextWindow,"pointermove",this.handlePointerMove),G_(this.contextWindow,"pointerup",this.handlePointerUp),G_(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),yT(this.updatePoint)}}function kN(e,t){return t?{point:t(e.point)}:e}function _N(e,t){return{x:e.x-t.x,y:e.y-t.y}}function NN({point:e},t){return{point:e,delta:_N(e,AN(t)),offset:_N(e,DN(t)),velocity:IN(t,.1)}}function DN(e){return e[0]}function AN(e){return e[e.length-1]}function IN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=AN(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Gw(t)));)n--;if(!r)return{x:0,y:0};const o=Kw(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ON(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function LN(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const MN=.35;function RN(e,t,n){return{min:FN(e,t),max:FN(e,n)}}function FN(e,t){return"number"==typeof e?e:e[t]||0}const PN=new WeakMap;class jN{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=sN(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new SN(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(z_(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?JS[o]?null:(JS[o]=!0,()=>{JS[o]=!1}):JS.x||JS.y?null:(JS.x=JS.y=!0,()=>{JS.x=JS.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),aN((e=>{let t=this.getAxisMotionValue(e).get()||0;if(UT.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Z_(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),i&&vT.postRender((()=>i(e,t))),E_(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>aN((e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:TN(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:i}=this.getProps();i&&vT.postRender((()=>i(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!VN(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?cC(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?cC(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,i=this.constraints;t&&Lk(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:ON(e.x,n,i),y:ON(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=MN){return!1===e?e=0:!0===e&&(e=MN),{x:RN(e,"left","right"),y:RN(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&aN((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Lk(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=wN(e,n),{scroll:i}=t;return i&&(bN(r.x,i.offset.x),bN(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:LN(e.x,t.x),y:LN(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=K_(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=aN((s=>{if(!VN(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return E_(this.visualElement,e),n.start(__(e,n,0,t,this.visualElement,!1))}stopAnimation(){aN((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){aN((e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()}))}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){aN((t=>{const{drag:n}=this.getProps();if(!VN(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-cC(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Lk(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};aN((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Z_(e),i=Z_(t);return i>r?n=Ww(t.min,t.max-r,e.min):r>i&&(n=Ww(e.min,e.max-i,t.min)),Fw(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),aN((t=>{if(!VN(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(cC(i,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;PN.set(this.visualElement,this);const e=G_(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Lk(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),vT.read(t);const i=W_(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(aN((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=MN,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function VN(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const BN=e=>(t,n)=>{e&&vT.postRender((()=>e(t,n)))};const $N={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function UN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const HN={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!HT.test(e))return e;e=parseFloat(e)}return`${UN(e,t.target.x)}% ${UN(e,t.target.y)}%`}},qN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=sC.parse(e);if(i.length>5)return r;const o=sC.createTransformer(e),s="number"!=typeof i[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const c=cC(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=c),"number"==typeof i[3+s]&&(i[3+s]/=c),o(i)}};class WN extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;!function(e){for(const t in e)Uk[t]=e[t],ST(t)&&(Uk[t].isCSSVariable=!0)}(GN),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),$N.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||vT.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),XS.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function zN(t){const[n,r]=function(t=!0){const n=e.useContext(Ow);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:i,register:o}=n,s=e.useId();e.useEffect((()=>{if(t)return o(s)}),[t]);const a=e.useCallback((()=>t&&i&&i(s)),[s,i,t]);return!r&&i?[!1,a]:[!0]}(),i=e.useContext(Nw);return p.jsx(WN,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(Pk),isPresent:n,safeToRemove:r})}const GN={borderRadius:{...HN,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:HN,borderTopRightRadius:HN,borderBottomLeftRadius:HN,borderBottomRightRadius:HN,boxShadow:qN};const KN=(e,t)=>e.depth-t.depth;class YN{constructor(){this.children=[],this.isDirty=!1}add(e){Mw(this.children,e),this.isDirty=!0}remove(e){Rw(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(KN),this.isDirty=!1,this.children.forEach(e)}}const QN=["TopLeft","TopRight","BottomLeft","BottomRight"],XN=QN.length,JN=e=>"string"==typeof e?parseFloat(e):e,ZN=e=>"number"==typeof e||HT.test(e);function eD(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const tD=rD(0,.5,aT),nD=rD(.5,.95,Uw);function rD(e,t,n){return r=>r<e?0:r>t?1:n(Ww(e,t,r))}function iD(e,t){e.min=t.min,e.max=t.max}function oD(e,t){iD(e.x,t.x),iD(e.y,t.y)}function sD(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function aD(e,t,n,r,i){return e=pN(e-=t,1/n,r),void 0!==i&&(e=pN(e,1/i,r)),e}function lD(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){UT.test(t)&&(t=parseFloat(t),t=cC(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=cC(o.min,o.max,r);e===o&&(a-=t),e.min=aD(e.min,t,n,a,i),e.max=aD(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}const cD=["x","scaleX","originX"],uD=["y","scaleY","originY"];function dD(e,t,n,r){lD(e.x,t,cD,n?n.x:void 0,r?r.x:void 0),lD(e.y,t,uD,n?n.y:void 0,r?r.y:void 0)}function fD(e){return 0===e.translate&&1===e.scale}function pD(e){return fD(e.x)&&fD(e.y)}function hD(e,t){return e.min===t.min&&e.max===t.max}function mD(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gD(e,t){return mD(e.x,t.x)&&mD(e.y,t.y)}function vD(e){return Z_(e.x)/Z_(e.y)}function yD(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class bD{constructor(){this.members=[]}add(e){Mw(this.members,e),e.scheduleRender()}remove(e){if(Rw(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ED=["","X","Y","Z"],xD={visibility:"hidden"};let wD=0;function TD(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function CD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=x_(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",vT,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&CD(r)}function SD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=wD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ND),this.nodes.forEach(RD),this.nodes.forEach(FD),this.nodes.forEach(DD)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new YN)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new zw),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:i,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=TT.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(yT(r),e(o-t))};return vT.setup(r,!0),()=>yT(r)}(r,250),$N.hasAnimatedSinceResize&&($N.hasAnimatedSinceResize=!1,this.nodes.forEach(MD))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||UD,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!gD(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...RS(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||MD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yT(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(PD),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&CD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ID);this.isUpdating||this.nodes.forEach(OD),this.isUpdating=!1,this.nodes.forEach(LD),this.nodes.forEach(kD),this.nodes.forEach(_D),this.clearAllSnapshots();const e=TT.now();bT.delta=Fw(0,1e3/60,e-bT.timestamp),bT.timestamp=e,bT.isProcessing=!0,ET.update.process(bT),ET.preRender.process(bT),ET.render.process(bT),bT.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,XS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(AD),this.sharedNodes.forEach(jD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,vT.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){vT.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Z_(this.snapshot.measuredBox.x)||Z_(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=sN(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!pD(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||uN(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),WD((r=n).x),WD(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return sN();const n=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(GD))){const{scroll:e}=this.root;e&&(bN(n.x,e.offset.x),bN(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=sN();if(oD(n,e),null==(t=this.scroll)?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&oD(n,e),bN(n.x,i.offset.x),bN(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n=sN();oD(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&xN(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),uN(e.latestValues)&&xN(n,e.latestValues)}return uN(this.latestValues)&&xN(n,this.latestValues),n}removeTransform(e){const t=sN();oD(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!uN(e.latestValues))continue;cN(e.latestValues)&&e.updateSnapshot();const r=sN();oD(r,e.measurePageBox()),dD(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return uN(this.latestValues)&&dD(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==bT.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=bT.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sN(),this.relativeTargetOrigin=sN(),iN(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),oD(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var s,a,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target=sN(),this.targetWithTransforms=sN()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,nN(s.x,a.x,l.x),nN(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):oD(this.target,this.layout.layoutBox),gN(this.target,this.targetDelta)):oD(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sN(),this.relativeTargetOrigin=sN(),iN(this.relativeTargetOrigin,this.target,e.target),oD(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!cN(this.parent.latestValues)&&!dN(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===bT.timestamp&&(r=!1),r)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;oD(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,s;t.x=t.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&xN(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,gN(e,s)),r&&uN(o.latestValues)&&xN(e,o.latestValues))}t.x<yN&&t.x>vN&&(t.x=1),t.y<yN&&t.y>vN&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=sN());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(sD(this.prevProjectionDelta.x,this.projectionDelta.x),sD(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),tN(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&yD(this.projectionDelta.x,this.prevProjectionDelta.x)&&yD(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oN(),this.projectionDelta=oN(),this.projectionDeltaWithTransform=oN()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o=oN();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=sN(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some($D));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h,m,g;VD(o.x,e.x,n),VD(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(iN(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,h=this.relativeTargetOrigin,m=s,g=n,BD(p.x,h.x,m.x,g),BD(p.y,h.y,m.y,g),d&&(l=this.relativeTarget,f=d,hD(l.x,f.x)&&hD(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d=sN()),oD(d,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=cC(0,n.opacity??1,tD(r)),e.opacityExit=cC(t.opacity??1,0,nD(r))):o&&(e.opacity=cC(t.opacity??1,n.opacity??1,r));for(let s=0;s<XN;s++){const i=`border${QN[s]}Radius`;let o=eD(t,i),a=eD(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||ZN(o)===ZN(a)?(e[i]=Math.max(cC(JN(o),JN(a),r),0),(UT.test(a)||UT.test(o))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=cC(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(yT(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vT.update((()=>{$N.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=qk(e)?e:fk(e);return r.start(__("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&zD(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||sN();const t=Z_(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Z_(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}oD(t,n),xN(t,i),tN(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new bD);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&TD("z",e,r,this.animationValues);for(let i=0;i<ED.length;i++)TD(`rotate${ED[i]}`,e,r,this.animationValues),TD(`skew${ED[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}getProjectionStyles(e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return xD;const t={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity="",t.pointerEvents=c_(null==e?void 0:e.pointerEvents)||"",t.transform=n?n(this.latestValues,""):"none",t;const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=c_(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!uN(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1),t}const i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));const{x:o,y:s}=this.projectionDelta;t.transformOrigin=`${100*o.origin}% ${100*s.origin}% 0`,r.animationValues?t.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:t.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const a in Uk){if(void 0===i[a])continue;const{correct:e,applyTo:n,isCSSVariable:o}=Uk[a],s="none"===t.transform?i[a]:e(i[a],r);if(n){const e=n.length;for(let r=0;r<e;r++)t[n[r]]=s}else o?this.options.visualElement.renderState.vars[a]=s:t[a]=s}return this.options.layoutId&&(t.pointerEvents=r===this?c_(null==e?void 0:e.pointerEvents)||"":"none"),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()})),this.root.nodes.forEach(ID),this.root.sharedNodes.clear()}}}function kD(e){e.updateLayout()}function _D(e){var t;const n=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?aN((e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=Z_(r);r.min=t[e].min,r.max=r.min+i})):zD(i,n.layoutBox,t)&&aN((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=Z_(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=oN();tN(s,t,n.layoutBox);const a=oN();o?tN(a,e.applyTransform(r,!0),n.measuredBox):tN(a,t,n.layoutBox);const l=!pD(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s=sN();iN(s,n.layoutBox,i.layoutBox);const a=sN();iN(a,t,o.layoutBox),gD(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function ND(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function DD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function AD(e){e.clearSnapshot()}function ID(e){e.clearMeasurements()}function OD(e){e.isLayoutDirty=!1}function LD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function MD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function RD(e){e.resolveTargetDelta()}function FD(e){e.calcProjection()}function PD(e){e.resetSkewAndRotation()}function jD(e){e.removeLeadSnapshot()}function VD(e,t,n){e.translate=cC(t.translate,0,n),e.scale=cC(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function BD(e,t,n,r){e.min=cC(t.min,n.min,r),e.max=cC(t.max,n.max,r)}function $D(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const UD={duration:.45,ease:[.4,0,.1,1]},HD=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),qD=HD("applewebkit/")&&!HD("chrome/")?Math.round:Uw;function WD(e){e.min=qD(e.min),e.max=qD(e.max)}function zD(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=vD(t),i=vD(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function GD(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const KD=SD({attachResizeListener:(e,t)=>W_(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),YD={current:void 0},QD=SD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!YD.current){const e=new KD({});e.mount(window),e.setOptions({layoutScroll:!0}),YD.current=e}return YD.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),XD={pan:{Feature:class extends U_{constructor(){super(...arguments),this.removePointerDownListener=Uw}onPointerDown(e){this.session=new SN(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:TN(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:BN(e),onStart:BN(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&vT.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=G_(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends U_{constructor(e){super(e),this.removeGroupControls=Uw,this.removeListeners=Uw,this.controls=new jN(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Uw}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:QD,MeasureLayout:zN}};function JD(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&vT.postRender((()=>i(t,z_(t))))}function ZD(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&vT.postRender((()=>i(t,z_(t))))}const eA=new WeakMap,tA=new WeakMap,nA=e=>{const t=eA.get(e.target);t&&t(e)},rA=e=>{e.forEach(nA)};function iA(e,t,n){const r=function({root:e,...t}){const n=e||document;tA.has(n)||tA.set(n,{});const r=tA.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(rA,{root:e,...t})),r[i]}(t);return eA.set(e,n),r.observe(e),()=>{eA.delete(e),r.unobserve(e)}}const oA={some:0,all:1};const sA={inView:{Feature:class extends U_{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:oA[r]};return iA(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends U_{mount(){const{current:e}=this.node;e&&(this.unmount=ck(e,((e,t)=>(ZD(this.node,t,"Start"),(e,{success:t})=>ZD(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends U_{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(nL){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=qw(W_(this.node.current,"focus",(()=>this.onFocus())),W_(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends U_{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,i,o]=ek(e,n),s=e=>{if(!tk(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const o=e=>{tk(e)&&(r(e),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,i)};return r.forEach((e=>{e.addEventListener("pointerenter",s,i)})),o}(e,((e,t)=>(JD(this.node,t,"Start"),e=>JD(this.node,e,"End")))))}unmount(){}}}},aA={layout:{ProjectionNode:QD,MeasureLayout:zN}},lA={current:null},cA={current:!1};const uA=new WeakMap;const dA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fA{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mS,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=TT.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,vT.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Nk(t),this.isVariantNode=Dk(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in u){const e=u[d];void 0!==a[d]&&qk(e)&&e.set(a[d],!1)}}mount(e){this.current=e,uA.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),cA.current||function(){if(cA.current=!0,Aw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lA.current=e.matches;e.addListener(t),t()}else lA.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||lA.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),this.projection=void 0,yT(this.notifyUpdate),yT(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=iS.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&vT.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),i(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in vk){const t=vk[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sN()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<dA.length;n++){const t=dA[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(qk(i))e.addValue(r,i);else if(qk(o))e.addValue(r,fk(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,fk(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=fk(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(Vw(n)||Bw(n))?n=parseFloat(n):(r=n,!pk.find(PS(r))&&sC.test(t)&&(n=KS(e,t))),this.setBaseTarget(e,qk(n)?n.get():n)),qk(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=l_(this.props,n,null==(t=this.presenceContext)?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||qk(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new zw),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class pA extends fA{constructor(){super(...arguments),this.KeyframeResolver=QS}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;qk(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}function hA(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}class mA extends pA{constructor(){super(...arguments),this.type="html",this.renderInstance=hA}readValueFromInstance(e,t){if(iS.has(t))return((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return tS(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(ST(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return wN(e,t)}build(e,t,n){Gk(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return f_(e,t,n)}}const gA=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class vA extends pA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sN}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(iS.has(t)){const e=GS(t);return e&&e.default||0}return t=gA.has(t)?t:Rk(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return h_(e,t,n)}build(e,t,n){n_(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){!function(e,t,n,r){hA(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gA.has(i)?i:Rk(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=i_(e.tagName),super.mount(e)}}const yA=wk(g_({...q_,...sA,...XD,...aA},((t,n)=>Zk(t)?new vA(n):new mA(n,{allowProjection:t!==e.Fragment}))));function bA(t){const n=Dw((()=>fk(t))),{isStatic:r}=e.useContext(Lw);if(r){const[,r]=e.useState(t);e.useEffect((()=>n.on("change",r)),[])}return n}function EA(e,t){const n=bA(t()),r=()=>n.set(t());return r(),Iw((()=>{const t=()=>vT.preRender(r,!1,!0),n=e.map((e=>e.on("change",t)));return()=>{n.forEach((e=>e())),yT(r)}})),n}function xA(e,t,n,r){if("function"==typeof e)return function(e){uk.current=[],e();const t=EA(uk.current,e);return uk.current=void 0,t}(e);const i="function"==typeof t?t:function(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=PC(e[1+n],e[2+n],e[3+n]);return t?i(r):i}(t,n,r);return Array.isArray(e)?wA(e,i):wA([e],(([e])=>i(e)))}function wA(e,t){const n=Dw((()=>[]));return EA(e,(()=>{n.length=0;const r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)}))}const TA=e.createContext(null);function CA({children:t,as:n="ul",axis:r="y",onReorder:i,values:o,...s},a){const l=Dw((()=>yA[n])),c=[],u=e.useRef(!1),d={axis:r,registerItem:(e,t)=>{const n=c.findIndex((t=>e===t.value));-1!==n?c[n].layout=t[r]:c.push({value:e,layout:t[r]}),c.sort(_A)},updateOrder:(e,t,n)=>{if(u.current)return;const r=function(e,t,n,r){if(!r)return e;const i=e.findIndex((e=>e.value===t));if(-1===i)return e;const o=r>0?1:-1,s=e[i+o];if(!s)return e;const a=e[i],l=s.layout,c=cC(l.min,l.max,.5);return 1===o&&a.layout.max+n>c||-1===o&&a.layout.min+n<c?function([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const r=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(r,0,i)}return e}(e,i,i+o):e}(c,e,t,n);c!==r&&(u.current=!0,i(r.map(kA).filter((e=>-1!==o.indexOf(e)))))}};return e.useEffect((()=>{u.current=!1})),p.jsx(l,{...s,ref:a,ignoreStrict:!0,children:p.jsx(TA.Provider,{value:d,children:t})})}const SA=e.forwardRef(CA);function kA(e){return e.value}function _A(e,t){return e.layout.min-t.layout.min}function NA(e,t=0){return qk(e)?e:bA(t)}function DA({children:t,style:n={},value:r,as:i="li",onDrag:o,layout:s=!0,...a},l){const c=Dw((()=>yA[i])),u=e.useContext(TA),d={x:NA(n.x),y:NA(n.y)},f=xA([d.x,d.y],(([e,t])=>e||t?1:"unset")),{axis:h,registerItem:m,updateOrder:g}=u;return p.jsx(c,{drag:h,...a,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(e,t)=>{const{velocity:n}=t;n[h]&&g(r,d[h].get(),n[h]),o&&o(e,t)},onLayoutMeasure:e=>m(r,e),ref:l,ignoreStrict:!0,children:t})}const AA=e.forwardRef(DA),IA=e.forwardRef(((e,t)=>{const n=h.c(16);let r,i,o,s,a;n[0]!==e?(({isActive:o,value:a,children:r,className:i,...s}=e),n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s,n[5]=a):(r=n[1],i=n[2],o=n[3],s=n[4],a=n[5]);const l=o&&"graphiql-tab-active";let c,u;return n[6]!==i||n[7]!==l?(c=$m("graphiql-tab",l,i),n[6]=i,n[7]=l,n[8]=c):c=n[8],n[9]!==r||n[10]!==o||n[11]!==s||n[12]!==t||n[13]!==c||n[14]!==a?(u=p.jsx(AA,{...s,ref:t,value:a,"aria-selected":o,role:"tab",className:c,children:r}),n[9]=r,n[10]=o,n[11]=s,n[12]=t,n[13]=c,n[14]=a,n[15]=u):u=n[15],u}));IA.displayName="Tab";const OA=e.forwardRef(((e,t)=>{const n=h.c(11);let r,i,o,s,a;return n[0]!==e?(({children:r,className:i,...o}=e),n[0]=e,n[1]=r,n[2]=i,n[3]=o):(r=n[1],i=n[2],o=n[3]),n[4]!==i?(s=$m("graphiql-tab-button",i),n[4]=i,n[5]=s):s=n[5],n[6]!==r||n[7]!==o||n[8]!==t||n[9]!==s?(a=p.jsx(rg,{...o,ref:t,type:"button",className:s,children:r}),n[6]=r,n[7]=o,n[8]=t,n[9]=s,n[10]=a):a=n[10],a}));OA.displayName="Tab.Button";const LA=e.forwardRef(((e,t)=>{const n=h.c(7);let r,i,o;return n[0]!==e.className?(r=$m("graphiql-tab-close",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]===Symbol.for("react.memo_cache_sentinel")?(i=p.jsx(fm,{}),n[2]=i):i=n[2],n[3]!==e||n[4]!==t||n[5]!==r?(o=p.jsx(rg,{"aria-label":"Close Tab",...e,ref:t,type:"button",className:r,children:i}),n[3]=e,n[4]=t,n[5]=r,n[6]=o):o=n[6],o}));LA.displayName="Tab.Close";const MA=Object.assign(IA,{Button:OA,Close:LA}),RA=e.forwardRef(((e,t)=>{const n=h.c(15);let r,i,o,s,a,l,c;return n[0]!==e?(({values:a,onReorder:o,children:r,className:i,...s}=e),n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s,n[5]=a):(r=n[1],i=n[2],o=n[3],s=n[4],a=n[5]),n[6]!==i?(l=$m("graphiql-tabs",i),n[6]=i,n[7]=l):l=n[7],n[8]!==r||n[9]!==o||n[10]!==s||n[11]!==t||n[12]!==l||n[13]!==a?(c=p.jsx(SA,{...s,ref:t,values:a,onReorder:o,axis:"x",role:"tablist",className:l,children:r}),n[8]=r,n[9]=o,n[10]=s,n[11]=t,n[12]=l,n[13]=a,n[14]=c):c=n[14],c}));RA.displayName="Tabs";var[FA,PA]=ug("Tooltip",[tE]),jA=tE(),VA="TooltipProvider",BA=700,$A="tooltip.open",[UA,HA]=FA(VA),qA=e=>{const{__scopeTooltip:t,delayDuration:n=BA,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=i.useRef(!0),l=i.useRef(!1),c=i.useRef(0);return i.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),p.jsx(UA,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback((()=>{window.clearTimeout(c.current),a.current=!1}),[]),onClose:i.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>a.current=!0),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback((e=>{l.current=e}),[]),disableHoverableContent:o,children:s})};qA.displayName=VA;var WA="Tooltip",[zA,GA]=FA(WA),KA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:l}=e,c=HA(WA,e.__scopeTooltip),u=jA(t),[d,f]=i.useState(null),h=mg(),m=i.useRef(0),g=a??c.disableHoverableContent,v=l??c.delayDuration,y=i.useRef(!1),[b,E]=vg({prop:r,defaultProp:o??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent($A))):c.onClose(),null==s||s(e)},caller:WA}),x=i.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),w=i.useCallback((()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,E(!0)}),[E]),T=i.useCallback((()=>{window.clearTimeout(m.current),m.current=0,E(!1)}),[E]),C=i.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{y.current=!0,E(!0),m.current=0}),v)}),[v,E]);return i.useEffect((()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)}),[]),p.jsx(vE,{...u,children:p.jsx(zA,{scope:t,contentId:h,open:b,stateAttribute:x,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback((()=>{c.isOpenDelayedRef.current?C():w()}),[c.isOpenDelayedRef,C,w]),onTriggerLeave:i.useCallback((()=>{g?T():(window.clearTimeout(m.current),m.current=0)}),[T,g]),onOpen:w,onClose:T,disableHoverableContent:g,children:n})})};KA.displayName=WA;var YA="TooltipTrigger",QA=i.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=GA(YA,n),s=HA(YA,n),a=jA(n),l=cg(t,i.useRef(null),o.onTriggerChange),c=i.useRef(!1),u=i.useRef(!1),d=i.useCallback((()=>c.current=!1),[]);return i.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),p.jsx(yE,{asChild:!0,...a,children:p.jsx(Tg.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:sg(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))})),onPointerLeave:sg(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:sg(e.onPointerDown,(()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:sg(e.onFocus,(()=>{c.current||o.onOpen()})),onBlur:sg(e.onBlur,o.onClose),onClick:sg(e.onClick,o.onClose)})})}));QA.displayName=YA;var XA="TooltipPortal",[JA,ZA]=FA(XA,{forceMount:void 0}),eI=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=GA(XA,t);return p.jsx(JA,{scope:t,forceMount:n,children:p.jsx(Wg,{present:n||o.open,children:p.jsx(qg,{asChild:!0,container:i,children:r})})})};eI.displayName=XA;var tI="TooltipContent",nI=i.forwardRef(((e,t)=>{const n=ZA(tI,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=GA(tI,e.__scopeTooltip);return p.jsx(Wg,{present:r||s.open,children:s.disableHoverableContent?p.jsx(aI,{side:i,...o,ref:t}):p.jsx(rI,{side:i,...o,ref:t})})})),rI=i.forwardRef(((e,t)=>{const n=GA(tI,e.__scopeTooltip),r=HA(tI,e.__scopeTooltip),o=i.useRef(null),s=cg(t,o),[a,l]=i.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,h=i.useCallback((()=>{l(null),f(!1)}),[f]),m=i.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect())]);l(o),f(!0)}),[f]);return i.useEffect((()=>()=>h()),[h]),i.useEffect((()=>{if(c&&d){const e=e=>m(e,d),t=e=>m(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,m,h]),i.useEffect((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==d?void 0:d.contains(t)),i=!function(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const e=t[o],a=t[s],l=e.x,c=e.y,u=a.x,d=a.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(i=!i)}return i}(n,a);r?h():i&&(h(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,a,u,h]),p.jsx(aI,{...e,ref:s})})),[iI,oI]=FA(WA,{isInside:!1}),sI=xg("TooltipContent"),aI=i.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=GA(tI,n),u=jA(n),{onClose:d}=c;return i.useEffect((()=>(document.addEventListener($A,d),()=>document.removeEventListener($A,d))),[d]),i.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;(null==t?void 0:t.contains(c.trigger))&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),p.jsx(Ig,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:p.jsxs(bE,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(sI,{children:r}),p.jsx(iI,{scope:n,isInside:!0,children:p.jsx(Ly,{id:c.contentId,role:"tooltip",children:o||r})})]})})}));nI.displayName=tI;var lI="TooltipArrow";i.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,i=jA(n);return oI(lI,n).isInside?null:p.jsx(EE,{...i,...r,ref:t})})).displayName=lI;var cI=qA,uI=KA,dI=QA,fI=eI,pI=nI;const hI=e=>{const t=h.c(10),{children:n,align:r,side:i,sideOffset:o,label:s}=e,a=void 0===r?"start":r,l=void 0===i?"bottom":i,c=void 0===o?5:o;let u,d,f;return t[0]!==n?(u=p.jsx(dI,{asChild:!0,children:n}),t[0]=n,t[1]=u):u=t[1],t[2]!==a||t[3]!==s||t[4]!==l||t[5]!==c?(d=p.jsx(fI,{children:p.jsx(pI,{className:"graphiql-tooltip",align:a,side:l,sideOffset:c,children:s})}),t[2]=a,t[3]=s,t[4]=l,t[5]=c,t[6]=d):d=t[6],t[7]!==u||t[8]!==d?(f=p.jsxs(uI,{children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9],f},mI=Object.assign(hI,{Provider:cI}),gI=e.forwardRef(((t,n)=>{const r=h.c(19);let i,o,s;r[0]!==t?(({label:i,onClick:o,...s}=t),r[0]=t,r[1]=i,r[2]=o,r[3]=s):(i=r[1],o=r[2],s=r[3]);const[a,l]=e.useState(null);let c;r[4]!==o?(c=e=>{try{o&&o(e),l(null)}catch(t){l(t instanceof Error?t:new Error(`Toolbar button click failed: ${t}`))}},r[4]=o,r[5]=c):c=r[5];const u=c,d=a&&"error";let f;r[6]!==s.className||r[7]!==d?(f=$m("graphiql-toolbar-button",d,s.className),r[6]=s.className,r[7]=d,r[8]=f):f=r[8];const m=a?a.message:i,g=a?"true":s["aria-invalid"];let v,y;return r[9]!==u||r[10]!==s||r[11]!==n||r[12]!==f||r[13]!==m||r[14]!==g?(v=p.jsx(rg,{...s,ref:n,type:"button",className:f,onClick:u,"aria-label":m,"aria-invalid":g}),r[9]=u,r[10]=s,r[11]=n,r[12]=f,r[13]=m,r[14]=g,r[15]=v):v=r[15],r[16]!==i||r[17]!==v?(y=p.jsx(mI,{label:i,children:v}),r[16]=i,r[17]=v,r[18]=y):y=r[18],y}));gI.displayName="ToolbarButton";const vI=()=>{const e=h.c(19);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={nonNull:!0,caller:vI},e[0]=t):t=e[0];const{queryEditor:n,setOperationName:r}=Qh(t);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={nonNull:!0,caller:vI},e[1]=i):i=e[1];const{isFetching:o,isSubscribed:s,operationName:a,run:l,stop:c}=em(i);let u;e[2]!==(null==n?void 0:n.operations)?(u=(null==n?void 0:n.operations)||[],e[2]=null==n?void 0:n.operations,e[3]=u):u=e[3];const d=u,f=d.length>1&&"string"!=typeof a,m=o||s,g=(m?"Stop":"Execute")+" query (Ctrl-Enter)";let v,y;e[4]!==m?(v=m?p.jsx(Fm,{}):p.jsx(Nm,{}),e[4]=m,e[5]=v):v=e[5],e[6]!==g||e[7]!==v?(y={type:"button",className:"graphiql-execute-button",children:v,"aria-label":g},e[6]=g,e[7]=v,e[8]=y):y=e[8];const b=y;let E;return e[9]!==b||e[10]!==f||e[11]!==m||e[12]!==g||e[13]!==d||e[14]!==n||e[15]!==l||e[16]!==r||e[17]!==c?(E=f&&!m?p.jsxs(Sw,{children:[p.jsx(mI,{label:g,children:p.jsx(Sw.Button,{...b})}),p.jsx(Sw.Content,{children:d.map(((e,t)=>{const i=e.name?e.name.value:`<Unnamed ${e.operation}>`;return p.jsx(Sw.Item,{onSelect:()=>{var t;const i=null==(t=e.name)?void 0:t.value;n&&i&&i!==n.operationName&&r(i),l()},children:i},`${i}-${t}`)}))})]}):p.jsx(mI,{label:g,children:p.jsx("button",{...b,onClick:()=>{m?c():l()}})}),e[9]=b,e[10]=f,e[11]=m,e[12]=g,e[13]=d,e[14]=n,e[15]=l,e[16]=r,e[17]=c,e[18]=E):E=e[18],E},yI=Object.assign((e=>{const t=h.c(20);let n,r,i,o,s,a,l,c,u;return t[0]!==e?(({button:n,children:r,label:i,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o):(n=t[1],r=t[2],i=t[3],o=t[4]),t[5]!==o.className?(s=$m("graphiql-un-styled graphiql-toolbar-menu",o.className),t[5]=o.className,t[6]=s):s=t[6],t[7]!==n||t[8]!==i||t[9]!==s?(a=p.jsx(Sw.Button,{className:s,"aria-label":i,children:n}),t[7]=n,t[8]=i,t[9]=s,t[10]=a):a=t[10],t[11]!==i||t[12]!==a?(l=p.jsx(mI,{label:i,children:a}),t[11]=i,t[12]=a,t[13]=l):l=t[13],t[14]!==r?(c=p.jsx(Sw.Content,{children:r}),t[14]=r,t[15]=c):c=t[15],t[16]!==o||t[17]!==l||t[18]!==c?(u=p.jsxs(Sw,{...o,children:[l,c]}),t[16]=o,t[17]=l,t[18]=c,t[19]=u):u=t[19],u}),{Item:Sw.Item}),bI=Object.freeze(Object.defineProperty({__proto__:null,ArgumentIcon:lm,Button:ig,ButtonGroup:og,ChevronDownIcon:cm,ChevronLeftIcon:um,ChevronUpIcon:dm,CloseIcon:fm,CopyIcon:pm,DeprecatedArgumentIcon:hm,DeprecatedEnumValueIcon:mm,DeprecatedFieldIcon:gm,Dialog:Fy,DialogRoot:Ry,DirectiveIcon:vm,DocsFilledIcon:ym,DocsIcon:bm,DropdownMenu:Sw,EditorContext:Kh,EditorContextProvider:Yh,EnumValueIcon:Em,ExecuteButton:vI,ExecutionContext:Jh,ExecutionContextProvider:Zh,FieldIcon:xm,GraphiQLProvider:om,HeaderEditor:Um,HistoryIcon:wm,ImagePreview:Hm,ImplementsIcon:Tm,KeyboardShortcutIcon:Cm,MagnifyingGlassIcon:Sm,MarkdownContent:kw,MergeIcon:km,PenIcon:_m,PlayIcon:Nm,PluginContextProvider:Ju,PlusIcon:Dm,PrettifyIcon:Am,QueryEditor:Wm,ReloadIcon:Im,ResponseEditor:Jm,RootTypeIcon:Om,SchemaContextProvider:td,SettingsIcon:Lm,Spinner:_w,StarFilledIcon:Mm,StarIcon:Rm,StopIcon:Fm,StorageContextProvider:Ru,Tab:MA,Tabs:RA,ToolbarButton:gI,ToolbarMenu:yI,Tooltip:mI,TooltipRoot:hI,TrashIcon:Pm,TypeIcon:jm,UnStyledButton:rg,VariableEditor:Zm,cn:$m,createBoundedUseStore:Lu,createContextHook:Du,createNullableContext:Nu,debounce:Zp,isMacOs:Bu,useAutoCompleteLeafs:ph,useCopyQuery:ch,useDragResize:eg,useEditorContext:Qh,useEditorState:hh,useExecutionContext:em,useHeaderEditor:gh,useHeadersEditorState:()=>hh("header"),useMergeQuery:uh,useOperationsEditorState:()=>hh("query"),useOptimisticState:function(t){const n=h.c(12),[r,i]=t;let o;n[0]!==r?(o={pending:null,last:r},n[0]=r,n[1]=o):o=n[1];const s=e.useRef(o),[a,l]=e.useState(r);let c,u,d;n[2]!==a||n[3]!==i||n[4]!==r?(c=()=>{s.current.last===r||(s.current.last=r,null===s.current.pending?l(r):s.current.pending===r?(s.current.pending=null,r!==a&&(s.current.pending=a,i(a))):(s.current.pending=null,l(r)))},u=[r,a,i],n[2]=a,n[3]=i,n[4]=r,n[5]=c,n[6]=u):(c=n[5],u=n[6]),e.useEffect(c,u),n[7]!==i?(d=e=>{l(e),null===s.current.pending&&s.current.last!==e&&(s.current.pending=e,i(e))},n[7]=i,n[8]=d):d=n[8];const f=d;let p;return n[9]!==f||n[10]!==a?(p=[a,f],n[9]=f,n[10]=a,n[11]=p):p=n[11],p},usePluginStore:Zu,usePrettifyEditors:fh,useQueryEditor:Th,useResponseEditor:Qm,useSchemaStore:nd,useStorage:Pu,useTheme:sm,useVariableEditor:qh,useVariablesEditorState:()=>hh("variable")},Symbol.toStringTag,{value:"Module"})),EI=Iu(((e,t)=>({historyStorage:null,actions:{addToHistory(n){const{historyStorage:r}=t();r.updateHistory(n),e({})},editLabel(n,r){const{historyStorage:i}=t();i.editLabel(n,r),e({})},toggleFavorite(n){const{historyStorage:r}=t();r.toggleFavorite(n),e({})},setActive:e=>e,deleteFromHistory(n,r){const{historyStorage:i}=t();i.deleteHistory(n,r),e({})}}}))),xI=t=>{const n=h.c(12),{maxHistoryLength:r,children:i}=t,o=void 0===r?20:r;let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s={nonNull:!0},n[0]=s):s=n[0];const{isFetching:a}=em(s);let l;n[1]===Symbol.for("react.memo_cache_sentinel")?(l={nonNull:!0},n[1]=l):l=n[1];const{tabs:c,activeTabIndex:u}=Qh(l),d=c[u],f=Pu();let p;n[2]!==o||n[3]!==f?(p=new Vs(f,o),n[2]=o,n[3]=f,n[4]=p):p=n[4];const m=p;let g,v,y,b;return n[5]!==m?(g=()=>{EI.setState({historyStorage:m})},v=[m],n[5]=m,n[6]=g,n[7]=v):(g=n[6],v=n[7]),e.useEffect(g,v),n[8]!==d||n[9]!==a?(y=()=>{if(!a)return;const{addToHistory:e}=EI.getState().actions;e({query:d.query??void 0,variables:d.variables??void 0,headers:d.headers??void 0,operationName:d.operationName??void 0})},b=[a,d],n[8]=d,n[9]=a,n[10]=y,n[11]=b):(y=n[10],b=n[11]),e.useEffect(y,b),i},wI=Lu(EI),TI=()=>wI(SI);function CI(e){return e.historyStorage.queries}function SI(e){return e.actions}const kI=t=>{const n=h.c(39),{editLabel:r,toggleFavorite:i,deleteFromHistory:o,setActive:s}=TI();let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a={nonNull:!0,caller:kI},n[0]=a):a=n[0];const{headerEditor:l,queryEditor:c,variableEditor:u}=Qh(a),d=e.useRef(null),f=e.useRef(null),[m,g]=e.useState(!1);let v,y,b;var E;n[1]!==m?(v=()=>{var e;m&&(null==(e=d.current)||e.focus())},y=[m],n[1]=m,n[2]=v,n[3]=y):(v=n[2],y=n[3]),e.useEffect(v,y),n[4]!==t.item.label||n[5]!==t.item.operationName||n[6]!==t.item.query?(b=t.item.label||t.item.operationName||(null==(E=t.item.query)?void 0:E.split("\n").map((e=>e.replace(/#(.*)/,""))).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")),n[4]=t.item.label,n[5]=t.item.operationName,n[6]=t.item.query,n[7]=b):b=n[7];const x=b;let w;n[8]!==r||n[9]!==t.item?(w=()=>{var e;g(!1);const{index:n,...i}=t.item;r({...i,label:null==(e=d.current)?void 0:e.value},n)},n[8]=r,n[9]=t.item,n[10]=w):w=n[10];const T=w;let C;n[11]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{g(!1)},n[11]=C):C=n[11];const S=C;let k;n[12]===Symbol.for("react.memo_cache_sentinel")?(k=e=>{e.stopPropagation(),g(!0)},n[12]=k):k=n[12];const _=k;let N;n[13]!==l||n[14]!==t.item||n[15]!==c||n[16]!==s||n[17]!==u?(N=()=>{const{query:e,variables:n,headers:r}=t.item;null==c||c.setValue(e??""),null==u||u.setValue(n??""),null==l||l.setValue(r??""),s(t.item)},n[13]=l,n[14]=t.item,n[15]=c,n[16]=s,n[17]=u,n[18]=N):N=n[18];const D=N;let A;n[19]!==o||n[20]!==t.item?(A=e=>{e.stopPropagation(),o(t.item)},n[19]=o,n[20]=t.item,n[21]=A):A=n[21];const I=A;let O;n[22]!==t.item||n[23]!==i?(O=e=>{e.stopPropagation(),i(t.item)},n[22]=t.item,n[23]=i,n[24]=O):O=n[24];const L=O,M=m&&"editable";let R,F,P;return n[25]!==M?(R=$m("graphiql-history-item",M),n[25]=M,n[26]=R):R=n[26],n[27]!==x||n[28]!==r||n[29]!==I||n[30]!==D||n[31]!==T||n[32]!==L||n[33]!==m||n[34]!==t.item?(F=m?p.jsxs(p.Fragment,{children:[p.jsx("input",{type:"text",defaultValue:t.item.label,ref:d,onKeyDown:e=>{"Esc"===e.key?g(!1):"Enter"===e.key&&(g(!1),r({...t.item,label:e.currentTarget.value}))},placeholder:"Type a label"}),p.jsx(rg,{type:"button",ref:f,onClick:T,children:"Save"}),p.jsx(rg,{type:"button",ref:f,onClick:S,children:p.jsx(fm,{})})]}):p.jsxs(p.Fragment,{children:[p.jsx(mI,{label:"Set active",children:p.jsx(rg,{type:"button",className:"graphiql-history-item-label",onClick:D,"aria-label":"Set active",children:x})}),p.jsx(mI,{label:"Edit label",children:p.jsx(rg,{type:"button",className:"graphiql-history-item-action",onClick:_,"aria-label":"Edit label",children:p.jsx(_m,{"aria-hidden":"true"})})}),p.jsx(mI,{label:t.item.favorite?"Remove favorite":"Add favorite",children:p.jsx(rg,{type:"button",className:"graphiql-history-item-action",onClick:L,"aria-label":t.item.favorite?"Remove favorite":"Add favorite",children:t.item.favorite?p.jsx(Mm,{"aria-hidden":"true"}):p.jsx(Rm,{"aria-hidden":"true"})})}),p.jsx(mI,{label:"Delete from history",children:p.jsx(rg,{type:"button",className:"graphiql-history-item-action",onClick:I,"aria-label":"Delete from history",children:p.jsx(Pm,{"aria-hidden":"true"})})})]}),n[27]=x,n[28]=r,n[29]=I,n[30]=D,n[31]=T,n[32]=L,n[33]=m,n[34]=t.item,n[35]=F):F=n[35],n[36]!==R||n[37]!==F?(P=p.jsx("li",{className:R,children:F}),n[36]=R,n[37]=F,n[38]=P):P=n[38],P};function _I(e,t){return{...e,index:t}}function NI(e){return e.favorite}function DI(e){return!e.favorite}function AI(e){return p.jsx(kI,{item:e},e.index)}function II(e){return p.jsx(kI,{item:e},e.index)}const OI={title:"History",icon:wm,content:()=>{const t=h.c(13),n=wI(CI),{deleteFromHistory:r}=TI();let i;i=n.slice().map(_I).reverse();const o=i.filter(NI);o.length&&(i=i.filter(DI));const[s,a]=e.useState(null);let l,c;t[0]!==s?(l=()=>{s&&setTimeout((()=>{a(null)}),2e3)},c=[s],t[0]=s,t[1]=l,t[2]=c):(l=t[1],c=t[2]),e.useEffect(l,c);const u=Boolean(o.length),d=Boolean(i.length),f=(s||d)&&p.jsx(ig,{type:"button",state:s||void 0,disabled:!i.length,onClick:()=>{try{!function(e,t){for(const n of e)t(n,!0)}(i,r),a("success")}catch{a("error")}},children:{success:"Cleared",error:"Failed to Clear"}[s]||"Clear"});let m;t[3]!==f?(m=p.jsxs("div",{className:"graphiql-history-header",children:["History",f]}),t[3]=f,t[4]=m):m=t[4];const g=u&&p.jsx("ul",{className:"graphiql-history-items",children:o.map(AI)});let v;t[5]!==u||t[6]!==d?(v=u&&d&&p.jsx("div",{className:"graphiql-history-item-spacer"}),t[5]=u,t[6]=d,t[7]=v):v=t[7];const y=d&&p.jsx("ul",{className:"graphiql-history-items",children:i.map(II)});let b;return t[8]!==m||t[9]!==g||t[10]!==v||t[11]!==y?(b=p.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[m,g,v,y]}),t[8]=m,t[9]=g,t[10]=v,t[11]=y,t[12]=b):b=t[12],b}},LI=[{name:"Docs"}],MI=Iu(((e,t)=>({explorerNavStack:LI,actions:{push(t){e((e=>{const n=e.explorerNavStack;return{explorerNavStack:n.at(-1).def===t.def?n:[...n,t]}}))},pop(){e((e=>{const t=e.explorerNavStack;return{explorerNavStack:t.length>1?t.slice(0,-1):t}}))},reset(){e((e=>{const t=e.explorerNavStack;return{explorerNavStack:1===t.length?t:LI}}))},resolveSchemaReferenceToNavItem(e){if(!e)return;const{push:n}=t().actions;switch(e.kind){case"Type":n({name:e.type.name,def:e.type});break;case"Field":n({name:e.field.name,def:e.field});break;case"Argument":e.field&&n({name:e.field.name,def:e.field});break;case"EnumValue":e.type&&n({name:e.type.name,def:e.type})}},rebuildNavStackWithSchema(t){e((e=>{const n=e.explorerNavStack;if(1===n.length)return e;const r=[...LI];let i=null;for(const o of n)if(o!==LI[0])if(o.def)if(Ht(o.def)){const e=t.getType(o.def.name);if(!e)break;r.push({name:o.name,def:e}),i=e}else{if(null===i)break;if(wt(i)||Nt(i)){const e=i.getFields()[o.name];if(!e)break;r.push({name:o.name,def:e})}else{if(xt(i)||_t(i)||Ct(i)||kt(i))break;{const e=i;if(!e.args.some((e=>e.name===o.name)))break;r.push({name:o.name,def:e})}}}else i=null,r.push(o);return{explorerNavStack:r}}))}}}))),RI=t=>{const n=h.c(7),{children:r}=t,{schema:i,validationErrors:o,schemaReference:s}=nd();let a,l,c,u;return n[0]!==s?(a=()=>{const{resolveSchemaReferenceToNavItem:e}=MI.getState().actions;e(s)},l=[s],n[0]=s,n[1]=a,n[2]=l):(a=n[1],l=n[2]),e.useEffect(a,l),n[3]!==i||n[4]!==o?(c=()=>{const{reset:e,rebuildNavStackWithSchema:t}=MI.getState().actions;null==i||o.length>0?e():t(i)},u=[i,o],n[3]=i,n[4]=o,n[5]=c,n[6]=u):(c=n[5],u=n[6]),e.useEffect(c,u),r},FI=Lu(MI),PI=()=>FI(VI),jI=()=>FI(BI);function VI(e){return e.explorerNavStack}function BI(e){return e.actions}const $I=e=>{const t=h.c(12),{field:n}=e;if(!("defaultValue"in n)||void 0===n.defaultValue)return null;const r=n.defaultValue,i=n.type;let o,s,a,l,c,u;if(t[0]!==n.defaultValue||t[1]!==n.type){l=Symbol.for("react.early_return_sentinel");{const e=Fn(r,i);e?(a=" = ",o="graphiql-doc-explorer-default-value",s=(e=>e?ut(e):"")(e)):l=null}t[0]=n.defaultValue,t[1]=n.type,t[2]=o,t[3]=s,t[4]=a,t[5]=l}else o=t[2],s=t[3],a=t[4],l=t[5];return l!==Symbol.for("react.early_return_sentinel")?l:(t[6]!==o||t[7]!==s?(c=p.jsx("span",{className:o,children:s}),t[6]=o,t[7]=s,t[8]=c):c=t[8],t[9]!==a||t[10]!==c?(u=p.jsxs(p.Fragment,{children:[a,c]}),t[9]=a,t[10]=c,t[11]=u):u=t[11],u)};function UI(e,t){return At(e)?p.jsxs(p.Fragment,{children:[UI(e.ofType,t),"!"]}):Dt(e)?p.jsxs(p.Fragment,{children:["[",UI(e.ofType,t),"]"]}):t(e)}const HI=e=>{const t=h.c(5),{type:n}=e,{push:r}=jI();if(!n)return null;let i,o;return t[0]!==r?(i=e=>p.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:t=>{t.preventDefault(),r({name:e.name,def:e})},href:"#",children:e.name}),t[0]=r,t[1]=i):i=t[1],t[2]!==i||t[3]!==n?(o=UI(n,i),t[2]=i,t[3]=n,t[4]=o):o=t[4],o},qI=e=>{const t=h.c(19),{arg:n,showDefaultValue:r,inline:i}=e;let o,s,a,l;t[0]!==n.name?(o=p.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:n.name}),t[0]=n.name,t[1]=o):o=t[1],t[2]!==n.type?(s=p.jsx(HI,{type:n.type}),t[2]=n.type,t[3]=s):s=t[3],t[4]!==n||t[5]!==r?(a=!1!==r&&p.jsx($I,{field:n}),t[4]=n,t[5]=r,t[6]=a):a=t[6],t[7]!==o||t[8]!==s||t[9]!==a?(l=p.jsxs("span",{children:[o,": ",s,a]}),t[7]=o,t[8]=s,t[9]=a,t[10]=l):l=t[10];const c=l;if(i)return c;let u,d,f;return t[11]!==n.description?(u=n.description?p.jsx(kw,{type:"description",children:n.description}):null,t[11]=n.description,t[12]=u):u=t[12],t[13]!==n.deprecationReason?(d=n.deprecationReason?p.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[p.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),p.jsx(kw,{type:"deprecation",children:n.deprecationReason})]}):null,t[13]=n.deprecationReason,t[14]=d):d=t[14],t[15]!==c||t[16]!==u||t[17]!==d?(f=p.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[c,u,d]}),t[15]=c,t[16]=u,t[17]=d,t[18]=f):f=t[18],f},WI=e=>{const t=h.c(3);let n;return t[0]!==e.children||t[1]!==e.preview?(n=e.children?p.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[p.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),p.jsx(kw,{type:"deprecation",onlyShowFirstChild:e.preview??!0,children:e.children})]}):null,t[0]=e.children,t[1]=e.preview,t[2]=n):n=t[2],n},zI=e=>{const t=h.c(2),{directive:n}=e;let r;return t[0]!==n.name.value?(r=p.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",n.name.value]}),t[0]=n.name.value,t[1]=r):r=t[1],r},GI=e=>{const t=h.c(10),{title:n,children:r}=e,i=KI[n];let o,s,a,l;return t[0]!==i?(o=p.jsx(i,{}),t[0]=i,t[1]=o):o=t[1],t[2]!==o||t[3]!==n?(s=p.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[o,n]}),t[2]=o,t[3]=n,t[4]=s):s=t[4],t[5]!==r?(a=p.jsx("div",{className:"graphiql-doc-explorer-section-content",children:r}),t[5]=r,t[6]=a):a=t[6],t[7]!==s||t[8]!==a?(l=p.jsxs("div",{children:[s,a]}),t[7]=s,t[8]=a,t[9]=l):l=t[9],l},KI={Arguments:lm,"Deprecated Arguments":hm,"Deprecated Enum Values":mm,"Deprecated Fields":gm,Directives:vm,"Enum Values":Em,Fields:xm,Implements:Tm,Implementations:jm,"Possible Types":jm,"Root Types":Om,Type:jm,"All Schema Types":jm},YI=e=>{const t=h.c(15),{field:n}=e;let r,i,o,s,a,l;return t[0]!==n.description?(r=n.description?p.jsx(kw,{type:"description",children:n.description}):null,t[0]=n.description,t[1]=r):r=t[1],t[2]!==n.deprecationReason?(i=p.jsx(WI,{preview:!1,children:n.deprecationReason}),t[2]=n.deprecationReason,t[3]=i):i=t[3],t[4]!==n.type?(o=p.jsx(GI,{title:"Type",children:p.jsx(HI,{type:n.type})}),t[4]=n.type,t[5]=o):o=t[5],t[6]!==n?(s=p.jsx(QI,{field:n}),a=p.jsx(XI,{field:n}),t[6]=n,t[7]=s,t[8]=a):(s=t[7],a=t[8]),t[9]!==r||t[10]!==i||t[11]!==o||t[12]!==s||t[13]!==a?(l=p.jsxs(p.Fragment,{children:[r,i,o,s,a]}),t[9]=r,t[10]=i,t[11]=o,t[12]=s,t[13]=a,t[14]=l):l=t[14],l},QI=t=>{const n=h.c(12),{field:r}=t,[i,o]=e.useState(!1);let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{o(!0)},n[0]=s):s=n[0];const a=s;if(!("args"in r))return null;let l,c,u,d,f;if(n[1]!==r.args){l=[],c=[];for(const e of r.args)e.deprecationReason?c.push(e):l.push(e);u=l.length>0?p.jsx(GI,{title:"Arguments",children:l.map(JI)}):null,n[1]=r.args,n[2]=l,n[3]=c,n[4]=u}else l=n[2],c=n[3],u=n[4];return n[5]!==l.length||n[6]!==c||n[7]!==i?(d=c.length>0?i||0===l.length?p.jsx(GI,{title:"Deprecated Arguments",children:c.map(ZI)}):p.jsx(ig,{type:"button",onClick:a,children:"Show Deprecated Arguments"}):null,n[5]=l.length,n[6]=c,n[7]=i,n[8]=d):d=n[8],n[9]!==u||n[10]!==d?(f=p.jsxs(p.Fragment,{children:[u,d]}),n[9]=u,n[10]=d,n[11]=f):f=n[11],f},XI=e=>{var t;const n=h.c(4),{field:r}=e,i=null==(t=r.astNode)?void 0:t.directives;if(!(null==i?void 0:i.length))return null;let o,s;return n[0]!==i?(o=i.map(eO),n[0]=i,n[1]=o):o=n[1],n[2]!==o?(s=p.jsx(GI,{title:"Directives",children:o}),n[2]=o,n[3]=s):s=n[3],s};function JI(e){return p.jsx(qI,{arg:e},e.name)}function ZI(e){return p.jsx(qI,{arg:e},e.name)}function eO(e){return p.jsx("div",{children:p.jsx(zI,{directive:e})},e.name.value)}const tO=e=>{var t,n;const r=h.c(39),{schema:i}=e;let o;r[0]!==i?(o=i.getQueryType(),r[0]=i,r[1]=o):o=r[1];const s=o;let a;r[2]!==i?(a=null==(t=i.getMutationType)?void 0:t.call(i),r[2]=i,r[3]=a):a=r[3];const l=a;let c;r[4]!==i?(c=null==(n=i.getSubscriptionType)?void 0:n.call(i),r[4]=i,r[5]=c):c=r[5];const u=c;let d,f,m,g,v,y,b;if(r[6]!==l||r[7]!==s||r[8]!==i||r[9]!==u){const e=i.getTypeMap(),t=null==s?void 0:s.name,n=null==l?void 0:l.name,o=null==u?void 0:u.name;let a;r[15]!==o||r[16]!==t||r[17]!==n?(a=[t,n,o],r[15]=o,r[16]=t,r[17]=n,r[18]=a):a=r[18];const c=a,h=i.description||"A GraphQL schema provides a root type for each kind of operation.";let y,b,E;r[19]!==h?(g=p.jsx(kw,{type:"description",children:h}),r[19]=h,r[20]=g):g=r[20],r[21]!==s?(y=s?p.jsxs("div",{children:[p.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",p.jsx(HI,{type:s})]}):null,r[21]=s,r[22]=y):y=r[22],r[23]!==l?(b=l&&p.jsxs("div",{children:[p.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",p.jsx(HI,{type:l})]}),r[23]=l,r[24]=b):b=r[24],r[25]!==u?(E=u&&p.jsxs("div",{children:[p.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",p.jsx(HI,{type:u})]}),r[25]=u,r[26]=E):E=r[26],r[27]!==y||r[28]!==b||r[29]!==E?(v=p.jsxs(GI,{title:"Root Types",children:[y,b,E]}),r[27]=y,r[28]=b,r[29]=E,r[30]=v):v=r[30],d=GI,f="All Schema Types",m=e&&p.jsx("div",{children:Object.values(e).map((e=>c.includes(e.name)||e.name.startsWith("__")?null:p.jsx("div",{children:p.jsx(HI,{type:e})},e.name)))}),r[6]=l,r[7]=s,r[8]=i,r[9]=u,r[10]=d,r[11]=f,r[12]=m,r[13]=g,r[14]=v}else d=r[10],f=r[11],m=r[12],g=r[13],v=r[14];return r[31]!==d||r[32]!==f||r[33]!==m?(y=p.jsx(d,{title:f,children:m}),r[31]=d,r[32]=f,r[33]=m,r[34]=y):y=r[34],r[35]!==g||r[36]!==v||r[37]!==y?(b=p.jsxs(p.Fragment,{children:[g,v,y]}),r[35]=g,r[36]=v,r[37]=y,r[38]=b):b=r[38],b},nO="undefined"!=typeof document?e.useLayoutEffect:()=>{};const rO=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},iO=e=>{if(e&&"window"in e&&e.window===e)return e;return rO(e).defaultView||window};function oO(e){return null!==(t=e)&&"object"==typeof t&&"nodeType"in t&&"number"==typeof t.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e;var t}let sO=!1;function aO(){return sO}function lO(e,t){if(!aO())return!(!t||!e)&&e.contains(t);if(!e||!t)return!1;let n=t;for(;null!==n;){if(n===e)return!0;n="SLOT"===n.tagName&&n.assignedSlot?n.assignedSlot.parentNode:oO(n)?n.host:n.parentNode}return!1}const cO=(e=document)=>{var t;if(!aO())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(null===(t=n.shadowRoot)||void 0===t?void 0:t.activeElement);)n=n.shadowRoot.activeElement;return n};function uO(e){return aO()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function dO(e){let t=null;return()=>(null==t&&(t=e()),t)}const fO=dO((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),pO=dO((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));function hO(){let t=e.useRef(new Map),n=e.useCallback(((e,n,r,i)=>{let o=(null==i?void 0:i.once)?(...e)=>{t.current.delete(r),r(...e)}:r;t.current.set(r,{type:n,eventTarget:e,fn:o,options:i}),e.addEventListener(n,o,i)}),[]),r=e.useCallback(((e,n,r,i)=>{var o;let s=(null===(o=t.current.get(r))||void 0===o?void 0:o.fn)||r;e.removeEventListener(n,s,i),t.current.delete(r)}),[]),i=e.useCallback((()=>{t.current.forEach(((e,t)=>{r(e.eventTarget,e.type,t,e.options)}))}),[r]);return e.useEffect((()=>i),[i]),{addGlobalListener:n,removeGlobalListener:r,removeAllGlobalListeners:i}}function mO(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function gO(t){let n=e.useRef({isFocused:!1,observer:null});nO((()=>{const e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(t){const n=e.useRef(null);return nO((()=>{n.current=t}),[t]),e.useCallback(((...e)=>{const t=n.current;return null==t?void 0:t(...e)}),[])}((e=>{null==t||t(e)}));return e.useCallback((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let t=e.target,i=e=>{if(n.current.isFocused=!1,t.disabled){let t=mO(e);r(t)}n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)};t.addEventListener("focusout",i,{once:!0}),n.current.observer=new MutationObserver((()=>{if(n.current.isFocused&&t.disabled){var e;null===(e=n.current.observer)||void 0===e||e.disconnect();let r=t===document.activeElement?null:document.activeElement;t.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}})),n.current.observer.observe(t,{attributes:!0,attributeFilter:["disabled"]})}}),[r])}let vO=!1,yO=null,bO=new Set,EO=new Map,xO=!1,wO=!1;const TO={Tab:!0,Escape:!0};function CO(e,t){for(let n of bO)n(e,t)}function SO(e){xO=!0,function(e){return!(e.metaKey||!fO()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(yO="keyboard",CO("keyboard",e))}function kO(e){yO="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(xO=!0,CO("pointer",e))}function _O(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(pO()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(xO=!0,yO="virtual")}function NO(e){e.target!==window&&e.target!==document&&!vO&&e.isTrusted&&(xO||wO||(yO="virtual",CO("virtual",e)),xO=!1,wO=!1)}function DO(){xO=!1,wO=!0}function AO(e){if("undefined"==typeof window||EO.get(iO(e)))return;const t=iO(e),n=rO(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){xO=!0,r.apply(this,arguments)},n.addEventListener("keydown",SO,!0),n.addEventListener("keyup",SO,!0),n.addEventListener("click",_O,!0),t.addEventListener("focus",NO,!0),t.addEventListener("blur",DO,!1),"undefined"!=typeof PointerEvent&&(n.addEventListener("pointerdown",kO,!0),n.addEventListener("pointermove",kO,!0),n.addEventListener("pointerup",kO,!0)),t.addEventListener("beforeunload",(()=>{IO(e)}),{once:!0}),EO.set(t,{focus:r})}const IO=(e,t)=>{const n=iO(e),r=rO(e);t&&r.removeEventListener("DOMContentLoaded",t),EO.has(n)&&(n.HTMLElement.prototype.focus=EO.get(n).focus,r.removeEventListener("keydown",SO,!0),r.removeEventListener("keyup",SO,!0),r.removeEventListener("click",_O,!0),n.removeEventListener("focus",NO,!0),n.removeEventListener("blur",DO,!1),"undefined"!=typeof PointerEvent&&(r.removeEventListener("pointerdown",kO,!0),r.removeEventListener("pointermove",kO,!0),r.removeEventListener("pointerup",kO,!0)),EO.delete(n))};function OO(){return"pointer"!==yO}"undefined"!=typeof document&&function(e){const t=rO(e);let n;"loading"!==t.readyState?AO(e):(n=()=>{AO(e)},t.addEventListener("DOMContentLoaded",n))}();const LO=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function MO(t,n,r){AO(),e.useEffect((()=>{let e=(e,n)=>{(function(e,t,n){let r=rO(null==n?void 0:n.target);const i="undefined"!=typeof window?iO(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?iO(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?iO(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?iO(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||r.activeElement instanceof i&&!LO.has(r.activeElement.type)||r.activeElement instanceof o||r.activeElement instanceof s&&r.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof a&&!TO[n.key])})(!!(null==r?void 0:r.isTextInput),e,n)&&t(OO())};return bO.add(e),()=>{bO.delete(e)}}),n)}function RO(t){let{isDisabled:n,onBlurWithin:r,onFocusWithin:i,onFocusWithinChange:o}=t,s=e.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:l}=hO(),c=e.useCallback((e=>{e.currentTarget.contains(e.target)&&s.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(s.current.isFocusWithin=!1,l(),r&&r(e),o&&o(!1))}),[r,o,s,l]),u=gO(c),d=e.useCallback((e=>{if(!e.currentTarget.contains(e.target))return;const t=rO(e.target),n=cO(t);if(!s.current.isFocusWithin&&n===uO(e.nativeEvent)){i&&i(e),o&&o(!0),s.current.isFocusWithin=!0,u(e);let n=e.currentTarget;a(t,"focus",(e=>{if(s.current.isFocusWithin&&!lO(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});!function(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}(r,n);let i=mO(r);c(i)}}),{capture:!0})}}),[i,o,u,a,c]);return n?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}let FO=!1,PO=0;function jO(e){"touch"===e.pointerType&&(FO=!0,setTimeout((()=>{FO=!1}),50))}function VO(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent&&document.addEventListener("pointerup",jO),PO++,()=>{PO--,PO>0||"undefined"!=typeof PointerEvent&&document.removeEventListener("pointerup",jO)}}function BO(t){let{onHoverStart:n,onHoverChange:r,onHoverEnd:i,isDisabled:o}=t,[s,a]=e.useState(!1),l=e.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;e.useEffect(VO,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=hO(),{hoverProps:d,triggerHoverEnd:f}=e.useMemo((()=>{let e=(e,t)=>{let n=l.target;l.pointerType="",l.target=null,"touch"!==t&&l.isHovered&&n&&(l.isHovered=!1,u(),i&&i({type:"hoverend",target:n,pointerType:t}),r&&r(!1),a(!1))},t={};return"undefined"!=typeof PointerEvent&&(t.onPointerEnter=t=>{FO&&"mouse"===t.pointerType||((t,i)=>{if(l.pointerType=i,o||"touch"===i||l.isHovered||!t.currentTarget.contains(t.target))return;l.isHovered=!0;let s=t.currentTarget;l.target=s,c(rO(t.target),"pointerover",(t=>{l.isHovered&&l.target&&!lO(l.target,t.target)&&e(t,t.pointerType)}),{capture:!0}),n&&n({type:"hoverstart",target:s,pointerType:i}),r&&r(!0),a(!0)})(t,t.pointerType)},t.onPointerLeave=t=>{!o&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:t,triggerHoverEnd:e}}),[n,r,i,o,l,c,u]);return e.useEffect((()=>{o&&f({currentTarget:l.target},l.pointerType)}),[o]),{hoverProps:d,isHovered:s}}function $O(t={}){let{autoFocus:n=!1,isTextInput:r,within:i}=t,o=e.useRef({isFocused:!1,isFocusVisible:n||OO()}),[s,a]=e.useState(!1),[l,c]=e.useState((()=>o.current.isFocused&&o.current.isFocusVisible)),u=e.useCallback((()=>c(o.current.isFocused&&o.current.isFocusVisible)),[]),d=e.useCallback((e=>{o.current.isFocused=e,a(e),u()}),[u]);MO((e=>{o.current.isFocusVisible=e,u()}),[],{isTextInput:r});let{focusProps:f}=function(t){let{isDisabled:n,onFocus:r,onBlur:i,onFocusChange:o}=t;const s=e.useCallback((e=>{if(e.target===e.currentTarget)return i&&i(e),o&&o(!1),!0}),[i,o]),a=gO(s),l=e.useCallback((e=>{const t=rO(e.target),n=t?cO(t):cO();e.target===e.currentTarget&&n===uO(e.nativeEvent)&&(r&&r(e),o&&o(!0),a(e))}),[o,r,a]);return{focusProps:{onFocus:!n&&(r||o||i)?l:void 0,onBlur:n||!i&&!o?void 0:s}}}({isDisabled:i,onFocusChange:d}),{focusWithinProps:p}=RO({isDisabled:!i,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:i?p:f}}var UO=Object.defineProperty,HO=(e,t,n)=>(((e,t,n)=>{t in e?UO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let qO=new class{constructor(){HO(this,"current",this.detect()),HO(this,"handoffState","pending"),HO(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function WO(e){var t,n;return qO.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?null!=(n=null==(t=e.current)?void 0:t.ownerDocument)?n:document:null:document}function zO(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function GO(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return zO((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=GO();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function KO(){let[t]=e.useState(GO);return e.useEffect((()=>()=>t.dispose()),[t]),t}let YO=(t,n)=>{qO.isServer?e.useEffect(t,n):e.useLayoutEffect(t,n)};function QO(t){let n=e.useRef(t);return YO((()=>{n.current=t}),[t]),n}let XO=function(t){let n=QO(t);return e.useCallback(((...e)=>n.current(...e)),[n])};let JO=e.createContext(void 0);function ZO(){return e.useContext(JO)}function eL(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function tL(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,tL),r}var nL,rL,iL=((rL=iL||{})[rL.None=0]="None",rL[rL.RenderStrategy=1]="RenderStrategy",rL[rL.Static=2]="Static",rL),oL=((nL=oL||{})[nL.Unmount=0]="Unmount",nL[nL.Hidden=1]="Hidden",nL);function sL(){let t=function(){let t=e.useRef([]),n=e.useCallback((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}),[]);return(...e)=>{if(!e.every((e=>null==e)))return t.current=e,n}}();return e.useCallback((e=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s,mergeRefs:a}){a=null!=a?a:lL;let l=cL(t,e);if(o)return aL(l,n,r,s,a);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=l;if(e)return aL(t,n,r,s,a)}if(1&c){let{unmount:e=!0,...t}=l;return tL(e?0:1,{0:()=>null,1:()=>aL({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return aL(l,n,r,s,a)}({mergeRefs:t,...e})),[t])}function aL(t,n={},r,i,o){let{as:s=r,children:a,refName:l="ref",...c}=pL(t,["unmount","static"]),u=void 0!==t.ref?{[l]:t.ref}:{},d="function"==typeof a?a(n):a;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(n)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let f={};if(n){let e=!1,t=[];for(let[r,i]of Object.entries(n))"boolean"==typeof i&&(e=!0),!0===i&&t.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){f["data-headlessui-state"]=t.join(" ");for(let e of t)f[`data-${e}`]=""}}if(s===e.Fragment&&(Object.keys(fL(c)).length>0||Object.keys(fL(f)).length>0)){if(e.isValidElement(d)&&!(Array.isArray(d)&&d.length>1)){let t=d.props,n=null==t?void 0:t.className,r="function"==typeof n?(...e)=>eL(n(...e),c.className):eL(n,c.className),i=r?{className:r}:{},s=cL(d.props,fL(pL(c,["ref"])));for(let e in f)e in s&&delete f[e];return e.cloneElement(d,Object.assign({},s,f,u,{ref:o(hL(d),u.ref)},i))}if(Object.keys(fL(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(fL(c)).concat(Object.keys(fL(f))).map((e=>`  - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>`  - ${e}`)).join("\n")].join("\n"))}return e.createElement(s,Object.assign({},pL(c,["ref"]),s!==e.Fragment&&u,s!==e.Fragment&&f),d)}function lL(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function cL(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function uL(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let r in n)Object.assign(t,{[r](...e){let t=n[r];for(let n of t)null==n||n(...e)}});return t}function dL(t){var n;return Object.assign(e.forwardRef(t),{displayName:null!=(n=t.displayName)?n:t.name})}function fL(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function pL(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function hL(t){return e.version.split(".")[0]>="19"?t.props.ref:t.ref}function mL(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))vL(n,gL(t,r),i);return n}function gL(e,t){return e?e+"["+t+"]":t}function vL(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())vL(e,gL(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):mL(n,t,e)}var yL=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(yL||{});let bL=dL((function(e,t){var n;let{features:r=1,...i}=e,o={ref:t,"aria-hidden":2==(2&r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:4==(4&r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&r)&&2!=(2&r)&&{display:"none"}}};return sL()({ourProps:o,theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),EL=e.createContext(null);function xL({children:n}){let r=e.useContext(EL);if(!r)return e.createElement(e.Fragment,null,n);let{target:i}=r;return i?t.createPortal(e.createElement(e.Fragment,null,n),i):null}function wL({data:t,form:n,disabled:r,onReset:i,overrides:o}){let[s,a]=e.useState(null),l=KO();return e.useEffect((()=>{if(i&&s)return l.addEventListener(s,"reset",i)}),[s,n,i]),e.createElement(xL,null,e.createElement(TL,{setForm:a,formId:n}),mL(t).map((([t,i])=>e.createElement(bL,{features:yL.Hidden,...fL({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:r,name:t,value:i,...o})}))))}function TL({setForm:t,formId:n}){return e.useEffect((()=>{if(n){let e=document.getElementById(n);e&&t(e)}}),[t,n]),n?null:e.createElement(bL,{features:yL.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&t(n)}})}let CL=e.createContext(void 0);function SL(){return e.useContext(CL)}function kL(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}let _L=Symbol();function NL(...t){let n=e.useRef(t);e.useEffect((()=>{n.current=t}),[t]);let r=XO((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return t.every((e=>null==e||(null==e?void 0:e[_L])))?void 0:r}let DL=e.createContext(null);function AL(){let t=e.useContext(DL);if(null===t){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,AL),e}return t}DL.displayName="DescriptionContext";let IL=dL((function(t,n){let r=e.useId(),i=ZO(),{id:o=`headlessui-description-${r}`,...s}=t,a=AL(),l=NL(n);YO((()=>a.register(o)),[o,a.register]);let c=i||!1,u=e.useMemo((()=>({...a.slot,disabled:c})),[a.slot,c]),d={ref:l,...a.props,id:o};return sL()({ourProps:d,theirProps:s,slot:u,defaultTag:"p",name:a.name||"Description"})}));Object.assign(IL,{});var OL,LL=((OL=LL||{}).Space=" ",OL.Enter="Enter",OL.Escape="Escape",OL.Backspace="Backspace",OL.Delete="Delete",OL.ArrowLeft="ArrowLeft",OL.ArrowUp="ArrowUp",OL.ArrowRight="ArrowRight",OL.ArrowDown="ArrowDown",OL.Home="Home",OL.End="End",OL.PageUp="PageUp",OL.PageDown="PageDown",OL.Tab="Tab",OL);let ML=e.createContext(null);function RL(){let t=e.useContext(ML);if(null===t){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,RL),e}return t}function FL(t){var n,r,i;let o=null!=(r=null==(n=e.useContext(ML))?void 0:n.value)?r:void 0;return(null!=(i=null==t?void 0:t.length)?i:0)>0?[o,...t].filter(Boolean).join(" "):o}ML.displayName="LabelContext";let PL=dL((function(t,n){var r;let i=e.useId(),o=RL(),s=SL(),a=ZO(),{id:l=`headlessui-label-${i}`,htmlFor:c=(null!=s?s:null==(r=o.props)?void 0:r.htmlFor),passive:u=!1,...d}=t,f=NL(n);YO((()=>o.register(l)),[l,o.register]);let p=XO((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),o.props&&"onClick"in o.props&&"function"==typeof o.props.onClick&&o.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,m=e.useMemo((()=>({...o.slot,disabled:h})),[o.slot,h]),g={ref:f,...o.props,id:l,htmlFor:c,onClick:p};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),sL()({ourProps:g,theirProps:d,slot:m,defaultTag:c?"label":"div",name:o.name||"Label"})})),jL=Object.assign(PL,{});function VL(e,t,n){let r,i=n.initialDeps??[];function o(){var o,s,a,l;let c;n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(c=Date.now());const u=e();if(!(u.length!==i.length||u.some(((e,t)=>i[t]!==e))))return r;let d;if(i=u,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(d=Date.now()),r=t(...u),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-d))/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}return o.updateDeps=e=>{i=e},o}function BL(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const $L=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,i)),n)}},UL=e=>e,HL=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},qL=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver((t=>{const r=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(n.getBoundingClientRect())};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()}));return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},WL={passive:!0},zL="undefined"==typeof window||"onscrollend"in window,GL=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const o=e.options.useScrollendEvent&&zL?()=>{}:$L(r,(()=>{t(i,!1)}),e.options.isScrollingResetDelay),s=r=>()=>{const{horizontal:s,isRtl:a}=e.options;i=s?n.scrollLeft*(a?-1:1):n.scrollTop,o(),t(i,r)},a=s(!0),l=s(!1);l(),n.addEventListener("scroll",a,WL);const c=e.options.useScrollendEvent&&zL;return c&&n.addEventListener("scrollend",l,WL),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},KL=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},YL=(e,{adjustments:t=0,behavior:n},r)=>{var i,o;const s=e+t;null==(o=null==(i=r.scrollElement)?void 0:i.scrollTo)||o.call(i,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class QL{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{const t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()}))})):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:UL,rangeExtractor:HL,onChange:()=>{},measureElement:KL,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=VL((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let i=t-1;i>=0;i--){const t=e[i];if(n.has(t.lane))continue;const o=r.get(t.lane);if(null==o||t.end>o.end?r.set(t.lane,t):t.end<o.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=VL((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,n,r,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i})),{key:!1}),this.getMeasurements=VL((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,s);for(let l=s;l<e;l++){const e=r(l),i=1===this.options.lanes?a[l-1]:this.getFurthestMeasurement(a,l),s=i?i.end+this.options.gap:t+n,c=o.get(e),u="number"==typeof c?c:this.options.estimateSize(l),d=s+u,f=i?i.lane:l%this.options.lanes;a[l]={index:l,start:s,size:u,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=VL((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes]),((e,t,n,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const i=e.length-1,o=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let s=XL(0,i,o,n),a=s;if(1===r)for(;a<i&&e[a].end<n+t;)a++;else if(r>1){const o=Array(r).fill(0);for(;a<i&&o.some((e=>e<n+t));){const t=e[a];o[t.lane]=t.end,a++}const l=Array(r).fill(n+t);for(;s>=0&&l.some((e=>e>=n));){const t=e[s];l[t.lane]=t.start,s--}s=Math.max(0,s-s%r),a=Math.min(i,a+(r-1-a%r))}return{startIndex:s,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=VL((()=>{let e=null,t=null;const n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]}),((e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;const i=r.key,o=this.elementsCache.get(i);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const r=t-(this.itemSizeCache.get(n.key)??n.size);0!==r&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=VL((()=>[this.getVirtualIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,i=e.length;r<i;r++){const i=t[e[r]];n.push(i)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return BL(t[XL(0,t.length-1,(e=>BL(t[e]).start),e)])},this.getOffsetForAlignment=(e,t,n=0)=>{const r=this.getSize(),i=this.getScrollOffset();"auto"===t&&(t=e>=i+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r);const o=this.options.horizontal?"scrollWidth":"scrollHeight",s=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-r;return Math.max(Math.min(s,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const r=this.getSize(),i=this.getScrollOffset();if("auto"===t)if(n.end>=i+r-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}const o="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(e,t);if(!r)return;const[i,o]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;if(this.elementsCache.has(this.options.getItemKey(e))){const[t]=BL(this.getOffsetForIndex(e,o));((e,t)=>Math.abs(e-t)<1)(t,this.getScrollOffset())||this.scrollToIndex(e,{align:o,behavior:n})}else this.scrollToIndex(e,{align:o,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;if(0===t.length)n=this.options.paddingStart;else if(1===this.options.lanes)n=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let r=t.length-1;for(;r>=0&&e.some((e=>null===e));){const n=t[r];null===e[n.lane]&&(e[n.lane]=n.end),r--}n=Math.max(...e.filter((e=>null!==e)))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const XL=(e,t,n,r)=>{for(;e<=t;){const i=(e+t)/2|0,o=n(i);if(o<r)e=i+1;else{if(!(o>r))return i;t=i-1}}return e>0?e-1:0};const JL="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function ZL(e){return function(e){const n=i.useReducer((()=>({})),{})[1],r={...e,onChange:(r,i)=>{var o;i?t.flushSync(n):n(),null==(o=e.onChange)||o.call(e,r,i)}},[o]=i.useState((()=>new QL(r)));return o.setOptions(r),JL((()=>o._didMount()),[]),JL((()=>o._willUpdate())),o}({observeElementRect:qL,observeElementOffset:GL,scrollToFn:YL,...e})}function eM(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function tM(t,n=!1){let[r,i]=e.useReducer((()=>({})),{}),o=e.useMemo((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(t)),[t,r]);return YO((()=>{if(!t)return;let e=new ResizeObserver(i);return e.observe(t),()=>{e.disconnect()}}),[t]),n?{width:`${o.width}px`,height:`${o.height}px`}:o}let nM=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function rM(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...i){let o=t[e].call(n,...i);o&&(n=o,r.forEach((e=>e())))}}}function iM(t){return e.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot)}let oM=new nM((()=>rM((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function sM(t,n){let r=oM.get(n),i=e.useId(),o=iM(r);if(YO((()=>{if(t)return r.dispatch("ADD",i),()=>r.dispatch("REMOVE",i)}),[r,t]),!t)return!1;let s=o.indexOf(i),a=o.length;return-1===s&&(s=a,a+=1),s===a-1}let aM=new Map,lM=new Map;function cM(e){var t;let n=null!=(t=lM.get(e))?t:0;return lM.set(e,n+1),0!==n||(aM.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>uM(e)}function uM(e){var t;let n=null!=(t=lM.get(e))?t:1;if(1===n?lM.delete(e):lM.set(e,n-1),1!==n)return;let r=aM.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,aM.delete(e))}let dM=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var fM,pM,hM,mM=((hM=mM||{})[hM.First=1]="First",hM[hM.Previous=2]="Previous",hM[hM.Next=4]="Next",hM[hM.Last=8]="Last",hM[hM.WrapAround=16]="WrapAround",hM[hM.NoScroll=32]="NoScroll",hM[hM.AutoFocus=64]="AutoFocus",hM),gM=((pM=gM||{})[pM.Error=0]="Error",pM[pM.Overflow=1]="Overflow",pM[pM.Success=2]="Success",pM[pM.Underflow=3]="Underflow",pM),vM=((fM=vM||{})[fM.Previous=-1]="Previous",fM[fM.Next=1]="Next",fM),yM=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(yM||{});var bM=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(bM||{});function EM(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function xM(){return EM()||/Android/gi.test(window.navigator.userAgent)}function wM(t,n,r,i){let o=QO(r);e.useEffect((()=>{if(t)return document.addEventListener(n,e,i),()=>document.removeEventListener(n,e,i);function e(e){o.current(e)}}),[t,n,i])}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));const TM=30;function CM(t,n,r){let i=sM(t,"outside-click"),o=QO(r),s=e.useCallback((function(e,t){if(e.defaultPrevented)return;let r=t(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let i=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(n);for(let n of i)if(null!==n&&(n.contains(r)||e.composed&&e.composedPath().includes(n)))return;return!function(e,t=0){var n;return e!==(null==(n=WO(e))?void 0:n.body)&&tL(t,{0:()=>e.matches(dM),1(){let t=e;for(;null!==t;){if(t.matches(dM))return!0;t=t.parentElement}return!1}})}(r,yM.Loose)&&-1!==r.tabIndex&&e.preventDefault(),o.current(e,r)}),[o,n]),a=e.useRef(null);wM(i,"pointerdown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),wM(i,"mousedown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),wM(i,"click",(e=>{xM()||a.current&&(s(e,(()=>a.current)),a.current=null)}),!0);let l=e.useRef({x:0,y:0});wM(i,"touchstart",(e=>{l.current.x=e.touches[0].clientX,l.current.y=e.touches[0].clientY}),!0),wM(i,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-l.current.x)>=TM||Math.abs(n-l.current.y)>=TM))return s(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(t,n,r,i){let o=QO(r);e.useEffect((()=>{if(t)return window.addEventListener(n,e,i),()=>window.removeEventListener(n,e,i);function e(e){o.current(e)}}),[t,n,i])}(i,"blur",(e=>s(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function SM(...t){return e.useMemo((()=>WO(...t)),[...t])}function kM(t){let n=e.useRef({value:"",selectionStart:null,selectionEnd:null});return function(t,n,r,i){let o=QO(r);e.useEffect((()=>{function e(e){o.current(e)}return(t=null!=t?t:window).addEventListener(n,e,i),()=>t.removeEventListener(n,e,i)}),[t,n,i])}(t,"blur",(e=>{let t=e.target;t instanceof HTMLInputElement&&(n.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})})),XO((()=>{if(document.activeElement!==t&&t instanceof HTMLInputElement&&t.isConnected){if(t.focus({preventScroll:!0}),t.value!==n.current.value)t.setSelectionRange(t.value.length,t.value.length);else{let{selectionStart:e,selectionEnd:r}=n.current;null!==e&&null!==r&&t.setSelectionRange(e,r)}n.current={value:"",selectionStart:null,selectionEnd:null}}}))}function _M(t,n){return e.useMemo((()=>{var e;if(t.type)return t.type;let r=null!=(e=t.as)?e:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==n?void 0:n.tagName)&&!n.hasAttribute("type")?"button":void 0}),[t.type,t.as,n])}function NM(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=null!=(n=t.defaultView)?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function DM(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let AM=rM((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:GO(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:DM(n)},i=[EM()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=GO();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let i=null!=(n=window.scrollY)?n:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:i}=new URL(n.href),s=e.querySelector(i);s&&!r(s)&&(o=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},NM(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(r))),i.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function IM(e,t,n=(()=>[document.body])){!function(e,t,n=(()=>({containers:[]}))){let r=iM(AM),i=t?r.get(t):void 0,o=!!i&&i.count>0;YO((()=>{if(t&&e)return AM.dispatch("PUSH",t,n),()=>AM.dispatch("POP",t,n)}),[e,t])}(sM(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}function OM(e){return[e.screenX,e.screenY]}var LM,MM;AM.subscribe((()=>{let e=AM.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&AM.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&AM.dispatch("TEARDOWN",n)}})),"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(LM=null==process?void 0:process.env)?void 0:LM.NODE_ENV)&&void 0===(null==(MM=null==Element?void 0:Element.prototype)?void 0:MM.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var RM=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(RM||{});function FM(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function PM(t,n,r,i){let[o,s]=e.useState(r),{hasFlag:a,addFlag:l,removeFlag:c}=function(t=0){let[n,r]=e.useState(t),i=e.useCallback((e=>r(e)),[n]),o=e.useCallback((e=>r((t=>t|e))),[n]),s=e.useCallback((e=>(n&e)===e),[n]),a=e.useCallback((e=>r((t=>t&~e))),[r]),l=e.useCallback((e=>r((t=>t^e))),[r]);return{flags:n,setFlag:i,addFlag:o,hasFlag:s,removeFlag:a,toggleFlag:l}}(t&&o?3:0),u=e.useRef(!1),d=e.useRef(!1),f=KO();return YO((()=>{if(t)return r&&s(!0),n?(null==void 0||undefined.call(i,r),function(e,{prepare:t,run:n,done:r,inFlight:i}){let o=GO();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{n(),o.requestAnimationFrame((()=>{o.add(function(e,t){var n,r;let i=GO();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),i.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,r))}))})),o.dispose}(n,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(r?(l(3),c(4)):(l(4),c(2)))},run(){d.current?r?(c(3),l(4)):(c(4),l(3)):r?c(1):l(1)},done(){d.current&&"function"==typeof n.getAnimations&&n.getAnimations().length>0||(u.current=!1,c(7),r||s(!1),null==void 0||undefined.call(i,r))}})):void(r&&l(3))}),[t,r,n,f]),t?[o,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function jM(t,n){let r=e.useRef([]),i=XO(t);e.useEffect((()=>{let e=[...r.current];for(let[t,o]of n.entries())if(r.current[t]!==o){let t=i(n,e);return r.current=n,t}}),[i,...n])}function VM(){return"undefined"!=typeof window}function BM(e){return HM(e)?(e.nodeName||"").toLowerCase():"#document"}function $M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function UM(e){var t;return null==(t=(HM(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function HM(e){return!!VM()&&(e instanceof Node||e instanceof $M(e).Node)}function qM(e){return!!VM()&&(e instanceof Element||e instanceof $M(e).Element)}function WM(e){return!!VM()&&(e instanceof HTMLElement||e instanceof $M(e).HTMLElement)}function zM(e){return!(!VM()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof $M(e).ShadowRoot)}function GM(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ZM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function KM(e){return["table","td","th"].includes(BM(e))}function YM(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(nL){return!1}}))}function QM(e){const t=XM(),n=qM(e)?ZM(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function XM(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function JM(e){return["html","body","#document"].includes(BM(e))}function ZM(e){return $M(e).getComputedStyle(e)}function eR(e){return qM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tR(e){if("html"===BM(e))return e;const t=e.assignedSlot||e.parentNode||zM(e)&&e.host||UM(e);return zM(t)?t.host:t}function nR(e){const t=tR(e);return JM(t)?e.ownerDocument?e.ownerDocument.body:e.body:WM(t)&&GM(t)?t:nR(t)}function rR(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=nR(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=$M(i);if(o){const e=iR(s);return t.concat(s,s.visualViewport||[],GM(i)?i:[],e&&n?rR(e):[])}return t.concat(i,rR(i,[],n))}function iR(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const oR=Math.min,sR=Math.max,aR=Math.round,lR=Math.floor,cR=e=>({x:e,y:e}),uR={left:"right",right:"left",bottom:"top",top:"bottom"},dR={start:"end",end:"start"};function fR(e,t,n){return sR(e,oR(t,n))}function pR(e,t){return"function"==typeof e?e(t):e}function hR(e){return e.split("-")[0]}function mR(e){return e.split("-")[1]}function gR(e){return"x"===e?"y":"x"}function vR(e){return"y"===e?"height":"width"}function yR(e){return["top","bottom"].includes(hR(e))?"y":"x"}function bR(e){return gR(yR(e))}function ER(e){return e.replace(/start|end/g,(e=>dR[e]))}function xR(e){return e.replace(/left|right|bottom|top/g,(e=>uR[e]))}function wR(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function TR(e,t,n){let{reference:r,floating:i}=e;const o=yR(t),s=bR(t),a=vR(s),l=hR(t),c="y"===o,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(mR(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1)}return p}async function CR(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=pR(t,e),h=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[f?"floating"===d?"reference":"floating":d],g=wR(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),b=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},E=wR(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-E.top+h.top)/b.y,bottom:(E.bottom-g.bottom+h.bottom)/b.y,left:(g.left-E.left+h.left)/b.x,right:(E.right-g.right+h.right)/b.x}}function SR(e){const t=ZM(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=WM(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=aR(n)!==o||aR(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function kR(e){return qM(e)?e:e.contextElement}function _R(e){const t=kR(e);if(!WM(t))return cR(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=SR(t);let s=(o?aR(n.width):n.width)/r,a=(o?aR(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const NR=cR(0);function DR(e){const t=$M(e);return XM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:NR}function AR(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=kR(e);let s=cR(1);t&&(r?qM(r)&&(s=_R(r)):s=_R(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==$M(e))&&t}(o,n,r)?DR(o):cR(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){const e=$M(o),t=r&&qM(r)?$M(r):r;let n=e,i=iR(n);for(;i&&r&&t!==n;){const e=_R(i),t=i.getBoundingClientRect(),r=ZM(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=s,n=$M(i),i=iR(n)}}return wR({width:u,height:d,x:l,y:c})}function IR(e,t){const n=eR(e).scrollLeft;return t?t.left+n:AR(UM(e)).left+n}function OR(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:IR(e,r)),y:r.top+t.scrollTop}}function LR(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=$M(e),r=UM(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const e=XM();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=UM(e),n=eR(e),r=e.ownerDocument.body,i=sR(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=sR(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+IR(e);const a=-n.scrollTop;return"rtl"===ZM(r).direction&&(s+=sR(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(UM(e));else if(qM(t))r=function(e,t){const n=AR(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=WM(e)?_R(e):cR(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=DR(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wR(r)}function MR(e,t){const n=tR(e);return!(n===t||!qM(n)||JM(n))&&("fixed"===ZM(n).position||MR(n,t))}function RR(e,t,n){const r=WM(t),i=UM(t),o="fixed"===n,s=AR(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=cR(0);function c(){l.x=IR(i)}if(r||!r&&!o)if(("body"!==BM(t)||GM(i))&&(a=eR(t)),r){const e=AR(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=!i||r||o?cR(0):OR(i,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function FR(e){return"static"===ZM(e).position}function PR(e,t){if(!WM(e)||"fixed"===ZM(e).position)return null;if(t)return t(e);let n=e.offsetParent;return UM(e)===n&&(n=n.ownerDocument.body),n}function jR(e,t){const n=$M(e);if(YM(e))return n;if(!WM(e)){let t=tR(e);for(;t&&!JM(t);){if(qM(t)&&!FR(t))return t;t=tR(t)}return n}let r=PR(e,t);for(;r&&KM(r)&&FR(r);)r=PR(r,t);return r&&JM(r)&&FR(r)&&!QM(r)?n:r||function(e){let t=tR(e);for(;WM(t)&&!JM(t);){if(QM(t))return t;if(YM(t))return null;t=tR(t)}return null}(e)||n}const VR={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,s=UM(r),a=!!t&&YM(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=cR(1);const u=cR(0),d=WM(r);if((d||!d&&!o)&&(("body"!==BM(r)||GM(s))&&(l=eR(r)),WM(r))){const e=AR(r);c=_R(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!s||d||o?cR(0):OR(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:UM,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?YM(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=rR(e,[],!1).filter((e=>qM(e)&&"body"!==BM(e))),i=null;const o="fixed"===ZM(e).position;let s=o?tR(e):e;for(;qM(s)&&!JM(s);){const t=ZM(s),n=QM(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||GM(s)&&!n&&MR(e,s))?r=r.filter((e=>e!==s)):i=t,s=tR(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=LR(t,n,i);return e.top=sR(r.top,e.top),e.right=oR(r.right,e.right),e.bottom=oR(r.bottom,e.bottom),e.left=sR(r.left,e.left),e}),LR(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:jR,getElementRects:async function(e){const t=this.getOffsetParent||jR,n=this.getDimensions,r=await n(e.floating);return{reference:RR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=SR(e);return{width:t,height:n}},getScale:_R,isElement:qM,isRTL:function(e){return"rtl"===ZM(e).direction}};function BR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $R(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=kR(e),u=i||o?[...c?rR(c):[],...rR(t)]:[];u.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const i=UM(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const h={rootMargin:-lR(d)+"px "+-lR(i.clientWidth-(u+f))+"px "+-lR(i.clientHeight-(d+p))+"px "+-lR(u)+"px",threshold:sR(0,oR(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||BR(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...h,root:i.ownerDocument})}catch(v){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null;let f,p=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?AR(e):null;return l&&function t(){const r=AR(e);m&&!BR(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const UR=CR,HR=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=hR(n),a=mR(n),l="y"===yR(n),c=["left","top"].includes(s)?-1:1,u=o&&l?-1:1,d=pR(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},qR=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pR(e,t),c={x:n,y:r},u=await CR(t,l),d=yR(hR(i)),f=gR(d);let p=c[f],h=c[d];if(o){const e="y"===f?"bottom":"right";p=fR(p+u["y"===f?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";h=fR(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:o,[d]:s}}}}}},WR=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=pR(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const v=hR(i),y=yR(a),b=hR(a)===a,E=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!m?[xR(a)]:function(e){const t=xR(e);return[ER(e),t,ER(t)]}(a)),w="none"!==h;!f&&w&&x.push(...function(e,t,n,r){const i=mR(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}(hR(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(ER)))),o}(a,m,h,E));const T=[a,...x],C=await CR(t,g),S=[];let k=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(C[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=mR(e),i=bR(e),o=vR(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xR(s)),[s,xR(s)]}(i,s,E);S.push(C[e[0]],C[e[1]])}if(k=[...k,{placement:i,overflows:S}],!S.every((e=>e<=0))){var _,N;const e=((null==(_=o.flip)?void 0:_.index)||0)+1,t=T[e];if(t){var D;const n="alignment"===d&&y!==yR(t),r=(null==(D=k[0])?void 0:D.overflows[0])>0;if(!n||r)return{data:{index:e,overflows:k},reset:{placement:t}}}let n=null==(N=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=k.filter((e=>{if(w){const t=yR(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},zR=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=(()=>{}),...c}=pR(e,t),u=await CR(t,c),d=hR(i),f=mR(i),p="y"===yR(i),{width:h,height:m}=o.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=f===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g="end"===f?"top":"bottom");const y=m-u.top-u.bottom,b=h-u.left-u.right,E=oR(m-u[g],y),x=oR(h-u[v],b),w=!t.middlewareData.shift;let T=E,C=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(T=y),w&&!f){const e=sR(u.left,0),t=sR(u.right,0),n=sR(u.top,0),r=sR(u.bottom,0);p?C=h-2*(0!==e||0!==t?e+t:sR(u.left,u.right)):T=m-2*(0!==n||0!==r?n+r:sR(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:T});const S=await s.getDimensions(a.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},GR=(e,t,n)=>{const r=new Map,i={platform:VR,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=TR(c,r,l),f=r,p={},h=0;for(let m=0;m<a.length;m++){const{name:n,fn:o}=a[m],{x:g,y:v,data:y,reset:b}=await o({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[n]:{...p[n],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:u,y:d}=TR(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})};var KR="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function YR(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!YR(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!YR(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function QR(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function XR(e,t){const n=QR(e);return Math.round(t*n)/n}function JR(e){const t=i.useRef(e);return KR((()=>{t.current=e})),t}const ZR=(e,t)=>({...HR(e),options:[e,t]}),eF=(e,t)=>({...qR(e),options:[e,t]}),tF=(e,t)=>({...WR(e),options:[e,t]}),nF=(e,t)=>({...zR(e),options:[e,t]}),rF={...i},iF=rF.useInsertionEffect||(e=>e());function oF(e){const t=i.useRef((()=>{}));return iF((()=>{t.current=e})),i.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var sF="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;let aF=!1,lF=0;const cF=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+lF++;const uF=rF.useId||function(){const[e,t]=i.useState((()=>aF?cF():void 0));return sF((()=>{null==e&&t(cF())}),[]),i.useEffect((()=>{aF=!0}),[]),e};const dF=i.createContext(null),fF=i.createContext(null),pF=()=>{var e;return(null==(e=i.useContext(dF))?void 0:e.id)||null},hF=()=>i.useContext(fF),mF="data-floating-ui-focusable";function gF(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=uF(),s=i.useRef({}),[a]=i.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=pF(),[c,u]=i.useState(r.reference),d=oF(((e,t,r)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=i.useMemo((()=>({setPositionReference:u})),[]),p=i.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return i.useMemo((()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:a,floatingId:o,refs:f})),[t,d,p,a,o,f])}function vF(e){void 0===e&&(e={});const{nodeId:t}=e,n=gF({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=i.useState(null),[c,u]=i.useState(null),d=(null==s?void 0:s.domReference)||a,f=i.useRef(null),p=hF();sF((()=>{d&&(f.current=d)}),[d]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=i.useState(r);YR(h,r)||m(r);const[g,v]=i.useState(null),[y,b]=i.useState(null),E=i.useCallback((e=>{e!==C.current&&(C.current=e,v(e))}),[]),x=i.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),w=a||g,T=l||y,C=i.useRef(null),S=i.useRef(null),k=i.useRef(f),_=null!=u,N=JR(u),D=JR(s),A=JR(d),I=i.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};D.current&&(e.platform=D.current),GR(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};O.current&&!YR(k.current,t)&&(k.current=t,o.flushSync((()=>{p(t)})))}))}),[h,t,n,D,A]);KR((()=>{!1===d&&k.current.isPositioned&&(k.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const O=i.useRef(!1);KR((()=>(O.current=!0,()=>{O.current=!1})),[]),KR((()=>{if(w&&(C.current=w),T&&(S.current=T),w&&T){if(N.current)return N.current(w,T,I);I()}}),[w,T,I,N,_]);const L=i.useMemo((()=>({reference:C,floating:S,setReference:E,setFloating:x})),[E,x]),M=i.useMemo((()=>({reference:w,floating:T})),[w,T]),R=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=XR(M.floating,f.x),r=XR(M.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...QR(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,M.floating,f.x,f.y]);return i.useMemo((()=>({...f,update:I,refs:L,elements:M,floatingStyles:R})),[f,I,L,M,R])}({...e,elements:{...s,...c&&{reference:c}}}),m=i.useCallback((e=>{const t=qM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),h.refs.setReference(t)}),[h.refs]),g=i.useCallback((e=>{(qM(e)||null===e)&&(f.current=e,l(e)),(qM(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!qM(e))&&h.refs.setReference(e)}),[h.refs]),v=i.useMemo((()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f})),[h.refs,g,m]),y=i.useMemo((()=>({...h.elements,domReference:d})),[h.elements,d]),b=i.useMemo((()=>({...h,...r,refs:v,elements:y,nodeId:t})),[h,v,y,t,r]);return sF((()=>{r.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),i.useMemo((()=>({...h,context:b,refs:v,elements:y})),[h,v,y,b])}const yF="active",bF="selected";function EF(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[yF]:t,[bF]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[mF]:""},...o,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var s;i&&[yF,bF].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(s=r.get(n))||s.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}function xF(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const wF=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:s=0,index:a=0,minItemsVisible:l=4,referenceOverflowThreshold:c=0,scrollRef:u,...d}=pR(e,t),{rects:f,elements:{floating:p}}=t,h=n.current[a],m=(null==u?void 0:u.current)||p,g=p.clientTop||m.clientTop,v=0!==p.clientTop,y=0!==m.clientTop,b=p===m;if(!h)return{};const E={...t,...await ZR(-h.offsetTop-p.clientTop-f.reference.height/2-h.offsetHeight/2-s).fn(t)},x=await UR(xF(E,m.scrollHeight+g+p.clientTop),d),w=await UR(E,{...d,elementContext:"reference"}),T=sR(0,x.top),C=E.y+T,S=(m.scrollHeight>m.clientHeight?e=>e:aR)(sR(0,m.scrollHeight+(v&&b||y?2*g:0)-T-sR(0,x.bottom)));if(m.style.maxHeight=S+"px",m.scrollTop=T,i){const e=m.offsetHeight<h.offsetHeight*oR(l,n.current.length)-1||w.top>=-c||w.bottom>=-c;o.flushSync((()=>i(e)))}return r&&(r.current=await UR(xF({...E,y:C},m.offsetHeight+g+p.clientTop),d)),{y:C}}});function TF(e,t){const{open:n,elements:r}=e,{enabled:s=!0,overflowRef:a,scrollRef:l,onChange:c}=t,u=oF(c),d=i.useRef(!1),f=i.useRef(null),p=i.useRef(null);i.useEffect((()=>{if(!s)return;function e(e){if(e.ctrlKey||!t||null==a.current)return;const n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,s=t.scrollHeight-t.clientHeight,l=n<0?-1:1,c=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),o.flushSync((()=>{u((e=>e+Math[c](n,s*l)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==l?void 0:l.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{f.current=t.scrollTop,null!=a.current&&(p.current={...a.current})})),()=>{f.current=null,p.current=null,t.removeEventListener("wheel",e)}):void 0}),[s,n,r.floating,a,l,u]);const h=i.useMemo((()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==l?void 0:l.current)||r.floating;if(a.current&&e&&d.current){if(null!==f.current){const t=e.scrollTop-f.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&o.flushSync((()=>u((e=>e+t))))}requestAnimationFrame((()=>{f.current=e.scrollTop}))}}})),[r.floating,u,a,l]);return i.useMemo((()=>s?{floating:h}:{}),[s,h])}let CF=e.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});CF.displayName="FloatingContext";let SF=e.createContext(null);SF.displayName="PlacementContext";let kF=4;function _F({children:t,enabled:n=!0}){let[r,o]=e.useState(null),[s,a]=e.useState(0),l=e.useRef(null),[c,u]=e.useState(null);!function(e){YO((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(c);let d=n&&null!==r&&null!==c,{to:f="bottom",gap:p=0,offset:h=0,padding:m=0,inner:g}=function(e,t){var n,r,i;let o=NF(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=NF(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=NF(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}(r,c),[v,y="center"]=f.split(" ");YO((()=>{d&&a(0)}),[d]);let{refs:b,floatingStyles:E,context:x}=vF({open:d,placement:"selection"===v?"center"===y?"bottom":`bottom-${y}`:"center"===y?`${v}`:`${v}-${y}`,strategy:"absolute",transform:!1,middleware:[ZR({mainAxis:"selection"===v?0:p,crossAxis:h}),eF({padding:m}),"selection"!==v&&tF({padding:m}),"selection"===v&&g?wF({...g,padding:m,overflowRef:l,offset:s,minItemsVisible:kF,referenceOverflowThreshold:m,onFallbackChange(e){var t,n;if(!e)return;let r=x.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,o=Math.min(kF,r.childElementCount),s=0,l=0;for(let a of null!=(n=null==(t=x.elements.floating)?void 0:t.childNodes)?n:[])if(a instanceof HTMLElement){let e=a.offsetTop,t=e+a.clientHeight+i,n=r.scrollTop,c=n+r.clientHeight;if(!(e>=n&&t<=c)){l=Math.max(0,Math.min(t,c)-Math.max(e,n)),s=a.clientHeight;break}o--}o>=1&&a((e=>{let t=s*o-l+i;return e>=t?e:t}))}}):null,nF({padding:m,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:$R}),[w=v,T=y]=x.placement.split("-");"selection"===v&&(w="selection");let C=e.useMemo((()=>({anchor:[w,T].filter(Boolean).join(" ")})),[w,T]),S=TF(x,{overflowRef:l,onChange:a}),{getReferenceProps:k,getFloatingProps:_}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=i.useCallback((t=>EF(t,e,"reference")),t),s=i.useCallback((t=>EF(t,e,"floating")),n),a=i.useCallback((t=>EF(t,e,"item")),r);return i.useMemo((()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:a})),[o,s,a])}([S]),N=XO((e=>{u(e),b.setFloating(e)}));return i.createElement(SF.Provider,{value:o},i.createElement(CF.Provider,{value:{setFloating:N,setReference:b.setReference,styles:E,getReferenceProps:k,getFloatingProps:_,slot:C}},t))}function NF(t,n,r=void 0){let i=KO(),o=XO(((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let n=AF(e,t);return[n,r=>{let o=DF(e);{let s=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));i.requestAnimationFrame((function a(){i.nextFrame(a);let l=!1;for(let[e,n]of o.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let c=AF(e,t);n!==c&&(r(c),n=c)}))}return i.dispose}]}return[r,null]})),s=e.useMemo((()=>o(t,n)[0]),[t,n]),[a=s,l]=e.useState();return YO((()=>{let[e,r]=o(t,n);if(l(e),r)return r(l)}),[t,n]),a}function DF(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...DF(r)]:[n]}return[]}function AF(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function IF({children:t,freeze:n}){let r=OF(n,t);return e.createElement(e.Fragment,null,r)}function OF(t,n){let[r,i]=e.useState(n);return!t&&r!==n&&i(n),t?r:n}let LF=e.createContext(null);LF.displayName="OpenClosedContext";var MF=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(MF||{});function RF({value:t,children:n}){return e.createElement(LF.Provider,{value:t},n)}var FF,PF,jF={exports:{}},VF={};var BF,$F,UF,HF=(PF||(PF=1,jF.exports=function(){if(FF)return VF;FF=1;var t=e,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,s=t.useMemo,a=t.useDebugValue;return VF.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!o){if(o=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,n(r,e))return t;var s=c(e);return void 0!==u&&u(t,s)?(r=e,t):(r=e,i=s)}var r,i,o=!1,s=void 0===l?null:l;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,l,c,u]);var p=r(e,d[0],d[1]);return o((function(){f.hasValue=!0,f.value=p}),[p]),a(p),p},VF}()),jF.exports),qF=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},WF=(e,t,n)=>(qF(e,t,"read from private field"),n?n.call(e):t.get(e)),zF=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},GF=(e,t,n,r)=>(qF(e,t,"write to private field"),t.set(e,n),n);class KF{constructor(e){zF(this,BF,{}),zF(this,$F,new nM((()=>new Set))),zF(this,UF,new Set),GF(this,BF,e)}get state(){return WF(this,BF)}subscribe(e,t){let n={selector:e,callback:t,current:e(WF(this,BF))};return WF(this,UF).add(n),()=>{WF(this,UF).delete(n)}}on(e,t){return WF(this,$F).get(e).add(t),()=>{WF(this,$F).get(e).delete(t)}}send(e){GF(this,BF,this.reduce(WF(this,BF),e));for(let t of WF(this,UF)){let e=t.selector(WF(this,BF));YF(t.current,e)||(t.current=e,t.callback(e))}for(let t of WF(this,$F).get(e.type))t(WF(this,BF),e)}}function YF(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&QF(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&QF(e.entries(),t.entries()):!(!XF(e)||!XF(t))&&QF(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function QF(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function XF(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function JF(e,t,n=YF){return HF.useSyncExternalStoreWithSelector(XO((t=>e.subscribe(ZF,t))),XO((()=>e.state)),XO((()=>e.state)),XO(t),n)}function ZF(e){return e}BF=new WeakMap,$F=new WeakMap,UF=new WeakMap;let eP=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||eP[0]===e.target)return;let t=e.target;t=t.closest(dM),eP.unshift(null!=t?t:e.target),eP=eP.filter((e=>null!=e&&e.isConnected)),eP.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}));var tP,nP=((tP=nP||{})[tP.First=0]="First",tP[tP.Previous=1]="Previous",tP[tP.Next=2]="Next",tP[tP.Last=3]="Last",tP[tP.Specific=4]="Specific",tP[tP.Nothing=5]="Nothing",tP);function rP(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}var iP,oP=((iP=oP||{})[iP.Left=0]="Left",iP[iP.Right=2]="Right",iP);function sP(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in i&&(e=>e.useSyncExternalStore)(i)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=i.useState(qO.isHandoffComplete);return t&&!1===qO.isHandoffComplete&&n(!1),i.useEffect((()=>{!0!==t&&n(!0)}),[t]),i.useEffect((()=>qO.handoff()),[]),!e&&t}let aP=e.createContext(!1);function lP(t){let n=e.useContext(aP),r=e.useContext(fP),[i,o]=e.useState((()=>{var e;if(!n&&null!==r)return null!=(e=r.current)?e:null;if(qO.isServer)return null;let i=null==t?void 0:t.getElementById("headlessui-portal-root");if(i)return i;if(null===t)return null;let o=t.createElement("div");return o.setAttribute("id","headlessui-portal-root"),t.body.appendChild(o)}));return e.useEffect((()=>{null!==i&&(null!=t&&t.body.contains(i)||null==t||t.body.appendChild(i))}),[i,t]),e.useEffect((()=>{n||null!==r&&o(r.current)}),[r,o,n]),i}let cP=e.Fragment,uP=dL((function(n,r){let{ownerDocument:i=null,...o}=n,s=e.useRef(null),a=NL(function(e,t=!0){return Object.assign(e,{[_L]:t})}((e=>{s.current=e})),r),l=SM(s),c=null!=i?i:l,u=lP(c),[d]=e.useState((()=>{var e;return qO.isServer?null:null!=(e=null==c?void 0:c.createElement("div"))?e:null})),f=e.useContext(pP),p=sP();YO((()=>{!u||!d||u.contains(d)||(d.setAttribute("data-headlessui-portal",""),u.appendChild(d))}),[u,d]),YO((()=>{if(d&&f)return f.register(d)}),[f,d]),function(t){let n=XO(t),r=e.useRef(!1);e.useEffect((()=>(r.current=!1,()=>{r.current=!0,zO((()=>{r.current&&n()}))})),[n])}((()=>{var e;!u||!d||(d instanceof Node&&u.contains(d)&&u.removeChild(d),u.childNodes.length<=0&&(null==(e=u.parentElement)||e.removeChild(u)))}));let h=sL();return p&&u&&d?t.createPortal(h({ourProps:{ref:a},theirProps:o,slot:{},defaultTag:cP,name:"Portal"}),d):null}));let dP=e.Fragment,fP=e.createContext(null);let pP=e.createContext(null),hP=dL((function(t,n){let r=NL(n),{enabled:i=!0,ownerDocument:o,...s}=t,a=sL();return i?e.createElement(uP,{...s,ownerDocument:o,ref:r}):a({ourProps:{ref:r},theirProps:s,slot:{},defaultTag:cP,name:"Portal"})})),mP=dL((function(t,n){let{target:r,...i}=t,o={ref:NL(n)},s=sL();return e.createElement(fP.Provider,{value:r},s({ourProps:o,theirProps:i,defaultTag:dP,name:"Popover.Group"}))})),gP=Object.assign(hP,{Group:mP});var vP,yP=Object.defineProperty,bP=(e,t,n)=>(((e,t,n)=>{t in e?yP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),EP=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(EP||{}),xP=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(xP||{}),wP=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(wP||{}),TP=((vP=TP||{})[vP.OpenCombobox=0]="OpenCombobox",vP[vP.CloseCombobox=1]="CloseCombobox",vP[vP.GoToOption=2]="GoToOption",vP[vP.SetTyping=3]="SetTyping",vP[vP.RegisterOption=4]="RegisterOption",vP[vP.UnregisterOption=5]="UnregisterOption",vP[vP.DefaultToFirstOption=6]="DefaultToFirstOption",vP[vP.SetActivationTrigger=7]="SetActivationTrigger",vP[vP.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",vP[vP.SetInputElement=9]="SetInputElement",vP[vP.SetButtonElement=10]="SetButtonElement",vP[vP.SetOptionsElement=11]="SetOptionsElement",vP);function CP(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),i=r.length>0&&null!==r[0].dataRef.current.order?r.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):function(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(r,(e=>e.dataRef.current.domRef.current)),o=n?i.indexOf(n):null;return-1===o&&(o=null),{options:i,activeOptionIndex:o}}let SP={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,r,i,o;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&(null==(r=e.dataRef.current)||!r.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,o=t.focus===nP.Specific?t.idx:rP(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,i;return null!=(i=null!=(t=e.activeOptionIndex)?t:n.findIndex((e=>!r(e))))?i:null},resolveDisabled:r,resolveId(){throw new Error("Function not implemented.")}}),s=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===o&&e.activationTrigger===s?e:{...e,activeOptionIndex:o,activationTrigger:s,isTyping:!1,__demoMode:!1}}let s=CP(e);if(null===s.activeOptionIndex){let e=s.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(s.activeOptionIndex=e)}let a=t.focus===nP.Specific?t.idx:rP(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),l=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===a&&e.activationTrigger===l?e:{...e,...s,isTyping:!1,activeOptionIndex:a,activationTrigger:l,__demoMode:!1}},4:(e,t)=>{var n,r,i,o;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let s=t.payload,a=CP(e,(e=>(e.push(s),e)));null===e.activeOptionIndex&&null!=(i=(r=e.dataRef.current).isSelected)&&i.call(r,t.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(s));let l={...e,...a,activationTrigger:2};return null!=(o=e.dataRef.current)&&o.__demoMode&&void 0===e.dataRef.current.value&&(l.activeOptionIndex=0),l},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let r=CP(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...r,activationTrigger:2}},6:(e,t)=>e.defaultToFirstOption===t.value?e:{...e,defaultToFirstOption:t.value},7:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},8:(e,t)=>{var n,r;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let i=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);i=-1!==n?n:null}return{...e,activeOptionIndex:i,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}}},9:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},10:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},11:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}};class kP extends KF{constructor(){super(...arguments),bP(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return tL(r,{0:()=>null==t?void 0:t(e),1:()=>{let r=i.slice(),o=r.findIndex((t=>n(t,e)));return-1===o?r.push(e):r.splice(o,1),null==t?void 0:t(r)}})},registerOption:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),null==(t=(e=this.state.dataRef.current).onClose)||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(null!==e){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:nP.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),bP(this,"selectors",{activeDescendantId:e=>{var t,n;let r=this.selectors.activeOptionIndex(e);if(null!==r)return e.virtual?null==(n=e.options.find((t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[r]))))?void 0:n.id:null==(t=e.options[r])?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&null===e.activeOptionIndex&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:n}=e.virtual,r=t.findIndex((e=>{var t;return!(null!=(t=null==n?void 0:n(e))&&t)}));if(-1!==r)return r}let t=e.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,n;let r=this.selectors.activeOptionIndex(e);return null===r?null:e.virtual?e.virtual.options[null!=r?r:0]:null!=(n=null==(t=e.options[r])?void 0:t.dataRef.current.value)?n:null},isActive:(e,t,n)=>{var r;let i=this.selectors.activeOptionIndex(e);return null!==i&&(e.virtual?i===e.dataRef.current.calculateIndex(t):(null==(r=e.options[i])?void 0:r.id)===n)},shouldScrollIntoView:(e,t,n)=>!(e.virtual||e.__demoMode||0!==e.comboboxState||0===e.activationTrigger||!this.selectors.isActive(e,t,n))})}static new({virtual:e=null,__demoMode:t=!1}={}){var n;return new kP({dataRef:{current:{}},comboboxState:t?0:1,isTyping:!1,options:[],virtual:e?{options:e.options,disabled:null!=(n=e.disabled)?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:t})}reduce(e,t){return tL(t.type,SP,e,t)}}const _P=e.createContext(null);function NP(t){let n=e.useContext(_P);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,DP),e}return n}function DP({virtual:t=null,__demoMode:n=!1}={}){return e.useMemo((()=>kP.new({virtual:t,__demoMode:n})),[])}let AP=e.createContext(null);function IP(t){let n=e.useContext(AP);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,IP),e}return n}AP.displayName="ComboboxDataContext";let OP=e.createContext(null);function LP(t){let n=NP("VirtualProvider"),r=IP("VirtualProvider"),{options:i}=r.virtual,o=JF(n,(e=>e.optionsElement)),[s,a]=e.useMemo((()=>{let e=o;if(!e)return[0,0];let t=window.getComputedStyle(e);return[parseFloat(t.paddingBlockStart||t.paddingTop),parseFloat(t.paddingBlockEnd||t.paddingBottom)]}),[o]),l=ZL({enabled:0!==i.length,scrollPaddingStart:s,scrollPaddingEnd:a,count:i.length,estimateSize:()=>40,getScrollElement:()=>n.state.optionsElement,overscan:12}),[c,u]=e.useState(0);YO((()=>{u((e=>e+1))}),[i]);let d=l.getVirtualItems(),f=JF(n,(e=>e.activationTrigger===wP.Pointer)),p=JF(n,n.selectors.activeOptionIndex);return 0===d.length?null:e.createElement(OP.Provider,{value:l},e.createElement("div",{style:{position:"relative",width:"100%",height:`${l.getTotalSize()}px`},ref:e=>{e&&(f||null!==p&&i.length>p&&l.scrollToIndex(p))}},d.map((n=>{var r;return e.createElement(e.Fragment,{key:n.key},e.cloneElement(null==(r=t.children)?void 0:r.call(t,{...t.slot,option:i[n.index]}),{key:`${c}-${n.key}`,"data-index":n.index,"aria-setsize":i.length,"aria-posinset":n.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${n.start}px)`,overflowAnchor:"none"}}))}))))}let MP=e.Fragment;let RP=iL.RenderStrategy|iL.Static;let FP=dL((function(t,n){let r=ZO(),{value:i,defaultValue:o,onChange:s,form:a,name:l,by:c,invalid:u=!1,disabled:d=r||!1,onClose:f,__demoMode:p=!1,multiple:h=!1,immediate:m=!1,virtual:g=null,nullable:v,...y}=t,b=function(t){let[n]=e.useState(t);return n}(o),[E=(h?[]:void 0),x]=function(t,n,r){let[i,o]=e.useState(r),s=void 0!==t,a=e.useRef(s),l=e.useRef(!1),c=e.useRef(!1);return!s||a.current||l.current?!s&&a.current&&!c.current&&(c.current=!0,a.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,a.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[s?t:i,XO((e=>(s||o(e),null==n?void 0:n(e))))]}(i,s,b),w=DP({virtual:g,__demoMode:p}),T=e.useRef({static:!1,hold:!1}),C=function(t=eM){return e.useCallback(((e,n)=>{if("string"==typeof t){let r=t;return(null==e?void 0:e[r])===(null==n?void 0:n[r])}return t(e,n)}),[t])}(c),S=XO((e=>g?null===c?g.options.indexOf(e):g.options.findIndex((t=>C(t,e))):w.state.options.findIndex((t=>C(t.dataRef.current.value,e))))),k=e.useCallback((e=>tL(D.mode,{[xP.Multi]:()=>E.some((t=>C(t,e))),[xP.Single]:()=>C(E,e)})),[E]),_=JF(w,(e=>e.virtual)),N=XO((()=>null==f?void 0:f())),D=e.useMemo((()=>({__demoMode:p,immediate:m,optionsPropsRef:T,value:E,defaultValue:b,disabled:d,invalid:u,mode:h?xP.Multi:xP.Single,virtual:g?_:null,onChange:x,isSelected:k,calculateIndex:S,compare:C,onClose:N})),[E,b,d,u,h,x,k,p,w,g,_,N]);YO((()=>{var e;g&&w.send({type:TP.UpdateVirtualConfiguration,options:g.options,disabled:null!=(e=g.disabled)?e:null})}),[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),YO((()=>{w.state.dataRef.current=D}),[D]);let[A,I,O,L]=JF(w,(e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]));CM(A===EP.Open,[I,O,L],(()=>w.actions.closeCombobox()));let M=JF(w,w.selectors.activeOptionIndex),R=JF(w,w.selectors.activeOption),F=e.useMemo((()=>({open:A===EP.Open,disabled:d,invalid:u,activeIndex:M,activeOption:R,value:E})),[D,d,E,u,R,A]),[P,j]=function({inherit:t=!1}={}){let n=FL(),[r,i]=e.useState([]),o=t?[n,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,e.useMemo((()=>function(t){let n=XO((e=>(i((t=>[...t,e])),()=>i((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=e.useMemo((()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value})),[n,t.slot,t.name,t.props,t.value]);return e.createElement(ML.Provider,{value:r},t.children)}),[i])]}(),V=null===n?{}:{ref:n},B=e.useCallback((()=>{if(void 0!==b)return null==x?void 0:x(b)}),[x,b]),$=sL();return e.createElement(j,{value:P,props:{htmlFor:null==O?void 0:O.id},slot:{open:A===EP.Open,disabled:d}},e.createElement(_F,null,e.createElement(AP.Provider,{value:D},e.createElement(_P.Provider,{value:w},e.createElement(RF,{value:tL(A,{[EP.Open]:MF.Open,[EP.Closed]:MF.Closed})},null!=l&&e.createElement(wL,{disabled:d,data:null!=E?{[l]:E}:{},form:a,onReset:B}),$({ourProps:V,theirProps:y,slot:F,defaultTag:MP,name:"Combobox"}))))))})),PP=dL((function(n,r){let i=NP("Combobox.Button"),o=IP("Combobox.Button"),[s,a]=e.useState(null),l=NL(r,a,i.actions.setButtonElement),c=e.useId(),{id:u=`headlessui-combobox-button-${c}`,disabled:d=o.disabled||!1,autoFocus:f=!1,...p}=n,h=JF(i,(e=>e.inputElement)),m=kM(h),g=XO((e=>{switch(e.key){case LL.Space:case LL.Enter:return e.preventDefault(),e.stopPropagation(),i.state.comboboxState===EP.Closed&&t.flushSync((()=>i.actions.openCombobox())),void m();case LL.ArrowDown:return e.preventDefault(),e.stopPropagation(),i.state.comboboxState===EP.Closed&&(t.flushSync((()=>i.actions.openCombobox())),i.state.dataRef.current.value||i.actions.goToOption({focus:nP.First})),void m();case LL.ArrowUp:return e.preventDefault(),e.stopPropagation(),i.state.comboboxState===EP.Closed&&(t.flushSync((()=>i.actions.openCombobox())),i.state.dataRef.current.value||i.actions.goToOption({focus:nP.Last})),void m();case LL.Escape:if(i.state.comboboxState!==EP.Open)return;return e.preventDefault(),i.state.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),t.flushSync((()=>i.actions.closeCombobox())),void m();default:return}})),v=XO((e=>{e.preventDefault(),!kL(e.currentTarget)&&(e.button===oP.Left&&(i.state.comboboxState===EP.Open?i.actions.closeCombobox():i.actions.openCombobox()),m())})),y=FL([u]),{isFocusVisible:b,focusProps:E}=$O({autoFocus:f}),{isHovered:x,hoverProps:w}=BO({isDisabled:d}),{pressed:T,pressProps:C}=function({disabled:t=!1}={}){let n=e.useRef(null),[r,i]=e.useState(!1),o=KO(),s=XO((()=>{n.current=null,i(!1),o.dispose()})),a=XO((e=>{if(o.dispose(),null===n.current){n.current=e.currentTarget,i(!0);{let t=WO(e.currentTarget);o.addEventListener(t,"pointerup",s,!1),o.addEventListener(t,"pointermove",(e=>{if(n.current){let t=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);i(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(t,n.current.getBoundingClientRect()))}}),!1),o.addEventListener(t,"pointercancel",s,!1)}}}));return{pressed:r,pressProps:t?{}:{onPointerDown:a,onPointerUp:s,onClick:s}}}({disabled:d}),[S,k]=JF(i,(e=>[e.comboboxState,e.optionsElement])),_=e.useMemo((()=>({open:S===EP.Open,active:T||S===EP.Open,disabled:d,invalid:o.invalid,value:o.value,hover:x,focus:b})),[o,x,b,T,d,S]),N=uL({ref:l,id:u,type:_M(n,s),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==k?void 0:k.id,"aria-expanded":S===EP.Open,"aria-labelledby":y,disabled:d||void 0,autoFocus:f,onMouseDown:v,onKeyDown:g},E,w,C);return sL()({ourProps:N,theirProps:p,slot:_,defaultTag:"button",name:"Combobox.Button"})})),jP=dL((function(n,r){var i,o;let s=NP("Combobox.Input"),a=IP("Combobox.Input"),l=e.useId(),c=SL(),{id:u=c||`headlessui-combobox-input-${l}`,onChange:d,displayValue:f,disabled:p=a.disabled||!1,autoFocus:h=!1,type:m="text",...g}=n,[v]=JF(s,(e=>[e.inputElement])),y=e.useRef(null),b=NL(y,r,e.useContext(CF).setReference,s.actions.setInputElement),E=SM(v),[x,w]=JF(s,(e=>[e.comboboxState,e.isTyping])),T=KO(),C=XO((()=>{s.actions.onChange(null),s.state.optionsElement&&(s.state.optionsElement.scrollTop=0),s.actions.goToOption({focus:nP.Nothing})})),S=e.useMemo((()=>{var e;return"function"==typeof f&&void 0!==a.value?null!=(e=f(a.value))?e:"":"string"==typeof a.value?a.value:""}),[a.value,f]);jM((([e,t],[n,r])=>{if(s.state.isTyping)return;let i=y.current;i&&((r===EP.Open&&t===EP.Closed||e!==n)&&(i.value=e),requestAnimationFrame((()=>{if(s.state.isTyping||!i||(null==E?void 0:E.activeElement)!==i)return;let{selectionStart:e,selectionEnd:t}=i;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&i.setSelectionRange(i.value.length,i.value.length)})))}),[S,x,E,w]),jM((([e],[t])=>{if(e===EP.Open&&t===EP.Closed){if(s.state.isTyping)return;let e=y.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:i}=e;e.value="",e.value=t,null!==i?e.setSelectionRange(n,r,i):e.setSelectionRange(n,r)}}),[x]);let k=e.useRef(!1),_=XO((()=>{k.current=!0})),N=XO((()=>{T.nextFrame((()=>{k.current=!1}))})),D=XO((e=>{switch(s.actions.setIsTyping(!0),e.key){case LL.Enter:if(s.state.comboboxState!==EP.Open||k.current)return;if(e.preventDefault(),e.stopPropagation(),null===s.selectors.activeOptionIndex(s.state))return void s.actions.closeCombobox();s.actions.selectActiveOption(),a.mode===xP.Single&&s.actions.closeCombobox();break;case LL.ArrowDown:return e.preventDefault(),e.stopPropagation(),tL(s.state.comboboxState,{[EP.Open]:()=>s.actions.goToOption({focus:nP.Next}),[EP.Closed]:()=>s.actions.openCombobox()});case LL.ArrowUp:return e.preventDefault(),e.stopPropagation(),tL(s.state.comboboxState,{[EP.Open]:()=>s.actions.goToOption({focus:nP.Previous}),[EP.Closed]:()=>{t.flushSync((()=>s.actions.openCombobox())),a.value||s.actions.goToOption({focus:nP.Last})}});case LL.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:nP.First});case LL.PageUp:return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:nP.First});case LL.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:nP.Last});case LL.PageDown:return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:nP.Last});case LL.Escape:return s.state.comboboxState!==EP.Open?void 0:(e.preventDefault(),s.state.optionsElement&&!a.optionsPropsRef.current.static&&e.stopPropagation(),a.mode===xP.Single&&null===a.value&&C(),s.actions.closeCombobox());case LL.Tab:if(s.state.comboboxState!==EP.Open)return;a.mode===xP.Single&&s.state.activationTrigger!==wP.Focus&&s.actions.selectActiveOption(),s.actions.closeCombobox()}})),A=XO((e=>{null==d||d(e),a.mode===xP.Single&&""===e.target.value&&C(),s.actions.openCombobox()})),I=XO((e=>{var t,n,r;let i=null!=(t=e.relatedTarget)?t:eP.find((t=>t!==e.currentTarget));if(!(null!=(n=s.state.optionsElement)&&n.contains(i)||null!=(r=s.state.buttonElement)&&r.contains(i)||s.state.comboboxState!==EP.Open))return e.preventDefault(),a.mode===xP.Single&&null===a.value&&C(),s.actions.closeCombobox()})),O=XO((e=>{var n,r,i;let o=null!=(n=e.relatedTarget)?n:eP.find((t=>t!==e.currentTarget));null!=(r=s.state.buttonElement)&&r.contains(o)||null!=(i=s.state.optionsElement)&&i.contains(o)||a.disabled||a.immediate&&s.state.comboboxState!==EP.Open&&T.microTask((()=>{t.flushSync((()=>s.actions.openCombobox())),s.actions.setActivationTrigger(wP.Focus)}))})),L=FL(),M=function(){var t,n;return null!=(n=null==(t=e.useContext(DL))?void 0:t.value)?n:void 0}(),{isFocused:R,focusProps:F}=$O({autoFocus:h}),{isHovered:P,hoverProps:j}=BO({isDisabled:p}),V=JF(s,(e=>e.optionsElement)),B=e.useMemo((()=>({open:x===EP.Open,disabled:p,invalid:a.invalid,hover:P,focus:R,autofocus:h})),[a,P,R,h,p,a.invalid]),$=uL({ref:b,id:u,role:"combobox",type:m,"aria-controls":null==V?void 0:V.id,"aria-expanded":x===EP.Open,"aria-activedescendant":JF(s,s.selectors.activeDescendantId),"aria-labelledby":L,"aria-describedby":M,"aria-autocomplete":"list",defaultValue:null!=(o=null!=(i=n.defaultValue)?i:void 0!==a.defaultValue?null==f?void 0:f(a.defaultValue):null)?o:a.defaultValue,disabled:p||void 0,autoFocus:h,onCompositionStart:_,onCompositionEnd:N,onKeyDown:D,onChange:A,onFocus:O,onBlur:I},F,j);return sL()({ourProps:$,theirProps:g,slot:B,defaultTag:"input",name:"Combobox.Input"})})),VP=jL,BP=dL((function(t,n){var r,i,o;let s=e.useId(),{id:a=`headlessui-combobox-options-${s}`,hold:l=!1,anchor:c,portal:u=!1,modal:d=!0,transition:f=!1,...p}=t,h=NP("Combobox.Options"),m=IP("Combobox.Options"),g=function(t){return e.useMemo((()=>t?"string"==typeof t?{to:t}:t:null),[t])}(c);g&&(u=!0);let[v,y]=function(t=null){!1===t&&(t=null),"string"==typeof t&&(t={to:t});let n=e.useContext(SF),r=e.useMemo((()=>t),[JSON.stringify(t,((e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t}))]);YO((()=>{null==n||n(null!=r?r:null)}),[n,r]);let i=e.useContext(CF);return e.useMemo((()=>[i.setFloating,t?i.styles:{}]),[i.setFloating,t,i.styles])}(g),[b,E]=e.useState(null),x=function(){let{getFloatingProps:t,slot:n}=e.useContext(CF);return e.useCallback(((...e)=>Object.assign({},t(...e),{"data-anchor":n.anchor})),[t,n])}(),w=NL(n,g?v:null,h.actions.setOptionsElement,E),[T,C,S,k,_]=JF(h,(e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger])),N=SM(C||S),D=SM(k),A=e.useContext(LF),[I,O]=PM(f,b,null!==A?(A&MF.Open)===MF.Open:T===EP.Open);!function(t,n,r){let i=QO((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));e.useEffect((()=>{if(!t)return;let e=null===n?null:n instanceof HTMLElement?n:n.current;if(!e)return;let r=GO();if("undefined"!=typeof ResizeObserver){let t=new ResizeObserver((()=>i.current(e)));t.observe(e),r.add((()=>t.disconnect()))}if("undefined"!=typeof IntersectionObserver){let t=new IntersectionObserver((()=>i.current(e)));t.observe(e),r.add((()=>t.disconnect()))}return()=>r.dispose()}),[n,i,t])}(I,C,h.actions.closeCombobox),IM(!m.__demoMode&&(d&&T===EP.Open),D),function(e,{allowed:t,disallowed:n}={}){let r=sM(e,"inert-others");YO((()=>{var e,i;if(!r)return;let o=GO();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&o.add(cM(t));let s=null!=(i=null==t?void 0:t())?i:[];for(let t of s){if(!t)continue;let e=WO(t);if(!e)continue;let n=t.parentElement;for(;n&&n!==e.body;){for(let e of n.children)s.some((t=>e.contains(t)))||o.add(cM(e));n=n.parentElement}}return o.dispose}),[r,t,n])}(!m.__demoMode&&(d&&T===EP.Open),{allowed:e.useCallback((()=>[C,S,k]),[C,S,k])}),YO((()=>{var e;m.optionsPropsRef.current.static=null!=(e=t.static)&&e}),[m.optionsPropsRef,t.static]),YO((()=>{m.optionsPropsRef.current.hold=l}),[m.optionsPropsRef,l]),function(t,{container:n,accept:r,walk:i}){let o=e.useRef(r),s=e.useRef(i);e.useEffect((()=>{o.current=r,s.current=i}),[r,i]),YO((()=>{if(!n||!t)return;let e=WO(n);if(!e)return;let r=o.current,i=s.current,a=Object.assign((e=>r(e)),{acceptNode:r}),l=e.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)i(l.currentNode)}),[n,t,o,s])}(T===EP.Open,{container:k,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let L=FL([null==S?void 0:S.id]),M=e.useMemo((()=>({open:T===EP.Open,option:void 0})),[T]),R=XO((()=>{h.actions.setActivationTrigger(wP.Pointer)})),F=XO((e=>{e.preventDefault(),h.actions.setActivationTrigger(wP.Pointer)})),P=uL(g?x():{},{"aria-labelledby":L,role:"listbox","aria-multiselectable":m.mode===xP.Multi||void 0,id:a,ref:w,style:{...p.style,...y,"--input-width":tM(C,!0).width,"--button-width":tM(S,!0).width},onWheel:_===wP.Pointer?void 0:R,onMouseDown:F,...FM(O)}),j=I&&T===EP.Closed,V=OF(j,null==(r=m.virtual)?void 0:r.options),B=OF(j,m.value),$=XO((e=>m.compare(B,e))),U=e.useMemo((()=>{if(!m.virtual)return m;if(void 0===V)throw new Error("Missing `options` in virtual mode");return V!==m.virtual.options?{...m,virtual:{...m.virtual,options:V}}:m}),[m,V,null==(i=m.virtual)?void 0:i.options]);m.virtual&&Object.assign(p,{children:e.createElement(AP.Provider,{value:U},e.createElement(LP,{slot:M},p.children))});let H=sL(),q=e.useMemo((()=>m.mode===xP.Multi?m:{...m,isSelected:$}),[m,$]);return e.createElement(gP,{enabled:!!u&&(t.static||I),ownerDocument:N},e.createElement(AP.Provider,{value:q},H({ourProps:P,theirProps:{...p,children:e.createElement(IF,{freeze:j},"function"==typeof p.children?null==(o=p.children)?void 0:o.call(p,M):p.children)},slot:M,defaultTag:"div",features:RP,visible:I,name:"Combobox.Options"})))})),$P=dL((function(t,n){var r,i,o;let s=IP("Combobox.Option"),a=NP("Combobox.Option"),l=e.useId(),{id:c=`headlessui-combobox-option-${l}`,value:u,disabled:d=null!=(o=null==(i=null==(r=s.virtual)?void 0:r.disabled)?void 0:i.call(r,u))&&o,order:f=null,...p}=t,[h]=JF(a,(e=>[e.inputElement])),m=kM(h),g=JF(a,e.useCallback((e=>a.selectors.isActive(e,u,c)),[u,c])),v=s.isSelected(u),y=e.useRef(null),b=QO({disabled:d,value:u,domRef:y,order:f}),E=e.useContext(OP),x=NL(n,y,E?E.measureElement:null),w=XO((()=>{a.actions.setIsTyping(!1),a.actions.onChange(u)}));YO((()=>a.actions.registerOption(c,b)),[b,c]);let T=JF(a,e.useCallback((e=>a.selectors.shouldScrollIntoView(e,u,c)),[u,c]));YO((()=>{if(T)return GO().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=y.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[T,y]);let C=XO((e=>{e.preventDefault(),e.button===oP.Left&&(d||(w(),xM()||requestAnimationFrame((()=>m())),s.mode===xP.Single&&a.actions.closeCombobox()))})),S=XO((()=>{if(d)return a.actions.goToOption({focus:nP.Nothing});let e=s.calculateIndex(u);a.actions.goToOption({focus:nP.Specific,idx:e})})),k=function(){let t=e.useRef([-1,-1]);return{wasMoved(e){let n=OM(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=OM(e)}}}(),_=XO((e=>k.update(e))),N=XO((e=>{if(!k.wasMoved(e)||d||g)return;let t=s.calculateIndex(u);a.actions.goToOption({focus:nP.Specific,idx:t},wP.Pointer)})),D=XO((e=>{k.wasMoved(e)&&(d||g&&(s.optionsPropsRef.current.hold||a.actions.goToOption({focus:nP.Nothing})))})),A=e.useMemo((()=>({active:g,focus:g,selected:v,disabled:d})),[g,v,d]),I={id:c,ref:x,role:"option",tabIndex:!0===d?void 0:-1,"aria-disabled":!0===d||void 0,"aria-selected":v,disabled:void 0,onMouseDown:C,onFocus:S,onPointerEnter:_,onMouseEnter:_,onPointerMove:N,onMouseMove:N,onPointerLeave:D,onMouseLeave:D};return sL()({ourProps:I,theirProps:p,slot:A,defaultTag:"div",name:"Combobox.Option"})})),UP=Object.assign(FP,{Input:jP,Button:PP,Label:VP,Options:BP,Option:$P});const HP=()=>{const t=h.c(32),n=PI(),{push:r}=jI(),i=e.useRef(null),o=function(){const e=h.c(5),t=PI(),{schema:n}=nd();let r;e[0]!==t?(r=t.at(-1),e[0]=t,e[1]=r):r=e[1];const i=r;let o;e[2]!==i||e[3]!==n?(o=e=>{const t={within:[],types:[],fields:[]};if(!n)return t;const r=i.def,o=n.getTypeMap();let s=Object.keys(o);r&&(s=s.filter((e=>e!==r.name)),s.unshift(r.name));for(const n of s){if(t.within.length+t.types.length+t.fields.length>=100)break;const i=o[n];if(r!==i&&qP(n,e)&&t.types.push({type:i}),!wt(i)&&!Ct(i)&&!Nt(i))continue;const s=i.getFields();for(const n in s){const o=s[n];let a;if(!qP(n,e)){if(!("args"in o))continue;if(a=o.args.filter((t=>qP(t.name,e))),0===a.length)continue}t[r===i?"within":"fields"].push(...a?a.map((e=>({type:i,field:o,argument:e}))):[{type:i,field:o}])}}return t},e[2]=i,e[3]=n,e[4]=o):o=e[4];return o}(),[s,a]=e.useState("");let l;t[0]!==o||t[1]!==s?(l=()=>o(s),t[0]=o,t[1]=s,t[2]=l):l=t[2];const[c,u]=e.useState(l);let d;t[3]!==o?(d=Zp(200,(e=>{u(o(e))})),t[3]=o,t[4]=d):d=t[4];const f=d,[m]=e.useState(i),g=m.current===document.activeElement;let v,y,b,E,x,w,T;if(t[5]!==f||t[6]!==s?(v=()=>{f(s)},y=[f,s],t[5]=f,t[6]=s,t[7]=v,t[8]=y):(v=t[7],y=t[8]),e.useEffect(v,y),t[9]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{const e=function(e){e.metaKey&&"k"===e.key&&i.current.focus()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},E=[],t[9]=b,t[10]=E):(b=t[9],E=t[10]),e.useEffect(b,E),t[11]!==n||t[12]!==r){let e;x=n.at(-1),t[16]!==r?(e=e=>{r("field"in e?{name:e.field.name,def:e.field}:{name:e.type.name,def:e.type})},t[16]=r,t[17]=e):e=t[17],w=e,T=1===n.length||wt(x.def)||Ct(x.def)||Nt(x.def),t[11]=n,t[12]=r,t[13]=x,t[14]=w,t[15]=T}else x=t[13],w=t[14],T=t[15];if(!T)return null;const C=g?void 0:"idle",S=`Search ${x.name}...`;let k,_,N,D,A,I;return t[18]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{i.current.focus()},k=p.jsx(Sm,{}),t[18]=k,t[19]=_):(k=t[18],_=t[19]),t[20]===Symbol.for("react.memo_cache_sentinel")?(N=e=>a(e.target.value),t[20]=N):N=t[20],t[21]!==s?(D=p.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:_,children:[k,p.jsx(jP,{autoComplete:"off",onChange:N,placeholder:(Bu?"⌘":"Ctrl")+" K",ref:i,value:s,"data-cy":"doc-explorer-input"})]}),t[21]=s,t[22]=D):D=t[22],t[23]!==g||t[24]!==c?(A=g&&p.jsxs(BP,{"data-cy":"doc-explorer-list",children:[c.within.length+c.types.length+c.fields.length===0?p.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):c.within.map(GP),c.within.length>0&&c.types.length+c.fields.length>0?p.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,c.types.map(KP),c.fields.map(YP)]}),t[23]=g,t[24]=c,t[25]=A):A=t[25],t[26]!==w||t[27]!==D||t[28]!==A||t[29]!==C||t[30]!==S?(I=p.jsxs(UP,{as:"div",className:"graphiql-doc-explorer-search",onChange:w,"data-state":C,"aria-label":S,children:[D,A]}),t[26]=w,t[27]=D,t[28]=A,t[29]=C,t[30]=S,t[31]=I):I=t[31],I};function qP(e,t){try{const n=t.replaceAll(/[^_0-9A-Za-z]/g,(e=>"\\"+e));return new RegExp(n,"i").test(e)}catch{return e.toLowerCase().includes(t.toLowerCase())}}const WP=e=>{const t=h.c(2),{type:n}=e;let r;return t[0]!==n.name?(r=p.jsx("span",{className:"graphiql-doc-explorer-search-type",children:n.name}),t[0]=n.name,t[1]=r):r=t[1],r},zP=e=>{const t=h.c(7),{field:n,argument:r}=e;let i,o,s;return t[0]!==n.name?(i=p.jsx("span",{className:"graphiql-doc-explorer-search-field",children:n.name}),t[0]=n.name,t[1]=i):i=t[1],t[2]!==r?(o=r?p.jsxs(p.Fragment,{children:["(",p.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:r.name}),":"," ",UI(r.type,QP),")"]}):null,t[2]=r,t[3]=o):o=t[3],t[4]!==i||t[5]!==o?(s=p.jsxs(p.Fragment,{children:[i,o]}),t[4]=i,t[5]=o,t[6]=s):s=t[6],s};function GP(e,t){return p.jsx($P,{value:e,"data-cy":"doc-explorer-option",children:p.jsx(zP,{field:e.field,argument:e.argument})},`within-${t}`)}function KP(e,t){return p.jsx($P,{value:e,"data-cy":"doc-explorer-option",children:p.jsx(WP,{type:e.type})},`type-${t}`)}function YP(e,t){return p.jsxs($P,{value:e,"data-cy":"doc-explorer-option",children:[p.jsx(WP,{type:e.type}),".",p.jsx(zP,{field:e.field,argument:e.argument})]},`field-${t}`)}function QP(e){return p.jsx(WP,{type:e})}const XP=e=>{const t=h.c(6),{field:n}=e,{push:r}=jI();let i,o;return t[0]!==n||t[1]!==r?(i=e=>{e.preventDefault(),r({name:n.name,def:n})},t[0]=n,t[1]=r,t[2]=i):i=t[2],t[3]!==n.name||t[4]!==i?(o=p.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:i,href:"#",children:n.name}),t[3]=n.name,t[4]=i,t[5]=o):o=t[5],o},JP=e=>{const t=h.c(2),{type:n}=e;let r;return t[0]!==n?(r=Ht(n)?p.jsxs(p.Fragment,{children:[n.description?p.jsx(kw,{type:"description",children:n.description}):null,p.jsx(ZP,{type:n}),p.jsx(ej,{type:n}),p.jsx(nj,{type:n}),p.jsx(ij,{type:n})]}):null,t[0]=n,t[1]=r):r=t[1],r},ZP=e=>{const t=h.c(5),{type:n}=e;if(!wt(n))return null;let r;t[0]!==n?(r=n.getInterfaces(),t[0]=n,t[1]=r):r=t[1];const i=r;let o;return t[2]!==i.length||t[3]!==n?(o=i.length>0?p.jsx(GI,{title:"Implements",children:n.getInterfaces().map(oj)}):null,t[2]=i.length,t[3]=n,t[4]=o):o=t[4],o},ej=t=>{const n=h.c(12),{type:r}=t,[i,o]=e.useState(!1);let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{o(!0)},n[0]=s):s=n[0];const a=s;if(!wt(r)&&!Ct(r)&&!Nt(r))return null;let l,c,u,d,f;if(n[1]!==r){const e=r.getFields();c=[],l=[];for(const t of Object.keys(e).map((t=>e[t])))t.deprecationReason?l.push(t):c.push(t);u=c.length>0?p.jsx(GI,{title:"Fields",children:c.map(sj)}):null,n[1]=r,n[2]=l,n[3]=c,n[4]=u}else l=n[2],c=n[3],u=n[4];return n[5]!==l||n[6]!==c.length||n[7]!==i?(d=l.length>0?i||0===c.length?p.jsx(GI,{title:"Deprecated Fields",children:l.map(aj)}):p.jsx(ig,{type:"button",onClick:a,children:"Show Deprecated Fields"}):null,n[5]=l,n[6]=c.length,n[7]=i,n[8]=d):d=n[8],n[9]!==u||n[10]!==d?(f=p.jsxs(p.Fragment,{children:[u,d]}),n[9]=u,n[10]=d,n[11]=f):f=n[11],f},tj=e=>{const t=h.c(22),{field:n}=e;let r,i,o,s,a,l,c,u,d;if(t[0]!==n){const e="args"in n?n.args.filter(lj):[];o="graphiql-doc-explorer-item",r=p.jsx(XP,{field:n}),i=e.length>0?p.jsxs(p.Fragment,{children:["(",p.jsx("span",{children:e.map((t=>1===e.length?p.jsx(qI,{arg:t,inline:!0},t.name):p.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:p.jsx(qI,{arg:t,inline:!0})},t.name)))}),")"]}):null,t[0]=n,t[1]=r,t[2]=i,t[3]=o}else r=t[1],i=t[2],o=t[3];return t[4]!==n.type?(s=p.jsx(HI,{type:n.type}),t[4]=n.type,t[5]=s):s=t[5],t[6]!==n?(a=p.jsx($I,{field:n}),t[6]=n,t[7]=a):a=t[7],t[8]!==r||t[9]!==i||t[10]!==s||t[11]!==a?(l=p.jsxs("div",{children:[r,i,": ",s,a]}),t[8]=r,t[9]=i,t[10]=s,t[11]=a,t[12]=l):l=t[12],t[13]!==n.description?(c=n.description?p.jsx(kw,{type:"description",onlyShowFirstChild:!0,children:n.description}):null,t[13]=n.description,t[14]=c):c=t[14],t[15]!==n.deprecationReason?(u=p.jsx(WI,{children:n.deprecationReason}),t[15]=n.deprecationReason,t[16]=u):u=t[16],t[17]!==o||t[18]!==l||t[19]!==c||t[20]!==u?(d=p.jsxs("div",{className:o,children:[l,c,u]}),t[17]=o,t[18]=l,t[19]=c,t[20]=u,t[21]=d):d=t[21],d},nj=t=>{const n=h.c(12),{type:r}=t,[i,o]=e.useState(!1);let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{o(!0)},n[0]=s):s=n[0];const a=s;if(!_t(r))return null;let l,c,u,d,f;if(n[1]!==r){u=[],l=[];for(const e of r.getValues())e.deprecationReason?l.push(e):u.push(e);c=u.length>0?p.jsx(GI,{title:"Enum Values",children:u.map(cj)}):null,n[1]=r,n[2]=l,n[3]=c,n[4]=u}else l=n[2],c=n[3],u=n[4];return n[5]!==l||n[6]!==i||n[7]!==u.length?(d=l.length>0?i||0===u.length?p.jsx(GI,{title:"Deprecated Enum Values",children:l.map(uj)}):p.jsx(ig,{type:"button",onClick:a,children:"Show Deprecated Values"}):null,n[5]=l,n[6]=i,n[7]=u.length,n[8]=d):d=n[8],n[9]!==c||n[10]!==d?(f=p.jsxs(p.Fragment,{children:[c,d]}),n[9]=c,n[10]=d,n[11]=f):f=n[11],f},rj=e=>{const t=h.c(10),{value:n}=e;let r,i,o,s;return t[0]!==n.name?(r=p.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:n.name}),t[0]=n.name,t[1]=r):r=t[1],t[2]!==n.description?(i=n.description&&p.jsx(kw,{type:"description",children:n.description}),t[2]=n.description,t[3]=i):i=t[3],t[4]!==n.deprecationReason?(o=n.deprecationReason&&p.jsx(kw,{type:"deprecation",children:n.deprecationReason}),t[4]=n.deprecationReason,t[5]=o):o=t[5],t[6]!==r||t[7]!==i||t[8]!==o?(s=p.jsxs("div",{className:"graphiql-doc-explorer-item",children:[r,i,o]}),t[6]=r,t[7]=i,t[8]=o,t[9]=s):s=t[9],s},ij=e=>{const t=h.c(6),{type:n}=e,{schema:r}=nd();if(!r||!Rt(n))return null;const i=Ct(n)?"Implementations":"Possible Types";let o,s;return t[0]!==r||t[1]!==n?(o=r.getPossibleTypes(n).map(dj),t[0]=r,t[1]=n,t[2]=o):o=t[2],t[3]!==i||t[4]!==o?(s=p.jsx(GI,{title:i,children:o}),t[3]=i,t[4]=o,t[5]=s):s=t[5],s};function oj(e){return p.jsx("div",{children:p.jsx(HI,{type:e})},e.name)}function sj(e){return p.jsx(tj,{field:e},e.name)}function aj(e){return p.jsx(tj,{field:e},e.name)}function lj(e){return!e.deprecationReason}function cj(e){return p.jsx(rj,{value:e},e.name)}function uj(e){return p.jsx(rj,{value:e},e.name)}function dj(e){return p.jsx("div",{children:p.jsx(HI,{type:e})},e.name)}const fj={title:"Documentation Explorer",icon:function(){const{visiblePlugin:e}=Zu();return e===fj?p.jsx(ym,{}):p.jsx(bm,{})},content:()=>{const e=h.c(38),{fetchError:t,isFetching:n,schema:r,validationErrors:i}=nd(),o=PI(),{pop:s}=jI();let a,l,c,u,d,f,m,g,v,y;if(e[0]!==o||e[1]!==t||e[2]!==n||e[3]!==r||e[4]!==i){if(l=o.at(-1),a=null,t){let t;e[7]===Symbol.for("react.memo_cache_sentinel")?(t=p.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}),e[7]=t):t=e[7],a=t}else if(i.length>0){let t;e[8]!==i[0].message?(t=p.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",i[0].message]}),e[8]=i[0].message,e[9]=t):t=e[9],a=t}else if(n){let t;e[10]===Symbol.for("react.memo_cache_sentinel")?(t=p.jsx(_w,{}),e[10]=t):t=e[10],a=t}else if(r){if(1===o.length){let t;e[12]!==r?(t=p.jsx(tO,{schema:r}),e[12]=r,e[13]=t):t=e[13],a=t}else if(Et(l.def)){let t;e[14]!==l.def?(t=p.jsx(JP,{type:l.def}),e[14]=l.def,e[15]=t):t=e[15],a=t}else if(l.def){let t;e[16]!==l.def?(t=p.jsx(YI,{field:l.def}),e[16]=l.def,e[17]=t):t=e[17],a=t}}else{let t;e[11]===Symbol.for("react.memo_cache_sentinel")?(t=p.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"}),e[11]=t):t=e[11],a=t}e[0]=o,e[1]=t,e[2]=n,e[3]=r,e[4]=i,e[5]=a,e[6]=l}else a=e[5],l=e[6];if(o.length>1){let t;e[18]!==o?(t=o.at(-2),e[18]=o,e[19]=t):t=e[19],c=t.name}return e[20]!==s||e[21]!==c?(u=c&&p.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:e=>{e.preventDefault(),s()},"aria-label":`Go back to ${c}`,children:[p.jsx(um,{}),c]}),e[20]=s,e[21]=c,e[22]=u):u=e[22],e[23]!==l.name?(d=p.jsx("div",{className:"graphiql-doc-explorer-title",children:l.name}),e[23]=l.name,e[24]=d):d=e[24],e[25]!==u||e[26]!==d?(f=p.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[u,d]}),e[25]=u,e[26]=d,e[27]=f):f=e[27],e[28]!==l.name?(m=p.jsx(HP,{},l.name),e[28]=l.name,e[29]=m):m=e[29],e[30]!==f||e[31]!==m?(g=p.jsxs("div",{className:"graphiql-doc-explorer-header",children:[f,m]}),e[30]=f,e[31]=m,e[32]=g):g=e[32],e[33]!==a?(v=p.jsx("div",{className:"graphiql-doc-explorer-content",children:a}),e[33]=a,e[34]=v):v=e[34],e[35]!==g||e[36]!==v?(y=p.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[g,v]}),e[35]=g,e[36]=v,e[37]=y):y=e[37],y}},pj=["light","dark","system"],hj="graphiql-session-tab-",mj=t=>{const n=h.c(231),r=t.isHeadersEditorEnabled??!0;let i;n[0]===Symbol.for("react.memo_cache_sentinel")?(i={nonNull:!0},n[0]=i):i=n[0];const{initialVariables:o,initialHeaders:s,setShouldPersistHeaders:a,addTab:l,moveTab:c,closeTab:u,changeTab:d,shouldPersistHeaders:f,tabs:m,activeTabIndex:g}=Qh(i);let v;n[1]===Symbol.for("react.memo_cache_sentinel")?(v={nonNull:!0},n[1]=v):v=n[1];const y=em(v),{isFetching:b,introspect:E}=nd(),x=Pu(),{visiblePlugin:w,setVisiblePlugin:T,plugins:C}=Zu(),S=t.forcedTheme&&pj.includes(t.forcedTheme)?t.forcedTheme:void 0,{theme:k,setTheme:_}=sm(t.defaultTheme);let N,D;n[2]!==S||n[3]!==_?(N=()=>{"system"===S?_(null):"light"!==S&&"dark"!==S||_(S)},D=[S,_],n[2]=S,n[3]=_,n[4]=N,n[5]=D):(N=n[4],D=n[5]),e.useEffect(N,D);const A=null==w?void 0:w.content,I=w?void 0:"first";let O;n[6]!==T||n[7]!==I?(O={defaultSizeRelation:.3333333333333333,direction:"horizontal",initiallyHidden:I,onHiddenElementChange(e){"first"===e&&T(null)},sizeThresholdSecond:200,storageKey:"docExplorerFlex"},n[6]=T,n[7]=I,n[8]=O):O=n[8];const L=eg(O);let M;n[9]===Symbol.for("react.memo_cache_sentinel")?(M={direction:"horizontal",storageKey:"editorFlex"},n[9]=M):M=n[9];const R=eg(M);let F,P;F="variables"!==t.defaultEditorToolsVisibility&&"headers"!==t.defaultEditorToolsVisibility?"boolean"!=typeof t.defaultEditorToolsVisibility?o||s?void 0:"second":t.defaultEditorToolsVisibility?void 0:"second":void 0,n[10]!==F?(P={defaultSizeRelation:3,direction:"vertical",initiallyHidden:F,sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"},n[10]=F,n[11]=P):P=n[11];const j=eg(P);let V;n[12]!==s||n[13]!==o||n[14]!==r||n[15]!==t.defaultEditorToolsVisibility?(V=()=>"variables"===t.defaultEditorToolsVisibility||"headers"===t.defaultEditorToolsVisibility?t.defaultEditorToolsVisibility:!o&&s&&r?"headers":"variables",n[12]=s,n[13]=o,n[14]=r,n[15]=t.defaultEditorToolsVisibility,n[16]=V):V=n[16];const[B,$]=e.useState(V),[U,H]=e.useState(null),[q,W]=e.useState(null);let z;if(n[17]!==t.children||n[18]!==t.onCopyQuery||n[19]!==t.onPrettifyQuery){let r,i,o;n[21]!==t.onCopyQuery||n[22]!==t.onPrettifyQuery?(r=(n,r)=>{e:switch(function(e){if(e&&"object"==typeof e&&"type"in e&&"function"==typeof e.type)return e.type}(r)){case xj.Logo:n.logo=r;break e;case xj.Toolbar:n.toolbar=e.cloneElement(r,{onCopyQuery:t.onCopyQuery,onPrettifyQuery:t.onPrettifyQuery});break e;case xj.Footer:n.footer=r}return n},n[21]=t.onCopyQuery,n[22]=t.onPrettifyQuery,n[23]=r):r=n[23],n[24]===Symbol.for("react.memo_cache_sentinel")?(i=p.jsx(xj.Logo,{}),n[24]=i):i=n[24],n[25]!==t.onCopyQuery||n[26]!==t.onPrettifyQuery?(o=p.jsx(xj.Toolbar,{onCopyQuery:t.onCopyQuery,onPrettifyQuery:t.onPrettifyQuery}),n[25]=t.onCopyQuery,n[26]=t.onPrettifyQuery,n[27]=o):o=n[27],z=e.Children.toArray(t.children).reduce(r,{logo:i,toolbar:o}),n[17]=t.children,n[18]=t.onCopyQuery,n[19]=t.onPrettifyQuery,n[20]=z}else z=n[20];const{logo:G,toolbar:K,footer:Y}=z;let Q;n[28]!==L?(Q=()=>{"first"===L.hiddenElement&&L.setHiddenElement(null)},n[28]=L,n[29]=Q):Q=n[29];const X=Q;let J;n[30]!==x?(J=()=>{try{x.clear(),W("success")}catch{W("error")}},n[30]=x,n[31]=J):J=n[31];const Z=J;let ee;n[32]!==a?(ee=e=>{a("true"===e.currentTarget.dataset.value)},n[32]=a,n[33]=ee):ee=n[33];const te=ee;let ne;n[34]!==_?(ne=e=>{const t=e.currentTarget.dataset.theme;_(t||null)},n[34]=_,n[35]=ne):ne=n[35];const re=ne;let ie;n[36]===Symbol.for("react.memo_cache_sentinel")?(ie=e=>{H(e.currentTarget.dataset.value)},n[36]=ie):ie=n[36];const oe=ie;let se;n[37]!==L||n[38]!==C||n[39]!==T||n[40]!==w?(se=e=>{const t=Number(e.currentTarget.dataset.index),n=C.find(((e,n)=>t===n));n===w?(T(null),L.setHiddenElement("first")):(T(n),L.setHiddenElement(null))},n[37]=L,n[38]=C,n[39]=T,n[40]=w,n[41]=se):se=n[41];const ae=se;let le;n[42]!==j?(le=e=>{"second"===j.hiddenElement&&j.setHiddenElement(null),$(e.currentTarget.dataset.name)},n[42]=j,n[43]=le):le=n[43];const ce=le;let ue;n[44]!==j?(ue=()=>{j.setHiddenElement("second"===j.hiddenElement?null:"second")},n[44]=j,n[45]=ue):ue=n[45];const de=ue;let fe;n[46]===Symbol.for("react.memo_cache_sentinel")?(fe=e=>{e||H(null)},n[46]=fe):fe=n[46];const pe=fe;let he;n[47]===Symbol.for("react.memo_cache_sentinel")?(he=e=>{e||(H(null),W(null))},n[47]=he):he=n[47];const me=he,ge=t.confirmCloseTab;let ve;n[48]!==g||n[49]!==u||n[50]!==ge||n[51]!==y?(ve=async e=>{const t=e.currentTarget.previousSibling,n=Number(t.id.replace(hj,""));(!ge||await ge(n))&&(g===n&&y.stop(),u(n))},n[48]=g,n[49]=u,n[50]=ge,n[51]=y,n[52]=ve):ve=n[52];const ye=ve;let be;n[53]!==d||n[54]!==y?(be=e=>{const t=Number(e.currentTarget.id.replace(hj,""));y.stop(),d(t)},n[53]=d,n[54]=y,n[55]=be):be=n[55];const Ee=be;let xe,we,Te;if(n[56]!==t.className?(xe=$m("graphiql-container",t.className),n[56]=t.className,n[57]=xe):xe=n[57],n[58]!==ae||n[59]!==C||n[60]!==w){let e;n[62]!==ae||n[63]!==w?(e=(e,t)=>{const n=e===w,r=`${n?"Hide":"Show"} ${e.title}`;return p.jsx(mI,{label:r,children:p.jsx(rg,{type:"button",className:$m(n&&"active"),onClick:ae,"data-index":t,"aria-label":r,children:p.jsx(e.icon,{"aria-hidden":"true"})})},e.title)},n[62]=ae,n[63]=w,n[64]=e):e=n[64],we=C.map(e),n[58]=ae,n[59]=C,n[60]=w,n[61]=we}else we=n[61];n[65]===Symbol.for("react.memo_cache_sentinel")?(Te={marginTop:"auto"},n[65]=Te):Te=n[65];const Ce=b&&"graphiql-spin";let Se,ke,_e,Ne,De,Ae,Ie,Oe,Le,Me;n[66]!==Ce?(Se=$m(Ce),n[66]=Ce,n[67]=Se):Se=n[67],n[68]!==Se?(ke=p.jsx(Im,{className:Se,"aria-hidden":"true"}),n[68]=Se,n[69]=ke):ke=n[69],n[70]!==E||n[71]!==b||n[72]!==ke?(_e=p.jsx(mI,{label:"Re-fetch GraphQL schema",children:p.jsx(rg,{type:"button",disabled:b,onClick:E,"aria-label":"Re-fetch GraphQL schema",style:Te,children:ke})}),n[70]=E,n[71]=b,n[72]=ke,n[73]=_e):_e=n[73],n[74]===Symbol.for("react.memo_cache_sentinel")?(Ne=p.jsx(mI,{label:"Open short keys dialog",children:p.jsx(rg,{type:"button","data-value":"short-keys",onClick:oe,"aria-label":"Open short keys dialog",children:p.jsx(Cm,{"aria-hidden":"true"})})}),n[74]=Ne):Ne=n[74],n[75]===Symbol.for("react.memo_cache_sentinel")?(De=p.jsx(mI,{label:"Open settings dialog",children:p.jsx(rg,{type:"button","data-value":"settings",onClick:oe,"aria-label":"Open settings dialog",children:p.jsx(Lm,{"aria-hidden":"true"})})}),n[75]=De):De=n[75],n[76]!==we||n[77]!==_e?(Ae=p.jsxs("div",{className:"graphiql-sidebar",children:[we,_e,Ne,De]}),n[76]=we,n[77]=_e,n[78]=Ae):Ae=n[78],n[79]===Symbol.for("react.memo_cache_sentinel")?(Ie={minWidth:"200px"},n[79]=Ie):Ie=n[79],n[80]!==A?(Oe=A?p.jsx(A,{}):null,n[80]=A,n[81]=Oe):Oe=n[81],n[82]!==L.firstRef||n[83]!==Oe?(Le=p.jsx("div",{ref:L.firstRef,className:"graphiql-plugin",style:Ie,children:Oe}),n[82]=L.firstRef,n[83]=Oe,n[84]=Le):Le=n[84],n[85]!==L.dragBarRef||n[86]!==w?(Me=w&&p.jsx("div",{className:"graphiql-horizontal-drag-bar",ref:L.dragBarRef}),n[85]=L.dragBarRef,n[86]=w,n[87]=Me):Me=n[87];const Re=L.secondRef;let Fe,Pe,je,Ve,Be;if(n[88]!==g||n[89]!==Ee||n[90]!==ye||n[91]!==m){let e;n[93]!==g||n[94]!==Ee||n[95]!==ye?(e=(e,t,n)=>p.jsxs(MA,{value:e,isActive:t===g,children:[p.jsx(MA.Button,{"aria-controls":"graphiql-session",id:`graphiql-session-tab-${t}`,title:e.title,onClick:Ee,children:e.title}),n.length>1&&p.jsx(MA.Close,{onClick:ye})]},e.id),n[93]=g,n[94]=Ee,n[95]=ye,n[96]=e):e=n[96],Fe=m.map(e),n[88]=g,n[89]=Ee,n[90]=ye,n[91]=m,n[92]=Fe}else Fe=n[92];n[97]!==c||n[98]!==Fe||n[99]!==m?(Pe=p.jsx(RA,{values:m,onReorder:c,"aria-label":"Select active operation",className:"no-scrollbar",children:Fe}),n[97]=c,n[98]=Fe,n[99]=m,n[100]=Pe):Pe=n[100],n[101]===Symbol.for("react.memo_cache_sentinel")?(je=p.jsx(Dm,{"aria-hidden":"true"}),n[101]=je):je=n[101],n[102]!==l?(Ve=p.jsx(mI,{label:"New tab",children:p.jsx(rg,{type:"button",className:"graphiql-tab-add",onClick:l,"aria-label":"New tab",children:je})}),n[102]=l,n[103]=Ve):Ve=n[103],n[104]!==G||n[105]!==Pe||n[106]!==Ve?(Be=p.jsxs("div",{className:"graphiql-session-header",children:[Pe,Ve,G]}),n[104]=G,n[105]=Pe,n[106]=Ve,n[107]=Be):Be=n[107];const $e=`${hj}${g}`,Ue=R.firstRef;let He,qe,We,ze;n[108]!==X||n[109]!==t.editorTheme||n[110]!==t.keyMap||n[111]!==t.onCopyQuery||n[112]!==t.onEditQuery||n[113]!==t.onPrettifyQuery||n[114]!==t.readOnly?(He=p.jsx(Wm,{editorTheme:t.editorTheme,keyMap:t.keyMap,onClickReference:X,onCopyQuery:t.onCopyQuery,onPrettifyQuery:t.onPrettifyQuery,onEdit:t.onEditQuery,readOnly:t.readOnly}),n[108]=X,n[109]=t.editorTheme,n[110]=t.keyMap,n[111]=t.onCopyQuery,n[112]=t.onEditQuery,n[113]=t.onPrettifyQuery,n[114]=t.readOnly,n[115]=He):He=n[115],n[116]===Symbol.for("react.memo_cache_sentinel")?(qe=p.jsx(vI,{}),n[116]=qe):qe=n[116],n[117]!==K?(We=p.jsxs("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands",children:[qe,K]}),n[117]=K,n[118]=We):We=n[118],n[119]!==j.firstRef||n[120]!==He||n[121]!==We?(ze=p.jsxs("section",{className:"graphiql-query-editor","aria-label":"Query Editor",ref:j.firstRef,children:[He,We]}),n[119]=j.firstRef,n[120]=He,n[121]=We,n[122]=ze):ze=n[122];const Ge=j.dragBarRef,Ke="variables"===B&&"second"!==j.hiddenElement&&"active";let Ye,Qe,Xe;n[123]!==Ke?(Ye=$m(Ke),n[123]=Ke,n[124]=Ye):Ye=n[124],n[125]!==ce||n[126]!==Ye?(Qe=p.jsx(rg,{type:"button",className:Ye,onClick:ce,"data-name":"variables",children:"Variables"}),n[125]=ce,n[126]=Ye,n[127]=Qe):Qe=n[127],n[128]!==B||n[129]!==j.hiddenElement||n[130]!==ce||n[131]!==r?(Xe=r&&p.jsx(rg,{type:"button",className:$m("headers"===B&&"second"!==j.hiddenElement&&"active"),onClick:ce,"data-name":"headers",children:"Headers"}),n[128]=B,n[129]=j.hiddenElement,n[130]=ce,n[131]=r,n[132]=Xe):Xe=n[132];const Je="second"===j.hiddenElement?"Show editor tools":"Hide editor tools",Ze="second"===j.hiddenElement?"Show editor tools":"Hide editor tools";let et,tt,nt,rt;n[133]!==j.hiddenElement?(et="second"===j.hiddenElement?p.jsx(dm,{className:"graphiql-chevron-icon","aria-hidden":"true"}):p.jsx(cm,{className:"graphiql-chevron-icon","aria-hidden":"true"}),n[133]=j.hiddenElement,n[134]=et):et=n[134],n[135]!==Ze||n[136]!==et||n[137]!==de?(tt=p.jsx(rg,{type:"button",onClick:de,"aria-label":Ze,className:"graphiql-toggle-editor-tools",children:et}),n[135]=Ze,n[136]=et,n[137]=de,n[138]=tt):tt=n[138],n[139]!==Je||n[140]!==tt?(nt=p.jsx(mI,{label:Je,children:tt}),n[139]=Je,n[140]=tt,n[141]=nt):nt=n[141],n[142]!==j.dragBarRef||n[143]!==Qe||n[144]!==Xe||n[145]!==nt?(rt=p.jsxs("div",{ref:Ge,className:"graphiql-editor-tools",children:[Qe,Xe,nt]}),n[142]=j.dragBarRef,n[143]=Qe,n[144]=Xe,n[145]=nt,n[146]=rt):rt=n[146];const it="variables"===B?"Variables":"Headers",ot="variables"!==B;let st,at,lt,ct,ut,dt,ft,pt,ht,mt,gt;n[147]!==X||n[148]!==t.editorTheme||n[149]!==t.keyMap||n[150]!==t.onEditVariables||n[151]!==t.readOnly||n[152]!==ot?(st=p.jsx(Zm,{editorTheme:t.editorTheme,isHidden:ot,keyMap:t.keyMap,onEdit:t.onEditVariables,onClickReference:X,readOnly:t.readOnly}),n[147]=X,n[148]=t.editorTheme,n[149]=t.keyMap,n[150]=t.onEditVariables,n[151]=t.readOnly,n[152]=ot,n[153]=st):st=n[153],n[154]!==B||n[155]!==r||n[156]!==t.editorTheme||n[157]!==t.keyMap||n[158]!==t.onEditHeaders||n[159]!==t.readOnly?(at=r&&p.jsx(Um,{editorTheme:t.editorTheme,isHidden:"headers"!==B,keyMap:t.keyMap,onEdit:t.onEditHeaders,readOnly:t.readOnly}),n[154]=B,n[155]=r,n[156]=t.editorTheme,n[157]=t.keyMap,n[158]=t.onEditHeaders,n[159]=t.readOnly,n[160]=at):at=n[160],n[161]!==j.secondRef||n[162]!==it||n[163]!==st||n[164]!==at?(lt=p.jsxs("section",{className:"graphiql-editor-tool","aria-label":it,ref:j.secondRef,children:[st,at]}),n[161]=j.secondRef,n[162]=it,n[163]=st,n[164]=at,n[165]=lt):lt=n[165],n[166]!==R.firstRef||n[167]!==ze||n[168]!==rt||n[169]!==lt?(ct=p.jsxs("div",{className:"graphiql-editors",ref:Ue,children:[ze,rt,lt]}),n[166]=R.firstRef,n[167]=ze,n[168]=rt,n[169]=lt,n[170]=ct):ct=n[170],n[171]!==R.dragBarRef?(ut=p.jsx("div",{className:"graphiql-horizontal-drag-bar",ref:R.dragBarRef}),n[171]=R.dragBarRef,n[172]=ut):ut=n[172],n[173]!==y.isFetching?(dt=y.isFetching?p.jsx(_w,{}):null,n[173]=y.isFetching,n[174]=dt):dt=n[174],n[175]!==t.editorTheme||n[176]!==t.keyMap||n[177]!==t.responseTooltip?(ft=p.jsx(Jm,{editorTheme:t.editorTheme,responseTooltip:t.responseTooltip,keyMap:t.keyMap}),n[175]=t.editorTheme,n[176]=t.keyMap,n[177]=t.responseTooltip,n[178]=ft):ft=n[178],n[179]!==R.secondRef||n[180]!==Y||n[181]!==dt||n[182]!==ft?(pt=p.jsxs("div",{className:"graphiql-response",ref:R.secondRef,children:[dt,ft,Y]}),n[179]=R.secondRef,n[180]=Y,n[181]=dt,n[182]=ft,n[183]=pt):pt=n[183],n[184]!==$e||n[185]!==ct||n[186]!==ut||n[187]!==pt?(ht=p.jsxs("div",{role:"tabpanel",id:"graphiql-session","aria-labelledby":$e,children:[ct,ut,pt]}),n[184]=$e,n[185]=ct,n[186]=ut,n[187]=pt,n[188]=ht):ht=n[188],n[189]!==L.secondRef||n[190]!==Be||n[191]!==ht?(mt=p.jsxs("div",{ref:Re,className:"graphiql-sessions",children:[Be,ht]}),n[189]=L.secondRef,n[190]=Be,n[191]=ht,n[192]=mt):mt=n[192],n[193]!==Le||n[194]!==Me||n[195]!==mt?(gt=p.jsxs("div",{className:"graphiql-main",children:[Le,Me,mt]}),n[193]=Le,n[194]=Me,n[195]=mt,n[196]=gt):gt=n[196];const vt="short-keys"===U;let yt,bt,Et;n[197]===Symbol.for("react.memo_cache_sentinel")?(yt=p.jsxs("div",{className:"graphiql-dialog-header",children:[p.jsx(Fy.Title,{className:"graphiql-dialog-title",children:"Short Keys"}),p.jsx(Fy.Close,{})]}),n[197]=yt):yt=n[197],n[198]!==t.keyMap?(bt=p.jsx("div",{className:"graphiql-dialog-section",children:p.jsx(yj,{keyMap:t.keyMap})}),n[198]=t.keyMap,n[199]=bt):bt=n[199],n[200]!==vt||n[201]!==bt?(Et=p.jsxs(Fy,{open:vt,onOpenChange:pe,children:[yt,bt]}),n[200]=vt,n[201]=bt,n[202]=Et):Et=n[202];const xt="settings"===U;let wt,Tt,Ct,St;n[203]===Symbol.for("react.memo_cache_sentinel")?(wt=p.jsxs("div",{className:"graphiql-dialog-header",children:[p.jsx(Fy.Title,{className:"graphiql-dialog-title",children:"Settings"}),p.jsx(Fy.Close,{})]}),n[203]=wt):wt=n[203],n[204]!==te||n[205]!==t.showPersistHeadersSettings||n[206]!==f?(Tt=t.showPersistHeadersSettings?p.jsxs("div",{className:"graphiql-dialog-section",children:[p.jsxs("div",{children:[p.jsx("div",{className:"graphiql-dialog-section-title",children:"Persist headers"}),p.jsxs("div",{className:"graphiql-dialog-section-caption",children:["Save headers upon reloading."," ",p.jsx("span",{className:"graphiql-warning-text",children:"Only enable if you trust this device."})]})]}),p.jsxs(og,{children:[p.jsx(ig,{type:"button",id:"enable-persist-headers",className:$m(f&&"active"),"data-value":"true",onClick:te,children:"On"}),p.jsx(ig,{type:"button",id:"disable-persist-headers",className:$m(!f&&"active"),onClick:te,children:"Off"})]})]}):null,n[204]=te,n[205]=t.showPersistHeadersSettings,n[206]=f,n[207]=Tt):Tt=n[207],n[208]!==S||n[209]!==re||n[210]!==k?(Ct=!S&&p.jsxs("div",{className:"graphiql-dialog-section",children:[p.jsxs("div",{children:[p.jsx("div",{className:"graphiql-dialog-section-title",children:"Theme"}),p.jsx("div",{className:"graphiql-dialog-section-caption",children:"Adjust how the interface appears."})]}),p.jsxs(og,{children:[p.jsx(ig,{type:"button",className:$m(null===k&&"active"),onClick:re,children:"System"}),p.jsx(ig,{type:"button",className:$m("light"===k&&"active"),"data-theme":"light",onClick:re,children:"Light"}),p.jsx(ig,{type:"button",className:$m("dark"===k&&"active"),"data-theme":"dark",onClick:re,children:"Dark"})]})]}),n[208]=S,n[209]=re,n[210]=k,n[211]=Ct):Ct=n[211],n[212]===Symbol.for("react.memo_cache_sentinel")?(St=p.jsxs("div",{children:[p.jsx("div",{className:"graphiql-dialog-section-title",children:"Clear storage"}),p.jsx("div",{className:"graphiql-dialog-section-caption",children:"Remove all locally stored data and start fresh."})]}),n[212]=St):St=n[212];const kt=q||void 0,_t="success"===q;let Nt,Dt,At,It;return n[213]!==q?(Nt={success:"Cleared data",error:"Failed"}[q]||"Clear data",n[213]=q,n[214]=Nt):Nt=n[214],n[215]!==Z||n[216]!==kt||n[217]!==_t||n[218]!==Nt?(Dt=p.jsxs("div",{className:"graphiql-dialog-section",children:[St,p.jsx(ig,{type:"button",state:kt,disabled:_t,onClick:Z,children:Nt})]}),n[215]=Z,n[216]=kt,n[217]=_t,n[218]=Nt,n[219]=Dt):Dt=n[219],n[220]!==xt||n[221]!==Tt||n[222]!==Ct||n[223]!==Dt?(At=p.jsxs(Fy,{open:xt,onOpenChange:me,children:[wt,Tt,Ct,Dt]}),n[220]=xt,n[221]=Tt,n[222]=Ct,n[223]=Dt,n[224]=At):At=n[224],n[225]!==xe||n[226]!==Ae||n[227]!==gt||n[228]!==Et||n[229]!==At?(It=p.jsx(mI.Provider,{children:p.jsxs("div",{className:xe,children:[Ae,gt,Et,At]})}),n[225]=xe,n[226]=Ae,n[227]=gt,n[228]=Et,n[229]=At,n[230]=It):It=n[230],It},gj=Bu?"⌘":"Ctrl",vj=Object.entries({"Search in editor":[gj,"F"],"Search in documentation":[gj,"K"],"Execute query":[gj,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]}),yj=e=>{const t=h.c(5),{keyMap:n}=e,r=void 0===n?"sublime":n;let i,o,s,a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=p.jsxs("table",{className:"graphiql-table",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Short Key"}),p.jsx("th",{children:"Function"})]})}),p.jsx("tbody",{children:vj.map(Tj)})]}),t[0]=i):i=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(o=p.jsx("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer",children:"CodeMirror Key Maps"}),t[1]=o):o=t[1],t[2]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx("em",{children:"i"}),t[2]=s):s=t[2],t[3]!==r?(a=p.jsxs("div",{children:[i,p.jsxs("p",{children:["The editors use"," ",o," ","that add more short keys. This instance of Graph",s,"QL uses"," ",p.jsx("code",{children:r}),"."]})]}),t[3]=r,t[4]=a):a=t[4],a},bj=p.jsxs("a",{className:"graphiql-logo-link",href:"https://github.com/graphql/graphiql",target:"_blank",rel:"noreferrer",children:["Graph",p.jsx("em",{children:"i"}),"QL"]}),Ej=e=>{const t=h.c(4),{prettify:n,copy:r,merge:i}=e;let o;return t[0]!==r||t[1]!==i||t[2]!==n?(o=p.jsxs(p.Fragment,{children:[n,i,r]}),t[0]=r,t[1]=i,t[2]=n,t[3]=o):o=t[3],o};const xj=Object.assign((e=>{var t,n;const r=h.c(72);let i,o,s,a,l,c,u,d,f,m,g,v,y,b,E,x,w,T,C,S,k,_,N,D,A,I,O,L,M,R;r[0]!==e?(({dangerouslyAssumeSchemaIsValid:o,confirmCloseTab:i,defaultQuery:a,defaultTabs:l,externalFragments:c,fetcher:u,getDefaultFieldNames:d,headers:f,inputValueDeprecation:m,introspectionQueryName:g,maxHistoryLength:v,onEditOperationName:y,onSchemaChange:b,onTabChange:E,onTogglePluginVisibility:x,operationName:w,plugins:A,referencePlugin:I,query:C,response:S,schema:k,schemaDescription:_,shouldPersistHeaders:N,storage:D,validationRules:O,variables:L,visiblePlugin:M,defaultHeaders:s,...T}=e),r[0]=e,r[1]=i,r[2]=o,r[3]=s,r[4]=a,r[5]=l,r[6]=c,r[7]=u,r[8]=d,r[9]=f,r[10]=m,r[11]=g,r[12]=v,r[13]=y,r[14]=b,r[15]=E,r[16]=x,r[17]=w,r[18]=T,r[19]=C,r[20]=S,r[21]=k,r[22]=_,r[23]=N,r[24]=D,r[25]=A,r[26]=I,r[27]=O,r[28]=L,r[29]=M):(i=r[1],o=r[2],s=r[3],a=r[4],l=r[5],c=r[6],u=r[7],d=r[8],f=r[9],m=r[10],g=r[11],v=r[12],y=r[13],b=r[14],E=r[15],x=r[16],w=r[17],T=r[18],C=r[19],S=r[20],k=r[21],_=r[22],N=r[23],D=r[24],A=r[25],I=r[26],O=r[27],L=r[28],M=r[29]),r[30]!==A?(R=void 0===A?[]:A,r[30]=A,r[31]=R):R=r[31];const F=R,P=void 0===I?fj:I;if(null==(t=T.toolbar)?void 0:t.additionalContent)throw new TypeError("`toolbar.additionalContent` was removed. Use render props on `GraphiQL.Toolbar` component instead.");if(null==(n=T.toolbar)?void 0:n.additionalComponent)throw new TypeError("`toolbar.additionalComponent` was removed. Use render props on `GraphiQL.Toolbar` component instead.");let j,V;r[32]!==F||r[33]!==P?(j=[P,OI,...F],r[32]=F,r[33]=P,r[34]=j):j=r[34],r[35]!==o||r[36]!==s||r[37]!==a||r[38]!==l||r[39]!==c||r[40]!==u||r[41]!==d||r[42]!==f||r[43]!==m||r[44]!==g||r[45]!==y||r[46]!==b||r[47]!==E||r[48]!==x||r[49]!==w||r[50]!==C||r[51]!==P||r[52]!==S||r[53]!==k||r[54]!==_||r[55]!==N||r[56]!==D||r[57]!==j||r[58]!==O||r[59]!==L||r[60]!==M?(V={getDefaultFieldNames:d,dangerouslyAssumeSchemaIsValid:o,defaultQuery:a,defaultHeaders:s,defaultTabs:l,externalFragments:c,fetcher:u,headers:f,inputValueDeprecation:m,introspectionQueryName:g,onEditOperationName:y,onSchemaChange:b,onTabChange:E,onTogglePluginVisibility:x,plugins:j,referencePlugin:P,visiblePlugin:M,operationName:w,query:C,response:S,schema:k,schemaDescription:_,shouldPersistHeaders:N,storage:D,validationRules:O,variables:L},r[35]=o,r[36]=s,r[37]=a,r[38]=l,r[39]=c,r[40]=u,r[41]=d,r[42]=f,r[43]=m,r[44]=g,r[45]=y,r[46]=b,r[47]=E,r[48]=x,r[49]=w,r[50]=C,r[51]=P,r[52]=S,r[53]=k,r[54]=_,r[55]=N,r[56]=D,r[57]=j,r[58]=O,r[59]=L,r[60]=M,r[61]=V):V=r[61];const B=V,$=!1!==N;let U,H,q;return r[62]!==i||r[63]!==T||r[64]!==$?(U=p.jsx(RI,{children:p.jsx(mj,{confirmCloseTab:i,showPersistHeadersSettings:$,forcedTheme:T.forcedTheme,...T})}),r[62]=i,r[63]=T,r[64]=$,r[65]=U):U=r[65],r[66]!==v||r[67]!==U?(H=p.jsx(xI,{maxHistoryLength:v,children:U}),r[66]=v,r[67]=U,r[68]=H):H=r[68],r[69]!==B||r[70]!==H?(q=p.jsx(om,{...B,children:H}),r[69]=B,r[70]=H,r[71]=q):q=r[71],q}),{Logo:e=>{const t=h.c(2),{children:n}=e,r=void 0===n?bj:n;let i;return t[0]!==r?(i=p.jsx("div",{className:"graphiql-logo",children:r}),t[0]=r,t[1]=i):i=t[1],i},Toolbar:({children:e=Ej,onCopyQuery:t,onPrettifyQuery:n})=>{if("function"!=typeof e)throw new TypeError("The `GraphiQL.Toolbar` component requires a render prop function as its child.");const r=ch({onCopyQuery:t}),i=uh(),o=fh({onPrettifyQuery:n}),s=p.jsx(gI,{onClick:o,label:"Prettify query (Shift-Ctrl-P)",children:p.jsx(Am,{className:"graphiql-toolbar-icon","aria-hidden":"true"})}),a=p.jsx(gI,{onClick:i,label:"Merge fragments into query (Shift-Ctrl-M)",children:p.jsx(km,{className:"graphiql-toolbar-icon","aria-hidden":"true"})});return e({prettify:s,copy:p.jsx(gI,{onClick:r,label:"Copy query (Shift-Ctrl-C)",children:p.jsx(pm,{className:"graphiql-toolbar-icon","aria-hidden":"true"})}),merge:a})},Footer:e=>{const t=h.c(2);let n;return t[0]!==e.children?(n=p.jsx("div",{className:"graphiql-footer",children:e.children}),t[0]=e.children,t[1]=n):n=t[1],n}});function wj(t,n,r){return p.jsxs(e.Fragment,{children:[p.jsx("code",{className:"graphiql-key",children:t}),n!==r.length-1&&" + "]},t)}function Tj(e){const[t,n]=e;return p.jsxs("tr",{children:[p.jsx("td",{children:n.map(wj)}),p.jsx("td",{children:t})]},t)}if(parseInt(e.version.slice(0,2),10)<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join("\n"));const Cj=Object.assign(xj,{createFetcher:function(e){const t=e.fetch||"undefined"!=typeof window&&window.fetch;if(!t)throw new Error("No valid fetcher implementation available");e.enableIncrementalDelivery=!1!==e.enableIncrementalDelivery;const n=((e,t)=>async(n,r)=>(await t(e.url,{method:"POST",body:JSON.stringify(n),headers:T(T({"content-type":"application/json"},e.headers),null==r?void 0:r.headers)})).json())(e,t),r=e.enableIncrementalDelivery?Cs(e,t):n;return async(t,i)=>{if("IntrospectionQuery"===t.operationName)return(e.schemaFetcher||n)(t,i);if(null!=i&&i.documentAST&&((e,t)=>{let n=!1;return at(e,{OperationDefinition(e){var r;t===(null==(r=e.name)?void 0:r.value)&&"subscription"===e.operation&&(n=!0)}}),n})(i.documentAST,t.operationName||void 0)){const n=await Ss(e,i);if(!n)throw new Error("Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. "+(e.subscriptionUrl?`Provided URL ${e.subscriptionUrl} failed`:"Please provide subscriptionUrl, wsClient or legacyClient option first."));return n(t)}return r(t,i)}},createLocalStorage:function({namespace:e}){const t=`${e}:`,n=e=>`${t}${e}`;return{setItem:(e,t)=>localStorage.setItem(n(e),t),getItem:e=>localStorage.getItem(n(e)),removeItem:e=>localStorage.removeItem(n(e)),get length(){let e=0;for(const n in localStorage)0===n.indexOf(t)&&(e+=1);return e},clear(){for(const e in localStorage)0===e.indexOf(t)&&localStorage.removeItem(e)}}},GraphQL:ms,React:bI});function Sj(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function kj(e){return"object"===Sj(e)}function _j(e,t){return e.length<124?e:t}const Nj="graphql-transport-ws";var Dj,Aj,Ij,Oj;function Lj(e){if(!kj(e))throw new Error(`Message is expected to be an object, but got ${Sj(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw new Error(`Message is expects the 'type' property to be a string, but got ${Sj(e.type)}`);switch(e.type){case Ij.ConnectionInit:case Ij.ConnectionAck:case Ij.Ping:case Ij.Pong:if(null!=e.payload&&!kj(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case Ij.Subscribe:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Sj(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!kj(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Sj(e.payload)}`);if("string"!=typeof e.payload.query)throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${Sj(e.payload.query)}`);if(null!=e.payload.variables&&!kj(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${Sj(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==Sj(e.payload.operationName))throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${Sj(e.payload.operationName)}`);if(null!=e.payload.extensions&&!kj(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${Sj(e.payload.extensions)}`);break;case Ij.Next:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Sj(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!kj(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Sj(e.payload)}`);break;case Ij.Error:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Sj(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(t=e.payload,!(Array.isArray(t)&&t.length>0&&t.every((e=>"message"in e))))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case Ij.Complete:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Sj(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw new Error(`Invalid message 'type' property "${e.type}"`)}var t;return e}function Mj(e,t){return Lj("string"==typeof e?JSON.parse(e,t):e)}function Rj(e,t){return Lj(e),JSON.stringify(e,t)}(Aj=Dj||(Dj={}))[Aj.InternalServerError=4500]="InternalServerError",Aj[Aj.InternalClientError=4005]="InternalClientError",Aj[Aj.BadRequest=4400]="BadRequest",Aj[Aj.BadResponse=4004]="BadResponse",Aj[Aj.Unauthorized=4401]="Unauthorized",Aj[Aj.Forbidden=4403]="Forbidden",Aj[Aj.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",Aj[Aj.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",Aj[Aj.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",Aj[Aj.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",Aj[Aj.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",(Oj=Ij||(Ij={})).ConnectionInit="connection_init",Oj.ConnectionAck="connection_ack",Oj.Ping="ping",Oj.Pong="pong",Oj.Subscribe="subscribe",Oj.Next="next",Oj.Error="error",Oj.Complete="complete";var Fj=function(e){return this instanceof Fj?(this.v=e,this):new Fj(e)},Pj=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{!function(e){e.value instanceof Fj?Promise.resolve(e.value.v).then(l,c):u(o[0][2],e)}(i[e](t))}catch(nL){u(o[0][3],nL)}}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}};function jj(e){return kj(e)&&"code"in e&&"reason"in e}const Vj=Object.freeze(Object.defineProperty({__proto__:null,get CloseCode(){return Dj},GRAPHQL_TRANSPORT_WS_PROTOCOL:Nj,get MessageType(){return Ij},createClient:function(e){const{url:t,connectionParams:n,lazy:r=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:s=0,disablePong:a,connectionAckWaitTimeout:l=0,retryAttempts:c=5,retryWait:u=async function(e){let t=1e3;for(let n=0;n<e;n++)t*=2;await new Promise((e=>setTimeout(e,t+Math.floor(2700*Math.random()+300))))},shouldRetry:d=jj,isFatalConnectionProblem:f,on:p,webSocketImpl:h,generateID:m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},jsonMessageReplacer:g,jsonMessageReviver:v}=e;let y;if(h){if(!("function"==typeof(b=h)&&"constructor"in b&&"CLOSED"in b&&"CLOSING"in b&&"CONNECTING"in b&&"OPEN"in b))throw new Error("Invalid WebSocket implementation provided");y=h}else"undefined"!=typeof WebSocket?y=WebSocket:"undefined"!=typeof global?y=global.WebSocket||global.MozWebSocket:"undefined"!=typeof window&&(y=window.WebSocket||window.MozWebSocket);var b;if(!y)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const E=y,x=(()=>{const e=(()=>{const e={};return{on:(t,n)=>(e[t]=n,()=>{delete e[t]}),emit(t){var n;"id"in t&&(null===(n=e[t.id])||void 0===n||n.call(e,t))}}})(),t={connecting:(null==p?void 0:p.connecting)?[p.connecting]:[],opened:(null==p?void 0:p.opened)?[p.opened]:[],connected:(null==p?void 0:p.connected)?[p.connected]:[],ping:(null==p?void 0:p.ping)?[p.ping]:[],pong:(null==p?void 0:p.pong)?[p.pong]:[],message:(null==p?void 0:p.message)?[e.emit,p.message]:[e.emit],closed:(null==p?void 0:p.closed)?[p.closed]:[],error:(null==p?void 0:p.error)?[p.error]:[]};return{onMessage:e.on,on(e,n){const r=t[e];return r.push(n),()=>{r.splice(r.indexOf(n),1)}},emit(e,...n){for(const r of[...t[e]])r(...n)}}})();function w(e){const t=[x.on("error",(n=>{t.forEach((e=>e())),e(n)})),x.on("closed",(n=>{t.forEach((e=>e())),e(n)}))]}let T,C,S=0,k=!1,_=0,N=!1;async function D(){clearTimeout(C);const[e,r]=await(null!=T?T:T=new Promise(((e,r)=>(async()=>{if(k){if(await u(_),!S)return T=void 0,r({code:1e3,reason:"All Subscriptions Gone"});_++}x.emit("connecting");const i=new E("function"==typeof t?await t():t,Nj);let o,c;function d(){isFinite(s)&&s>0&&(clearTimeout(c),c=setTimeout((()=>{i.readyState===E.OPEN&&(i.send(Rj({type:Ij.Ping})),x.emit("ping",!1,void 0))}),s))}w((e=>{T=void 0,clearTimeout(o),clearTimeout(c),r(e),jj(e)&&4499===e.code&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)})),i.onerror=e=>x.emit("error",e),i.onclose=e=>x.emit("closed",e),i.onopen=async()=>{try{x.emit("opened",i);const e="function"==typeof n?await n():n;if(i.readyState!==E.OPEN)return;i.send(Rj(e?{type:Ij.ConnectionInit,payload:e}:{type:Ij.ConnectionInit},g)),isFinite(l)&&l>0&&(o=setTimeout((()=>{i.close(Dj.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")}),l)),d()}catch(a$){x.emit("error",a$),i.close(Dj.InternalClientError,_j(a$ instanceof Error?a$.message:new Error(a$).message,"Internal client error"))}};let f=!1;i.onmessage=({data:t})=>{try{const n=Mj(t,v);if(x.emit("message",n),"ping"===n.type||"pong"===n.type)return x.emit(n.type,!0,n.payload),void("pong"===n.type?d():a||(i.send(Rj(n.payload?{type:Ij.Pong,payload:n.payload}:{type:Ij.Pong})),x.emit("pong",!1,n.payload)));if(f)return;if(n.type!==Ij.ConnectionAck)throw new Error(`First message cannot be of type ${n.type}`);clearTimeout(o),f=!0,x.emit("connected",i,n.payload),k=!1,_=0,e([i,new Promise(((e,t)=>w(t)))])}catch(a$){i.onmessage=null,x.emit("error",a$),i.close(Dj.BadResponse,_j(a$ instanceof Error?a$.message:new Error(a$).message,"Bad response"))}}})())));e.readyState===E.CLOSING&&await r;let i=()=>{};const c=new Promise((e=>i=e));return[e,i,Promise.race([c.then((()=>{if(!S){const t=()=>e.close(1e3,"Normal Closure");isFinite(o)&&o>0?C=setTimeout((()=>{e.readyState===E.OPEN&&t()}),o):t()}})),r])]}function A(e){if(jj(e)&&(t=e.code,![1e3,1001,1006,1005,1012,1013,1013].includes(t)&&t>=1e3&&t<=1999||[Dj.InternalServerError,Dj.InternalClientError,Dj.BadRequest,Dj.BadResponse,Dj.Unauthorized,Dj.SubprotocolNotAcceptable,Dj.SubscriberAlreadyExists,Dj.TooManyInitialisationRequests].includes(e.code)))throw e;var t;if(N)return!1;if(jj(e)&&1e3===e.code)return S>0;if(!c||_>=c)throw e;if(!d(e))throw e;if(null==f?void 0:f(e))throw e;return k=!0}return r||(async()=>{for(S++;;)try{const[,,e]=await D();await e}catch(e){try{if(!A(e))return}catch(t){return null==i?void 0:i(t)}}})(),{on:x.on,subscribe(e,t){const n=m(e);let r=!1,i=!1,o=()=>{S--,r=!0};return(async()=>{for(S++;;)try{const[s,a,l]=await D();if(r)return a();const c=x.onMessage(n,(e=>{switch(e.type){case Ij.Next:return void t.next(e.payload);case Ij.Error:return i=!0,r=!0,t.error(e.payload),void o();case Ij.Complete:return r=!0,void o()}}));return s.send(Rj({id:n,type:Ij.Subscribe,payload:e},g)),o=()=>{r||s.readyState!==E.OPEN||s.send(Rj({id:n,type:Ij.Complete},g)),S--,r=!0,a()},void(await l.finally(c))}catch(s){if(!A(s))return}})().then((()=>{i||t.complete()})).catch((e=>{t.error(e)})),()=>{r||o()}},iterate(e){const t=[],n={done:!1,error:null,resolve:()=>{}},r=this.subscribe(e,{next(e){t.push(e),n.resolve()},error(e){n.done=!0,n.error=e,n.resolve()},complete(){n.done=!0,n.resolve()}}),i=function(){return Pj(this,arguments,(function*(){for(;;){for(t.length||(yield Fj(new Promise((e=>n.resolve=e))));t.length;)yield yield Fj(t.shift());if(n.error)throw n.error;if(n.done)return yield Fj(void 0)}}))}();return i.throw=async e=>(n.done||(n.done=!0,n.error=e,n.resolve()),{done:!0,value:void 0}),i.return=async()=>(r(),{done:!0,value:void 0}),i},async dispose(){if(N=!0,T){const[e]=await T;e.close(1e3,"Normal Closure")}},terminate(){T&&x.emit("closed",{code:4499,reason:"Terminated",wasClean:!1})}}},parseMessage:Mj,stringifyMessage:Rj,validateMessage:Lj},Symbol.toStringTag,{value:"Module"}));var Bj,$j={exports:{}};$j.exports;function Uj(){return Bj||(Bj=1,$j.exports=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),s=r||i||o,a=s&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),E=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==x||x<12.11)),T=n||s&&a>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,k=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function _(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return _(e).appendChild(t)}function D(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function A(e,t,n,r){var i=D(e,t,n,r);return i.setAttribute("role","presentation"),i}function I(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function O(){var e;try{e=document.activeElement}catch(nL){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function L(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function M(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}S=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(nL){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var R=function(e){e.select()};function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function j(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,s=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}}m?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(R=function(e){try{e.select()}catch(t){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var $=50,U={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},q={origin:"*mouse"},W={origin:"+move"};function z(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var G=[""];function K(e){for(;G.length<=e;)G.push(Y(G)+" ");return G[e]}function Y(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function X(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function J(){}function Z(e,t){var n;return Object.create?n=Object.create(e):(J.prototype=e,n=new J),t&&P(t,n),n}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function se(e,t,n){for(;(n<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var s=e[o];(s.from<n&&s.to>t||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ce=null;function ue(e,t,n){var r;ce=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var p=0,h=c;p<u;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var g=0,v=c;g<u;++g){var y=d[g];"1"==y&&"r"==v?d[g]="n":o.test(y)&&(v=y,"r"==y&&(d[g]="R"))}for(var b=1,E=d[0];b<u-1;++b){var x=d[b];"+"==x&&"1"==E&&"1"==d[b+1]?d[b]="1":","!=x||E!=d[b+1]||"1"!=E&&"n"!=E||(d[b]=E),E=x}for(var w=0;w<u;++w){var T=d[w];if(","==T)d[w]="N";else if("%"==T){var C=void 0;for(C=w+1;C<u&&"%"==d[C];++C);for(var S=w&&"!"==d[w-1]||C<u&&"1"==d[C]?"1":"N",k=w;k<C;++k)d[k]=S;w=C-1}}for(var _=0,N=c;_<u;++_){var D=d[_];"L"==N&&"1"==D?d[_]="L":o.test(D)&&(N=D)}for(var A=0;A<u;++A)if(i.test(d[A])){var I=void 0;for(I=A+1;I<u&&i.test(d[I]);++I);for(var O="L"==(A?d[A-1]:c),L=O==("L"==(I<u?d[I]:c))?O?"L":"R":c,M=A;M<I;++M)d[M]=L;A=I-1}for(var R,F=[],P=0;P<u;)if(s.test(d[P])){var j=P;for(++P;P<u&&s.test(d[P]);++P);F.push(new l(0,j,P))}else{var V=P,B=F.length,$="rtl"==t?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var U=V;U<P;)if(a.test(d[U])){V<U&&(F.splice(B,0,new l(1,V,U)),B+=$);var H=U;for(++U;U<P&&a.test(d[U]);++U);F.splice(B,0,new l(2,H,U)),B+=$,V=U}else++U;V<P&&F.splice(B,0,new l(1,V,P))}return"ltr"==t&&(1==F[0].level&&(R=e.match(/^\s+/))&&(F[0].from=R[0].length,F.unshift(new l(0,0,R[0].length))),1==Y(F).level&&(R=e.match(/\s+$/))&&(Y(F).to-=R[0].length,F.push(new l(0,u-R[0].length,u)))),"rtl"==t?F.reverse():F}}();function fe(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var pe=[],he=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||pe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||pe}function ge(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=B(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ye(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,n||t.type,e,t),Ce(t)||t.codemirrorIgnore}function be(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function Ee(e,t){return me(e,t).length>0}function xe(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){we(e),Te(e)}function ke(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Ne,De,Ae=function(){if(s&&a<9)return!1;var e=D("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==Ne){var t=D("span","​");N(e,D("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ne=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&a<8))}var n=Ne?D("span","​"):D("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Oe(e){if(null!=De)return De;var t=N(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return _(e),!(!n||n.left==n.right)&&(De=r.right-n.right<3)}var Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Me=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(nL){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(nL){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re=function(){var e=D("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Fe=null;function Pe(e){if(null!=Fe)return Fe;var t=N(e,D("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return Fe=Math.abs(n.left-r.left)>1}var je={},Ve={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function $e(e,t){Ve[e]=t}function Ue(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function He(e,t){t=Ue(t);var n=je[t.name];if(!n)return He(e,"text/plain");var r=n(e,t);if(qe.hasOwnProperty(t.name)){var i=qe[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var s in t.modeProps)r[s]=t.modeProps[s];return r}var qe={};function We(e,t){P(t,qe.hasOwnProperty(e)?qe[e]:qe[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}var Ye=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Qe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Xe(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Je(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ze(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function et(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function tt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var s=0;s<e.lines.length;++s){var a=e.lines[s].height;if(t<a)break;t-=a}return n+s}function nt(e,t){return t>=e.first&&t<e.first+e.size}function rt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,n){if(void 0===n&&(n=null),!(this instanceof it))return new it(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ot(e,t){return e.line-t.line||e.ch-t.ch}function st(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function at(e){return it(e.line,e.ch)}function lt(e,t){return ot(e,t)<0?t:e}function ct(e,t){return ot(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function dt(e,t){if(t.line<e.first)return it(e.first,0);var n=e.first+e.size-1;return t.line>n?it(n,Qe(e,n).text.length):ft(t,Qe(e,t.line).text.length)}function ft(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function pt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=dt(e,t[r]);return n}Ye.prototype.eol=function(){return this.pos>=this.string.length},Ye.prototype.sol=function(){return this.pos==this.lineStart},Ye.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ye.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ye.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ye.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ye.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ye.prototype.skipToEnd=function(){this.pos=this.string.length},Ye.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ye.prototype.backUp=function(e){this.pos-=e},Ye.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ye.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ye.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ye.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ye.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ht=function(e,t){this.state=e,this.lookAhead=t},mt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,r){var i=[e.state.modeGen],o={};St(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var s=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],l=1,c=0;n.state=!0,St(e,t.text,a.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=s,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)a(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function vt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=yt(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,r.state),o=gt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function yt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new mt(r,!0,t);var o=kt(e,t,n),s=o>r.first&&Qe(r,o-1).stateAfter,a=s?mt.fromSaved(r,s,o):new mt(r,Ke(r.mode),o);return r.iter(o,t,(function(n){bt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?a.save():null,a.nextLine()})),n&&(r.modeFrontier=a.line),a}function bt(e,t,n,r){var i=e.doc.mode,o=new Ye(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Et(i,n.state);!o.eol();)xt(i,o,n.state),o.start=o.pos}function Et(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ge(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function xt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ge(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}mt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},mt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mt.fromSaved=function(e,t,n){return t instanceof ht?new mt(e,ze(e.mode,t.state),n,t.lookAhead):new mt(e,ze(e.mode,t),n)},mt.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ht(t,this.maxLookAhead):t};var wt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Tt(e,t,n,r){var i,o,s=e.doc,a=s.mode,l=Qe(s,(t=dt(s,t)).line),c=yt(e,t.line,n),u=new Ye(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=xt(a,u,c.state),r&&o.push(new wt(u,i,ze(s.mode,c.state)));return r?o:new wt(u,i,c.state)}function Ct(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function St(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,c=0,u=null,d=new Ye(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Ct(Et(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(a=!1,s&&bt(e,t,r,d.pos),d.pos=t.length,l=null):l=Ct(xt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);i(h,u),c=h}}function kt(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=Qe(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ht?c.lookAhead:0)<=o.modeFrontier))return a;var u=j(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=a-1,r=u)}return i}function _t(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Qe(e,r).stateAfter;if(i&&(!(i instanceof ht)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Nt=!1,Dt=!1;function At(){Nt=!0}function It(){Dt=!0}function Ot(e,t,n){this.marker=e,this.from=t,this.to=n}function Lt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Mt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Rt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Ft(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Ot(s,o.from,a?null:o.to))}}return r}function Pt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Ot(s,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}function jt(e,t){if(t.full)return null;var n=nt(e,t.from.line)&&Qe(e,t.from.line).markedSpans,r=nt(e,t.to.line)&&Qe(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==ot(t.from,t.to),a=Ft(n,i,s),l=Pt(r,o,s),c=1==t.text.length,u=Y(t.text).length+(c?i:0);if(a)for(var d=0;d<a.length;++d){var f=a[d];if(null==f.to){var p=Lt(l,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=i}}if(l)for(var h=0;h<l.length;++h){var m=l[h];null!=m.to&&(m.to+=u),null==m.from?Lt(a,m.marker)||(m.from=u,c&&(a||(a=[])).push(m)):(m.from+=u,c&&(a||(a=[])).push(m))}a&&(a=Vt(a)),l&&l!=a&&(l=Vt(l));var g=[a];if(!c){var v,y=t.text.length-2;if(y>0&&a)for(var b=0;b<a.length;++b)null==a[b].to&&(v||(v=[])).push(new Ot(a[b].marker,null,null));for(var E=0;E<y;++E)g.push(v);g.push(l)}return g}function Vt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Bt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=B(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var c=i[l];if(!(ot(c.to,a.from)<0||ot(c.from,a.to)>0)){var u=[l,1],d=ot(c.from,a.from),f=ot(c.to,a.to);(d<0||!s.inclusiveLeft&&!d)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}function $t(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Ut(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Ht(e){return e.inclusiveLeft?-1:0}function qt(e){return e.inclusiveRight?1:0}function Wt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ot(r.from,i.from)||Ht(e)-Ht(t);if(o)return-o;var s=ot(r.to,i.to)||qt(e)-qt(t);return s||t.id-e.id}function zt(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Wt(n,i.marker)<0)&&(n=i.marker);return n}function Gt(e){return zt(e,!0)}function Kt(e){return zt(e,!1)}function Yt(e,t){var n,r=Dt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Wt(n,o.marker)<0)&&(n=o.marker)}return n}function Qt(e,t,n,r,i){var o=Qe(e,t),s=Dt&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),u=ot(c.from,n)||Ht(l.marker)-Ht(i),d=ot(c.to,r)||qt(l.marker)-qt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(c.to,n)>=0:ot(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(c.from,r)<=0:ot(c.from,r)<0)))return!0}}}function Xt(e){for(var t;t=Gt(e);)e=t.find(-1,!0).line;return e}function Jt(e){for(var t;t=Kt(e);)e=t.find(1,!0).line;return e}function Zt(e){for(var t,n;t=Kt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function en(e,t){var n=Qe(e,t),r=Xt(n);return n==r?t:et(r)}function tn(e,t){if(t>e.lastLine())return t;var n,r=Qe(e,t);if(!nn(e,r))return t;for(;n=Kt(r);)r=n.find(1,!0).line;return et(r)+1}function nn(e,t){var n=Dt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&rn(e,t,r))return!0}}function rn(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return rn(e,r.line,Lt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&rn(e,t,i))return!0}function on(e){for(var t=0,n=(e=Xt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==n)break;t+=a.height}return t}function sn(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Gt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Kt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function an(e){var t=e.display,n=e.doc;t.maxLine=Qe(n,n.first),t.maxLineLength=sn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=sn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var ln=function(e,t,n){this.text=e,Ut(this,t),this.height=n?n(this):1};function cn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),$t(e),Ut(e,n);var i=r?r(e):1;i!=e.height&&Ze(e,i)}function un(e){e.parent=null,$t(e)}ln.prototype.lineNo=function(){return et(this)},xe(ln);var dn={},fn={};function pn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?fn:dn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function hn(e,t){var n=A("span",null,null,l?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;r.pos=0,r.addToken=gn,Oe(e.display.measure)&&(s=fe(o,e.doc.direction))&&(r.addToken=yn(r.addToken,s)),r.map=[],En(o,r,vt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ie(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function mn(e){var t=D("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gn(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?vn(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),m=h?h.index-p:t.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));s&&a<9?c.appendChild(D("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(D("span",K(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(D("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),s&&a<9?c.appendChild(D("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),s&&a<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||f||o||l){var E=n||"";r&&(E+=r),i&&(E+=i);var x=D("span",[c],E,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,l[w]);return e.content.appendChild(x)}e.content.appendChild(c)}}function vn(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function yn(e,t){return function(n,r,i,o,s,a,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,r,i,o,s,a,l);e(n,r.slice(0,d.to-c),i,o,null,a,l),o=null,r=r.slice(d.to-c),c=d.to}}}function bn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function En(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,c,u,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=a="",f=null,d=null,v=1/0;for(var y=[],b=void 0,E=0;E<r.length;++E){var x=r[E],w=x.marker;if("bookmark"==w.type&&x.from==h&&w.widgetNode)y.push(w);else if(x.from<=h&&(null==x.to||x.to>h||w.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&v>x.to&&(v=x.to,c=""),w.className&&(l+=" "+w.className),w.css&&(a=(a?a+";":"")+w.css),w.startStyle&&x.from==h&&(u+=" "+w.startStyle),w.endStyle&&x.to==v&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var T in w.attributes)(f||(f={}))[T]=w.attributes[T];w.collapsed&&(!d||Wt(d.marker,w)<0)&&(d=x)}else x.from>h&&v>x.from&&(v=x.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!d||d.from==h)for(var S=0;S<y.length;++S)bn(t,0,y[S]);if(d&&(d.from||0)==h){if(bn(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var k=Math.min(p,v);;){if(g){var _=h+g.length;if(!d){var N=_>k?g.slice(0,k-h):g;t.addToken(t,N,s?s+l:l,u,h+N.length==v?c:"",a,f)}if(_>=k){g=g.slice(k-h),h=k;break}h=_,u=""}g=i.slice(o,o=n[m++]),s=pn(n[m++],t.cm.options)}}else for(var D=1;D<n.length;D+=2)t.addToken(t,i.slice(o,o=n[D]),pn(n[D+1],t.cm.options))}function xn(e,t,n){this.line=t,this.rest=Zt(t),this.size=this.rest?et(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=nn(e,t)}function wn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var s=new xn(e.doc,Qe(e.doc,o),o);r=o+s.size,i.push(s)}return i}var Tn=null;function Cn(e){Tn?Tn.ops.push(e):e.ownsGroup=Tn={ops:[e],delayedCallbacks:[]}}function Sn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function kn(e,t){var n=e.ownsGroup;if(n)try{Sn(n)}finally{Tn=null,t(n)}}var _n=null;function Nn(e,t){var n=me(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Tn?r=Tn.delayedCallbacks:_n?r=_n:(r=_n=[],setTimeout(Dn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},s=0;s<n.length;++s)o(s)}}function Dn(){var e=_n;_n=null;for(var t=0;t<e.length;++t)e[t]()}function An(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Mn(e,t):"gutter"==o?Fn(e,t,n,r):"class"==o?Rn(e,t):"widget"==o&&Pn(e,t,r)}t.changes=null}function In(e){return e.node==e.text&&(e.node=D("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),s&&a<8&&(e.node.style.zIndex=2)),e.node}function On(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=In(t);t.background=r.insertBefore(D("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Ln(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):hn(e,t)}function Mn(e,t){var n=t.text.className,r=Ln(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Rn(e,t)):n&&(t.text.className=n)}function Rn(e,t){On(e,t),t.line.wrapClass?In(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Fn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=In(t);t.gutterBackground=D("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var s=In(t),a=t.gutter=D("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(D("div",rt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&a.appendChild(D("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Pn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Vn(e,t,n)}function jn(e,t,n,r){var i=Ln(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rn(e,t),Fn(e,t,n,r),Vn(e,t,r),t.node}function Vn(e,t,n){if(Bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Bn(e,t.rest[r],t,n,!1)}function Bn(e,t,n,r,i){if(t.widgets)for(var o=In(n),s=0,a=t.widgets;s<a.length;++s){var l=a[s],c=D("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),$n(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),Nn(l,"redraw")}}function $n(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Un(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!I(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,D("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Hn(e,t){for(var n=ke(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function qn(e){return e.lineSpace.offsetTop}function Wn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function zn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,D("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Gn(e){return $-e.display.nativeBarWidth}function Kn(e){return e.display.scroller.clientWidth-Gn(e)-e.display.barWidth}function Yn(e){return e.display.scroller.clientHeight-Gn(e)-e.display.barHeight}function Qn(e,t,n){var r=e.options.lineWrapping,i=r&&Kn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jn(e,t){var n=et(t=Xt(t)),r=e.display.externalMeasured=new xn(e.doc,t,n);r.lineN=n;var i=r.built=hn(e,r);return r.text=i.pre,N(e.display.lineMeasure,i.pre),r}function Zn(e,t,n,r){return nr(e,tr(e,t),n,r)}function er(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Rr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function tr(e,t){var n=et(t),r=er(e,n);r&&!r.text?r=null:r&&r.changes&&(An(e,r,n,Ar(e)),e.curOp.forceUpdate=!0),r||(r=Jn(e,t));var i=Xn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function nr(e,t,n,r,i){t.before&&(n=-1);var o,s=n+(r||"");return t.cache.hasOwnProperty(s)?o=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Qn(e,t.view,t.rect),t.hasHeights=!0),(o=ar(e,t,n,r)).bogus||(t.cache[s]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var rr,ir={left:0,right:0,top:0,bottom:0};function or(e,t,n){for(var r,i,o,s,a,l,c=0;c<e.length;c+=3)if(a=e[c],l=e[c+1],t<a?(i=0,o=1,s="left"):t<l?o=1+(i=t-a):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-a)-1,t>=l&&(s="right")),null!=i){if(r=e[c+2],a==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],s="left";if("right"==n&&i==l-a)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],s="right";break}return{node:r,start:i,end:o,collapse:s,coverStart:a,coverEnd:l}}function sr(e,t){var n=ir;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function ar(e,t,n,r){var i,o=or(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&oe(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u));)++u;if((i=s&&a<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():sr(S(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}s&&a<11&&(i=lr(e.display.measure,i))}else{var p;c>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Dr(e.display),top:h.top,bottom:h.bottom}:ir}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var E=b?y[b-1]:0,x=y[b],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:E,bottom:x};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}function lr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Pe(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function cr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ur(e){e.display.externalMeasure=null,_(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)cr(e.display.view[t])}function dr(e){ur(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fr(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pr(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function hr(e){var t=Xt(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Un(t[r]));return n}function mr(e,t,n,r,i){if(!i){var o=hr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var s=on(t);if("local"==r?s+=qn(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:pr());var l=a.left+("window"==r?0:fr());n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function gr(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=fr(),i-=pr();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function vr(e,t,n,r,i){return r||(r=Qe(e.doc,t.line)),mr(e,r,Zn(e,r,t.ch,i),n)}function yr(e,t,n,r,i,o){function s(t,s){var a=nr(e,i,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,mr(e,r,a,n)}r=r||Qe(e.doc,t.line),i||(i=tr(e,r));var a=fe(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(e,t,n){return s(n?e-1:e,1==a[t].level!=n)}var d=ue(a,l,c),f=ce,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function br(e,t){var n=0;t=dt(e.doc,t),e.options.lineWrapping||(n=Dr(e.display)*t.ch);var r=Qe(e.doc,t.line),i=on(r)+qn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Er(e,t,n,r,i){var o=it(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function xr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Er(r.first,0,null,-1,-1);var i=tt(r,n),o=r.first+r.size-1;if(i>o)return Er(r.first+r.size-1,Qe(r,o).text.length,null,1,1);t<0&&(t=0);for(var s=Qe(r,i);;){var a=Sr(e,s,i,t,n),l=Yt(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==i)return c;s=Qe(r,i=c.line)}}function wr(e,t,n,r){r-=hr(t);var i=t.text.length,o=ae((function(t){return nr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=ae((function(t){return nr(e,n,t).top>r}),o,i)}}function Tr(e,t,n,r){return n||(n=tr(e,t)),wr(e,t,n,mr(e,t,nr(e,n,r),"line").top)}function Cr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Sr(e,t,n,r,i){i-=on(t);var o=tr(e,t),s=hr(t),a=0,l=t.text.length,c=!0,u=fe(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?_r:kr)(e,t,n,o,u,r,i);a=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,h=null,m=null,g=ae((function(t){var n=nr(e,o,t);return n.top+=s,n.bottom+=s,!!Cr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),a,l),v=!1;if(m){var y=r-m.left<m.right-r,b=y==c;g=h+(b?0:1),p=b?"after":"before",f=y?m.left:m.right}else{c||g!=l&&g!=a||g++,p=0==g?"after":g==t.text.length?"before":nr(e,o,g-(c?1:0)).bottom+s<=i==c?"after":"before";var E=yr(e,it(n,g,p),"line",t,o);f=E.left,v=i<E.top?-1:i>=E.bottom?1:0}return Er(n,g=se(t.text,g,1),p,v,r-f)}function kr(e,t,n,r,i,o,s){var a=ae((function(a){var l=i[a],c=1!=l.level;return Cr(yr(e,it(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,s,!0)}),0,i.length-1),l=i[a];if(a>0){var c=1!=l.level,u=yr(e,it(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Cr(u,o,s,!0)&&u.top>s&&(l=i[a-1])}return l}function _r(e,t,n,r,i,o,s){var a=wr(e,t,r,s),l=a.begin,c=a.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=c||p.to<=l)){var h=nr(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=h<o?o-h+1e9:h-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Nr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rr){rr=D("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(D("br"));rr.appendChild(document.createTextNode("x"))}N(e.measure,rr);var n=rr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),_(e.measure),n||1}function Dr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=D("span","xxxxxxxxxx"),n=D("pre",[t],"CodeMirror-line-like");N(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s){var a=e.display.gutterSpecs[s].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Or(e){var t=Nr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Dr(e.display)-3);return function(i){if(nn(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Lr(e){var t=e.doc,n=Or(e);t.iter((function(e){var t=n(e);t!=e.height&&Ze(e,t)}))}function Mr(e,t,n,r){var i=e.display;if(!n&&"true"==ke(t).getAttribute("cm-not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(d){return null}var l,c=xr(e,o,s);if(r&&c.xRel>0&&(l=Qe(e.doc,c.line).text).length==c.ch){var u=j(l,l.length,e.options.tabSize)-l.length;c=it(c.line,Math.max(0,Math.round((o-zn(e.display).left)/Dr(e.display))-u))}return c}function Rr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Fr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Dt&&en(e.doc,t)<i.viewTo&&jr(e);else if(n<=i.viewFrom)Dt&&tn(e.doc,n+r)>i.viewFrom?jr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)jr(e);else if(t<=i.viewFrom){var o=Vr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):jr(e)}else if(n>=i.viewTo){var s=Vr(e,t,t,-1);s?(i.view=i.view.slice(0,s.index),i.viewTo=s.lineN):jr(e)}else{var a=Vr(e,t,t,-1),l=Vr(e,n,n+r,1);a&&l?(i.view=i.view.slice(0,a.index).concat(wn(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):jr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function Pr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Rr(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==B(s,n)&&s.push(n)}}}function jr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Vr(e,t,n,r){var i,o=Rr(e,t),s=e.display.view;if(!Dt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=t){if(r>0){if(o==s.length-1)return null;i=a+s[o].size-t,o++}else i=a-t;t+=i,n+=i}for(;en(e.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Br(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=wn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=wn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Rr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(wn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Rr(e,n)))),r.viewTo=n}function $r(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Ur(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Hr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=e.options.$customCursor;s&&(t=!0);for(var a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(s){var u=s(e,l);u&&qr(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&qr(e,l.head,i);c||zr(e,l,o)}}return r}function qr(e,t,n){var r=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(D("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=vr(e,t,"div",null,null),s=o.right-o.left;i.style.width=(s>0?s:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(D("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Wr(e,t){return e.top-t.top||e.left-t.left}function zr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),s=zn(e.display),a=s.left,l=Math.max(r.sizerWidth,Kn(e)-r.sizer.offsetLeft)-s.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(D("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n                             height: "+(r-t)+"px"))}function d(t,n,r){var o,s,d=Qe(i,t),f=d.text.length;function p(n,r){return vr(e,it(t,n),"div",d,r)}function h(t,n,r){var i=Tr(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=fe(d,i.direction);return le(m,n||0,null==r?f:r,(function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,E=null==r&&t==f,x=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var T=(c?E:b)&&w,C=(c?b:E)&&x?a:(g?v:y).left,S=T?l:(g?y:v).right;u(C,v.top,S-C,v.bottom)}else{var k,_,N,D;g?(k=c&&b&&x?a:v.left,_=c?l:h(e,i,"before"),N=c?a:h(t,i,"after"),D=c&&E&&w?l:y.right):(k=c?h(e,i,"before"):a,_=!c&&b&&x?l:v.right,N=!c&&E&&w?a:y.left,D=c?h(t,i,"after"):l),u(k,v.top,_-k,v.bottom),v.bottom<y.top&&u(a,v.bottom,null,y.top),u(N,y.top,D-N,y.bottom)}(!o||Wr(v,o)<0)&&(o=v),Wr(y,o)<0&&(o=y),(!s||Wr(v,s)<0)&&(s=v),Wr(y,s)<0&&(s=y)})),{start:o,end:s}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var h=Qe(i,f.line),m=Qe(i,p.line),g=Xt(h)==Xt(m),v=d(f.line,f.ch,g?h.text.length+1:null).end,y=d(p.line,g?0:null,p.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(a,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(a,v.bottom,null,y.top)}n.appendChild(o)}function Gr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Xr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Kr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Qr(e))}function Yr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Xr(e))}),100)}function Qr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Gr(e))}function Xr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,k(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Jr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,d=void 0,f=0;if(!c.hidden){if(i+=c.line.height,s&&a<8){var p=c.node.offsetTop+c.node.offsetHeight;d=p-n,n=p}else{var h=c.node.getBoundingClientRect();d=h.bottom-h.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=c.line.height-d;if((m>.005||m<-.005)&&(i<r&&(o-=m),Ze(c.line,d),Zr(c.line),c.rest))for(var g=0;g<c.rest.length;g++)Zr(c.rest[g]);if(f>e.display.sizerWidth){var v=Math.ceil(f/Dr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Zr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ei(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-qn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=tt(t,r),s=tt(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=tt(t,on(Qe(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=tt(t,on(Qe(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function ti(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=D("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-qn(e.display))+"px;\n                         height: "+(t.bottom-t.top+Gn(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var s=!1,a=yr(e,t),l=n&&n!=t?yr(e,n):a,c=ii(e,i={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-r,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(di(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(pi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(s=!0)),!s)break}return i}function ri(e,t){var n=ii(e,t);null!=n.scrollTop&&di(e,n.scrollTop),null!=n.scrollLeft&&pi(e,n.scrollLeft)}function ii(e,t){var n=e.display,r=Nr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Yn(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Wn(n),l=t.top<r,c=t.bottom>a-r;if(t.top<i)s.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?a:t.bottom)-o);u!=i&&(s.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Kn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?s.scrollLeft=0:t.left<f?s.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>p+f-3&&(s.scrollLeft=t.right+(h?0:10)-p),s}function oi(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function si(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ai(e,t,n){null==t&&null==n||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function li(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,ui(e,br(e,t.from),br(e,t.to),t.margin))}function ui(e,t,n,r){var i=ii(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});ai(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Ui(e,{top:t}),fi(e,t,!0),n&&Ui(e),Mi(e,100))}function fi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function hi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Wn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Gn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var mi=function(e,t,n){this.cm=n;var r=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},mi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mi.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},mi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},mi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gi=function(){};function vi(e,t){t||(t=hi(e));var n=e.display.barWidth,r=e.display.barHeight;yi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Jr(e),yi(e,hi(e)),n=e.display.barWidth,r=e.display.barHeight}function yi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}gi.prototype.update=function(){return{bottom:0,right:0}},gi.prototype.setScrollLeft=function(){},gi.prototype.setScrollTop=function(){},gi.prototype.clear=function(){};var bi={native:mi,null:gi};function Ei(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?pi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var xi=0;function wi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++xi,markArrays:null},Cn(e.curOp)}function Ti(e){var t=e.curOp;t&&kn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ci(e)}))}function Ci(e){for(var t=e.ops,n=0;n<t.length;n++)Si(t[n]);for(var r=0;r<t.length;r++)ki(t[r]);for(var i=0;i<t.length;i++)_i(t[i]);for(var o=0;o<t.length;o++)Ni(t[o]);for(var s=0;s<t.length;s++)Di(t[s])}function Si(e){var t=e.cm,n=t.display;Pi(t),e.updateMaxLine&&an(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Fi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ki(e){e.updatedDisplay=e.mustUpdate&&Bi(e.cm,e.update)}function _i(e){var t=e.cm,n=t.display;e.updatedDisplay&&Jr(t),e.barMeasure=hi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Zn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Gn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Kn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ni(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&pi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==O();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&vi(t,e.barMeasure),e.updatedDisplay&&Wi(t,e.barMeasure),e.selectionChanged&&Gr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Kr(e.cm)}function Di(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&$i(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&fi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&pi(t,e.scrollLeft,!0,!0),e.scrollToPos&&ti(t,ni(t,dt(r,e.scrollToPos.from),dt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||ve(i[s],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&ve(o[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Ai(e,t){if(e.curOp)return t();wi(e);try{return t()}finally{Ti(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);wi(e);try{return t.apply(e,arguments)}finally{Ti(e)}}}function Oi(e){return function(){if(this.curOp)return e.apply(this,arguments);wi(this);try{return e.apply(this,arguments)}finally{Ti(this)}}}function Li(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);wi(t);try{return e.apply(this,arguments)}finally{Ti(t)}}}function Mi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,F(Ri,e))}function Ri(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=yt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=gt(e,o,r,!0);a&&(r.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<s.length;++f)d=s[f]!=o.styles[f];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&bt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Mi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ai(e,(function(){for(var t=0;t<i.length;t++)Pr(e,i[t],"text")}))}}var Fi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ei(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Kn(e),this.force=n,this.dims=Ar(e),this.events=[]};function Pi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Gn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Gn(e)+"px",t.scrollbarsClipped=!0)}function ji(e){if(e.hasFocus())return null;var t=O();if(!t||!I(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&I(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Vi(e){if(e&&e.activeElt&&e.activeElt!=O()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Bi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return jr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==$r(e))return!1;Gi(e)&&(jr(e),t.dims=Ar(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),Dt&&(o=en(e.doc,o),s=tn(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Br(e,o,s),n.viewOffset=on(Qe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=$r(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=ji(e);return l>4&&(n.lineDiv.style.display="none"),Hi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Vi(c),_(n.cursorDiv),_(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Mi(e,400)),n.updateLineNumbers=null,!0}function $i(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Kn(e))r&&(t.visible=ei(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Wn(e.display)-Yn(e),n.top)}),t.visible=ei(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Bi(e,t))break;Jr(e);var i=hi(e);Ur(e),vi(e,i),Wi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ui(e,t){var n=new Fi(e,t);if(Bi(e,n)){Jr(e),$i(e,n);var r=hi(e);Ur(e),vi(e,r),Wi(e,r),n.finish()}}function Hi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,s=o.firstChild;function a(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;s!=f.node;)s=a(s);var p=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(p=!1),An(e,f,u,n)),p&&(_(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(rt(e.options,u)))),s=f.node.nextSibling}else{var h=jn(e,f,u,n);o.insertBefore(h,s)}u+=f.size}for(;s;)s=a(s)}function qi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Nn(e,"gutterChanged",e)}function Wi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Gn(e)+"px"}function zi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&(n[s].gutter&&(n[s].gutter.style.left=o),n[s].gutterBackground&&(n[s].gutterBackground.style.left=o));var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Gi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=rt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(D("div",[D("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",qi(e.display),!0}return!1}function Ki(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],s=null;if("string"!=typeof o&&(s=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:s})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Yi(e){var t=e.gutters,n=e.gutterSpecs;_(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,s=i.style,a=t.appendChild(D("div",null,"CodeMirror-gutter "+o));s&&(a.style.cssText=s),"CodeMirror-linenumbers"==o&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",qi(e)}function Qi(e){Yi(e.display),Fr(e),zi(e)}function Xi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=D("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=A("div",null,"CodeMirror-code"),o.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=D("div",null,"CodeMirror-cursors"),o.measure=D("div",null,"CodeMirror-measure"),o.lineMeasure=D("div",null,"CodeMirror-measure"),o.lineSpace=A("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=A("div",[o.lineSpace],"CodeMirror-lines");o.mover=D("div",[c],null,"position: relative"),o.sizer=D("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=D("div",null,null,"position: absolute; height: "+$+"px; width: 1px;"),o.gutters=D("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=D("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=D("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),s&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Ki(i.gutters,i.lineNumbers),Yi(o),r.init(o)}Fi.prototype.signal=function(e,t){Ee(e,t)&&this.events.push(arguments)},Fi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var Ji=0,Zi=null;function eo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function to(e){var t=eo(e);return t.x*=Zi,t.y*=Zi,t}function no(e,t){var r=eo(t),i=r.x,o=r.y,s=Zi;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,s=1);var a=e.display,c=a.scroller,u=c.scrollWidth>c.clientWidth,f=c.scrollHeight>c.clientHeight;if(i&&u||o&&f){if(o&&y&&l)e:for(var p=t.target,h=a.view;p!=c;p=p.parentNode)for(var m=0;m<h.length;m++)if(h[m].node==p){e.display.currentWheelTarget=p;break e}if(i&&!n&&!d&&null!=s)return o&&f&&di(e,Math.max(0,c.scrollTop+o*s)),pi(e,Math.max(0,c.scrollLeft+i*s)),(!o||o&&f)&&we(t),void(a.wheelStartX=null);if(o&&null!=s){var g=o*s,v=e.doc.scrollTop,b=v+a.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):b=Math.min(e.doc.height,b+g+50),Ui(e,{top:v,bottom:b})}Ji<20&&0!==t.deltaMode&&(null==a.wheelStartX?(a.wheelStartX=c.scrollLeft,a.wheelStartY=c.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=c.scrollLeft-a.wheelStartX,t=c.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(Zi=(Zi*Ji+n)/(Ji+1),++Ji)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}s?Zi=-.53:n?Zi=15:u?Zi=-.7:f&&(Zi=-1/3);var ro=function(e,t){this.ranges=e,this.primIndex=t};ro.prototype.primary=function(){return this.ranges[this.primIndex]},ro.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!st(n.anchor,r.anchor)||!st(n.head,r.head))return!1}return!0},ro.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new io(at(this.ranges[t].anchor),at(this.ranges[t].head));return new ro(e,this.primIndex)},ro.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ro.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ot(t,r.from())>=0&&ot(e,r.to())<=0)return n}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return ot(e.from(),t.from())})),n=B(t,i);for(var o=1;o<t.length;o++){var s=t[o],a=t[o-1],l=ot(a.to(),s.from());if(r&&!s.empty()?l>0:l>=0){var c=ct(a.from(),s.from()),u=lt(a.to(),s.to()),d=a.empty()?s.from()==s.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new io(d?u:c,d?c:u))}}return new ro(t,n)}function so(e,t){return new ro([new io(e,t||e)],0)}function ao(e){return e.text?it(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function lo(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return ao(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ao(t).ch-t.to.ch),it(n,r)}function co(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new io(lo(i.anchor,t),lo(i.head,t)))}return oo(e.cm,n,e.sel.primIndex)}function uo(e,t,n){return e.line==t.line?it(n.line,e.ch-t.ch+n.ch):it(n.line+(e.line-t.line),e.ch)}function fo(e,t,n){for(var r=[],i=it(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=uo(a.from,i,o),c=uo(ao(a),i,o);if(i=a.to,o=c,"around"==n){var u=e.sel.ranges[s],d=ot(u.head,u.anchor)<0;r[s]=new io(d?c:l,d?l:c)}else r[s]=new io(l,l)}return new ro(r,e.sel.primIndex)}function po(e){e.doc.mode=He(e.options,e.doc.modeOption),ho(e)}function ho(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Mi(e,100),e.state.modeGen++,e.curOp&&Fr(e)}function mo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function go(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){cn(e,n,i,r),Nn(e,"change",e,t)}function s(e,t){for(var n=[],o=e;o<t;++o)n.push(new ln(c[o],i(o),r));return n}var a=t.from,l=t.to,c=t.text,u=Qe(e,a.line),d=Qe(e,l.line),f=Y(c),p=i(c.length-1),h=l.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(mo(e,t)){var m=s(0,c.length-1);o(d,d.text,p),h&&e.remove(a.line,h),m.length&&e.insert(a.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,a.ch)+f+u.text.slice(l.ch),p);else{var g=s(1,c.length-1);g.push(new ln(f+u.text.slice(l.ch),p,r)),o(u,u.text.slice(0,a.ch)+c[0],i(0)),e.insert(a.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(a.line+1,h);else{o(u,u.text.slice(0,a.ch)+c[0],i(0)),o(d,f+d.text.slice(l.ch),p);var v=s(1,c.length-1);h>1&&e.remove(a.line+1,h-1),e.insert(a.line+1,v)}Nn(e,"change",e,t)}function vo(e,t,n){function r(e,i,o){if(e.linked)for(var s=0;s<e.linked.length;++s){var a=e.linked[s];if(a.doc!=i){var l=o&&a.sharedHist;n&&!l||(t(a.doc,l),r(a.doc,e,l))}}}r(e,null,!0)}function yo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Lr(e),po(e),bo(e),e.options.direction=t.direction,e.options.lineWrapping||an(e),e.options.mode=t.modeOption,Fr(e)}function bo(e){("rtl"==e.doc.direction?L:k)(e.display.lineDiv,"CodeMirror-rtl")}function Eo(e){Ai(e,(function(){bo(e),Fr(e)}))}function xo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function wo(e,t){var n={from:at(t.from),to:ao(t),text:Xe(e,t.from,t.to)};return Do(e,n,t.from.line,t.to.line+1),vo(e,(function(e){return Do(e,n,t.from.line,t.to.line+1)}),!0),n}function To(e){for(;e.length&&Y(e).ranges;)e.pop()}function Co(e,t){return t?(To(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function So(e,t,n,r){var i=e.history;i.undone.length=0;var o,s,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Co(i,i.lastOp==r)))s=Y(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,s.to)?s.to=ao(t):o.changes.push(wo(e,t));else{var l=Y(i.done);for(l&&l.ranges||No(e.sel,i.done),o={changes:[wo(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||ve(e,"historyAdded")}function ko(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function _o(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ko(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:No(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&To(i.undone)}function No(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Do(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Ao(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Io(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Ao(n[i]));return r}function Oo(e,t){var n=Io(e,t),r=jt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function Lo(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?ro.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];r.push({changes:a});for(var l=0;l<s.length;++l){var c=s[l],u=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&B(t,Number(u[1]))>-1&&(Y(a)[d]=c[d],delete c[d])}}}return r}function Mo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ot(t,i)<0;o!=ot(n,i)<0?(i=t,t=n):o!=ot(t,n)<0&&(t=n)}return new io(i,t)}return new io(n||t,t)}function Ro(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$o(e,new ro([Mo(e.sel.primary(),t,n,i)],0),r)}function Fo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Mo(e.sel.ranges[o],t[o],null,i);$o(e,oo(e.cm,r,e.sel.primIndex),n)}function Po(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,$o(e,oo(e.cm,i,e.sel.primIndex),r)}function jo(e,t,n,r){$o(e,so(t,n),r)}function Vo(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new io(dt(e,t[n].anchor),dt(e,t[n].head))},origin:n&&n.origin};return ve(e,"beforeSelectionChange",e,r),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?oo(e.cm,r.ranges,r.ranges.length-1):t}function Bo(e,t,n){var r=e.history.done,i=Y(r);i&&i.ranges?(r[r.length-1]=t,Uo(e,t,n)):$o(e,t,n)}function $o(e,t,n){Uo(e,t,n),_o(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Uo(e,t,n){(Ee(e,"beforeSelectionChange")||e.cm&&Ee(e.cm,"beforeSelectionChange"))&&(t=Vo(e,t,n));var r=n&&n.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);Ho(e,Wo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||si(e.cm)}function Ho(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,be(e.cm)),Nn(e,"cursorActivity",e))}function qo(e){Ho(e,Wo(e,e.sel,null,!1))}function Wo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Go(e,s.anchor,a&&a.anchor,n,r),c=Go(e,s.head,a&&a.head,n,r);(i||l!=s.anchor||c!=s.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new io(l,c))}return i?oo(e.cm,i,t.primIndex):t}function zo(e,t,n,r,i){var o=Qe(e,t.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(c?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(u?a.to>=t.ch:a.to>t.ch))){if(i&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=Ko(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=ot(d,n))&&(r<0?f<0:f>0))return zo(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=Ko(e,p,r,p.line==t.line?o:null)),p?zo(e,p,t,r,i):null}}return t}function Go(e,t,n,r,i){var o=r||1,s=zo(e,t,n,o,i)||!i&&zo(e,t,n,o,!0)||zo(e,t,n,-o,i)||!i&&zo(e,t,n,-o,!0);return s||(e.cantEdit=!0,it(e.first,0))}function Ko(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?dt(e,it(t.line-1)):null:n>0&&t.ch==(r||Qe(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+n)}function Yo(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),H)}function Qo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=dt(e,t)),n&&(r.to=dt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ve(e,"beforeChange",e,r),e.cm&&ve(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Xo(e,t,n){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,Xo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Ee(e,"beforeChange")||e.cm&&Ee(e.cm,"beforeChange"))||(t=Qo(e,t,!0))){var r=Nt&&!n&&Bt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Jo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Jo(e,t)}}function Jo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var n=co(e,t);So(e,t,n,e.cm?e.cm.curOp.id:NaN),ts(e,t,n,jt(e,t));var r=[];vo(e,(function(e,n){n||-1!=B(r,e.history)||(ss(e.history,t),r.push(e.history)),ts(e,t,null,jt(e,t))}))}}function Zo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,s=e.sel,a="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<a.length&&(i=a[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=a.pop()).ranges){if(r)return void a.push(i);break}if(No(i,l),n&&!i.equals(e.sel))return void $o(e,i,{clearRedo:!1});s=i}var u=[];No(s,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=Ee(e,"beforeChange")||e.cm&&Ee(e.cm,"beforeChange"),f=function(n){var r=i.changes[n];if(r.origin=t,d&&!Qo(e,r,!1))return a.length=0,{};u.push(wo(e,r));var o=n?co(e,r):Y(a);ts(e,r,o,Oo(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:ao(r)});var s=[];vo(e,(function(e,t){t||-1!=B(s,e.history)||(ss(e.history,r),s.push(e.history)),ts(e,r,null,Oo(e,r))}))},p=i.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function es(e,t){if(0!=t&&(e.first+=t,e.sel=new ro(Q(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Pr(e.cm,r,"gutter")}}function ts(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ii(e.cm,ts)(e,t,n,r);if(t.to.line<e.first)es(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);es(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Qe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Xe(e,t.from,t.to),n||(n=co(e,t)),e.cm?ns(e.cm,t,r):go(e,t,r),Uo(e,n,H),e.cantEdit&&Go(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function ns(e,t,n){var r=e.doc,i=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=et(Xt(Qe(r,o.line))),r.iter(l,s.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),go(r,t,n,Or(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=sn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),_t(r,o.line),Mi(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?Fr(e):o.line!=s.line||1!=t.text.length||mo(e.doc,t)?Fr(e,o.line,s.line+1,c):Pr(e,o.line,"text");var u=Ee(e,"changes"),d=Ee(e,"change");if(d||u){var f={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&Nn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function rs(e,t,n,r,i){var o;r||(r=n),ot(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Xo(e,{from:n,to:r,text:t,origin:i})}function is(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function os(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)is(o.ranges[a].anchor,t,n,r),is(o.ranges[a].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=it(c.from.line+r,c.from.ch),c.to=it(c.to.line+r,c.to.ch);else if(t<=c.to.line){s=!1;break}}s||(e.splice(0,i+1),i=0)}}}function ss(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;os(e.done,n,r,i),os(e.undone,n,r,i)}function as(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Qe(e,ut(e,t)):i=et(t),null==i?null:(r(o,i)&&e.cm&&Pr(e.cm,i,n),o)}function ls(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function cs(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}io.prototype.from=function(){return ct(this.anchor,this.head)},io.prototype.to=function(){return lt(this.anchor,this.head)},io.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ls.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,un(i),Nn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},cs.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ls))){var a=[];this.collapse(a),this.children=[new ls(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var s=i.lines.length%25+25,a=s;a<i.lines.length;){var l=new ls(i.lines.slice(a,a+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,s),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new cs(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=B(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new cs(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var us=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function ds(e,t,n){on(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&oi(e,n)}function fs(e,t,n,r){var i=new us(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),as(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!nn(e,t)){var r=on(t)<e.scrollTop;Ze(t,t.height+Un(i)),r&&oi(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Nn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}us.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=et(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Un(this);Ze(n,Math.max(0,n.height-o)),e&&(Ai(e,(function(){ds(e,n,-o),Pr(e,r,"widget")})),Nn(e,"lineWidgetCleared",e,this,r))}},us.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Un(this)-t;i&&(nn(this.doc,r)||Ze(r,r.height+i),n&&Ai(n,(function(){n.curOp.forceUpdate=!0,ds(n,r,i),Nn(n,"lineWidgetChanged",n,e,et(r))})))},xe(us);var ps=0,hs=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ps};function ms(e,t,n,r,i){if(r&&r.shared)return vs(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ii(e.cm,ms)(e,t,n,r,i);var o=new hs(e,i),s=ot(t,n);if(r&&P(r,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Qt(e,t.line,t,n,o)||t.line!=n.line&&Qt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");It()}o.addToHistory&&So(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&Xt(r)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&Ze(r,0),Rt(r,new Ot(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){nn(e,t)&&Ze(t,0)})),o.clearOnEnter&&he(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(At(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ps,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Fr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Pr(c,u,"text");o.atomic&&qo(c.doc),Nn(c,"markerAdded",c,o)}return o}hs.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&wi(e),Ee(this,"clear")){var n=this.find();n&&Nn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Lt(s.markedSpans,this);e&&!this.collapsed?Pr(e,et(s),"text"):e&&(null!=a.to&&(i=et(s)),null!=a.from&&(r=et(s))),s.markedSpans=Mt(s.markedSpans,a),null==a.from&&this.collapsed&&!nn(this.doc,s)&&e&&Ze(s,Nr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Xt(this.lines[l]),u=sn(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Fr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&qo(e.doc)),e&&Nn(e,"markerCleared",e,this,r,i),t&&Ti(e),this.parent&&this.parent.clear()}},hs.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],s=Lt(o.markedSpans,this);if(null!=s.from&&(n=it(t?o:et(o),s.from),-1==e))return n;if(null!=s.to&&(r=it(t?o:et(o),s.to),1==e))return r}return n&&{from:n,to:r}},hs.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Ai(r,(function(){var i=t.line,o=et(t.line),s=er(r,o);if(s&&(cr(s),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!nn(n.doc,i)&&null!=n.height){var a=n.height;n.height=null;var l=Un(n)-a;l&&Ze(i,i.height+l)}Nn(r,"markerChanged",r,e)}))},hs.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},hs.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xe(hs);var gs=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function vs(e,t,n,r,i){(r=P(r)).shared=!1;var o=[ms(e,t,n,r,i)],s=o[0],a=r.widgetNode;return vo(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(ms(e,dt(e,t),dt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=Y(o)})),new gs(o,s)}function ys(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function bs(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(ot(o,s)){var a=ms(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}function Es(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];vo(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==B(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}gs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Nn(this,"clear")}},gs.prototype.find=function(e,t){return this.primary.find(e,t)},xe(gs);var xs=0,ws=function(e,t,n,r,i){if(!(this instanceof ws))return new ws(e,t,n,r,i);null==n&&(n=0),cs.call(this,[new ls([new ln("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=it(n,0);this.sel=so(o),this.history=new xo(null),this.id=++xs,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),go(this,{from:o,to:o,text:e}),$o(this,so(o),H)};ws.prototype=Z(cs.prototype,{constructor:ws,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Je(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Li((function(e){var t=it(this.first,0),n=this.first+this.size-1;Xo(this,{from:t,to:it(n,Qe(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),$o(this,so(t),H)})),replaceRange:function(e,t,n,r){rs(this,e,t=dt(this,t),n=n?dt(this,n):t,r)},getRange:function(e,t,n){var r=Xe(this,dt(this,e),dt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(nt(this,e))return Qe(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Qe(this,e)),Xt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return dt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Li((function(e,t,n){jo(this,dt(this,"number"==typeof e?it(e,t||0):e),null,n)})),setSelection:Li((function(e,t,n){jo(this,dt(this,e),dt(this,t||e),n)})),extendSelection:Li((function(e,t,n){Ro(this,dt(this,e),t&&dt(this,t),n)})),extendSelections:Li((function(e,t){Fo(this,pt(this,e),t)})),extendSelectionsBy:Li((function(e,t){Fo(this,pt(this,Q(this.sel.ranges,e)),t)})),setSelections:Li((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new io(dt(this,e[i].anchor),dt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),$o(this,oo(this.cm,r,t),n)}})),addSelection:Li((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new io(dt(this,e),dt(this,t||e))),$o(this,oo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Xe(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Xe(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Li((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&"end"!=t&&fo(this,r,t),l=r.length-1;l>=0;l--)Xo(this,r[l]);a?Bo(this,a):this.cm&&si(this.cm)})),undo:Li((function(){Zo(this,"undo")})),redo:Li((function(){Zo(this,"redo")})),undoSelection:Li((function(){Zo(this,"undo",!0)})),redoSelection:Li((function(){Zo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new xo(this.history),vo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Lo(this.history.done),undone:Lo(this.history.undone)}},setHistory:function(e){var t=this.history=new xo(this.history);t.done=Lo(e.done.slice(0),null,!0),t.undone=Lo(e.undone.slice(0),null,!0)},setGutterMarker:Li((function(e,t,n){return as(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&re(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Li((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&as(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,re(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!nt(this,e))return null;if(t=e,!(e=Qe(this,e)))return null}else if(null==(t=et(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Li((function(e,t,n){return as(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Li((function(e,t,n){return as(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(C(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0}))})),addLineWidget:Li((function(e,t,n){return fs(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ms(this,dt(this,e),dt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ms(this,e=dt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Qe(this,(e=dt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=dt(this,e),t=dt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),dt(this,it(n,t))},indexFromPos:function(e){var t=(e=dt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new ws(Je(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new ws(Je(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],bs(r,ys(this)),r},unlinkDoc:function(e){if(e instanceof Fa&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Es(ys(this));break}if(e.history==this.history){var n=[e.id];vo(e,(function(e){return n.push(e.id)}),!0),e.history=new xo(null),e.history.done=Lo(this.history.done,n),e.history.undone=Lo(this.history.undone,n)}},iterLinkedDocs:function(e){vo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Le(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Li((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Eo(this.cm))}))}),ws.prototype.eachLine=ws.prototype.iter;var Ts=0;function Cs(e){var t=this;if(_s(t),!ye(t,e)&&!Hn(t.display,e)){we(e),s&&(Ts=+new Date);var n=Mr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&Ii(t,(function(){var e={from:n=dt(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Xo(t.doc,e),Bo(t.doc,so(dt(t.doc,n),dt(t.doc,ao(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==B(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Uo(t.doc,so(n,n)),f)for(var p=0;p<f.length;++p)rs(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(h){}}}}function Ss(e,t){if(s&&(!e.state.draggingText||+new Date-Ts<100))Se(t);else if(!ye(e,t)&&!Hn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=D("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function ks(e,t){var n=Mr(e,t);if(n){var r=document.createDocumentFragment();qr(e,n,r),e.display.dragCursor||(e.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,r)}}function _s(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ns(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Ds=!1;function As(){Ds||(Is(),Ds=!0)}function Is(){var e;he(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ns(Os)}),100))})),he(window,"blur",(function(){return Ns(Xr)}))}function Os(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ls={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ms=0;Ms<10;Ms++)Ls[Ms+48]=Ls[Ms+96]=String(Ms);for(var Rs=65;Rs<=90;Rs++)Ls[Rs]=String.fromCharCode(Rs);for(var Fs=1;Fs<=12;Fs++)Ls[Fs+111]=Ls[Fs+63235]="F"+Fs;var Ps={};function js(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Vs(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Q(n.split(" "),js),o=0;o<i.length;o++){var s=void 0,a=void 0;o==i.length-1?(a=i.join(" "),s=r):(a=i.slice(0,o+1).join(" "),s="...");var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[n]}for(var c in t)e[c]=t[c];return e}function Bs(e,t,n,r){var i=(t=qs(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Bs(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=Bs(e,t.fallthrough[o],n,r);if(s)return s}}}function $s(e){var t="string"==typeof e?e:Ls[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Us(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Hs(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Ls[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Us(n,e,t))}function qs(e){return"string"==typeof e?Ps[e]:e}function Ws(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&ot(o.from,Y(r).to)<=0;){var s=r.pop();if(ot(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}Ai(e,(function(){for(var t=r.length-1;t>=0;t--)rs(e.doc,"",r[t].from,r[t].to,"+delete");si(e)}))}function zs(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Gs(e,t,n){var r=zs(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function Ks(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=fe(n,t.doc.direction);if(o){var s,a=i<0?Y(o):o[0],l=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var c=tr(t,n);s=i<0?n.text.length-1:0;var u=nr(t,c,s).top;s=ae((function(e){return nr(t,c,e).top==u}),i<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=zs(n,s,1))}else s=i<0?a.to:a.from;return new it(r,s,l)}}return new it(r,i<0?n.text.length:0,i<0?"before":"after")}function Ys(e,t,n,r){var i=fe(t,e.doc.direction);if(!i)return Gs(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(i,n.ch,n.sticky),s=i[o];if("ltr"==e.doc.direction&&s.level%2==0&&(r>0?s.to>n.ch:s.from<n.ch))return Gs(t,n,r);var a,l=function(e,n){return zs(t,e instanceof it?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(a=a||tr(e,t),Tr(e,t,a,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==s.level){var d=1==s.level==r<0,f=l(n,d?1:-1);if(null!=f&&(d?f<=s.to&&f<=u.end:f>=s.from&&f>=u.begin)){var p=d?"before":"after";return new it(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new it(n.line,l(e,1),"before"):new it(n.line,e,"after")};e>=0&&e<i.length;e+=t){var s=i[e],a=t>0==(1!=s.level),c=a?r.begin:l(r.end,-1);if(s.from<=c&&c<s.to)return o(c,a);if(c=a?s.from:l(s.to,-1),r.begin<=c&&c<r.end)return o(c,a)}},m=h(o+r,r,u);if(m)return m;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,c(g)))?null:m}Ps.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ps.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ps.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ps.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ps.default=y?Ps.macDefault:Ps.pcDefault;var Qs={selectAll:Yo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Ws(e,(function(t){if(t.empty()){var n=Qe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ws(e,(function(t){return{from:it(t.from().line,0),to:dt(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return Ws(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ws(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ws(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Xs(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return Zs(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return Js(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),W)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),W)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Zs(e,t.head):r}),W)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=j(e.getLine(o.line),o.ch,r);t.push(K(r-s%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ai(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Qe(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=Qe(e.doc,i.line-1).text;s&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),it(i.line-1,s.length-1),i,"+transpose"))}n.push(new io(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Ai(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);si(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,t){var n=Qe(e.doc,t),r=Xt(n);return r!=n&&(t=et(r)),Ks(!0,e,r,t,1)}function Js(e,t){var n=Qe(e.doc,t),r=Jt(n);return r!=n&&(t=et(r)),Ks(!0,e,n,t,-1)}function Zs(e,t){var n=Xs(e,t.line),r=Qe(e.doc,n.line),i=fe(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return it(n.line,s?0:o,n.sticky)}return n}function ea(e,t,n){if("string"==typeof t&&!(t=Qs[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ta(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Bs(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Bs(t,e.options.extraKeys,n,e)||Bs(t,e.options.keyMap,n,e)}var na=new V;function ra(e,t,n,r){var i=e.state.keySeq;if(i){if($s(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:na.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),ia(e,i+" "+t,n,r))return!0}return ia(e,t,n,r)}function ia(e,t,n,r){var i=ta(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Nn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(we(n),Gr(e)),!!i}function oa(e,t){var n=Hs(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ra(e,"Shift-"+n,t,(function(t){return ea(e,t,!0)}))||ra(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ea(e,t)})):ra(e,n,t,(function(t){return ea(e,t)})))}function sa(e,t,n){return ra(e,"'"+n+"'",t,(function(t){return ea(e,t,!0)}))}var aa=null;function la(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=O(),ye(t,e)))){s&&a<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=oa(t,e);d&&(aa=i?r:null,i||88!=r||Re||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ca(t)}}function ca(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(k(t,"CodeMirror-crosshair"),ge(document,"keyup",n),ge(document,"mouseover",n))}L(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n)}function ua(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}function da(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Hn(t.display,e)||ye(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==aa)return aa=null,void we(e);if(!d||e.which&&!(e.which<10)||!oa(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(sa(t,e,i)||t.display.input.onKeyPress(e))}}}var fa,pa,ha=400,ma=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ga(e,t){var n=+new Date;return pa&&pa.compare(n,e,t)?(fa=pa=null,"triple"):fa&&fa.compare(n,e,t)?(pa=new ma(n,e,t),fa=null,"double"):(fa=new ma(n,e,t),pa=null,"single")}function va(e){var t=this,n=t.display;if(!(ye(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Hn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ka(t,e)){var r=Mr(t,e),i=_e(e),o=r?ga(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&ya(t,i,r,o,e)||(1==i?r?Ea(t,r,o,e):ke(e)==n.scroller&&we(e):2==i?(r&&Ro(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(T?t.display.input.onContextMenu(e):Yr(t)))}}function ya(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),ra(e,Us(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=Qs[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=U}finally{e.state.suppressEdits=!1}return r}))}function ba(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}function Ea(e,t,n,r){s?setTimeout(F(Kr,e),0):e.curOp.focus=O();var i,o=ba(e,n,r),a=e.doc.sel;e.options.dragDrop&&Ae&&!e.isReadOnly()&&"single"==n&&(i=a.contains(t))>-1&&(ot((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?xa(e,r,t,o):Ta(e,r,t,o)}function xa(e,t,n,r){var i=e.display,o=!1,c=Ii(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Yr(e)),ge(i.wrapper.ownerDocument,"mouseup",c),ge(i.wrapper.ownerDocument,"mousemove",u),ge(i.scroller,"dragstart",d),ge(i.scroller,"drop",c),o||(we(t),r.addNew||Ro(e.doc,n,null,null,r.extend),l&&!f||s&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",d),he(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function wa(e,t,n){if("char"==n)return new io(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new io(it(t.line,0),dt(e.doc,it(t.line+1,0)));var r=n(e,t);return new io(r.from,r.to)}function Ta(e,t,n,r){s&&Yr(e);var i=e.display,o=e.doc;we(t);var a,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),a=l>-1?u[l]:new io(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new io(n,n)),n=Mr(e,t,!0,!0),l=-1;else{var d=wa(e,n,r.unit);a=r.extend?Mo(a,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,$o(o,oo(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?($o(o,oo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Po(o,l,a,q):(l=0,$o(o,new ro([a],0),q),c=o.sel);var f=n;function p(t){if(0!=ot(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],s=e.options.tabSize,u=j(Qe(o,n.line).text,n.ch,s),d=j(Qe(o,t.line).text,t.ch,s),p=Math.min(u,d),h=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Qe(o,m).text,y=z(v,p,s);p==h?i.push(new io(it(m,y),it(m,y))):v.length>y&&i.push(new io(it(m,y),it(m,z(v,h,s))))}i.length||i.push(new io(n,n)),$o(o,oo(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=a,x=wa(e,t,r.unit),w=E.anchor;ot(x.anchor,w)>0?(b=x.head,w=ct(E.from(),x.anchor)):(b=x.anchor,w=lt(E.to(),x.head));var T=c.ranges.slice(0);T[l]=Ca(e,new io(dt(o,w),b)),$o(o,oo(e,T,l),q)}}var h=i.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,s=Mr(e,t,!0,"rectangle"==r.unit);if(s)if(0!=ot(s,f)){e.curOp.focus=O(),p(s);var a=ei(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(Ii(e,(function(){m==n&&g(t)})),150)}else{var l=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;l&&setTimeout(Ii(e,(function(){m==n&&(i.scroller.scrollTop+=l,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(we(t),i.input.focus()),ge(i.wrapper.ownerDocument,"mousemove",y),ge(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Ii(e,(function(e){0!==e.buttons&&_e(e)?g(e):v(e)})),b=Ii(e,v);e.state.selectingText=b,he(i.wrapper.ownerDocument,"mousemove",y),he(i.wrapper.ownerDocument,"mouseup",b)}function Ca(e,t){var n=t.anchor,r=t.head,i=Qe(e.doc,n.line);if(0==ot(n,r)&&n.sticky==r.sticky)return t;var o=fe(i);if(!o)return t;var s=ue(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return t;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,r.ch,r.sticky),d=u-s||(r.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new io(new it(n.line,h,m),r)}function Sa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(u){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ee(e,n))return Ce(t);o-=a.top-s.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=s.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return ve(e,n,e,tt(e.doc,o),e.display.gutterSpecs[l].className,t),Ce(t)}}function ka(e,t){return Sa(e,t,"gutterClick",!0)}function _a(e,t){Hn(e.display,t)||Na(e,t)||ye(e,t,"contextmenu")||T||e.display.input.onContextMenu(t)}function Na(e,t){return!!Ee(e,"gutterContextMenu")&&Sa(e,t,"gutterContextMenu",!1)}function Da(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dr(e)}ma.prototype.compare=function(e,t,n){return this.time+ha>e&&0==ot(t,this.pos)&&n==this.button};var Aa={toString:function(){return"CodeMirror.Init"}},Ia={},Oa={};function La(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Aa&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Aa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,po(e)}),!0),n("indentUnit",2,po,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){ho(e),dr(e),Fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(it(r,o))}r++}));for(var i=n.length-1;i>=0;i--)rs(e.doc,t,n[i],it(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Aa&&e.refresh()})),n("specialCharPlaceholder",mn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!E),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Da(e),Qi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=qs(t),i=n!=Aa&&qs(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ra,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Ki(t,e.options.lineNumbers),Qi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Ir(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return vi(e)}),!0),n("scrollbarStyle","native",(function(e){Ei(e),vi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Ki(e.options.gutters,t),Qi(e)}),!0),n("firstLineNumber",1,Qi,!0),n("lineNumberFormatter",(function(e){return e}),Qi,!0),n("showCursorWhenSelecting",!1,Ur,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Xr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ma),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Ur,!0),n("singleCursorHeightPerLine",!0,Ur,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,ho,!0),n("addModeClass",!1,ho,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,ho,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Ma(e,t,n){if(!t!=!(n&&n!=Aa)){var r=e.display.dragFunctions,i=t?he:ge;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Ra(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(k(e.display.wrapper,"CodeMirror-wrap"),an(e)),Lr(e),Fr(e),dr(e),setTimeout((function(){return vi(e)}),100)}function Fa(e,t){var n=this;if(!(this instanceof Fa))return new Fa(e,t);this.options=t=t?P(t):{},P(Ia,t,!1);var r=t.value;"string"==typeof r?r=new ws(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Fa.inputStyles[t.inputStyle](this),o=this.display=new Xi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Da(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ei(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new V,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),s&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Pa(this),As(),wi(this),this.curOp.forceUpdate=!0,yo(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Qr(n)}),20):Xr(this),Oa)Oa.hasOwnProperty(c)&&Oa[c](this,t[c],Aa);Gi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<ja.length;++u)ja[u](this);Ti(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Pa(e){var t=e.display;he(t.scroller,"mousedown",Ii(e,va)),he(t.scroller,"dblclick",s&&a<11?Ii(e,(function(t){if(!ye(e,t)){var n=Mr(e,t);if(n&&!ka(e,t)&&!Hn(e.display,t)){we(t);var r=e.findWordAt(n);Ro(e.doc,r.anchor,r.head)}}})):function(t){return ye(e,t)||we(t)}),he(t.scroller,"contextmenu",(function(t){return _a(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||_a(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!ka(e,i)){t.input.ensurePolled(),clearTimeout(n);var s=+new Date;t.activeTouch={start:s,moved:!1,prev:s-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Hn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new io(s,s):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(s):new io(it(s.line,0),dt(e.doc,it(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),we(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),pi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return no(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Se(t)},over:function(t){ye(e,t)||(ks(e,t),Se(t))},start:function(t){return Ss(e,t)},drop:Ii(e,Cs),leave:function(t){ye(e,t)||_s(e)}};var c=t.input.getField();he(c,"keyup",(function(t){return ua.call(e,t)})),he(c,"keydown",Ii(e,la)),he(c,"keypress",Ii(e,da)),he(c,"focus",(function(t){return Qr(e,t)})),he(c,"blur",(function(t){return Xr(e,t)}))}Fa.defaults=Ia,Fa.optionHandlers=Oa;var ja=[];function Va(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=yt(e,t).state:n="prev");var s=e.options.tabSize,a=Qe(o,t),l=j(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(i,a.text.slice(u.length),a.text))==U||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?j(Qe(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/s);p;--p)f+=s,d+="\t";if(f<c&&(d+=K(c-f)),d!=u)return rs(o,d,it(t,0),it(t,u.length),"+input"),a.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var m=o.sel.ranges[h];if(m.head.line==t&&m.head.ch<u.length){var g=it(t,u.length);Po(o,h,new io(g,g));break}}}Fa.defineInitHook=function(e){return ja.push(e)};var Ba=null;function $a(e){Ba=e}function Ua(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var s=+new Date-200,a="paste"==i||e.state.pasteIncoming>s,l=Le(t),c=null;if(a&&r.ranges.length>1)if(Ba&&Ba.text.join("\n")==t){if(r.ranges.length%Ba.text.length==0){c=[];for(var u=0;u<Ba.text.length;u++)c.push(o.splitLines(Ba.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Q(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=it(h.line,h.ch-n):e.state.overwrite&&!a?m=it(m.line,Math.min(Qe(o,m.line).text.length,m.ch+Y(l).length)):a&&Ba&&Ba.lineWise&&Ba.text.join("\n")==l.join("\n")&&(h=m=it(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:l,origin:i||(a?"paste":e.state.cutIncoming>s?"cut":"+input")};Xo(e.doc,g),Nn(e,"inputRead",e,g)}t&&!a&&qa(e,t),si(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ha(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Ai(t,(function(){return Ua(t,n,0,null,"paste")})),!0}function qa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){s=Va(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Va(e,i.head.line,"smart"));s&&Nn(e,"electricInput",e,i.head.line)}}}function Wa(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:it(i,0),head:it(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function za(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ga(){var e=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=D("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),za(e),t}function Ka(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ii(this,t[e])(this,n,i),ve(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](qs(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Oi((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");X(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Fr(this)})),removeOverlay:Oi((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Fr(this)}})),indentLine:Oi((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),nt(this.doc,e)&&Va(this,e,t,n)})),indentSelection:Oi((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Va(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&si(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)Va(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Po(this.doc,r,new io(o,c[r].to()),H)}}})),getTokenAt:function(e,t){return Tt(this,e,t)},getLineTokens:function(e,t){return Tt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,n=vt(this,Qe(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf("overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var s=0;s<o[t].length;s++){var a=i[o[t][s]];a&&r.push(a)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==B(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return yt(this,(e=ut(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return yr(this,null==e?n.head:"object"==typeof e?dt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return vr(this,dt(this.doc,e),t||"page")},coordsChar:function(e,t){return xr(this,(e=gr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=gr(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Qe(this.doc,e)}else r=e;return mr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-on(r):0)},defaultTextHeight:function(){return Nr(this.display)},defaultCharWidth:function(){return Dr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,s=(e=yr(this,dt(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&ri(this,{left:a,top:s,right:a+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:Oi(la),triggerOnKeyPress:Oi(da),triggerOnKeyUp:ua,triggerOnMouseDown:Oi(va),execCommand:function(e){if(Qs.hasOwnProperty(e))return Qs[e].call(null,this)},triggerElectric:Oi((function(e){qa(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),s=0;s<t&&!(o=Ya(this.doc,o,i,n,r)).hitSide;++s);return o},moveH:Oi((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ya(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),W)})),deleteH:Oi((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Ws(this,(function(n){var i=Ya(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var s=dt(this.doc,e),a=0;a<t;++a){var l=yr(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Qa(this,l,i,n)).hitSide)break}return s},moveV:Oi((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(s){if(o)return e<0?s.from():s.to();var a=yr(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=Qa(n,a,e,t);return"page"==t&&s==r.sel.primary()&&oi(n,vr(n,l,"div").top-a.top),l}),W),i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]})),findWordAt:function(e){var t=Qe(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),s=ne(o,i)?function(e){return ne(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ne(e)};n>0&&s(t.charAt(n-1));)--n;for(;r<t.length&&s(t.charAt(r));)++r}return new io(it(e.line,n),it(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):k(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==O()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Oi((function(e,t){ai(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Gn(this)-this.display.barHeight,width:e.scrollWidth-Gn(this)-this.display.barWidth,clientHeight:Yn(this),clientWidth:Kn(this)}},scrollIntoView:Oi((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:it(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?li(this,e):ui(this,e.from,e.to,e.margin)})),setSize:Oi((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&ur(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Pr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return Ai(this,e)},startOperation:function(){return wi(this)},endOperation:function(){return Ti(this)},refresh:Oi((function(){var e=this.display.cachedTextHeight;Fr(this),this.curOp.forceUpdate=!0,dr(this),ai(this,this.doc.scrollLeft,this.doc.scrollTop),qi(this.display),(null==e||Math.abs(e-Nr(this.display))>.5||this.options.lineWrapping)&&Lr(this),ve(this,"refresh",this)})),swapDoc:Oi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),yo(this,e),dr(this),this.display.input.reset(),ai(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Nn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Ya(e,t,n,r,i){var o=t,s=n,a=Qe(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n<e.first||n>=e.first+e.size)&&(t=new it(n,t.ch,t.sticky),a=Qe(e,n))}function u(o){var s;if("codepoint"==r){var u=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))s=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;s=new it(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(d?2:1))),-n)}}else s=i?Ys(e.cm,a,t,n):Gs(a,t,n);if(null==s){if(o||!c())return!1;t=Ks(i,e.cm,a,t.line,l)}else t=s;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var m=a.text.charAt(t.ch)||"\n",g=ne(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||g||(g="s"),d&&d!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(d=g),n>0&&!u(!h))break}var v=Go(e,t,o,s,!0);return st(o,v)&&(v.hitSide=!0),v}function Qa(e,t,n,r){var i,o,s=e.doc,a=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Nr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=xr(e,a,i)).outside;){if(n<0?i<=0:i>=s.height){o.hitSide=!0;break}i+=5*n}return o}var Xa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ja(e,t){var n=er(e,t.line);if(!n||n.hidden)return null;var r=Qe(e.doc,t.line),i=Xn(n,r,t.line),o=fe(r,e.doc.direction),s="left";o&&(s=ue(o,t.ch)%2?"right":"left");var a=or(i.map,t.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Za(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function el(e,t){return t&&(e.bad=!0),e}function tl(e,t,n,r,i){var o="",s=!1,a=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function u(){s&&(o+=a,l&&(o+=a),s=l=!1)}function d(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(it(r,0),it(i+1,0),c(+p));return void(h.length&&(o=h[0].find(0))&&d(Xe(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(s=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=n;)t=t.nextSibling,l=!1;return o}function nl(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return el(e.clipPos(it(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return rl(o,t,n)}}function rl(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!I(r,t))return el(it(et(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Y(e.rest):e.line;return el(it(et(o),o.text.length),i)}var s=3==t.nodeType?t:null,a=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],s=0;s<o.length;s+=3){var a=o[s+2];if(a==t||a==n){var u=et(i<0?e.line:e.rest[i]),d=o[s]+r;return(r<0||a!=t)&&(d=o[s+(r?1:0)]),it(u,d)}}}var d=u(s,a,n);if(d)return el(d,i);for(var f=a.nextSibling,p=s?s.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return el(it(d.line,d.ch-p),i);p+=f.textContent.length}for(var h=a.previousSibling,m=n;h;h=h.previousSibling){if(d=u(h,h.firstChild,-1))return el(it(d.line,d.ch+m),i);m+=h.textContent.length}}Xa.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function s(e){if(o(e)&&!ye(r,e)){if(r.somethingSelected())$a({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Wa(r);$a({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,H),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var s=Ba.text.join("\n");if(e.clipboardData.setData("Text",s),e.clipboardData.getData("Text")==s)return void e.preventDefault()}var a=Ga(),l=a.firstChild;r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),l.value=Ba.text.join("\n");var c=O();R(l),setTimeout((function(){r.display.lineSpace.removeChild(a),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,za(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),he(i,"paste",(function(e){!o(e)||ye(r,e)||Ha(e,r)||a<=11&&setTimeout(Ii(r,(function(){return t.updateFromDOM()})),20)})),he(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),he(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),he(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),he(i,"touchstart",(function(){return n.forceCompositionEnd()})),he(i,"input",(function(){t.composing||t.readFromDOMSoon()})),he(i,"copy",s),he(i,"cut",s)},Xa.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Xa.prototype.prepareSelection=function(){var e=Hr(this.cm,!1);return e.focus=O()==this.div,e},Xa.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Xa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Xa.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var s=nl(t,e.anchorNode,e.anchorOffset),a=nl(t,e.focusNode,e.focusOffset);if(!s||s.bad||!a||a.bad||0!=ot(ct(s,a),i)||0!=ot(lt(s,a),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Ja(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Ja(t,o);if(!u){var d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=S(c.node,c.offset,u.offset,u.node)}catch(nL){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Xa.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Xa.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},Xa.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Xa.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return I(this.div,t)},Xa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&O()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Xa.prototype.blur=function(){this.div.blur()},Xa.prototype.getField=function(){return this.div},Xa.prototype.supportsTouch=function(){return!0},Xa.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Ai(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},Xa.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Xa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&Za(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=nl(t,e.anchorNode,e.anchorOffset),r=nl(t,e.focusNode,e.focusOffset);n&&r&&Ai(t,(function(){$o(t.doc,so(n,r),H),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Xa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>r.firstLine()&&(s=it(s.line-1,Qe(r.doc,s.line-1).length)),a.ch==Qe(r.doc,a.line).text.length&&a.line<r.lastLine()&&(a=it(a.line+1,0)),s.line<i.viewFrom||a.line>i.viewTo-1)return!1;s.line==i.viewFrom||0==(e=Rr(r,s.line))?(t=et(i.view[0].line),n=i.view[0].node):(t=et(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=Rr(r,a.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=et(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(tl(r,n,c,t,l)),f=Xe(r.doc,it(t,0),it(l,Qe(r.doc,l).text.length));d.length>1&&f.length>1;)if(Y(d)==Y(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=Y(d),b=Y(f),E=Math.min(y.length-(1==d.length?p:0),b.length-(1==f.length?p:0));h<E&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==d.length&&1==f.length&&t==s.line)for(;p&&p>s.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=it(t,p),w=it(l,f.length?Y(f).length-h:0);return d.length>1||d[0]||ot(x,w)?(rs(r.doc,d,x,w,"+input"),!0):void 0},Xa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Xa.prototype.reset=function(){this.forceCompositionEnd()},Xa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Xa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Xa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Ai(this.cm,(function(){return Fr(e.cm)}))},Xa.prototype.setUneditable=function(e){e.contentEditable="false"},Xa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,Ua)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Xa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Xa.prototype.onContextMenu=function(){},Xa.prototype.resetPosition=function(){},Xa.prototype.needsContentAttribute=!0;var il=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};function ol(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=O();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var s=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=s}}catch(nL){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Fa((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a}function sl(e){e.off=ge,e.on=he,e.wheelEventPixels=to,e.Doc=ws,e.splitLines=Le,e.countColumn=j,e.findColumn=z,e.isWordChar=te,e.Pass=U,e.signal=ve,e.Line=ln,e.changeEnd=ao,e.scrollbarModel=bi,e.Pos=it,e.cmpPos=ot,e.modes=je,e.mimeModes=Ve,e.resolveMode=Ue,e.getMode=He,e.modeExtensions=qe,e.extendMode=We,e.copyState=ze,e.startState=Ke,e.innerMode=Ge,e.commands=Qs,e.keyMap=Ps,e.keyName=Hs,e.isModifierKey=$s,e.lookupKey=Bs,e.normalizeKeyMap=Vs,e.StringStream=Ye,e.SharedTextMarker=gs,e.TextMarker=hs,e.LineWidget=us,e.e_preventDefault=we,e.e_stopPropagation=Te,e.e_stop=Se,e.addClass=L,e.contains=I,e.rmClass=k,e.keyNames=Ls}il.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(r,e)){if(r.somethingSelected())$a({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Wa(r);$a({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),R(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){s&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){ye(r,e)||Ha(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",o),he(i,"copy",o),he(e.scroller,"paste",(function(t){if(!Hn(e,t)&&!ye(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),he(e.lineSpace,"selectstart",(function(t){Hn(e,t)||we(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},il.prototype.createField=function(e){this.wrapper=Ga(),this.textarea=this.wrapper.firstChild},il.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},il.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Hr(e);if(e.options.moveInputWithCursor){var i=yr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},il.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},il.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&R(this.textarea),s&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},il.prototype.getField=function(){return this.textarea},il.prototype.supportsTouch=function(){return!1},il.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||O()!=this.textarea))try{this.textarea.focus()}catch(nL){}},il.prototype.blur=function(){this.textarea.blur()},il.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},il.prototype.receivedFocus=function(){this.slowPoll()},il.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},il.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},il.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Me(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Ai(t,(function(){Ua(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},il.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},il.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},il.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Mr(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ii(n,$o)(n.doc,so(o),H);var u,f=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n      z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),s&&a>=9&&g(),T){Se(e);var m=function(){ge(window,"mouseup",m),setTimeout(v,20)};he(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=f,s&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!s||s&&a<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Ii(n,Yo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},il.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},il.prototype.setUneditable=function(){},il.prototype.needsContentAttribute=!1,La(Fa),Ka(Fa);var al="iter insert remove copy getEditor constructor".split(" ");for(var ll in ws.prototype)ws.prototype.hasOwnProperty(ll)&&B(al,ll)<0&&(Fa.prototype[ll]=function(e){return function(){return e.apply(this.doc,arguments)}}(ws.prototype[ll]));return xe(ws),Fa.inputStyles={textarea:il,contenteditable:Xa},Fa.defineMode=function(e){Fa.defaults.mode||"null"==e||(Fa.defaults.mode=e),Be.apply(this,arguments)},Fa.defineMIME=$e,Fa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Fa.defineMIME("text/plain","null"),Fa.defineExtension=function(e,t){Fa.prototype[e]=t},Fa.defineDocExtension=function(e,t){ws.prototype[e]=t},Fa.fromTextArea=ol,sl(Fa),Fa.version="5.65.3",Fa}()),$j.exports}var Hj=Uj();const qj=s(Hj),Wj=r({__proto__:null,default:qj},[Hj]);var zj,Gj={};var Kj=(zj||(zj=1,function(e){var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=s(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<n.length;i++)if(n[i].head.line!=n[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new r(this,t);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var i=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},o=window.cancelAnimationFrame||clearTimeout;function s(e,t,n){var r=e.options.hintOptions,i={};for(var o in h)i[o]=h[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}function a(e){return"string"==typeof e?e:e.text}function l(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var s in r)r.hasOwnProperty(s)&&o(s,r[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&o(s,a[s]);return i}function c(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function u(r,i){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=r,this.data=i,this.picked=!1;var o=this,s=r.cm,u=s.getInputField().ownerDocument,d=u.defaultView||u.parentWindow,f=this.hints=u.createElement("ul");f.setAttribute("role","listbox"),f.setAttribute("aria-expanded","true"),f.id=this.id;var p=r.cm.options.theme;f.className="CodeMirror-hints "+p,this.selectedHint=i.selectedHint||0;for(var h=i.list,m=0;m<h.length;++m){var g=f.appendChild(u.createElement("li")),v=h[m],y=t+(m!=this.selectedHint?"":" "+n);null!=v.className&&(y=v.className+" "+y),g.className=y,m==this.selectedHint&&g.setAttribute("aria-selected","true"),g.id=this.id+"-"+m,g.setAttribute("role","option"),v.render?v.render(g,i,v):g.appendChild(u.createTextNode(v.displayText||a(v))),g.hintId=m}var b=r.options.container||u.body,E=s.cursorCoords(r.options.alignWithWord?i.from:null),x=E.left,w=E.bottom,T=!0,C=0,S=0;if(b!==u.body){var k=-1!==["absolute","relative","fixed"].indexOf(d.getComputedStyle(b).position)?b:b.offsetParent,_=k.getBoundingClientRect(),N=u.body.getBoundingClientRect();C=_.left-N.left-k.scrollLeft,S=_.top-N.top-k.scrollTop}f.style.left=x-C+"px",f.style.top=w-S+"px";var D=d.innerWidth||Math.max(u.body.offsetWidth,u.documentElement.offsetWidth),A=d.innerHeight||Math.max(u.body.offsetHeight,u.documentElement.offsetHeight);b.appendChild(f),s.getInputField().setAttribute("aria-autocomplete","list"),s.getInputField().setAttribute("aria-owns",this.id),s.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var I,O=r.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect,L=!!r.options.paddingForScrollbar&&f.scrollHeight>f.clientHeight+1;if(setTimeout((function(){I=s.getScrollInfo()})),O.bottom-A>0){var M=O.bottom-O.top;if(E.top-(E.bottom-O.top)-M>0)f.style.top=(w=E.top-M-S)+"px",T=!1;else if(M>A){f.style.height=A-5+"px",f.style.top=(w=E.bottom-O.top-S)+"px";var R=s.getCursor();i.from.ch!=R.ch&&(E=s.cursorCoords(R),f.style.left=(x=E.left-C)+"px",O=f.getBoundingClientRect())}}var F,P=O.right-D;if(L&&(P+=s.display.nativeBarWidth),P>0&&(O.right-O.left>D&&(f.style.width=D-5+"px",P-=O.right-O.left-D),f.style.left=(x=E.left-P-C)+"px"),L)for(var j=f.firstChild;j;j=j.nextSibling)j.style.paddingRight=s.display.nativeBarWidth+"px";s.addKeyMap(this.keyMap=l(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(s.on("blur",this.onBlur=function(){F=setTimeout((function(){r.close()}),100)}),s.on("focus",this.onFocus=function(){clearTimeout(F)})),s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),t=s.getWrapperElement().getBoundingClientRect();I||(I=s.getScrollInfo());var n=w+I.top-e.top,i=n-(d.pageYOffset||(u.documentElement||u.body).scrollTop);if(T||(i+=f.offsetHeight),i<=t.top||i>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=x+I.left-e.left+"px"}),e.on(f,"dblclick",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(f,"click",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())})),e.on(f,"mousedown",(function(){setTimeout((function(){s.focus()}),20)}));var V=this.getSelectedHintRange();return 0===V.from&&0===V.to||this.scrollToActive(),e.signal(i,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function f(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}function p(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=d(e,i);function o(i){if(i==r.length)return t(null);f(r[i],e,n,(function(e){e&&e.list.length>0?t(e):o(i+1)}))}o(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(a(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=i((function(){r.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;f(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new u(this,t),e.signal(t,"shown")))}},u.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),s=e.Pos(i.line,o.start),a=i;o.start<i.ch&&/\w/.test(o.string.charAt(i.ch-o.start-1))?r=o.string.substr(0,i.ch-o.start):(r="",s=i);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&l.push(u)}if(l.length)return{list:l,from:s,to:a}})),e.commands.autocomplete=e.showHint;var h={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(Uj())),Gj);const Yj=r({__proto__:null,default:s(Kj)},[Kj]);var Qj,Xj={exports:{}};function Jj(){return Qj||(Qj=1,function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var a=e.getLineHandle(t.line),l=t.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=i(o),d=!c&&l>=0&&u.test(a.text.charAt(l))&&r[a.text.charAt(l)]||u.test(a.text.charAt(l+1))&&r[a.text.charAt(++l)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),h=s(e,n(t.line,l+(f>0?1:0)),f,p,o);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function s(e,t,o,s,a){for(var l=a&&a.maxScanLineLength||1e4,c=a&&a.maxScanLines||1e3,u=[],d=i(a),f=o>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),p=t.line;p!=f;p+=o){var h=e.getLine(p);if(h){var m=o>0?0:h.length-1,g=o>0?h.length:-1;if(!(h.length>l))for(p==t.line&&(m=t.ch-(o<0?1:0));m!=g;m+=o){var v=h.charAt(m);if(d.test(v)&&(void 0===s||(e.getTokenTypeAt(n(p,m+1))||"")==(s||""))){var y=r[v];if(y&&">"==y.charAt(1)==o>0)u.push(v);else{if(!u.length)return{pos:n(p,m),ch:v};u.pop()}}}}}return p-o!=(o>0?e.lastLine():e.firstLine())&&null}function a(e,r,i){for(var s=e.state.matchBrackets.maxHighlightLineLength||1e3,a=i&&i.highlightNonMatching,l=[],c=e.listSelections(),u=0;u<c.length;u++){var d=c[u].empty()&&o(e,c[u].head,i);if(d&&(d.match||!1!==a)&&e.getLine(d.from.line).length<=s){var f=d.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(d.from,n(d.from.line,d.from.ch+1),{className:f})),d.to&&e.getLine(d.to.line).length<=s&&l.push(e.markText(d.to,n(d.to.line,d.to.ch+1),{className:f}))}}if(l.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<l.length;e++)l[e].clear()}))};if(!r)return p;setTimeout(p,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=a(e,!1,e.state.matchBrackets)}))}function c(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",c),c(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",c))})),e.defineExtension("matchBrackets",(function(){a(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return s(this,e,t,n,r)}))}(Uj())),Xj.exports}var Zj=Jj();const eV=r({__proto__:null,default:s(Zj)},[Zj]);var tV,nV={};var rV=(tV||(tV=1,function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,s){s&&s!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:l,Enter:c};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=s(n))}}function s(e){return function(t){return f(t,e)}}function a(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(t){var i=a(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),s=t.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return e.Pass;var c=p(t,s[l].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(l=s.length-1;l>=0;l--){var u=s[l].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var l=p(t,o[s].head);if(!l||i.indexOf(l)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),u(t,-1),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}function u(e,t){for(var n=[],r=e.listSelections(),i=0,o=0;o<r.length;o++){var s=r[o];s.head==e.getCursor()&&(i=o);var a=s.head.ch||t>0?{line:s.head.line,ch:s.head.ch+t}:{line:s.head.line-1};n.push({anchor:a,head:a})}e.setSelections(n,i)}function d(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var s=r(o,"pairs"),l=s.indexOf(i);if(-1==l)return e.Pass;for(var c,f=r(o,"closeBefore"),p=r(o,"triples"),m=s.charAt(l+1)==i,g=t.listSelections(),v=l%2==0,y=0;y<g.length;y++){var b,E=g[y],x=E.head,w=t.getRange(x,n(x.line,x.ch+1));if(v&&!E.empty())b="surround";else if(!m&&v||w!=i)if(m&&x.ch>1&&p.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;b="addFour"}else if(m){var T=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(w)||T==i||e.isWordChar(T))return e.Pass;b="both"}else{if(!v||!(0===w.length||/\s/.test(w)||f.indexOf(w)>-1))return e.Pass;b="both"}else b=m&&h(t,x)?"both":p.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=b)return e.Pass}else c=b}var C=l%2?s.charAt(l-1):i,S=l%2?i:s.charAt(l+1);t.operation((function(){if("skip"==c)u(t,1);else if("skipThree"==c)u(t,3);else if("surround"==c){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=C+e[n]+S;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),n=0;n<e.length;n++)e[n]=d(e[n]);t.setSelections(e)}else"both"==c?(t.replaceSelection(C+S,null),t.triggerElectric(C+S),u(t,-1)):"addFour"==c&&(t.replaceSelection(C+C+C+C,"before"),u(t,1))}))}function p(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function h(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(Uj())),nV);const iV=r({__proto__:null,default:s(rV)},[rV]);var oV,sV={};var aV=(oV||(oV=1,function(e){function t(t){return function(n,r){var i=r.line,o=n.getLine(i);function s(t){for(var s,a=r.ch,l=0;;){var c=a<=0?-1:o.lastIndexOf(t[0],a-1);if(-1!=c){if(1==l&&c<r.ch)break;if(s=n.getTokenTypeAt(e.Pos(i,c+1)),!/^(comment|string)/.test(s))return{ch:c+1,tokenType:s,pair:t};a=c-1}else{if(1==l)break;l=1,a=o.length}}}function a(t){var r,o,s=1,a=n.lastLine(),l=t.ch;e:for(var c=i;c<=a;++c)for(var u=n.getLine(c),d=c==i?l:0;;){var f=u.indexOf(t.pair[0],d),p=u.indexOf(t.pair[1],d);if(f<0&&(f=u.length),p<0&&(p=u.length),(d=Math.min(f,p))==u.length)break;if(n.getTokenTypeAt(e.Pos(c,d+1))==t.tokenType)if(d==f)++s;else if(! --s){r=c,o=d;break e}++d}return null==r||i==r?null:{from:e.Pos(i,l),to:e.Pos(r,o)}}for(var l=[],c=0;c<t.length;c++){var u=s(t[c]);u&&l.push(u)}for(l.sort((function(e,t){return e.ch-t.ch})),c=0;c<l.length;c++){var d=a(l[c]);if(d)return d}return null}}e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var s=t.getLine(i).indexOf(";");if(-1!=s)return{startCh:r.end,end:e.Pos(i,s)}}}var i,o=n.line,s=r(o);if(!s||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var a=s.end;;){var l=r(a.line+1);if(null==l)break;a=l.end}return{from:t.clipPos(e.Pos(o,s.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var s=i;null!=r(s+1);)++s;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(s))}}))}(Uj())),sV);const lV=r({__proto__:null,default:s(aV)},[aV]);var cV,uV,dV={},fV={exports:{}};function pV(){return cV||(cV=1,function(e){function t(t,r,o,s){if(o&&o.call){var a=o;o=null}else a=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var l=i(t,o,"minFoldSize");function c(e){var n=a(t,r);if(!n||n.to.line-n.from.line<l)return null;if("fold"===s)return n;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold){if(!e)return null;n.cleared=!0,i[o].clear()}return n}var u=c(!0);if(i(t,o,"scanUp"))for(;!u&&r.line>t.firstLine();)r=e.Pos(r.line-1,0),u=c(!1);if(u&&!u.cleared&&"unfold"!==s){var d=n(t,o,u);e.on(d,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(u.from,u.to,{replacedWith:d,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}function n(e,t,n){var r=i(e,t,"widget");if("function"==typeof r&&(r=r(n.from,n.to)),"string"==typeof r){var o=document.createTextNode(r);(r=document.createElement("span")).appendChild(o),r.className="CodeMirror-foldmarker"}else r&&(r=r.cloneNode(!0));return r}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return i(this,e,t)}))}(Uj())),fV.exports}var hV=(uV||(uV=1,function(e){e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",c),t.off("changes",u),t.off("viewportChange",d),t.off("fold",f),t.off("unfold",f),t.off("swapDoc",u)),i&&(t.state.foldGutter=new n(r(i)),l(t),t.on("gutterClick",c),t.on("changes",u),t.on("viewportChange",d),t.on("fold",f),t.on("unfold",f),t.on("swapDoc",u))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var o=r[i].find(-1);if(o&&o.line===n)return r[i]}}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function s(e,n,r){var s=e.state.foldGutter.options,l=n-1,c=e.foldOption(s,"minFoldSize"),u=e.foldOption(s,"rangeFinder"),d="string"==typeof s.indicatorFolded&&a(s.indicatorFolded),f="string"==typeof s.indicatorOpen&&a(s.indicatorOpen);e.eachLine(n,r,(function(n){++l;var r=null,a=n.gutterMarkers;if(a&&(a=a[s.gutter]),i(e,l)){if(d&&a&&d.test(a.className))return;r=o(s.indicatorFolded)}else{var p=t(l,0),h=u&&u(e,p);if(h&&h.to.line-h.from.line>=c){if(f&&a&&f.test(a.className))return;r=o(s.indicatorOpen)}}(r||a)&&e.setGutterMarker(n,s.gutter,r)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function l(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){s(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function c(e,n,r){var o=e.state.foldGutter;if(o){var s=o.options;if(r==s.gutter){var a=i(e,n);a?a.clear():e.foldCode(t(n,0),s)}}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){l(e)}),n.foldOnChangeTimeSpan||600)}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?l(e):e.operation((function(){n.from<t.from&&(s(e,n.from,t.from),t.from=n.from),n.to>t.to&&(s(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&s(e,r,r+1)}}}(Uj(),pV())),dV);const mV=r({__proto__:null,default:s(hV)},[hV]);var gV,vV={};var yV=(gV||(gV=1,function(e){var t="CodeMirror-lint-markers",n="CodeMirror-lint-line-";function r(t,n,r){var i=document.createElement("div");function o(t){if(!i.parentNode)return e.off(document,"mousemove",o);i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",i.style.left=t.clientX+5+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(n),null!=i.style.opacity&&(i.style.opacity=1),i}function i(e){e.parentNode&&e.parentNode.removeChild(e)}function o(e){e.parentNode&&(null==e.style.opacity&&i(e),e.style.opacity=0,setTimeout((function(){i(e)}),600))}function s(t,n,i,s){var a=r(t,n,i);function l(){e.off(s,"mouseout",l),a&&(o(a),a=null)}var c=setInterval((function(){if(a)for(var e=s;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){l();break}}if(!a)return clearInterval(c)}),400);e.on(s,"mouseout",l)}function a(e,t,n){for(var r in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},l)this.options[r]=l[r];for(var r in t)l.hasOwnProperty(r)?null!=t[r]&&(this.options[r]=t[r]):t.options||(this.linterOptions[r]=t[r]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){E(e,t)},this.waitingFor=0}var l={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function c(e){var n=e.state.lint;n.hasGutter&&e.clearGutter(t),n.options.highlightLines&&u(e);for(var r=0;r<n.marked.length;++r)n.marked[r].clear();n.marked.length=0}function u(e){e.eachLine((function(t){var n=t.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(t.wrapClass);n&&e.removeLineClass(t,"wrap",n[0])}))}function d(t,n,r,i,o){var a=document.createElement("div"),l=a;return a.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,i&&((l=a.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=o&&e.on(l,"mouseover",(function(e){s(t,e,n,l)})),a}function f(e,t){return"error"==e?e:t}function p(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}function h(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+t,void 0!==e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function m(t,n){var r=t.state.lint,i=++r.waitingFor;function o(){i=-1,t.off("change",o)}t.on("change",o),n(t.getValue(),(function(n,s){t.off("change",o),r.waitingFor==i&&(s&&n instanceof e&&(n=s),t.operation((function(){v(t,n)})))}),r.linterOptions,t)}function g(t){var n=t.state.lint;if(n){var r=n.options,i=r.getAnnotations||t.getHelper(e.Pos(0,0),"lint");if(i)if(r.async||i.async)m(t,i);else{var o=i(t.getValue(),n.linterOptions,t);if(!o)return;o.then?o.then((function(e){t.operation((function(){v(t,e)}))})):t.operation((function(){v(t,o)}))}}}function v(e,r){var i=e.state.lint;if(i){var o=i.options;c(e);for(var s=p(r),a=0;a<s.length;++a){var l=s[a];if(l){var u=[];l=l.filter((function(e){return!(u.indexOf(e.message)>-1)&&u.push(e.message)}));for(var m=null,g=i.hasGutter&&document.createDocumentFragment(),v=0;v<l.length;++v){var y=l[v],b=y.severity;b||(b="error"),m=f(m,b),o.formatAnnotation&&(y=o.formatAnnotation(y)),i.hasGutter&&g.appendChild(h(y)),y.to&&i.marked.push(e.markText(y.from,y.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+b,__annotation:y}))}i.hasGutter&&e.setGutterMarker(a,t,d(e,g,m,s[a].length>1,o.tooltips)),o.highlightLines&&e.addLineClass(a,"wrap",n+m)}}o.onUpdateLinting&&o.onUpdateLinting(r,s,e)}}function y(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){g(e)}),t.options.delay))}function b(e,t,n){for(var r=n.target||n.srcElement,i=document.createDocumentFragment(),o=0;o<t.length;o++){var a=t[o];i.appendChild(h(a))}s(e,n,i,r)}function E(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,s=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),a=[],l=0;l<s.length;++l){var c=s[l].__annotation;c&&a.push(c)}a.length&&b(e,a,t)}}e.defineOption("lint",!1,(function(n,r,i){if(i&&i!=e.Init&&(c(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",y),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var o=n.getOption("gutters"),s=!1,l=0;l<o.length;++l)o[l]==t&&(s=!0);var u=n.state.lint=new a(n,r,s);u.options.lintOnChange&&n.on("change",y),0!=u.options.tooltips&&"gutter"!=u.options.tooltips&&e.on(n.getWrapperElement(),"mouseover",u.onMouseOver),g(n)}})),e.defineExtension("performLint",(function(){g(this)}))}(Uj())),vV);const bV=r({__proto__:null,default:s(yV)},[yV]);var EV,xV={exports:{}};function wV(){return EV||(EV=1,function(e){var t,n,r=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var n=i(e),r=n,o=0;o<t.length;o++)-1==r.indexOf(t.charAt(o))&&(r+=t.charAt(o));return n==r?e:new RegExp(e.source,r)}function s(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,t,n){t=o(t,"g");for(var i=n.line,s=n.ch,a=e.lastLine();i<=a;i++,s=0){t.lastIndex=s;var l=e.getLine(i),c=t.exec(l);if(c)return{from:r(i,c.index),to:r(i,c.index+c[0].length),match:c}}}function l(e,t,n){if(!s(t))return a(e,t,n);t=o(t,"gm");for(var i,l=1,c=n.line,u=e.lastLine();c<=u;){for(var d=0;d<l&&!(c>u);d++){var f=e.getLine(c++);i=null==i?f:i+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(i);if(p){var h=i.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:r(g,v),to:r(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:p}}}}function c(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var s=o.index+o[0].length;if(s>e.length-n)break;(!r||s>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=o(t,"g");for(var i=n.line,s=n.ch,a=e.firstLine();i>=a;i--,s=-1){var l=e.getLine(i),u=c(l,t,s<0?0:l.length-s);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function d(e,t,n){if(!s(t))return u(e,t,n);t=o(t,"gm");for(var i,a=1,l=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p<a&&d>=f;p++){var h=e.getLine(d--);i=null==i?h:h+"\n"+i}a*=2;var m=c(i,t,l);if(m){var g=i.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=d+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var s=i+o>>1,a=r(e.slice(0,s)).length;if(a==n)return s;a>n?o=s:i=s+1}}function p(e,i,o,s){if(!i.length)return null;var a=s?t:n,l=a(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.lastLine()+1-l.length;c<=d;c++,u=0){var p=e.getLine(c).slice(u),h=a(p);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return o=f(p,h,m,a)+u,{from:r(c,f(p,h,m,a)+u),to:r(c,f(p,h,m+l[0].length,a)+u)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var v=1;v<l.length-1;v++)if(a(e.getLine(c+v))!=l[v])continue e;var y=e.getLine(c+l.length-1),b=a(y),E=l[l.length-1];if(b.slice(0,E.length)==E)return{from:r(c,f(p,h,g,a)+u),to:r(c+l.length-1,f(y,b,E.length,a))}}}}function h(e,i,o,s){if(!i.length)return null;var a=s?t:n,l=a(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.firstLine()-1+l.length;c>=d;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var h=a(p);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:r(c,f(p,h,m,a)),to:r(c,f(p,h,m+l[0].length,a))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=c-l.length+1;v<l.length-1;v++)if(a(e.getLine(o+v))!=l[v])continue e;var y=e.getLine(c+1-l.length),b=a(y);if(b.slice(b.length-l[0].length)==l[0])return{from:r(c+1-l.length,f(y,b,y.length-l[0].length,a)),to:r(c,f(p,h,g.length,a))}}}}function m(e,t,n,i){var s;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof i?s=i.caseFold:(s=i,i=null),"string"==typeof t?(null==s&&(s=!1),this.matches=function(n,r){return(n?h:p)(e,t,r,s)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(n,r){return(n?u:a)(e,t,r)}:this.matches=function(n,r){return(n?d:l)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),m.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new m(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new m(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(Uj())),xV.exports}var TV=wV();const CV=r({__proto__:null,default:s(TV)},[TV]);var SV,kV,_V={},NV={exports:{}};function DV(){return SV||(SV=1,function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var s=t(this,r,o.bottom),a=!1,l=this;function c(t){if("string"==typeof t)d.value=t;else{if(a)return;a=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),l.focus(),o.onClose&&o.onClose(s)}}var u,d=s.getElementsByTagName("input")[0];return d?(d.focus(),o.value&&(d.value=o.value,!1!==o.selectValueOnOpen&&d.select()),o.onInput&&e.on(d,"input",(function(e){o.onInput(e,d.value,c)})),o.onKeyUp&&e.on(d,"keyup",(function(e){o.onKeyUp(e,d.value,c)})),e.on(d,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,d.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),c()),13==t.keyCode&&i(d.value,t))})),!1!==o.closeOnBlur&&e.on(s,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=s.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==o.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var s=t(this,r,o&&o.bottom),a=s.getElementsByTagName("button"),l=!1,c=this,u=1;function d(){l||(l=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),c.focus())}a[0].focus();for(var f=0;f<a.length;++f){var p=a[f];!function(t){e.on(p,"click",(function(n){e.e_preventDefault(n),d(),t&&t(c)}))}(i[f]),e.on(p,"blur",(function(){--u,setTimeout((function(){u<=0&&d()}),200)})),e.on(p,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(r,i){n(this,c);var o,s=t(this,r,i&&i.bottom),a=!1,l=i&&void 0!==i.duration?i.duration:5e3;function c(){a||(a=!0,clearTimeout(o),e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}return e.on(s,"click",(function(t){e.e_preventDefault(t),c()})),l&&(o=setTimeout(c,l)),c}))}(Uj())),NV.exports}var AV=(kV||(kV=1,function(e){function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,n(e),e.phrase("Jump to line:"),i.line+1+":"+i.ch,(function(t){var n;if(t)if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(o=i.line+o+1),e.setCursor(o-1,i.ch)}else(n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,n[1]),i.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(Uj(),DV())),_V);const IV=r({__proto__:null,default:s(AV)},[AV]);var OV=DV();const LV=r({__proto__:null,default:s(OV)},[OV]);var MV,RV={};var FV=(MV||(MV=1,function(e){var t=e.commands,n=e.Pos;function r(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var s,a="start",l=r.ch,c=l,u=i<0?0:o.length,d=0;c!=u;c+=i,d++){var f=o.charAt(i<0?c-1:c),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==a)"o"!=p?(a="in",s=p):l=c+i;else if("in"==a&&s!=p){if("w"==s&&"W"==p&&i<0&&c--,"W"==s&&"w"==p&&i>0){if(c==l+1){s="w";continue}c--}break}}return n(r.line,c)}function i(e,t){e.extendSelectionsBy((function(n){return e.display.shift||e.doc.extend||n.empty()?r(e.doc,n.head,t):t<0?n.from():n.to()}))}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,s=0;s<e;s++){var a=t.listSelections()[s].head;if(!(a.line<=o)){var l=n(a.line+(r?0:1),0);t.replaceRange("\n",l,null,"+insertLine"),t.indentLine(l.line,null,!0),i.push({head:l,anchor:l}),o=a.line+1}}t.setSelections(i)})),t.execCommand("indentAuto")}function s(t,r){for(var i=r.ch,o=i,s=t.getLine(r.line);i&&e.isWordChar(s.charAt(i-1));)--i;for(;o<s.length&&e.isWordChar(s.charAt(o));)++o;return{from:n(r.line,i),to:n(r.line,o),word:s.slice(i,o)}}function a(e,t){for(var n=e.listSelections(),r=[],i=0;i<n.length;i++){var o=n[i],s=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),a=e.findPosV(o.head,t,"line",o.head.goalColumn);s.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,a.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var l={anchor:s,head:a};r.push(o),r.push(l)}e.setSelections(r)}function l(t,n,r){for(var i=0;i<t.length;i++)if(0==e.cmpPos(t[i].from(),n)&&0==e.cmpPos(t[i].to(),r))return!0;return!1}t.goSubwordLeft=function(e){i(e,-1)},t.goSubwordRight=function(e){i(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++)for(var o=t[i].from(),s=t[i].to(),a=o.line;a<=s.line;++a)s.line>o.line&&a==s.line&&0==s.ch||r.push({anchor:a==o.line?o:n(a,0),head:a==s.line?s:n(a)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){var o=t[i];r.push({anchor:n(o.from().line,0),head:n(o.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return o(e,!1)},t.insertLineBefore=function(e){return o(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),i=t.getCursor("to"),o=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,i)){var a=s(t,r);if(!a.word)return;t.setSelection(a.from,a.to),o=!0}else{var c=t.getRange(r,i),u=o?new RegExp("\\b"+c+"\\b"):c,d=t.getSearchCursor(u,i),f=d.findNext();if(f||(f=(d=t.getSearchCursor(u,n(t.firstLine(),0))).findNext()),!f||l(t.listSelections(),d.from(),d.to()))return;t.addSelection(d.from(),d.to())}o&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),i=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,i)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=i})))},t.addCursorToPrevLine=function(e){a(e,-1)},t.addCursorToNextLine=function(e){a(e,1)};var c="(){}[]";function u(t){for(var r=t.listSelections(),i=[],o=0;o<r.length;o++){var s=r[o],a=s.head,l=t.scanForBracket(a,-1);if(!l)return!1;for(;;){var u=t.scanForBracket(a,1);if(!u)return!1;if(u.ch==c.charAt(c.indexOf(l.ch)+1)){var d=n(l.pos.line,l.pos.ch+1);if(0!=e.cmpPos(d,s.from())||0!=e.cmpPos(u.pos,s.to())){i.push({anchor:d,head:u.pos});break}if(!(l=t.scanForBracket(l.pos,-1)))return!1}a=n(u.pos.line,u.pos.ch+1)}}return t.setSelections(i),!0}function d(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function f(t,r,i){if(t.isReadOnly())return e.Pass;for(var o,s=t.listSelections(),a=[],l=0;l<s.length;l++){var c=s[l];if(!c.empty()){for(var u=c.from().line,d=c.to().line;l<s.length-1&&s[l+1].from().line==d;)d=s[++l].to().line;s[l].to().ch||d--,a.push(u,d)}}a.length?o=!0:a.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],s=0;s<a.length;s+=2){var l=a[s],c=a[s+1],u=n(l,0),d=n(c),f=t.getRange(u,d,!1);r?f.sort((function(e,t){return e<t?-i:e==t?0:i})):f.sort((function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-i:e==t?0:i})),t.replaceRange(f,u,d),o&&e.push({anchor:u,head:n(c+1,0)})}o&&t.setSelections(e,0)}))}function p(t,n){t.operation((function(){for(var r=t.listSelections(),i=[],o=[],a=0;a<r.length;a++)(c=r[a]).empty()?(i.push(a),o.push("")):o.push(n(t.getRange(c.from(),c.to())));var l;for(t.replaceSelections(o,"around","case"),a=i.length-1;a>=0;a--){var c=r[i[a]];if(!(l&&e.cmpPos(c.head,l)>0)){var u=s(t,c.head);l=u.from,t.replaceRange(n(u.word),u.from,u.to)}}}))}function h(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=s(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function m(e,t){var r=h(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){u(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!u(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var i=t.scanForBracket(r.head,1,d(t.getTokenTypeAt(r.head)));if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1,d(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return o&&n(o.pos.line,o.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,s=[],a=0;a<r.length;a++){var l=r[a],c=l.from().line-1,u=l.to().line;s.push({anchor:n(l.anchor.line-1,l.anchor.ch),head:n(l.head.line-1,l.head.ch)}),0!=l.to().ch||l.empty()||--u,c>o?i.push(c,u):i.length&&(i[i.length-1]=u),o=u}t.operation((function(){for(var e=0;e<i.length;e+=2){var r=i[e],o=i[e+1],a=t.getLine(r);t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),o>t.lastLine()?t.replaceRange("\n"+a,n(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.setSelections(s),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,s=r.length-1;s>=0;s--){var a=r[s],l=a.to().line+1,c=a.from().line;0!=a.to().ch||a.empty()||l--,l<o?i.push(l,c):i.length&&(i[i.length-1]=c),o=c}t.operation((function(){for(var e=i.length-2;e>=0;e-=2){var r=i[e],o=i[e+1],s=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(s+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){for(var o=t[i],s=o.from(),a=s.line,l=o.to().line;i<t.length-1&&t[i+1].from().line==l;)l=t[++i].to().line;r.push({start:a,end:l,anchor:!o.empty()&&s})}e.operation((function(){for(var t=0,i=[],o=0;o<r.length;o++){for(var s,a=r[o],l=a.anchor&&n(a.anchor.line-t,a.anchor.ch),c=a.start;c<=a.end;c++){var u=c-t;c==a.end&&(s=n(u,e.getLine(u).length+1)),u<e.lastLine()&&(e.replaceRange(" ",n(u),n(u+1,/^\s*/.exec(e.getLine(u+1))[0].length)),++t)}i.push({anchor:l||s,head:s})}e.setSelections(i,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,r=0;r<t;r++){var i=e.listSelections()[r];i.empty()?e.replaceRange(e.getLine(i.head.line)+"\n",n(i.head.line,0)):e.replaceRange(e.getRange(i.from(),i.to()),i.from())}e.scrollIntoView()}))},t.sortLines=function(e){f(e,!0,1)},t.reverseSortLines=function(e){f(e,!0,-1)},t.sortLinesInsensitive=function(e){f(e,!1,1)},t.reverseSortLinesInsensitive=function(e){f(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),s=t[r].empty()?e.findMarksAt(i):e.findMarks(i,o),a=0;a<s.length;a++)if(s[a].sublimeBookmark){s[a].clear();for(var l=0;l<n.length;l++)n[l]==s[a]&&n.splice(l--,1);break}a==s.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var r=t.listSelections(),i=t.getOption("indentUnit"),o=r.length-1;o>=0;o--){var s=r[o].head,a=t.getRange({line:s.line,ch:0},s),l=e.countColumn(a,null,t.getOption("tabSize")),c=t.findPosH(s,-1,"char",!1);if(a&&!/\S/.test(a)&&l%i==0){var u=new n(s.line,e.findColumn(a,l-i,i));u.ch!=s.ch&&(c=u)}t.replaceRange("",c,s,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var g=e.keyMap;g.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(g.macSublime),g.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(g.pcSublime);var v=g.default==g.macDefault;g.sublime=v?g.macSublime:g.pcSublime}(Uj(),wV(),Jj())),RV);const PV=r({__proto__:null,default:s(FV)},[FV]);var jV,VV={};var BV,$V=(jV||(jV=1,(BV=Uj()).defineMode("javascript",(function(e,t){var n,r,i=e.indentUnit,o=t.statementIndent,s=t.jsonld,a=t.json||s,l=!1!==t.trackScope,c=t.typescript,u=t.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function m(e,t,i){return n=e,r=i,t}function g(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=v(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==n&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return m(n);if("="==n&&e.eat(">"))return m("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):rt(e,t,1)?(h(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==n&&e.eatWhile(u))return m("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(f.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?m("."):m("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var r=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(r)){var i=d[r];return m(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",r)}return m("variable","variable",r)}}function v(e){return function(t,n){var r,i=!1;if(s&&"@"==t.peek()&&t.match(p))return n.tokenize=g,m("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=g),m("string","string")}}function y(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return m("comment","comment")}function b(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return m("quasi","string-2",e.current())}var E="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,s=n-1;s>=0;--s){var a=e.string.charAt(s),l=E.indexOf(a);if(l>=0&&l<3){if(!i){++s;break}if(0==--i){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(e.string.charAt(s-1)==a&&"\\"!=e.string.charAt(s-2)){s--;break}}else if(o&&!i){++s;break}}o&&!i&&(t.fatArrowAt=s)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function T(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function C(e,t){if(!l)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function S(e,t,n,r,i){var o=e.cc;for(k.state=e,k.stream=i,k.marked=null,k.cc=o,k.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():a?q:U)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==n&&C(e,r)?"variable-2":t}}var k={state:null,marked:null,cc:null};function _(){for(var e=arguments.length-1;e>=0;e--)k.cc.push(arguments[e])}function N(){return _.apply(null,arguments),!0}function D(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function A(e){var n=k.state;if(k.marked="def",l){if(n.context)if("var"==n.lexical.info&&n.context&&n.context.block){var r=I(e,n.context);if(null!=r)return void(n.context=r)}else if(!D(e,n.localVars))return void(n.localVars=new M(e,n.localVars));t.globalVars&&!D(e,n.globalVars)&&(n.globalVars=new M(e,n.globalVars))}}function I(e,t){if(t){if(t.block){var n=I(e,t.prev);return n?n==t.prev?t:new L(n,t.vars,!0):null}return D(e,t.vars)?t:new L(t.prev,new M(e,t.vars),!1)}return null}function O(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,n){this.prev=e,this.vars=t,this.block=n}function M(e,t){this.name=e,this.next=t}var R=new M("this",new M("arguments",null));function F(){k.state.context=new L(k.state.context,k.state.localVars,!1),k.state.localVars=R}function P(){k.state.context=new L(k.state.context,k.state.localVars,!0),k.state.localVars=null}function j(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function V(e,t){var n=function(){var n=k.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new T(r,k.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function B(){var e=k.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function $(e){function t(n){return n==e?N():";"==e||"}"==n||")"==n||"]"==n?_():N(t)}return t}function U(e,t){return"var"==e?N(V("vardef",t),_e,$(";"),B):"keyword a"==e?N(V("form"),z,U,B):"keyword b"==e?N(V("form"),U,B):"keyword d"==e?k.stream.match(/^\s*$/,!1)?N():N(V("stat"),K,$(";"),B):"debugger"==e?N($(";")):"{"==e?N(V("}"),P,de,B,j):";"==e?N():"if"==e?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==B&&k.state.cc.pop()(),N(V("form"),z,U,B,Le)):"function"==e?N(Pe):"for"==e?N(V("form"),P,Me,U,j,B):"class"==e||c&&"interface"==t?(k.marked="keyword",N(V("form","class"==e?e:t),Ue,B)):"variable"==e?c&&"declare"==t?(k.marked="keyword",N(U)):c&&("module"==t||"enum"==t||"type"==t)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==t?N(et):"type"==t?N(Ve,$("operator"),ge,$(";")):N(V("form"),Ne,$("{"),V("}"),de,B,B)):c&&"namespace"==t?(k.marked="keyword",N(V("form"),q,U,B)):c&&"abstract"==t?(k.marked="keyword",N(U)):N(V("stat"),ie):"switch"==e?N(V("form"),z,$("{"),V("}","switch"),P,de,B,B,j):"case"==e?N(q,$(":")):"default"==e?N($(":")):"catch"==e?N(V("form"),F,H,U,B,j):"export"==e?N(V("stat"),ze,B):"import"==e?N(V("stat"),Ke,B):"async"==e?N(U):"@"==t?N(q,U):_(V("stat"),q,$(";"),B)}function H(e){if("("==e)return N(Be,$(")"))}function q(e,t){return G(e,t,!1)}function W(e,t){return G(e,t,!0)}function z(e){return"("!=e?_():N(V(")"),K,$(")"),B)}function G(e,t,n){if(k.state.fatArrowAt==k.stream.start){var r=n?ee:Z;if("("==e)return N(F,V(")"),ce(Be,")"),B,$("=>"),r,j);if("variable"==e)return _(F,Ne,$("=>"),r,j)}var i=n?Q:Y;return w.hasOwnProperty(e)?N(i):"function"==e?N(Pe,i):"class"==e||c&&"interface"==t?(k.marked="keyword",N(V("form"),$e,B)):"keyword c"==e||"async"==e?N(n?W:q):"("==e?N(V(")"),K,$(")"),B,i):"operator"==e||"spread"==e?N(n?W:q):"["==e?N(V("]"),Ze,B,i):"{"==e?ue(se,"}",null,i):"quasi"==e?_(X,i):"new"==e?N(te(n)):N()}function K(e){return e.match(/[;\}\)\],]/)?_():_(q)}function Y(e,t){return","==e?N(K):Q(e,t,!1)}function Q(e,t,n){var r=0==n?Y:Q,i=0==n?q:W;return"=>"==e?N(F,n?ee:Z,j):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?N(r):c&&"<"==t&&k.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(V(">"),ce(ge,">"),B,r):"?"==t?N(q,$(":"),i):N(i):"quasi"==e?_(X,r):";"!=e?"("==e?ue(W,")","call",r):"."==e?N(oe,r):"["==e?N(V("]"),K,$("]"),B,r):c&&"as"==t?(k.marked="keyword",N(ge,r)):"regexp"==e?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),N(i)):void 0:void 0}function X(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?N(X):N(K,J)}function J(e){if("}"==e)return k.marked="string-2",k.state.tokenize=b,N(X)}function Z(e){return x(k.stream,k.state),_("{"==e?U:q)}function ee(e){return x(k.stream,k.state),_("{"==e?U:W)}function te(e){return function(t){return"."==t?N(e?re:ne):"variable"==t&&c?N(Ce,e?Q:Y):_(e?W:q)}}function ne(e,t){if("target"==t)return k.marked="keyword",N(Y)}function re(e,t){if("target"==t)return k.marked="keyword",N(Q)}function ie(e){return":"==e?N(B,U):_(Y,$(";"),B)}function oe(e){if("variable"==e)return k.marked="property",N()}function se(e,t){return"async"==e?(k.marked="property",N(se)):"variable"==e||"keyword"==k.style?(k.marked="property","get"==t||"set"==t?N(ae):(c&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),N(le))):"number"==e||"string"==e?(k.marked=s?"property":k.style+" property",N(le)):"jsonld-keyword"==e?N(le):c&&O(t)?(k.marked="keyword",N(se)):"["==e?N(q,fe,$("]"),le):"spread"==e?N(W,le):"*"==t?(k.marked="keyword",N(se)):":"==e?_(le):void 0;var n}function ae(e){return"variable"!=e?_(le):(k.marked="property",N(Pe))}function le(e){return":"==e?N(W):"("==e?_(Pe):void 0}function ce(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var s=k.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),N((function(n,r){return n==t||r==t?_():_(e)}),r)}return i==t||o==t?N():n&&n.indexOf(";")>-1?_(e):N($(t))}return function(n,i){return n==t||i==t?N():_(e,r)}}function ue(e,t,n){for(var r=3;r<arguments.length;r++)k.cc.push(arguments[r]);return N(V(t,n),ce(e,t),B)}function de(e){return"}"==e?N():_(U,de)}function fe(e,t){if(c){if(":"==e)return N(ge);if("?"==t)return N(fe)}}function pe(e,t){if(c&&(":"==e||"in"==t))return N(ge)}function he(e){if(c&&":"==e)return k.stream.match(/^\s*\w+\s+is\b/,!1)?N(q,me,ge):N(ge)}function me(e,t){if("is"==t)return k.marked="keyword",N()}function ge(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(k.marked="keyword",N("typeof"==t?W:ge)):"variable"==e||"void"==t?(k.marked="type",N(Te)):"|"==t||"&"==t?N(ge):"string"==e||"number"==e||"atom"==e?N(Te):"["==e?N(V("]"),ce(ge,"]",","),B,Te):"{"==e?N(V("}"),ye,B,Te):"("==e?N(ce(we,")"),ve,Te):"<"==e?N(ce(ge,">"),ge):"quasi"==e?_(Ee,Te):void 0}function ve(e){if("=>"==e)return N(ge)}function ye(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(ye):_(be,ye)}function be(e,t){return"variable"==e||"keyword"==k.style?(k.marked="property",N(be)):"?"==t||"number"==e||"string"==e?N(be):":"==e?N(ge):"["==e?N($("variable"),pe,$("]"),be):"("==e?_(je,be):e.match(/[;\}\)\],]/)?void 0:N()}function Ee(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?N(Ee):N(ge,xe)}function xe(e){if("}"==e)return k.marked="string-2",k.state.tokenize=b,N(Ee)}function we(e,t){return"variable"==e&&k.stream.match(/^\s*[?:]/,!1)||"?"==t?N(we):":"==e?N(ge):"spread"==e?N(we):_(ge)}function Te(e,t){return"<"==t?N(V(">"),ce(ge,">"),B,Te):"|"==t||"."==e||"&"==t?N(ge):"["==e?N(ge,$("]"),Te):"extends"==t||"implements"==t?(k.marked="keyword",N(ge)):"?"==t?N(ge,$(":"),ge):void 0}function Ce(e,t){if("<"==t)return N(V(">"),ce(ge,">"),B,Te)}function Se(){return _(ge,ke)}function ke(e,t){if("="==t)return N(ge)}function _e(e,t){return"enum"==t?(k.marked="keyword",N(et)):_(Ne,fe,Ie,Oe)}function Ne(e,t){return c&&O(t)?(k.marked="keyword",N(Ne)):"variable"==e?(A(t),N()):"spread"==e?N(Ne):"["==e?ue(Ae,"]"):"{"==e?ue(De,"}"):void 0}function De(e,t){return"variable"!=e||k.stream.match(/^\s*:/,!1)?("variable"==e&&(k.marked="property"),"spread"==e?N(Ne):"}"==e?_():"["==e?N(q,$("]"),$(":"),De):N($(":"),Ne,Ie)):(A(t),N(Ie))}function Ae(){return _(Ne,Ie)}function Ie(e,t){if("="==t)return N(W)}function Oe(e){if(","==e)return N(_e)}function Le(e,t){if("keyword b"==e&&"else"==t)return N(V("form","else"),U,B)}function Me(e,t){return"await"==t?N(Me):"("==e?N(V(")"),Re,B):void 0}function Re(e){return"var"==e?N(_e,Fe):"variable"==e?N(Fe):_(Fe)}function Fe(e,t){return")"==e?N():";"==e?N(Fe):"in"==t||"of"==t?(k.marked="keyword",N(q,Fe)):_(q,Fe)}function Pe(e,t){return"*"==t?(k.marked="keyword",N(Pe)):"variable"==e?(A(t),N(Pe)):"("==e?N(F,V(")"),ce(Be,")"),B,he,U,j):c&&"<"==t?N(V(">"),ce(Se,">"),B,Pe):void 0}function je(e,t){return"*"==t?(k.marked="keyword",N(je)):"variable"==e?(A(t),N(je)):"("==e?N(F,V(")"),ce(Be,")"),B,he,j):c&&"<"==t?N(V(">"),ce(Se,">"),B,je):void 0}function Ve(e,t){return"keyword"==e||"variable"==e?(k.marked="type",N(Ve)):"<"==t?N(V(">"),ce(Se,">"),B):void 0}function Be(e,t){return"@"==t&&N(q,Be),"spread"==e?N(Be):c&&O(t)?(k.marked="keyword",N(Be)):c&&"this"==e?N(fe,Ie):_(Ne,fe,Ie)}function $e(e,t){return"variable"==e?Ue(e,t):He(e,t)}function Ue(e,t){if("variable"==e)return A(t),N(He)}function He(e,t){return"<"==t?N(V(">"),ce(Se,">"),B,He):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(k.marked="keyword"),N(c?ge:q,He)):"{"==e?N(V("}"),qe,B):void 0}function qe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&O(t))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",N(qe)):"variable"==e||"keyword"==k.style?(k.marked="property",N(We,qe)):"number"==e||"string"==e?N(We,qe):"["==e?N(q,fe,$("]"),We,qe):"*"==t?(k.marked="keyword",N(qe)):c&&"("==e?_(je,qe):";"==e||","==e?N(qe):"}"==e?N():"@"==t?N(q,qe):void 0}function We(e,t){if("!"==t)return N(We);if("?"==t)return N(We);if(":"==e)return N(ge,Ie);if("="==t)return N(W);var n=k.state.lexical.prev;return _(n&&"interface"==n.info?je:Pe)}function ze(e,t){return"*"==t?(k.marked="keyword",N(Je,$(";"))):"default"==t?(k.marked="keyword",N(q,$(";"))):"{"==e?N(ce(Ge,"}"),Je,$(";")):_(U)}function Ge(e,t){return"as"==t?(k.marked="keyword",N($("variable"))):"variable"==e?_(W,Ge):void 0}function Ke(e){return"string"==e?N():"("==e?_(q):"."==e?_(Y):_(Ye,Qe,Je)}function Ye(e,t){return"{"==e?ue(Ye,"}"):("variable"==e&&A(t),"*"==t&&(k.marked="keyword"),N(Xe))}function Qe(e){if(","==e)return N(Ye,Qe)}function Xe(e,t){if("as"==t)return k.marked="keyword",N(Ye)}function Je(e,t){if("from"==t)return k.marked="keyword",N(q)}function Ze(e){return"]"==e?N():_(ce(W,"]"))}function et(){return _(V("form"),Ne,$("{"),V("}"),ce(tt,"}"),B,B)}function tt(){return _(Ne,Ie)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function rt(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return F.lex=P.lex=!0,j.lex=!0,B.lex=!0,{startState:function(e){var n={tokenize:g,lastType:"sof",cc:[],lexical:new T((e||0)-i,0,"block",!1),localVars:t.localVars,context:t.localVars&&new L(null,null,!1),indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(n.globalVars=t.globalVars),n},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=y&&e.eatSpace())return null;var i=t.tokenize(e,t);return"comment"==n?i:(t.lastType="operator"!=n||"++"!=r&&"--"!=r?n:"incdec",S(t,i,n,r,e))},indent:function(e,n){if(e.tokenize==y||e.tokenize==b)return BV.Pass;if(e.tokenize!=g)return 0;var r,s=n&&n.charAt(0),a=e.lexical;if(!/^\s*else\b/.test(n))for(var l=e.cc.length-1;l>=0;--l){var c=e.cc[l];if(c==B)a=a.prev;else if(c!=Le&&c!=j)break}for(;("stat"==a.type||"form"==a.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==Y||r==Q)&&!/^[,\.=+\-*:?[\(]/.test(n));)a=a.prev;o&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var u=a.type,d=s==u;return"vardef"==u?a.indented+("operator"==e.lastType||","==e.lastType?a.info.length+1:0):"form"==u&&"{"==s?a.indented:"form"==u?a.indented+i:"stat"==u?a.indented+(nt(e,n)?o||i:0):"switch"!=a.info||d||0==t.doubleIndentSwitch?a.align?a.column+(d?0:1):a.indented+(d?0:i):a.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:a?null:"/*",blockCommentEnd:a?null:"*/",blockCommentContinue:a?null:" * ",lineComment:a?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:a?"json":"javascript",jsonldMode:s,jsonMode:a,expressionAllowed:rt,skipExpression:function(e){S(e,"atom","atom","true",new BV.StringStream("",2,null))}}})),BV.registerHelper("wordChars","javascript",/[\w$]/),BV.defineMIME("text/javascript","javascript"),BV.defineMIME("text/ecmascript","javascript"),BV.defineMIME("application/javascript","javascript"),BV.defineMIME("application/x-javascript","javascript"),BV.defineMIME("application/ecmascript","javascript"),BV.defineMIME("application/json",{name:"javascript",json:!0}),BV.defineMIME("application/x-json",{name:"javascript",json:!0}),BV.defineMIME("application/manifest+json",{name:"javascript",json:!0}),BV.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),BV.defineMIME("text/typescript",{name:"javascript",typescript:!0}),BV.defineMIME("application/typescript",{name:"javascript",typescript:!0})),VV);const UV=r({__proto__:null,default:s($V)},[$V]);var HV,qV={};var WV=(HV||(HV=1,function(e){var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function o(e){var t=e.search(n);return-1==t?0:t}function s(e,t,n){return/\bstring\b/.test(e.getTokenTypeAt(r(t.line,0)))&&!/^[\'\"\`]/.test(n)}function a(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=this,i=1/0,o=this.listSelections(),s=null,a=o.length-1;a>=0;a--){var l=o[a].from(),c=o[a].to();l.line>=i||(c.line>=i&&(c=r(i,0)),i=l.line,null==s?n.uncomment(l,c,e)?s="un":(n.lineComment(l,c,e),s="line"):"un"==s?n.uncomment(l,c,e):n.lineComment(l,c,e))}})),e.defineExtension("lineComment",(function(e,i,l){l||(l=t);var c=this,u=a(c,e),d=c.getLine(e.line);if(null!=d&&!s(c,e,d)){var f=l.lineComment||u.lineComment;if(f){var p=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,c.lastLine()+1),h=null==l.padding?" ":l.padding,m=l.commentBlankLines||e.line==i.line;c.operation((function(){if(l.indent){for(var t=null,i=e.line;i<p;++i){var s=(a=c.getLine(i)).slice(0,o(a));(null==t||t.length>s.length)&&(t=s)}for(i=e.line;i<p;++i){var a=c.getLine(i),u=t.length;(m||n.test(a))&&(a.slice(0,u)!=t&&(u=o(a)),c.replaceRange(t+f+h,r(i,0),r(i,u)))}}else for(i=e.line;i<p;++i)(m||n.test(c.getLine(i)))&&c.replaceRange(f+h,r(i,0))}))}else(l.blockCommentStart||u.blockCommentStart)&&(l.fullLines=!0,c.blockComment(e,i,l))}})),e.defineExtension("blockComment",(function(e,o,s){s||(s=t);var l=this,c=a(l,e),u=s.blockCommentStart||c.blockCommentStart,d=s.blockCommentEnd||c.blockCommentEnd;if(u&&d){if(!/\bcomment\b/.test(l.getTokenTypeAt(r(e.line,0)))){var f=Math.min(o.line,l.lastLine());f!=e.line&&0==o.ch&&n.test(l.getLine(f))&&--f;var p=null==s.padding?" ":s.padding;e.line>f||l.operation((function(){if(0!=s.fullLines){var t=n.test(l.getLine(f));l.replaceRange(p+d,r(f)),l.replaceRange(u+p,r(e.line,0));var a=s.blockCommentLead||c.blockCommentLead;if(null!=a)for(var h=e.line+1;h<=f;++h)(h!=f||t)&&l.replaceRange(a+p,r(h,0))}else{var m=0==i(l.getCursor("to"),o),g=!l.somethingSelected();l.replaceRange(d,o),m&&l.setSelection(g?o:l.getCursor("from"),o),l.replaceRange(u,e)}}))}}else(s.lineComment||c.lineComment)&&0!=s.fullLines&&l.lineComment(e,o,s)})),e.defineExtension("uncomment",(function(e,i,o){o||(o=t);var s,l=this,c=a(l,e),u=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,l.lastLine()),d=Math.min(e.line,u),f=o.lineComment||c.lineComment,p=[],h=null==o.padding?" ":o.padding;e:if(f){for(var m=d;m<=u;++m){var g=l.getLine(m),v=g.indexOf(f);if(v>-1&&!/comment/.test(l.getTokenTypeAt(r(m,v+1)))&&(v=-1),-1==v&&n.test(g))break e;if(v>-1&&n.test(g.slice(0,v)))break e;p.push(g)}if(l.operation((function(){for(var e=d;e<=u;++e){var t=p[e-d],n=t.indexOf(f),i=n+f.length;n<0||(t.slice(i,i+h.length)==h&&(i+=h.length),s=!0,l.replaceRange("",r(e,n),r(e,i)))}})),s)return!0}var y=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!y||!b)return!1;var E=o.blockCommentLead||c.blockCommentLead,x=l.getLine(d),w=x.indexOf(y);if(-1==w)return!1;var T=u==d?x:l.getLine(u),C=T.indexOf(b,u==d?w+y.length:0),S=r(d,w+1),k=r(u,C+1);if(-1==C||!/comment/.test(l.getTokenTypeAt(S))||!/comment/.test(l.getTokenTypeAt(k))||l.getRange(S,k,"\n").indexOf(b)>-1)return!1;var _=x.lastIndexOf(y,e.ch),N=-1==_?-1:x.slice(0,e.ch).indexOf(b,_+y.length);if(-1!=_&&-1!=N&&N+b.length!=e.ch)return!1;N=T.indexOf(b,i.ch);var D=T.slice(i.ch).lastIndexOf(y,N-i.ch);return _=-1==N||-1==D?-1:i.ch+D,(-1==N||-1==_||_==i.ch)&&(l.operation((function(){l.replaceRange("",r(u,C-(h&&T.slice(C-h.length,C)==h?h.length:0)),r(u,C+b.length));var e=w+y.length;if(h&&x.slice(e,e+h.length)==h&&(e+=h.length),l.replaceRange("",r(d,w),r(d,e)),E)for(var t=d+1;t<=u;++t){var i=l.getLine(t),o=i.indexOf(E);if(-1!=o&&!n.test(i.slice(0,o))){var s=o+E.length;h&&i.slice(s,s+h.length)==h&&(s+=h.length),l.replaceRange("",r(t,o),r(t,s))}}})),!0)}))}(Uj())),qV);const zV=r({__proto__:null,default:s(WV)},[WV]);var GV,KV={};var YV=(GV||(GV=1,function(e){function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return"string"==typeof e&&e==e.toLowerCase()}function o(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function s(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){h(e)},onKeyDown:i,bottom:e.options.search.bottom})}function a(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function l(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function c(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(nL){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function f(t,n,i,o){var l=r(t);if(l.query)return p(t,n);var c=t.getSelection()||l.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),i&&t.openDialog){var u=null,f=function(n,r){e.e_stop(r),n&&(n!=l.queryText&&(d(t,l,n),l.posFrom=l.posTo=t.getCursor()),u&&(u.style.opacity=1),p(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((u=r).style.opacity=.4)})))};s(t,g(t),c,f,(function(n,i){var o=e.keyName(n),s=t.getOption("extraKeys"),a=s&&s[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(e.e_stop(n),d(t,r(t),i),t.execCommand(a)):"find"!=a&&"findPersistent"!=a||(e.e_stop(n),f(i,n))})),o&&c&&(d(t,l,c),p(t,n))}else a(t,g(t),"Search for:",c,(function(e){e&&!l.query&&t.operation((function(){d(t,l,e),l.posFrom=l.posTo=t.getCursor(),p(t,n)}))}))}function p(t,n,i){t.operation((function(){var s=r(t),a=o(t,s.query,n?s.posFrom:s.posTo);(a.find(n)||(a=o(t,s.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(n))&&(t.setSelection(a.from(),a.to()),t.scrollIntoView({from:a.from(),to:a.to()},20),s.posFrom=a.from(),s.posTo=a.to(),i&&i(a.from(),a.to()))}))}function h(e){e.operation((function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var o=arguments[i];n.appendChild("string"==typeof o?document.createTextNode(o):o)}return n}function g(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function v(e){return m("",null," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function b(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",m("button",{},e.phrase("Yes"))," ",m("button",{},e.phrase("No"))," ",m("button",{},e.phrase("All"))," ",m("button",{},e.phrase("Stop")))}function E(e,t,n){e.operation((function(){for(var r=o(e,t);r.findNext();)if("string"!=typeof t){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return i[t]})))}else r.replace(n)}))}function x(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,i=t?e.phrase("Replace all:"):e.phrase("Replace:"),s=m("",null,m("span",{className:"CodeMirror-search-label"},i),v(e));a(e,s,i,n,(function(n){n&&(n=u(n),a(e,y(e),e.phrase("Replace with:"),"",(function(r){if(r=c(r),t)E(e,n,r);else{h(e);var i=o(e,n,e.getCursor("from")),s=function(){var t,c=i.from();!(t=i.findNext())&&(i=o(e,n),!(t=i.findNext())||c&&i.from().line==c.line&&i.from().ch==c.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),l(e,b(e),e.phrase("Replace?"),[function(){a(t)},s,function(){E(e,n,r)}]))},a=function(e){i.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),s()};s()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){h(e),f(e)},e.commands.findPersistent=function(e){h(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=h,e.commands.replace=x,e.commands.replaceAll=function(e){x(e,!0)}}(Uj(),wV(),DV())),KV);const QV=r({__proto__:null,default:s(YV)},[YV]);qj.registerHelper("hint","graphql",((e,t)=>{const{schema:n,externalFragments:r,autocompleteOptions:i}=t;if(!n)return;const o=e.getCursor(),s=e.getTokenAt(o),a=null!==s.type&&/"|\w/.test(s.string[0])?s.start:s.end,l=new iu(o.line,a),c={list:Kc(n,e.getValue(),l,s,r,i).map((e=>{var t;return{text:null!==(t=null==e?void 0:e.rawInsert)&&void 0!==t?t:e.label,type:e.type,description:e.documentation,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason}})),from:{line:o.line,ch:a},to:{line:o.line,ch:s.end}};return(null==c?void 0:c.list)&&c.list.length>0&&(c.from=qj.Pos(c.from.line,c.from.ch),c.to=qj.Pos(c.to.line,c.to.ch),qj.signal(e,"hasCompletion",e,c,s)),c}));const XV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),JV=["error","warning","information","hint"],ZV={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};qj.registerHelper("lint","graphql",((e,t)=>{const{schema:n,validationRules:r,externalFragments:i}=t;return lu(e,n,r,0,i).map((e=>({message:e.message,severity:e.severity?JV[e.severity-1]:JV[0],type:e.source?ZV[e.source]:void 0,from:qj.Pos(e.range.start.line,e.range.start.character),to:qj.Pos(e.range.end.line,e.range.end.character)})))}));const eB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function tB(e,t){const n=[];let r=e;for(;null==r?void 0:r.kind;)n.push(r),r=r.prevState;for(let i=n.length-1;i>=0;i--)t(n[i])}function nB(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return tB(t,(t=>{var r,i;switch(t.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(n.type=e.getType(t.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&t.name?rB(e,n.parentType,t.name):null,n.type=null===(r=n.fieldDef)||void 0===r?void 0:r.type;break;case"SelectionSet":n.parentType=n.type?qt(n.type):null;break;case"Directive":n.directiveDef=t.name?e.getDirective(t.name):null;break;case"Arguments":const o=t.prevState?"Field"===t.prevState.kind?n.fieldDef:"Directive"===t.prevState.kind?n.directiveDef:"AliasedField"===t.prevState.kind?t.prevState.name&&rB(e,n.parentType,t.prevState.name):null:null;n.argDefs=o?o.args:null;break;case"Argument":if(n.argDef=null,n.argDefs)for(let e=0;e<n.argDefs.length;e++)if(n.argDefs[e].name===t.name){n.argDef=n.argDefs[e];break}n.inputType=null===(i=n.argDef)||void 0===i?void 0:i.type;break;case"EnumValue":const s=n.inputType?qt(n.inputType):null;n.enumValue=s instanceof sn?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}(s.getValues(),(e=>e.value===t.name)):null;break;case"ListValue":const a=n.inputType?Ut(n.inputType):null;n.inputType=a instanceof Pt?a.ofType:null;break;case"ObjectValue":const l=n.inputType?qt(n.inputType):null;n.objectFieldDefs=l instanceof cn?l.getFields():null;break;case"ObjectField":const c=t.name&&n.objectFieldDefs?n.objectFieldDefs[t.name]:null;n.inputType=null==c?void 0:c.type,n.fieldDef=c;break;case"NamedType":n.type=t.name?e.getType(t.name):null}})),n}function rB(e,t,n){return n===Kn.name&&e.getQueryType()===t?Kn:n===Yn.name&&e.getQueryType()===t?Yn:n===Qn.name&&Mt(t)?Qn:t&&t.getFields?t.getFields()[n]:void 0}function iB(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:cB(e.fieldDef)?null:e.parentType}}function oB(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}function sB(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:cB(e.fieldDef)?null:e.parentType}}function aB(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?qt(e.inputType):void 0}}function lB(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}function cB(e){return"__"===e.name.slice(0,2)}function uB(e,t){const n=e.state.info,r=t.target||t.srcElement;if(!(r instanceof HTMLElement))return;if("SPAN"!==r.nodeName||void 0!==n.hoverTimeout)return;const i=r.getBoundingClientRect(),o=function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(a,l)},s=function(){qj.off(document,"mousemove",o),qj.off(e.getWrapperElement(),"mouseout",s),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},a=function(){qj.off(document,"mousemove",o),qj.off(e.getWrapperElement(),"mouseout",s),n.hoverTimeout=void 0,function(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2},"window"),r=e.state.info,{options:i}=r,o=i.render||e.getHelper(n,"info");if(o){const r=e.getTokenAt(n,!0);if(r){const s=o(r,i,e,n);s&&function(e,t,n){const r=document.createElement("div");r.className="CodeMirror-info",r.append(n),document.body.append(r);const i=r.getBoundingClientRect(),o=window.getComputedStyle(r),s=i.right-i.left+parseFloat(o.marginLeft)+parseFloat(o.marginRight),a=i.bottom-i.top+parseFloat(o.marginTop)+parseFloat(o.marginBottom);let l=t.bottom;a>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(l=t.top-a);l<0&&(l=t.bottom);let c,u=Math.max(0,window.innerWidth-s-15);u>t.left&&(u=t.left);r.style.opacity="1",r.style.top=l+"px",r.style.left=u+"px";const d=function(){clearTimeout(c)},f=function(){clearTimeout(c),c=setTimeout(p,200)},p=function(){qj.off(r,"mouseover",d),qj.off(r,"mouseout",f),qj.off(e.getWrapperElement(),"mouseout",f),r.style.opacity?(r.style.opacity="0",setTimeout((()=>{r.parentNode&&r.remove()}),600)):r.parentNode&&r.remove()};qj.on(r,"mouseover",d),qj.on(r,"mouseout",f),qj.on(e.getWrapperElement(),"mouseout",f)}(e,t,s)}}}(e,i)},l=function(e){const{options:t}=e.state.info;return(null==t?void 0:t.hoverTime)||500}(e);n.hoverTimeout=setTimeout(a,l),qj.on(document,"mousemove",o),qj.on(e.getWrapperElement(),"mouseout",s)}qj.defineOption("info",!1,((e,t,n)=>{if(n&&n!==qj.Init){const t=e.state.info.onMouseOver;qj.off(e.getWrapperElement(),"mouseover",t),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const n=e.state.info=function(e){return{options:e instanceof Function?{render:e}:!0===e?{}:e}}(t);n.onMouseOver=uB.bind(null,e),qj.on(e.getWrapperElement(),"mouseover",n.onMouseOver)}}));const dB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function fB(e,t,n,r){const i=document.createElement("span");i.className="type-name-pill",r instanceof jt?(pB(i,t,n,r.ofType),mB(i,"!")):r instanceof Pt?(mB(i,"["),pB(i,t,n,r.ofType),mB(i,"]")):mB(i,(null==r?void 0:r.name)||"","type-name",n,lB(t,r)),e.append(i)}function pB(e,t,n,r){r instanceof jt?(pB(e,t,n,r.ofType),mB(e,"!")):r instanceof Pt?(mB(e,"["),pB(e,t,n,r.ofType),mB(e,"]")):mB(e,(null==r?void 0:r.name)||"","type-name",n,lB(t,r))}function hB(e,t,n){const{description:r}=n;if(r){const n=document.createElement("div");n.className="info-description",t.renderDescription?n.innerHTML=t.renderDescription(r):n.append(document.createTextNode(r)),e.append(n)}!function(e,t,n){const r=n.deprecationReason;if(r){const n=document.createElement("div");n.className="info-deprecation",e.append(n);const i=document.createElement("span");i.className="info-deprecation-label",i.append(document.createTextNode("Deprecated")),n.append(i);const o=document.createElement("div");o.className="info-deprecation-reason",t.renderDescription?o.innerHTML=t.renderDescription(r):o.append(document.createTextNode(r)),n.append(o)}}(e,t,n)}function mB(e,t,n="",r={onClick:null},i=null){if(n){const{onClick:o}=r;let s;o?(s=document.createElement("a"),s.href="javascript:void 0",s.addEventListener("click",(e=>{e.preventDefault(),o(i,e)}))):s=document.createElement("span"),s.className=n,s.append(document.createTextNode(t)),e.append(s)}else e.append(document.createTextNode(t))}qj.registerHelper("info","graphql",((e,t)=>{var n;if(!t.schema||!e.state)return;const{kind:r,step:i}=e.state,o=nB(t.schema,e.state);if("Field"===r&&0===i&&o.fieldDef||"AliasedField"===r&&2===i&&o.fieldDef||"ObjectField"===r&&0===i&&o.fieldDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){(function(e,t,n){var r;const i=(null===(r=t.fieldDef)||void 0===r?void 0:r.name)||"";mB(e,i,"field-name",n,iB(t))})(e,t,n),fB(e,t,n,t.type)}(e,o,t);const n=document.createElement("div");return n.append(e),hB(n,t,o.fieldDef),n}if("Directive"===r&&1===i&&o.directiveDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;const i="@"+((null===(r=t.directiveDef)||void 0===r?void 0:r.name)||"");mB(e,i,"directive-name",n,oB(t))}(e,o,t);const n=document.createElement("div");return n.append(e),hB(n,t,o.directiveDef),n}if("Argument"===r&&0===i&&o.argDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;const i=(null===(r=t.argDef)||void 0===r?void 0:r.name)||"";mB(e,i,"arg-name",n,sB(t)),fB(e,t,n,t.inputType)}(e,o,t);const n=document.createElement("div");return n.append(e),hB(n,t,o.argDef),n}if("EnumValue"===r&&(null===(n=o.enumValue)||void 0===n?void 0:n.description)){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;const i=(null===(r=t.enumValue)||void 0===r?void 0:r.name)||"";pB(e,t,n,t.inputType),mB(e,"."),mB(e,i,"enum-value",n,aB(t))}(e,o,t);const n=document.createElement("div");return n.append(e),hB(n,t,o.enumValue),n}if("NamedType"===r&&o.type&&o.type.description){const e=document.createElement("div");e.className="CodeMirror-info-header",pB(e,o,t,o.type);const n=document.createElement("div");return n.append(e),hB(n,t,o.type),n}}));const gB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function vB(e,t){const n=t.target||t.srcElement;if(!(n instanceof HTMLElement))return;if("SPAN"!==(null==n?void 0:n.nodeName))return;const r=n.getBoundingClientRect(),i={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=i,e.state.jump.isHoldingModifier&&xB(e)}function yB(e){e.state.jump.isHoldingModifier||!e.state.jump.cursor?e.state.jump.isHoldingModifier&&e.state.jump.marker&&wB(e):e.state.jump.cursor=null}function bB(e,t){if(e.state.jump.isHoldingModifier||t.key!==(EB?"Meta":"Control"))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&xB(e);const n=o=>{o.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&wB(e),qj.off(document,"keyup",n),qj.off(document,"click",r),e.off("mousedown",i))},r=t=>{const{destination:n,options:r}=e.state.jump;n&&r.onClick(n,t)},i=(t,n)=>{e.state.jump.destination&&(n.codemirrorIgnore=!0)};qj.on(document,"keyup",n),qj.on(document,"click",r),e.on("mousedown",i)}qj.defineOption("jump",!1,((e,t,n)=>{if(n&&n!==qj.Init){const t=e.state.jump.onMouseOver;qj.off(e.getWrapperElement(),"mouseover",t);const n=e.state.jump.onMouseOut;qj.off(e.getWrapperElement(),"mouseout",n),qj.off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const n=e.state.jump={options:t,onMouseOver:vB.bind(null,e),onMouseOut:yB.bind(null,e),onKeyDown:bB.bind(null,e)};qj.on(e.getWrapperElement(),"mouseover",n.onMouseOver),qj.on(e.getWrapperElement(),"mouseout",n.onMouseOut),qj.on(document,"keydown",n.onKeyDown)}}));const EB="undefined"!=typeof navigator&&navigator.userAgent.includes("Mac");function xB(e){if(e.state.jump.marker)return;const{cursor:t,options:n}=e.state.jump,r=e.coordsChar(t),i=e.getTokenAt(r,!0),o=n.getDestination||e.getHelper(r,"jump");if(o){const t=o(i,n,e);if(t){const n=e.markText({line:r.line,ch:i.start},{line:r.line,ch:i.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=n,e.state.jump.destination=t}}}function wB(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}qj.registerHelper("jump","graphql",((e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const{state:n}=e,{kind:r,step:i}=n,o=nB(t.schema,n);return"Field"===r&&0===i&&o.fieldDef||"AliasedField"===r&&2===i&&o.fieldDef?iB(o):"Directive"===r&&1===i&&o.directiveDef?oB(o):"Argument"===r&&0===i&&o.argDef?sB(o):"EnumValue"===r&&o.enumValue?aB(o):"NamedType"===r&&o.type?lB(o):void 0}));const TB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function CB(e,t){var n,r;const{levels:i,indentLevel:o}=e;return((i&&0!==i.length?i.at(-1)-((null===(n=this.electricInput)||void 0===n?void 0:n.test(t))?1:0):o)||0)*((null===(r=this.config)||void 0===r?void 0:r.indentUnit)||0)}qj.defineMode("graphql",(e=>{const t=Dc({eatWhitespace:e=>e.eatWhile(Tc),lexRules:Cc,parseRules:Sc,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:CB,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}}));const SB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function kB(e,t,n){const r=function(e,t){if(!t)return _B(e,(e=>!e.isDeprecated));const n=e.map((e=>({proximity:DB(NB(e.text),t),entry:e}))),r=_B(_B(n,(e=>e.proximity<=2)),(e=>!e.entry.isDeprecated)).sort(((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.text.length-t.entry.text.length));return r.map((e=>e.entry))}(n,NB(t.string));if(!r)return;const i=null!==t.type&&/"|\w/.test(t.string[0])?t.start:t.end;return{list:r,from:{line:e.line,ch:i},to:{line:e.line,ch:t.end}}}function _B(e,t){const n=e.filter(t);return 0===n.length?e:n}function NB(e){return e.toLowerCase().replaceAll(/\W/g,"")}function DB(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,s=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=s;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=s;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][s]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}qj.registerHelper("hint","graphql-variables",((e,t)=>{const n=e.getCursor(),r=e.getTokenAt(n),i=function(e,t,n){const r="Invalid"===t.state.kind?t.state.prevState:t.state,{kind:i,step:o}=r;if("Document"===i&&0===o)return kB(e,t,[{text:"{"}]);const{variableToType:s}=n;if(!s)return;const a=function(e,t){const n={type:null,fields:null};return tB(t,(t=>{switch(t.kind){case"Variable":n.type=e[t.name];break;case"ListValue":{const e=n.type?Ut(n.type):void 0;n.type=e instanceof Pt?e.ofType:null;break}case"ObjectValue":{const e=n.type?qt(n.type):void 0;n.fields=e instanceof cn?e.getFields():null;break}case"ObjectField":{const e=t.name&&n.fields?n.fields[t.name]:null;n.type=null==e?void 0:e.type;break}}})),n}(s,t.state);if("Document"===i||"Variable"===i&&0===o){return kB(e,t,Object.keys(s).map((e=>({text:`"${e}": `,type:s[e]}))))}if(("ObjectValue"===i||"ObjectField"===i&&0===o)&&a.fields){return kB(e,t,Object.keys(a.fields).map((e=>a.fields[e])).map((e=>({text:`"${e.name}": `,type:e.type,description:e.description}))))}if("StringValue"===i||"NumberValue"===i||"BooleanValue"===i||"NullValue"===i||"ListValue"===i&&1===o||"ObjectField"===i&&2===o||"Variable"===i&&2===o){const n=a.type?qt(a.type):void 0;if(n instanceof cn)return kB(e,t,[{text:"{"}]);if(n instanceof sn){return kB(e,t,n.getValues().map((e=>({text:`"${e.name}"`,type:n,description:e.description}))))}if(n===En)return kB(e,t,[{text:"true",type:En,description:"Not false."},{text:"false",type:En,description:"Not true."}])}}(n,r,t);return(null==i?void 0:i.list)&&i.list.length>0&&(i.from=qj.Pos(i.from.line,i.from.ch),i.to=qj.Pos(i.to.line,i.to.ch),qj.signal(e,"hasCompletion",e,i,r)),i}));const AB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let IB,OB,LB,MB,RB,FB,PB;function jB(){const e=LB,t=[];if(UB("{"),!WB("}")){do{t.push(VB())}while(WB(","));UB("}")}return{kind:"Object",start:e,end:RB,members:t}}function VB(){const e=LB,t="String"===PB?$B():null;UB("String"),UB(":");const n=BB();return{kind:"Member",start:e,end:RB,key:t,value:n}}function BB(){switch(PB){case"[":return function(){const e=LB,t=[];if(UB("["),!WB("]")){do{t.push(BB())}while(WB(","));UB("]")}return{kind:"Array",start:e,end:RB,values:t}}();case"{":return jB();case"String":case"Number":case"Boolean":case"Null":const e=$B();return GB(),e}UB("Value")}function $B(){return{kind:PB,start:LB,end:MB,value:JSON.parse(IB.slice(LB,MB))}}function UB(e){if(PB===e)return void GB();let t;if("EOF"===PB)t="[end of file]";else if(MB-LB>1)t="`"+IB.slice(LB,MB)+"`";else{const e=IB.slice(LB).match(/^.+?\b/);t="`"+(e?e[0]:IB[LB])+"`"}throw qB(`Expected ${e} but found ${t}.`)}class HB extends Error{constructor(e,t){super(e),this.position=t}}function qB(e){return new HB(e,{start:LB,end:MB})}function WB(e){if(PB===e)return GB(),!0}function zB(){return MB<OB&&(MB++,FB=MB===OB?0:IB.charCodeAt(MB)),FB}function GB(){for(RB=MB;9===FB||10===FB||13===FB||32===FB;)zB();if(0!==FB){switch(LB=MB,FB){case 34:return PB="String",function(){zB();for(;34!==FB&&FB>31;)if(92===FB)switch(FB=zB(),FB){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:zB();break;case 117:zB(),KB(),KB(),KB(),KB();break;default:throw qB("Bad character escape sequence.")}else{if(MB===OB)throw qB("Unterminated string.");zB()}if(34===FB)return void zB();throw qB("Unterminated string.")}();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return PB="Number",function(){45===FB&&zB();48===FB?zB():YB();46===FB&&(zB(),YB());69!==FB&&101!==FB||(FB=zB(),43!==FB&&45!==FB||zB(),YB())}();case 102:if("false"!==IB.slice(LB,LB+5))break;return MB+=4,zB(),void(PB="Boolean");case 110:if("null"!==IB.slice(LB,LB+4))break;return MB+=3,zB(),void(PB="Null");case 116:if("true"!==IB.slice(LB,LB+4))break;return MB+=3,zB(),void(PB="Boolean")}PB=IB[LB],zB()}else PB="EOF"}function KB(){if(FB>=48&&FB<=57||FB>=65&&FB<=70||FB>=97&&FB<=102)return zB();throw qB("Expected hexadecimal digit.")}function YB(){if(FB<48||FB>57)throw qB("Expected decimal digit.");do{zB()}while(FB>=48&&FB<=57)}function QB(e,t){if(!e||!t)return[];if(e instanceof jt)return"Null"===t.kind?[[t,`Type "${e}" is non-nullable and cannot be null.`]]:QB(e.ofType,t);if("Null"===t.kind)return[];if(e instanceof Pt){const n=e.ofType;if("Array"===t.kind){return JB(t.values||[],(e=>QB(n,e)))}return QB(n,t)}if(e instanceof cn){if("Object"!==t.kind)return[[t,`Type "${e}" must be an Object.`]];const n=Object.create(null),r=JB(t.members,(t=>{var r;const i=null===(r=null==t?void 0:t.key)||void 0===r?void 0:r.value;n[i]=!0;const o=e.getFields()[i];if(!o)return[[t.key,`Type "${e}" does not have a field "${i}".`]];return QB(o?o.type:void 0,t.value)}));for(const i of Object.keys(e.getFields())){const o=e.getFields()[i];!n[i]&&o.type instanceof jt&&!o.defaultValue&&r.push([t,`Object of type "${e}" is missing required field "${i}".`])}return r}return"Boolean"===e.name&&"Boolean"!==t.kind||"String"===e.name&&"String"!==t.kind||"ID"===e.name&&"Number"!==t.kind&&"String"!==t.kind||"Float"===e.name&&"Number"!==t.kind||"Int"===e.name&&("Number"!==t.kind||(0|t.value)!==t.value)||(e instanceof sn||e instanceof Gt)&&("String"!==t.kind&&"Number"!==t.kind&&"Boolean"!==t.kind&&"Null"!==t.kind||(null==(n=e.parseValue(t.value))||n!=n))?[[t,`Expected value of type "${e}".`]]:[];var n}function XB(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}function JB(e,t){return Array.prototype.concat.apply([],e.map(t))}qj.registerHelper("lint","graphql-variables",((e,t,n)=>{if(!e)return[];let r;try{r=function(e){IB=e,OB=e.length,LB=MB=RB=-1,zB(),GB();const t=jB();return UB("EOF"),t}(e)}catch(o){if(o instanceof HB)return[XB(n,o.position,o.message)];throw o}const{variableToType:i}=t;return i?function(e,t,n){var r;const i=[];for(const o of n.members)if(o){const n=null===(r=o.key)||void 0===r?void 0:r.value,s=t[n];if(s)for(const[t,r]of QB(s,o.value))i.push(XB(e,t,r));else i.push(XB(e,o.key,`Variable "$${n}" does not appear in any GraphQL query.`))}return i}(n,i,r):[]}));const ZB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));qj.defineMode("graphql-variables",(e=>{const t=Dc({eatWhitespace:e=>e.eatSpace(),lexRules:e$,parseRules:t$,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:CB,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const e$={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},t$={Document:[wc("{"),Ec("Variable",bc(wc(","))),wc("}")],Variable:[n$("variable"),wc(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[xc("Number","number")],StringValue:[xc("String","string")],BooleanValue:[xc("Keyword","builtin")],NullValue:[xc("Keyword","keyword")],ListValue:[wc("["),Ec("Value",bc(wc(","))),wc("]")],ObjectValue:[wc("{"),Ec("ObjectField",bc(wc(","))),wc("}")],ObjectField:[n$("attribute"),wc(":"),"Value"]};function n$(e){return{style:e,match:e=>"String"===e.kind,update(e,t){e.name=t.value.slice(1,-1)}}}const r$=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));qj.defineMode("graphql-results",(e=>{const t=Dc({eatWhitespace:e=>e.eatSpace(),lexRules:i$,parseRules:o$,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:CB,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const i$={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},o$={Document:[wc("{"),Ec("Entry",wc(",")),wc("}")],Entry:[xc("String","def"),wc(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[xc("Number","number")],StringValue:[xc("String","string")],BooleanValue:[xc("Keyword","builtin")],NullValue:[xc("Keyword","keyword")],ListValue:[wc("["),Ec("Value",wc(",")),wc("]")],ObjectValue:[wc("{"),Ec("ObjectField",wc(",")),wc("}")],ObjectField:[xc("String","property"),wc(":"),"Value"]},s$=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));return Cj}));
//# sourceMappingURL=index.umd.js.map
