mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-03 22:06:26 -06:00
33 lines
1.0 MiB
33 lines
1.0 MiB
!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 F=/\r\n|[\n\r]/g;function R(e,t){let n=0,r=1;for(const i of e.body.matchAll(F)){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,R(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=>R(s,e))):null==d?void 0:d.map((e=>R(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))}function Ie(e){return Oe(e,[])}function Oe(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:Oe(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(Oe(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>2)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+": "+Oe(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}const Le=function(e,t){return e instanceof t};class Me{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||I(!1,`Body must be a string. Received: ${Ie(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 Fe(e){return Le(e,Me)}function Re(e,t){const n=new je(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}function Pe(e,t){const n=new je(e,t);n.expectToken(ee.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(ee.EOF),r}class je{constructor(e,t={}){const n=Fe(e)?e:new Me(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,`${Ve(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 ${Be(e)}, found ${Ve(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 ${Ve(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 ${Ve(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 Ve(e){const t=e.value;return Be(e.kind)+(null!=t?` "${t}"`:"")}function Be(e){return fe(e)?`"${e}"`:e}function $e(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,5),a=s.pop();return i+s.join(", ")+", or "+a+"?"}function Ue(e){return e}function He(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function qe(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function We(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function ze(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),o=t.charCodeAt(r);if(Ye(i)&&Ye(o)){let s=0;do{++n,s=10*s+i-Ge,i=e.charCodeAt(n)}while(Ye(i)&&s>0);let a=0;do{++r,a=10*a+o-Ge,o=t.charCodeAt(r)}while(Ye(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 Ge=48,Ke=57;function Ye(e){return!isNaN(e)&&Ge<=e&&e<=Ke}function Qe(e,t){const n=Object.create(null),r=new Xe(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:ze(e,t)}))}class Xe{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=Je(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=Je(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 Je(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function Ze(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 et=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function tt(e){return nt[e.charCodeAt(0)]}const nt=["\\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"],rt=Object.freeze({});function it(e,t,n=W){const r=new Map;for(const v of Object.values(J))r.set(v,st(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: ${Ie(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===rt)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 ot(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}=st(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===rt)t[s]=rt;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===rt)t[o]=rt;else if(void 0!==r&&!1!==r)return r}else t[o]===r&&(t[o]=null)}};n[r]=a}return n}function st(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 at(e){return it(e,lt)}const lt={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ct(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=dt("(",ct(e.variableDefinitions,", "),")"),n=ct([e.operation,ct([e.name,t]),ct(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+dt(" = ",n)+dt(" ",ct(r," "))},SelectionSet:{leave:({selections:e})=>ut(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=dt("",e,": ")+t;let s=o+dt("(",ct(n,", "),")");return s.length>80&&(s=o+dt("(\n",ft(ct(n,"\n")),"\n)")),ct([s,ct(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+dt(" ",ct(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ct(["...",dt("on ",e),ct(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${dt("(",ct(n,", "),")")} on ${t} ${dt("",ct(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?ue(e):`"${e.replace(et,tt)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ct(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ct(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+dt("(",ct(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>dt("",e,"\n")+ct(["schema",ct(t," "),ut(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>dt("",e,"\n")+ct(["scalar",t,ct(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>dt("",e,"\n")+ct(["type",t,dt("implements ",ct(n," & ")),ct(r," "),ut(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>dt("",e,"\n")+t+(pt(n)?dt("(\n",ft(ct(n,"\n")),"\n)"):dt("(",ct(n,", "),")"))+": "+r+dt(" ",ct(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>dt("",e,"\n")+ct([t+": "+n,dt("= ",r),ct(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>dt("",e,"\n")+ct(["interface",t,dt("implements ",ct(n," & ")),ct(r," "),ut(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>dt("",e,"\n")+ct(["union",t,ct(n," "),dt("= ",ct(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>dt("",e,"\n")+ct(["enum",t,ct(n," "),ut(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>dt("",e,"\n")+ct([t,ct(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>dt("",e,"\n")+ct(["input",t,ct(n," "),ut(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>dt("",e,"\n")+"directive @"+t+(pt(n)?dt("(\n",ft(ct(n,"\n")),"\n)"):dt("(",ct(n,", "),")"))+(r?" repeatable":"")+" on "+ct(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ct(["extend schema",ct(e," "),ut(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ct(["extend scalar",e,ct(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ct(["extend type",e,dt("implements ",ct(t," & ")),ct(n," "),ut(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ct(["extend interface",e,dt("implements ",ct(t," & ")),ct(n," "),ut(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ct(["extend union",e,ct(t," "),dt("= ",ct(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ct(["extend enum",e,ct(t," "),ut(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ct(["extend input",e,ct(t," "),ut(n)]," ")}};function ct(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function ut(e){return dt("{\n",ft(ct(e,"\n")),"\n}")}function dt(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function ft(e){return dt(" ",e.replace(/\n/g,"\n "))}function pt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}function ht(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=>ht(e,t)));case J.OBJECT:return qe(e.fields,(e=>e.name.value),(e=>ht(e.value,t)));case J.VARIABLE:return null==t?void 0:t[e.name.value]}}function mt(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 gt(e){if("true"===e||"false"===e||"null"===e)throw new B(`Enum values cannot be named: ${e}`);return mt(e)}function vt(e){return yt(e)||bt(e)||xt(e)||Tt(e)||Ct(e)||St(e)||kt(e)||_t(e)}function yt(e){return Le(e,qt)}function bt(e){return Le(e,Wt)}function Et(e){if(!bt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL Object type.`);return e}function xt(e){return Le(e,Zt)}function wt(e){if(!xt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL Interface type.`);return e}function Tt(e){return Le(e,en)}function Ct(e){return Le(e,nn)}function St(e){return Le(e,sn)}function kt(e){return Le(e,Mt)}function _t(e){return Le(e,Ft)}function Nt(e){return yt(e)||Ct(e)||St(e)||Rt(e)&&Nt(e.ofType)}function Dt(e){return yt(e)||bt(e)||xt(e)||Tt(e)||Ct(e)||Rt(e)&&Dt(e.ofType)}function At(e){return yt(e)||Ct(e)}function It(e){return bt(e)||xt(e)||Tt(e)}function Ot(e){return xt(e)||Tt(e)}function Lt(e){if(!Ot(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL abstract type.`);return e}class Mt{constructor(e){vt(e)||I(!1,`Expected ${Ie(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class Ft{constructor(e){Pt(e)||I(!1,`Expected ${Ie(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 Rt(e){return kt(e)||_t(e)}function Pt(e){return vt(e)&&!_t(e)}function jt(e){if(!Pt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL nullable type.`);return e}function Vt(e){if(e)return _t(e)?e.ofType:e}function Bt(e){return yt(e)||bt(e)||xt(e)||Tt(e)||Ct(e)||St(e)}function $t(e){if(e){let t=e;for(;Rt(t);)t=t.ofType;return t}}function Ut(e){return"function"==typeof e?e():e}function Ht(e){return"function"==typeof e?e():e}class qt{constructor(e){var t,n,r,i;const o=null!==(t=e.parseValue)&&void 0!==t?t:Ue;this.name=mt(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:Ue,this.parseValue=o,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:(e,t)=>o(ht(e,t)),this.extensions=Ze(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: ${Ie(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 Wt{constructor(e){var t;this.name=mt(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=Ze(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=()=>Gt(e),this._interfaces=()=>zt(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||I(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Ie(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:Qt(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function zt(e){var t;const n=Ut(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 Gt(e){const t=Ht(e.fields);return Yt(t)||I(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),We(t,((t,n)=>{var r;Yt(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: ${Ie(t.resolve)}.`);const i=null!==(r=t.args)&&void 0!==r?r:{};return Yt(i)||I(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:mt(n),description:t.description,type:t.type,args:Kt(i),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:Ze(t.extensions),astNode:t.astNode}}))}function Kt(e){return Object.entries(e).map((([e,t])=>({name:mt(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Ze(t.extensions),astNode:t.astNode})))}function Yt(e){return L(e)&&!Array.isArray(e)}function Qt(e){return We(e,(e=>({description:e.description,type:e.type,args:Xt(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function Xt(e){return qe(e,(e=>e.name),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function Jt(e){return _t(e.type)&&void 0===e.defaultValue}class Zt{constructor(e){var t;this.name=mt(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Ze(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=Gt.bind(void 0,e),this._interfaces=zt.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||I(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ie(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:Qt(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class en{constructor(e){var t;this.name=mt(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Ze(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._types=tn.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||I(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ie(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 tn(e){const t=Ut(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 nn{constructor(e){var t;this.name=mt(e.name),this.description=e.description,this.extensions=Ze(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._values="function"==typeof e.values?e.values:on(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return"function"==typeof this._values&&(this._values=on(this.name,this._values())),this._values}getValue(e){return null===this._nameLookup&&(this._nameLookup=He(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: ${Ie(e)}`);return t.name}parseValue(e){if("string"!=typeof e){const t=Ie(e);throw new B(`Enum "${this.name}" cannot represent non-string value: ${t}.`+rn(this,t))}const t=this.getValue(e);if(null==t)throw new B(`Value "${e}" does not exist in "${this.name}" enum.`+rn(this,e));return t.value}parseLiteral(e,t){if(e.kind!==J.ENUM){const t=at(e);throw new B(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+rn(this,t),{nodes:e})}const n=this.getValue(e.value);if(null==n){const t=at(e);throw new B(`Value "${t}" does not exist in "${this.name}" enum.`+rn(this,t),{nodes:e})}return n.value}toConfig(){const e=qe(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 rn(e,t){return $e("the enum value",Qe(t,e.getValues().map((e=>e.name))))}function on(e,t){return Yt(t)||I(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map((([t,n])=>(Yt(n)||I(!1,`${e}.${t} must refer to an object with a "value" key representing an internal value but got: ${Ie(n)}.`),{name:gt(t),description:n.description,value:void 0!==n.value?n.value:t,deprecationReason:n.deprecationReason,extensions:Ze(n.extensions),astNode:n.astNode})))}class sn{constructor(e){var t,n;this.name=mt(e.name),this.description=e.description,this.extensions=Ze(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=an.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=We(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 an(e){const t=Ht(e.fields);return Yt(t)||I(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),We(t,((t,n)=>(!("resolve"in t)||I(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:mt(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Ze(t.extensions),astNode:t.astNode})))}function ln(e){return _t(e.type)&&void 0===e.defaultValue}function cn(e,t){return e===t||(_t(e)&&_t(t)||!(!kt(e)||!kt(t)))&&cn(e.ofType,t.ofType)}function un(e,t,n){return t===n||(_t(n)?!!_t(t)&&un(e,t.ofType,n.ofType):_t(t)?un(e,t.ofType,n):kt(n)?!!kt(t)&&un(e,t.ofType,n.ofType):!kt(t)&&(Ot(n)&&(xt(t)||bt(t))&&e.isSubType(n,t)))}function dn(e,t,n){return t===n||(Ot(t)?Ot(n)?e.getPossibleTypes(t).some((t=>e.isSubType(n,t))):e.isSubType(t,n):!!Ot(n)&&e.isSubType(n,t))}const fn=2147483647,pn=-2147483648,hn=new qt({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=xn(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: ${Ie(t)}`);if(n>fn||n<pn)throw new B("Int cannot represent non 32-bit signed integer value: "+Ie(t));return n},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new B(`Int cannot represent non-integer value: ${Ie(e)}`);if(e>fn||e<pn)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: ${at(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>fn||t<pn)throw new B(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),mn=new qt({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=xn(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: ${Ie(t)}`);return n},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new B(`Float cannot represent non numeric value: ${Ie(e)}`);return e},parseLiteral(e){if(e.kind!==J.FLOAT&&e.kind!==J.INT)throw new B(`Float cannot represent non numeric value: ${at(e)}`,e);return parseFloat(e.value)}}),gn=new qt({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=xn(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: ${Ie(e)}`)},parseValue(e){if("string"!=typeof e)throw new B(`String cannot represent a non string value: ${Ie(e)}`);return e},parseLiteral(e){if(e.kind!==J.STRING)throw new B(`String cannot represent a non string value: ${at(e)}`,{nodes:e});return e.value}}),vn=new qt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=xn(e);if("boolean"==typeof t)return t;if(Number.isFinite(t))return 0!==t;throw new B(`Boolean cannot represent a non boolean value: ${Ie(t)}`)},parseValue(e){if("boolean"!=typeof e)throw new B(`Boolean cannot represent a non boolean value: ${Ie(e)}`);return e},parseLiteral(e){if(e.kind!==J.BOOLEAN)throw new B(`Boolean cannot represent a non boolean value: ${at(e)}`,{nodes:e});return e.value}}),yn=new qt({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=xn(e);if("string"==typeof t)return t;if(Number.isInteger(t))return String(t);throw new B(`ID cannot represent value: ${Ie(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: ${Ie(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: "+at(e),{nodes:e});return e.value}}),bn=Object.freeze([gn,hn,mn,vn,yn]);function En(e){return bn.some((({name:t})=>e.name===t))}function xn(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 wn(e){return Le(e,Tn)}class Tn{constructor(e){var t,n;this.name=mt(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(t=e.isRepeatable)&&void 0!==t&&t,this.extensions=Ze(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=Kt(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Xt(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const Cn=new Tn({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 Ft(vn),description:"Included when true."}}}),Sn=new Tn({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 Ft(vn),description:"Skipped when true."}}}),kn="No longer supported",_n=new Tn({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:gn,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:kn}}}),Nn=new Tn({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Q.SCALAR],args:{url:{type:new Ft(gn),description:"The URL that specifies the behavior of this scalar."}}}),Dn=new Tn({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Q.INPUT_OBJECT],args:{}}),An=Object.freeze([Cn,Sn,_n,Nn,Dn]);function In(e){return An.some((({name:t})=>t===e.name))}function On(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function Ln(e,t){if(_t(t)){const n=Ln(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(kt(t)){const n=t.ofType;if(On(e)){const t=[];for(const r of e){const e=Ln(r,n);null!=e&&t.push(e)}return{kind:J.LIST,values:t}}return Ln(e,n)}if(St(t)){if(!L(e))return null;const n=[];for(const r of Object.values(t.getFields())){const t=Ln(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(At(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 Mn.test(e)?{kind:J.INT,value:e}:{kind:J.FLOAT,value:e}}if("string"==typeof n)return Ct(t)?{kind:J.ENUM,value:n}:t===yn&&Mn.test(n)?{kind:J.INT,value:n}:{kind:J.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${Ie(n)}.`)}M(!1,"Unexpected input type: "+Ie(t))}const Mn=/^-?(?:0|[1-9][0-9]*)$/,Fn=new Wt({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:gn,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Ft(new Mt(new Ft(jn))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new Ft(jn),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:jn,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:jn,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Ft(new Mt(new Ft(Rn))),resolve:e=>e.getDirectives()}})}),Rn=new Wt({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 Ft(gn),resolve:e=>e.name},description:{type:gn,resolve:e=>e.description},isRepeatable:{type:new Ft(vn),resolve:e=>e.isRepeatable},locations:{type:new Ft(new Mt(new Ft(Pn))),resolve:e=>e.locations},args:{type:new Ft(new Mt(new Ft(Bn))),args:{includeDeprecated:{type:vn,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))}})}),Pn=new nn({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."}}}),jn=new Wt({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 Ft(qn),resolve:e=>yt(e)?Un.SCALAR:bt(e)?Un.OBJECT:xt(e)?Un.INTERFACE:Tt(e)?Un.UNION:Ct(e)?Un.ENUM:St(e)?Un.INPUT_OBJECT:kt(e)?Un.LIST:_t(e)?Un.NON_NULL:void M(!1,`Unexpected type: "${Ie(e)}".`)},name:{type:gn,resolve:e=>"name"in e?e.name:void 0},description:{type:gn,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:gn,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Mt(new Ft(Vn)),args:{includeDeprecated:{type:vn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(bt(e)||xt(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},interfaces:{type:new Mt(new Ft(jn)),resolve(e){if(bt(e)||xt(e))return e.getInterfaces()}},possibleTypes:{type:new Mt(new Ft(jn)),resolve(e,t,n,{schema:r}){if(Ot(e))return r.getPossibleTypes(e)}},enumValues:{type:new Mt(new Ft($n)),args:{includeDeprecated:{type:vn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Ct(e)){const n=e.getValues();return t?n:n.filter((e=>null==e.deprecationReason))}}},inputFields:{type:new Mt(new Ft(Bn)),args:{includeDeprecated:{type:vn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(St(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},ofType:{type:jn,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:vn,resolve:e=>{if(St(e))return e.isOneOf}}})}),Vn=new Wt({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 Ft(gn),resolve:e=>e.name},description:{type:gn,resolve:e=>e.description},args:{type:new Ft(new Mt(new Ft(Bn))),args:{includeDeprecated:{type:vn,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))},type:{type:new Ft(jn),resolve:e=>e.type},isDeprecated:{type:new Ft(vn),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:gn,resolve:e=>e.deprecationReason}})}),Bn=new Wt({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 Ft(gn),resolve:e=>e.name},description:{type:gn,resolve:e=>e.description},type:{type:new Ft(jn),resolve:e=>e.type},defaultValue:{type:gn,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=Ln(n,t);return r?at(r):null}},isDeprecated:{type:new Ft(vn),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:gn,resolve:e=>e.deprecationReason}})}),$n=new Wt({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 Ft(gn),resolve:e=>e.name},description:{type:gn,resolve:e=>e.description},isDeprecated:{type:new Ft(vn),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:gn,resolve:e=>e.deprecationReason}})});var Un,Hn;(Hn=Un||(Un={})).SCALAR="SCALAR",Hn.OBJECT="OBJECT",Hn.INTERFACE="INTERFACE",Hn.UNION="UNION",Hn.ENUM="ENUM",Hn.INPUT_OBJECT="INPUT_OBJECT",Hn.LIST="LIST",Hn.NON_NULL="NON_NULL";const qn=new nn({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Un.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Un.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Un.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Un.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Un.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Un.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Un.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Un.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Wn={name:"__schema",type:new Ft(Fn),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},zn={name:"__type",type:jn,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Ft(gn),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},Gn={name:"__typename",type:new Ft(gn),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},Kn=Object.freeze([Fn,Rn,Pn,jn,Vn,Bn,$n,qn]);function Yn(e){return Kn.some((({name:t})=>e.name===t))}function Qn(e){return Le(e,Jn)}function Xn(e){if(!Qn(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL schema.`);return e}class Jn{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: ${Ie(e.types)}.`),!e.directives||Array.isArray(e.directives)||I(!1,`"directives" must be Array if provided but got: ${Ie(e.directives)}.`),this.description=e.description,this.extensions=Ze(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:An;const r=new Set(e.types);if(null!=e.types)for(const i of e.types)r.delete(i),Zn(i,r);null!=this._queryType&&Zn(this._queryType,r),null!=this._mutationType&&Zn(this._mutationType,r),null!=this._subscriptionType&&Zn(this._subscriptionType,r);for(const i of this._directives)if(wn(i))for(const e of i.args)Zn(e.type,r);Zn(Fn,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,xt(i)){for(const t of i.getInterfaces())if(xt(t)){let e=this._implementationsMap[t.name];void 0===e&&(e=this._implementationsMap[t.name]={objects:[],interfaces:[]}),e.interfaces.push(i)}}else if(bt(i))for(const t of i.getInterfaces())if(xt(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 Tt(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),Tt(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 Zn(e,t){const n=$t(e);if(!t.has(n))if(t.add(n),Tt(n))for(const r of n.getTypes())Zn(r,t);else if(bt(n)||xt(n)){for(const e of n.getInterfaces())Zn(e,t);for(const e of Object.values(n.getFields())){Zn(e.type,t);for(const n of e.args)Zn(n.type,t)}}else if(St(n))for(const r of Object.values(n.getFields()))Zn(r.type,t);return t}function er(e){if(Xn(e),e.__validationErrors)return e.__validationErrors;const t=new nr(e);!function(e){const t=e.schema,n=t.getQueryType();if(n){if(!bt(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${Ie(n)}.`,null!==(r=rr(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&&!bt(i)&&e.reportError(`Mutation root type must be Object type if provided, it cannot be ${Ie(i)}.`,null!==(o=rr(t,K.MUTATION))&&void 0!==o?o:i.astNode);const s=t.getSubscriptionType();var a;s&&!bt(s)&&e.reportError(`Subscription root type must be Object type if provided, it cannot be ${Ie(s)}.`,null!==(a=rr(t,K.SUBSCRIPTION))&&void 0!==a?a:s.astNode)}(t),function(e){for(const n of e.schema.getDirectives())if(wn(n)){ir(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(ir(e,r),Nt(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${Ie(r.type)}.`,r.astNode),Jt(r)&&null!=r.deprecationReason)e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[mr(r.astNode),null===(t=r.astNode)||void 0===t?void 0:t.type])}}else e.reportError(`Expected directive but got: ${Ie(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(_t(t.type)&&St(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))Bt(r)?(Yn(r)||ir(e,r),bt(r)||xt(r)?(or(e,r),sr(e,r)):Tt(r)?cr(e,r):Ct(r)?ur(e,r):St(r)&&(dr(e,r),t(r))):e.reportError(`Expected GraphQL named type but got: ${Ie(r)}.`,r.astNode)}(t);const n=t.getErrors();return e.__validationErrors=n,n}function tr(e){const t=er(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}class nr{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 rr(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 ir(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function or(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(ir(e,s),!Dt(s.type))e.reportError(`The type of ${t.name}.${s.name} must be Output Type but got: ${Ie(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(ir(e,n),!Nt(n.type))e.reportError(`The type of ${t.name}.${s.name}(${r}:) must be Input Type but got: ${Ie(n.type)}.`,null===(i=n.astNode)||void 0===i?void 0:i.type);if(Jt(n)&&null!=n.deprecationReason)e.reportError(`Required argument ${t.name}.${s.name}(${r}:) cannot be deprecated.`,[mr(n.astNode),null===(o=n.astNode)||void 0===o?void 0:o.type])}}}function sr(e,t){const n=Object.create(null);for(const r of t.getInterfaces())xt(r)?t!==r?n[r.name]?e.reportError(`Type ${t.name} can only implement ${r.name} once.`,pr(t,r)):(n[r.name]=!0,lr(e,t,r),ar(e,t,r)):e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,pr(t,r)):e.reportError(`Type ${Ie(t)} must only implement Interface types, it cannot implement ${Ie(r)}.`,pr(t,r))}function ar(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(!un(e.schema,u.type,l.type))e.reportError(`Interface field ${n.name}.${c} expects type ${Ie(l.type)} but ${t.name}.${c} is type ${Ie(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(!cn(r.type,o.type))e.reportError(`Interface field argument ${n.name}.${c}(${i}:) expects type ${Ie(r.type)} but ${t.name}.${c}(${i}:) is type ${Ie(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))&&Jt(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 lr(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}.`,[...pr(n,i),...pr(t,n)])}function cr(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.`,hr(t,i.name)):(r[i.name]=!0,bt(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${Ie(i)}.`,hr(t,String(i))))}function ur(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)ir(e,r)}function dr(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(ir(e,o),!Nt(o.type))e.reportError(`The type of ${t.name}.${o.name} must be Input Type but got: ${Ie(o.type)}.`,null===(r=o.astNode)||void 0===r?void 0:r.type);if(ln(o)&&null!=o.deprecationReason)e.reportError(`Required input field ${t.name}.${o.name} cannot be deprecated.`,[mr(o.astNode),null===(i=o.astNode)||void 0===i?void 0:i.type]);t.isOneOf&&fr(t,o,e)}}function fr(e,t,n){var r;_t(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 pr(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 hr(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 mr(e){var t;return null==e||null===(t=e.directives)||void 0===t?void 0:t.find((e=>e.name.value===_n.name))}function gr(e,t){switch(t.kind){case J.LIST_TYPE:{const n=gr(e,t.type);return n&&new Mt(n)}case J.NON_NULL_TYPE:{const n=gr(e,t.type);return n&&new Ft(n)}case J.NAMED_TYPE:return e.getType(t.name.value)}}class vr{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:yr,t&&(Nt(t)&&this._inputTypeStack.push(t),It(t)&&this._parentTypeStack.push(t),Dt(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=$t(this.getType());this._parentTypeStack.push(It(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(Dt(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(bt(n)?n:void 0);break}case J.INLINE_FRAGMENT:case J.FRAGMENT_DEFINITION:{const n=e.typeCondition,r=n?gr(t,n):$t(this.getType());this._typeStack.push(Dt(r)?r:void 0);break}case J.VARIABLE_DEFINITION:{const n=gr(t,e.type);this._inputTypeStack.push(Nt(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(Nt(r)?r:void 0);break}case J.LIST:{const e=Vt(this.getInputType()),t=kt(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Nt(t)?t:void 0);break}case J.OBJECT_FIELD:{const t=$t(this.getInputType());let n,r;St(t)&&(r=t.getFields()[e.name.value],r&&(n=r.type)),this._defaultValueStack.push(r?r.defaultValue:void 0),this._inputTypeStack.push(Nt(n)?n:void 0);break}case J.ENUM:{const t=$t(this.getInputType());let n;Ct(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 yr(e,t,n){const r=n.name.value;return r===Wn.name&&e.getQueryType()===t?Wn:r===zn.name&&e.getQueryType()===t?zn:r===Gn.name&&It(t)?Gn:bt(t)||xt(t)?t.getFields()[r]:void 0}function br(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=st(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=st(t,r.kind).leave;let o;return i&&(o=i.apply(t,n)),e.leave(r),o}}}function Er(e){return e.kind===J.OPERATION_DEFINITION||e.kind===J.FRAGMENT_DEFINITION}function xr(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 wr(e){return e.kind===J.SCHEMA_DEFINITION||Tr(e)||e.kind===J.DIRECTIVE_DEFINITION}function Tr(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 Cr(e){return e.kind===J.SCHEMA_EXTENSION||Sr(e)}function Sr(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 kr(e){return{Document(t){for(const n of t.definitions)if(!Er(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 _r(e){return{Field(t){const n=e.getParentType();if(n){if(!e.getFieldDef()){const r=e.getSchema(),i=t.name.value;let o=$e("to use an inline fragment on",function(e,t,n){if(!Ot(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:xt(t)&&e.isSubType(t,n)?-1:xt(n)&&e.isSubType(n,t)?1:ze(t.name,n.name)})).map((e=>e.name))}(r,n,i));""===o&&(o=$e(function(e,t){if(bt(e)||xt(e)){return Qe(t,Object.keys(e.getFields()))}return[]}(n,i))),e.reportError(new B(`Cannot query field "${i}" on type "${n.name}".`+o,{nodes:t}))}}}}}function Nr(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const t=gr(e.getSchema(),n);if(t&&!It(t)){const t=at(n);e.reportError(new B(`Fragment cannot condition on non composite type "${t}".`,{nodes:n}))}}},FragmentDefinition(t){const n=gr(e.getSchema(),t.typeCondition);if(n&&!It(n)){const n=at(t.typeCondition);e.reportError(new B(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}function Dr(e){return{...Ar(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const n=t.name.value,o=Qe(n,r.args.map((e=>e.name)));e.reportError(new B(`Unknown argument "${n}" on field "${i.name}.${r.name}".`+$e(o),{nodes:t}))}}}}function Ar(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():An;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=Qe(n,i);e.reportError(new B(`Unknown argument "${n}" on directive "@${r}".`+$e(o),{nodes:t}))}}return!1}}}function Ir(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():An;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: "+Ie(t.kind))}}(s);c&&!l.includes(c)&&e.reportError(new B(`Directive "@${a}" may not be used on ${c}.`,{nodes:n}))}}}function Or(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new B(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function Lr(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const o of e.getDocument().definitions)Tr(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)&&(wr(d)||Cr(d)));if(r&&Mr.includes(c))return;const o=Qe(c,r?Mr.concat(i):i);e.reportError(new B(`Unknown type "${c}".`+$e(o),{nodes:t}))}var d}}}const Mr=[...bn,...Kn].map((e=>e.name));function Fr(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 Rr(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 Pr(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 jr(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 Vr(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 Br(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 $r(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 Ur(e){switch(e.kind){case J.OBJECT:return{...e,fields:(t=e.fields,t.map((e=>({...e,value:Ur(e.value)}))).sort(((e,t)=>ze(e.name.value,t.name.value))))};case J.LIST:return{...e,values:e.values.map(Ur)};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 Hr(e){return Array.isArray(e)?e.map((([e,t])=>`subfields "${e}" conflict because `+Hr(t))).join(" and "):e}function qr(e){const t=new ei,n=new ti,r=new Map;return{SelectionSet(i){const o=function(e,t,n,r,i,o){const s=[],[a,l]=Xr(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=Kr(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++){Wr(e,s,t,n,r,!1,a,l[c]);for(let i=c+1;i<l.length;i++)zr(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=Hr(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 Wr(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]=Jr(e,n,l);if(s!==c){Gr(e,t,n,r,i,o,s,c);for(const a of u)Wr(e,t,n,r,i,o,s,a)}}function zr(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]=Jr(e,n,l),[f,p]=Jr(e,n,c);Gr(e,t,n,r,i,o,u,f);for(const h of p)zr(e,t,n,r,i,o,s,h);for(const h of d)zr(e,t,n,r,i,o,h,a)}function Gr(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=Kr(e,n,r,i,o,l,a,c);s&&t.push(s)}}}function Kr(e,t,n,r,i,o,s,a){const[l,c,u]=s,[d,f,p]=a,h=i||l!==d&&bt(l)&&bt(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&&Yr(t)===Yr(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&&Qr(m,g))return[[o,`they return conflicting types "${Ie(m)}" and "${Ie(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]=Xr(e,t,o,s),[f,p]=Xr(e,t,a,l);Gr(e,c,t,n,r,i,u,f);for(const h of p)Wr(e,c,t,n,r,i,u,h);for(const h of d)Wr(e,c,t,n,r,i,f,h);for(const h of d)for(const o of p)zr(e,c,t,n,r,i,h,o);return c}(e,t,n,r,h,$t(m),v,$t(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 Yr(e){return at(Ur(e))}function Qr(e,t){return kt(e)?!kt(t)||Qr(e.ofType,t.ofType):!!kt(t)||(_t(e)?!_t(t)||Qr(e.ofType,t.ofType):!!_t(t)||!(!At(e)&&!At(t))&&e!==t)}function Xr(e,t,n,r){const i=t.get(r);if(i)return i;const o=Object.create(null),s=Object.create(null);Zr(e,n,r,o,s);const a=[o,Object.keys(s)];return t.set(r,a),a}function Jr(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=gr(e.getSchema(),n.typeCondition);return Xr(e,t,i,n.selectionSet)}function Zr(e,t,n,r,i){for(const o of n.selections)switch(o.kind){case J.FIELD:{const e=o.name.value;let n;(bt(t)||xt(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?gr(e.getSchema(),n):t;Zr(e,s,o.selectionSet,r,i);break}}}class ei{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 ti{constructor(){this._orderedPairSet=new ei}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 ni(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(It(n)&&It(r)&&!dn(e.getSchema(),n,r)){const i=Ie(r),o=Ie(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=gr(e.getSchema(),n.typeCondition);if(It(t))return t}}(e,n),i=e.getParentType();if(r&&i&&!dn(e.getSchema(),r,i)){const o=Ie(i),s=Ie(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 ri(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)Tr(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=ii[o.kind]:s&&(a=function(e){if(yt(e))return J.SCALAR_TYPE_EXTENSION;if(bt(e))return J.OBJECT_TYPE_EXTENSION;if(xt(e))return J.INTERFACE_TYPE_EXTENSION;if(Tt(e))return J.UNION_TYPE_EXTENSION;if(Ct(e))return J.ENUM_TYPE_EXTENSION;if(St(e))return J.INPUT_OBJECT_TYPE_EXTENSION;M(!1,"Unexpected type: "+Ie(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: "+Ie(e))}}(r.kind);e.reportError(new B(`Cannot extend non-${t} type "${i}".`,{nodes:o?[o,r]:r}))}}else{const o=Qe(i,Object.keys({...n,...null==t?void 0:t.getTypeMap()}));e.reportError(new B(`Cannot extend type "${i}" because it is not defined.`+$e(o),{nodes:r.name}))}}}const ii={[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 oi(e){return{...si(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)&&Jt(o)){const n=Ie(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 si(e){var t;const n=Object.create(null),r=e.getSchema(),i=null!==(t=null==r?void 0:r.getDirectives())&&void 0!==t?t:An;for(const a of i)n[a.name]=He(a.args.filter(Jt),(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]=He(e.filter(ai),(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=vt(a.type)?Ie(a.type):at(a.type);e.reportError(new B(`Directive "@${r}" argument "${o}" of type "${n}" is required, but it was not provided.`,{nodes:t}))}}}}}}function ai(e){return e.type.kind===J.NON_NULL_TYPE&&null==e.defaultValue}function li(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n)if(At($t(n))){if(r){const i=t.name.value,o=Ie(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=Ie(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=Ie(n);e.reportError(new B(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:t}))}}}}function ci(e){return e.map((e=>"number"==typeof e?"["+e.toString()+"]":"."+e)).join("")}function ui(e,t,n){return{prev:e,key:t,typename:n}}function di(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function fi(e,t,n=pi){return hi(e,t,n,void 0)}function pi(e,t,n){let r="Invalid value "+Ie(t);throw e.length>0&&(r+=` at "value${ci(e)}"`),n.message=r+": "+n.message,n}function hi(e,t,n,r){if(_t(t))return null!=e?hi(e,t.ofType,n,r):void n(di(r),e,new B(`Expected non-nullable type "${Ie(t)}" not to be null.`));if(null==e)return null;if(kt(t)){const i=t.ofType;return On(e)?Array.from(e,((e,t)=>{const o=ui(r,t,void 0);return hi(e,i,n,o)})):[hi(e,i,n,r)]}if(St(t)){if(!L(e)||Array.isArray(e))return void n(di(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]=hi(o,s.type,n,ui(r,s.name,t.name));else if(void 0!==s.defaultValue)i[s.name]=s.defaultValue;else if(_t(s.type)){const t=Ie(s.type);n(di(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=Qe(s,Object.keys(t.getFields()));n(di(r),e,new B(`Field "${s}" is not defined by type "${t.name}".`+$e(i)))}if(t.isOneOf){const o=Object.keys(i);1!==o.length&&n(di(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(di(r).concat(s),a,new B(`Field "${s}" must be non-null.`))}return i}if(At(t)){let o;try{o=t.parseValue(e)}catch(i){return void n(di(r),e,i instanceof B?i:new B(`Expected type "${t.name}". `+i.message,{originalError:i}))}return void 0===o&&n(di(r),e,new B(`Expected type "${t.name}".`)),o}M(!1,"Unexpected input type: "+Ie(t))}function mi(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&&_t(t))return;return i}if(_t(t)){if(e.kind===J.NULL)return;return mi(e,t.ofType,n)}if(e.kind===J.NULL)return null;if(kt(t)){const r=t.ofType;if(e.kind===J.LIST){const t=[];for(const i of e.values)if(gi(i,n)){if(_t(r))return;t.push(null)}else{const e=mi(i,r,n);if(void 0===e)return;t.push(e)}return t}const i=mi(e,r,n);if(void 0===i)return;return[i]}if(St(t)){if(e.kind!==J.OBJECT)return;const r=Object.create(null),i=He(e.fields,(e=>e.name.value));for(const e of Object.values(t.getFields())){const t=i[e.name];if(!t||gi(t.value,n)){if(void 0!==e.defaultValue)r[e.name]=e.defaultValue;else if(_t(e.type))return;continue}const o=mi(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(At(t)){let i;try{i=t.parseLiteral(e,n)}catch(r){return}if(void 0===i)return;return i}M(!1,"Unexpected input type: "+Ie(t))}}function gi(e,t){return e.kind===J.VARIABLE&&(null==t||void 0===t[e.name.value])}function vi(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=gr(e,o.type);if(!Nt(s)){const e=at(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(!Ei(n,t)){if(o.defaultValue)i[t]=mi(o.defaultValue,s);else if(_t(s)){const e=Ie(s);r(new B(`Variable "$${t}" of required type "${e}" was not provided.`,{nodes:o}))}continue}const a=n[t];if(null===a&&_t(s)){const e=Ie(s);r(new B(`Variable "$${t}" of non-null type "${e}" must not be null.`,{nodes:o}))}else i[t]=fi(a,s,((e,n,i)=>{let s=`Variable "$${t}" got invalid value `+Ie(n);e.length>0&&(s+=` at "${t}${ci(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 yi(e,t,n){var r;const i={},o=He(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(_t(r))throw new B(`Argument "${e}" of required type "${Ie(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||!Ei(n,t)){if(void 0!==s.defaultValue)i[e]=s.defaultValue;else if(_t(r))throw new B(`Argument "${e}" of required type "${Ie(r)}" was provided the variable "$${t}" which was not provided a runtime value.`,{nodes:l});continue}c=null==n[t]}if(c&&_t(r))throw new B(`Argument "${e}" of non-null type "${Ie(r)}" must not be null.`,{nodes:l});const u=mi(l,r,n);if(void 0===u)throw new B(`Argument "${e}" has invalid value ${at(l)}.`,{nodes:l});i[e]=u}return i}function bi(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 yi(e,i,n)}function Ei(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function xi(e,t,n,r,i){const o=new Map;return wi(e,t,n,r,i,o,new Set),o}function wi(e,t,n,r,i,o,s){for(const l of i.selections)switch(l.kind){case J.FIELD:{if(!Ti(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(!Ti(n,l)||!Ci(e,l,r))continue;wi(e,t,n,r,l.selectionSet,o,s);break;case J.FRAGMENT_SPREAD:{const i=l.name.value;if(s.has(i)||!Ti(n,l))continue;s.add(i);const a=t[i];if(!a||!Ci(e,a,r))continue;wi(e,t,n,r,a.selectionSet,o,s);break}}var a}function Ti(e,t){const n=bi(Sn,t,e);if(!0===(null==n?void 0:n.if))return!1;const r=bi(Cn,t,e);return!1!==(null==r?void 0:r.if)}function Ci(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=gr(e,r);return i===n||!!Ot(i)&&e.isSubType(i,n)}function Si(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=xi(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 ki(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 _i(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=ki(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 Ni(e){return{Field:t,Directive:t};function t(t){var n;const r=ki(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 Di(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 Ai(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():An;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(Tr(n)||Sr(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 Ii(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];Ct(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 Oi(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;Li(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 Li(e,t){return!!(bt(e)||xt(e)||St(e))&&null!=e.getFields()[t]}function Mi(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 Fi(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 Ri(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 Pi(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 ji(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 Vi(e){return{OperationDefinition(t){var n;const r=ki(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 Bi(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(e){t[e.variable.name.value]=e},ListValue(t){if(!kt(Vt(e.getParentInputType())))return $i(e,t),!1},ObjectValue(n){const r=$t(e.getInputType());if(!St(r))return $i(e,n),!1;const i=He(n.fields,(e=>e.name.value));for(const t of Object.values(r.getFields())){if(!i[t.name]&&ln(t)){const i=Ie(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=$t(e.getParentInputType());if(!e.getInputType()&&St(n)){const r=Qe(t.name.value,Object.keys(n.getFields()));e.reportError(new B(`Field "${t.name.value}" is not defined by type "${n.name}".`+$e(r),{nodes:t}))}},NullValue(t){const n=e.getInputType();_t(n)&&e.reportError(new B(`Expected value of type "${Ie(n)}", found ${at(t)}.`,{nodes:t}))},EnumValue:t=>$i(e,t),IntValue:t=>$i(e,t),FloatValue:t=>$i(e,t),StringValue:t=>$i(e,t),BooleanValue:t=>$i(e,t)}}function $i(e,t){const n=e.getInputType();if(!n)return;const r=$t(n);if(At(r))try{if(void 0===r.parseLiteral(t,void 0)){const r=Ie(n);e.reportError(new B(`Expected value of type "${r}", found ${at(t)}.`,{nodes:t}))}}catch(i){const r=Ie(n);i instanceof B?e.reportError(i):e.reportError(new B(`Expected value of type "${r}", found ${at(t)}; `+i.message,{nodes:t,originalError:i}))}else{const r=Ie(n);e.reportError(new B(`Expected value of type "${r}", found ${at(t)}.`,{nodes:t}))}}function Ui(e){return{VariableDefinition(t){const n=gr(e.getSchema(),t.type);if(void 0!==n&&!Nt(n)){const n=t.variable.name.value,r=at(t.type);e.reportError(new B(`Variable "$${n}" cannot be non-input type "${r}".`,{nodes:t.type}))}}}}function Hi(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=gr(t,r.type);if(l&&!qi(t,l,r.defaultValue,o,s)){const t=Ie(l),s=Ie(o);e.reportError(new B(`Variable "$${n}" of type "${t}" used in position expecting type "${s}".`,{nodes:[r,i]}))}St(a)&&a.isOneOf&&Pt(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 qi(e,t,n,r,i){if(_t(r)&&!_t(t)){if(!(null!=n&&n.kind!==J.NULL)&&!(void 0!==i))return!1;return un(e,t,r.ofType)}return un(e,t,r)}const Wi=Object.freeze([Pr]),zi=Object.freeze([kr,Ri,Fr,Si,Lr,Nr,Ui,li,_r,Mi,Or,Br,ni,jr,Vi,Vr,$r,Ir,Ai,Dr,Ni,Bi,oi,Hi,qr,Fi,...Wi]),Gi=Object.freeze([Rr,Pi,ji,Ii,Oi,_i,Di,Lr,Ir,Ai,ri,Ar,Ni,Fi,si]);class Ki{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 Yi extends Ki{constructor(e,t,n){super(e,n),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Qi extends Ki{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 vr(this._schema);it(e,br(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 Xi(e,t,n=zi,r,i=new vr(e)){var o;const s=null!==(o=null==r?void 0:r.maxErrors)&&void 0!==o?o:100;t||I(!1,"Must provide document."),tr(e);const a=Object.freeze({}),l=[],c=new Qi(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=ot(n.map((e=>e(c))));try{it(t,br(i,u))}catch(uL){if(uL!==a)throw uL}return l}function Ji(e,t,n=Gi){const r=[],i=new Yi(e,t,(e=>{r.push(e)}));return it(e,ot(n.map((e=>e(i))))),r}function Zi(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 eo extends Error{constructor(e){super("Unexpected error value: "+Ie(e)),this.name="NonErrorThrown",this.thrownValue=e}}function to(e,t,n){var r;const i=(o=e)instanceof Error?o:new eo(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 no=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&&wi(e,t,n,r,a.selectionSet,o,s);return o}(e.schema,e.fragments,e.variableValues,t,n)));function ro(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;so(t,n,r);const o=ao(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=xi(e.schema,e.fragments,e.variableValues,r,t.selectionSet),o=void 0;switch(t.operation){case K.QUERY:return lo(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=ui(r,o,t.name),l=co(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 lo(e,r,n,o,i)}}(o,e,i);return O(t)?t.then((e=>oo(e,o.errors)),(e=>(o.errors.push(e),oo(null,o.errors)))):oo(t,o.errors)}catch(s){return o.errors.push(s),oo(null,o.errors)}}function io(e){const t=ro(e);if(O(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function oo(e,t){return 0===t.length?{data:e}:{errors:t,data:e}}function so(e,t,n){t||I(!1,"Must provide document."),tr(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 ao(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=vi(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:yo,typeResolver:null!=d?d:vo,subscribeFieldResolver:null!=f?f:yo,errors:[]}}function lo(e,t,n,r,i){const o=Object.create(null);let s=!1;try{for(const[a,l]of i.entries()){const i=co(e,t,n,l,ui(r,a,t.name));void 0!==i&&(o[a]=i,O(i)&&(s=!0))}}catch(a){if(s)return Zi(o).finally((()=>{throw a}));throw a}return s?Zi(o):o}function co(e,t,n,r,i){var o;const s=bo(e.schema,t,r[0]);if(!s)return;const a=s.type,l=null!==(o=s.resolve)&&void 0!==o?o:e.fieldResolver,c=uo(e,s,r,t,i);try{const t=yi(s,r[0],e.variableValues),o=l(n,t,e.contextValue,c);let u;return u=O(o)?o.then((t=>po(e,a,r,c,i,t))):po(e,a,r,c,i,o),O(u)?u.then(void 0,(t=>fo(to(t,r,di(i)),a,e))):u}catch(u){return fo(to(u,r,di(i)),a,e)}}function uo(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 fo(e,t,n){if(_t(t))throw e;return n.errors.push(e),null}function po(e,t,n,r,i,o){if(o instanceof Error)throw o;if(_t(t)){const s=po(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:kt(t)?function(e,t,n,r,i,o){if(!On(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=ui(i,o,void 0);try{let i;return i=O(t)?t.then((t=>po(e,s,n,r,l,t))):po(e,s,n,r,l,t),O(i)?(a=!0,i.then(void 0,(t=>fo(to(t,n,di(l)),s,e)))):i}catch(c){return fo(to(c,n,di(l)),s,e)}}));return a?Promise.all(l):l}(e,t,n,r,i,o):At(t)?function(e,t){const n=e.serialize(t);if(null==n)throw new Error(`Expected \`${Ie(e)}.serialize(${Ie(t)})\` to return non-nullable value, returned: ${Ie(n)}`);return n}(t,o):Ot(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=>mo(e,ho(s,e,t,n,r,o),n,r,i,o)));return mo(e,ho(c,e,t,n,r,o),n,r,i,o)}(e,t,n,r,i,o):bt(t)?mo(e,t,n,r,i,o):void M(!1,"Cannot complete value of unexpected output type: "+Ie(t))}function ho(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(bt(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 ${Ie(o)}, received "${Ie(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(!bt(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 mo(e,t,n,r,i,o){const s=no(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(o,e.contextValue,r);if(O(a))return a.then((r=>{if(!r)throw go(t,o,n);return lo(e,t,o,i,s)}));if(!a)throw go(t,o,n)}return lo(e,t,o,i,s)}function go(e,t,n){return new B(`Expected value of type "${e.name}" but got: ${Ie(t)}.`,{nodes:n})}const vo=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},yo=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 bo(e,t,n){const r=n.name.value;return r===Wn.name&&e.getQueryType()===t?Wn:r===zn.name&&e.getQueryType()===t?zn:r===Gn.name?Gn:t.getFields()[r]}function Eo(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=er(t);if(c.length>0)return{errors:c};let u;try{u=Re(n)}catch(f){return{errors:[f]}}const d=Xi(t,u);return d.length>0?{errors:d}:ro({schema:t,document:u,rootValue:r,contextValue:i,variableValues:o,operationName:s,fieldResolver:a,typeResolver:l})}function xo(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function wo(...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;so(n,r,i);const o=ao(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=xi(t,n,i,s,r.selectionSet),[l,c]=[...a.entries()][0],u=bo(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=ui(void 0,l,s.name),f=uo(e,u,c,s,d);try{var p;const t=yi(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 to(h,c,di(d))}}(o);if(!xo(e))throw new Error(`Subscription field must return Async Iterable. Received: ${Ie(e)}.`);return e}catch(s){if(s instanceof B)return{errors:[s]};throw s}}function To(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=$t(e.getParentInputType());if(St(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=$t(e.getInputType());null!=i||M(!1),e.reportError(new B(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function Co(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 So(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: ${Ie(e)}.`);const n=e.__schema,r=qe(n.types,(e=>e.name),(e=>function(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case Un.SCALAR:return new qt({name:(r=e).name,description:r.description,specifiedByURL:r.specifiedByURL});case Un.OBJECT:return new Wt({name:(n=e).name,description:n.description,interfaces:()=>f(n),fields:()=>p(n)});case Un.INTERFACE:return new Zt({name:(t=e).name,description:t.description,interfaces:()=>f(t),fields:()=>p(t)});case Un.UNION:return function(e){if(!e.possibleTypes){const t=Ie(e);throw new Error(`Introspection result missing possibleTypes: ${t}.`)}return new en({name:e.name,description:e.description,types:()=>e.possibleTypes.map(u)})}(e);case Un.ENUM:return function(e){if(!e.enumValues){const t=Ie(e);throw new Error(`Introspection result missing enumValues: ${t}.`)}return new nn({name:e.name,description:e.description,values:qe(e.enumValues,(e=>e.name),(e=>({description:e.description,deprecationReason:e.deprecationReason})))})}(e);case Un.INPUT_OBJECT:return function(e){if(!e.inputFields){const t=Ie(e);throw new Error(`Introspection result missing inputFields: ${t}.`)}return new sn({name:e.name,description:e.description,fields:()=>m(e.inputFields),isOneOf:e.isOneOf})}(e)}var t;var n;var r;const i=Ie(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[...bn,...Kn])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=Ie(e);throw new Error(`Introspection result missing directive args: ${t}.`)}if(!e.locations){const t=Ie(e);throw new Error(`Introspection result missing directive locations: ${t}.`)}return new Tn({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:m(e.args)})})):[];return new Jn({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===Un.LIST){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return new Mt(l(t))}if(e.kind===Un.NON_NULL){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");const n=l(t);return new Ft(jt(n))}return c(e)}function c(e){const t=e.name;if(!t)throw new Error(`Unknown type reference: ${Ie(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 Et(c(e))}function d(e){return wt(c(e))}function f(e){if(null===e.interfaces&&e.kind===Un.INTERFACE)return[];if(!e.interfaces){const t=Ie(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: ${Ie(e)}.`);return qe(e.fields,(e=>e.name),h)}function h(e){const t=l(e.type);if(!Dt(t)){const e=Ie(t);throw new Error(`Introspection must provide output type for fields, but received: ${e}.`)}if(!e.args){const t=Ie(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 qe(e,(e=>e.name),g)}function g(e){const t=l(e.type);if(!Nt(t)){const e=Ie(t);throw new Error(`Introspection must provide input type for arguments, but received: ${e}.`)}const n=null!=e.defaultValue?mi(Pe(e.defaultValue),t):void 0;return{description:e.description,type:t,defaultValue:n,deprecationReason:e.deprecationReason}}}function ko(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(Tr(A))a.push(A);else if(Sr(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=_o[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 Tn({...t,args:We(t.args,b)})})),...c.map((function(e){var t;return new Tn({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 kt(e)?new Mt(m(e.ofType)):_t(e)?new Ft(m(e.ofType)):g(e)}function g(e){return f[e.name]}function v(e){return Yn(e)||En(e)?e:yt(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=Do(s))&&void 0!==o?o:i}return new qt({...n,specifiedByURL:i,extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):bt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new Wt({...n,interfaces:()=>[...e.getInterfaces().map(g),..._(r)],fields:()=>({...We(n.fields,y),...T(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):xt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new Zt({...n,interfaces:()=>[...e.getInterfaces().map(g),..._(r)],fields:()=>({...We(n.fields,y),...T(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Tt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new en({...n,types:()=>[...e.getTypes().map(g),...N(r)],extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Ct(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[e.name])&&void 0!==t?t:[];return new nn({...n,values:{...n.values,...k(r)},extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):St(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new sn({...n,fields:()=>({...We(n.fields,(e=>({...e,type:m(e.type)}))),...S(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):void M(!1,"Unexpected type: "+Ie(e))}function y(e){return{...e,type:m(e.type),args:e.args&&We(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=_o[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 Mt(w(e.type)):e.kind===J.NON_NULL_TYPE?new Ft(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:No(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:mi(i.defaultValue,e),deprecationReason:No(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:mi(n.defaultValue,e),deprecationReason:No(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:No(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 Wt({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 Zt({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 nn({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 en({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 qt({name:n,description:null===(c=e.description)||void 0===c?void 0:c.value,specifiedByURL:Do(e),astNode:e,extensionASTNodes:r});case J.INPUT_OBJECT_TYPE_DEFINITION:{var u;const t=[e,...r];return new sn({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(bi(Dn,d)))})}}var d}}const _o=He([...bn,...Kn],(e=>e.name));function No(e){const t=bi(_n,e);return null==t?void 0:t.reason}function Do(e){const t=bi(Nn,e);return null==t?void 0:t.url}function Ao(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=Ji(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}(e);const n=ko({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,...An.filter((e=>n.directives.every((t=>t.name!==e.name))))];return new Jn({...n,directives:r})}function Io(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(ze))n[r]=t(e[r]);return n}function Oo(e){return Lo(e,(e=>e.name))}function Lo(e,t){return e.slice().sort(((e,n)=>ze(t(e),t(n))))}function Mo(e){return!En(e)&&!Yn(e)}function Fo(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Ro(e),...r.map((e=>function(e){return qo(e)+"directive @"+e.name+$o(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}(e))),...i.map((e=>Po(e)))].filter(Boolean).join("\n\n")}function Ro(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}`),qo(e)+`schema {\n${t.join("\n")}\n}`}function Po(e){return yt(e)?function(e){return qo(e)+`scalar ${e.name}`+function(e){if(null==e.specifiedByURL)return"";return` @specifiedBy(url: ${at({kind:J.STRING,value:e.specifiedByURL})})`}(e)}(e):bt(e)?function(e){return qo(e)+`type ${e.name}`+jo(e)+Vo(e)}(e):xt(e)?function(e){return qo(e)+`interface ${e.name}`+jo(e)+Vo(e)}(e):Tt(e)?function(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return qo(e)+"union "+e.name+n}(e):Ct(e)?function(e){const t=e.getValues().map(((e,t)=>qo(e," ",!t)+" "+e.name+Ho(e.deprecationReason)));return qo(e)+`enum ${e.name}`+Bo(t)}(e):St(e)?function(e){const t=Object.values(e.getFields()).map(((e,t)=>qo(e," ",!t)+" "+Uo(e)));return qo(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Bo(t)}(e):void M(!1,"Unexpected type: "+Ie(e))}function jo(e){const t=e.getInterfaces();return t.length?" implements "+t.map((e=>e.name)).join(" & "):""}function Vo(e){return Bo(Object.values(e.getFields()).map(((e,t)=>qo(e," ",!t)+" "+e.name+$o(e.args," ")+": "+String(e.type)+Ho(e.deprecationReason))))}function Bo(e){return 0!==e.length?" {\n"+e.join("\n")+"\n}":""}function $o(e,t=""){return 0===e.length?"":e.every((e=>!e.description))?"("+e.map(Uo).join(", ")+")":"(\n"+e.map(((e,n)=>qo(e," "+t,!n)+" "+t+Uo(e))).join("\n")+"\n"+t+")"}function Uo(e){const t=Ln(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${at(t)}`),n+Ho(e.deprecationReason)}function Ho(e){if(null==e)return"";if(e!==kn){return` @deprecated(reason: ${at({kind:J.STRING,value:e})})`}return" @deprecated"}function qo(e,t="",n=!0){const{description:r}=e;if(null==r)return"";return(t&&!n?"\n"+t:t)+at({kind:J.STRING,value:r,block:ce(r)}).replace(/\n/g,"\n"+t)+"\n"}function Wo(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(void 0!==r)for(const n of r)Wo(e,t,n)}}function zo(e){const t=[];return it(e,{FragmentSpread(e){t.push(e.name.value)}}),t}function Go(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{mt(e)}catch(t){return t}}var Ko,Yo,Qo,Xo;function Jo(e,t){return[...es(e,t),...Zo(e,t)]}function Zo(e,t){const n=[],r=ds(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:Ko.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,o]of r.persisted){const e=ds(i.args,o.args);for(const t of e.added)Jt(t)&&n.push({type:Ko.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:Ko.DIRECTIVE_ARG_REMOVED,description:`${t.name} was removed from ${i.name}.`});i.isRepeatable&&!o.isRepeatable&&n.push({type:Ko.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const t of i.locations)o.locations.includes(t)||n.push({type:Ko.DIRECTIVE_LOCATION_REMOVED,description:`${t} was removed from ${i.name}.`})}return n}function es(e,t){const n=[],r=ds(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:Ko.TYPE_REMOVED,description:En(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,o]of r.persisted)Ct(i)&&Ct(o)?n.push(...rs(i,o)):Tt(i)&&Tt(o)?n.push(...ns(i,o)):St(i)&&St(o)?n.push(...ts(i,o)):bt(i)&&bt(o)||xt(i)&&xt(o)?n.push(...os(i,o),...is(i,o)):i.constructor!==o.constructor&&n.push({type:Ko.TYPE_CHANGED_KIND,description:`${i.name} changed from ${cs(i)} to ${cs(o)}.`});return n}function ts(e,t){const n=[],r=ds(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)ln(i)?n.push({type:Ko.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:Qo.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:Ko.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted){ls(i.type,o.type)||n.push({type:Ko.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`})}return n}function ns(e,t){const n=[],r=ds(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:Qo.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:Ko.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function rs(e,t){const n=[],r=ds(e.getValues(),t.getValues());for(const i of r.added)n.push({type:Qo.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:Ko.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function is(e,t){const n=[],r=ds(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:Qo.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:Ko.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function os(e,t){const n=[],r=ds(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:Ko.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted){n.push(...ss(e,i,o));as(i.type,o.type)||n.push({type:Ko.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`})}return n}function ss(e,t,n){const r=[],i=ds(t.args,n.args);for(const o of i.removed)r.push({type:Ko.ARG_REMOVED,description:`${e.name}.${t.name} arg ${o.name} was removed.`});for(const[o,s]of i.persisted){if(ls(o.type,s.type)){if(void 0!==o.defaultValue)if(void 0===s.defaultValue)r.push({type:Qo.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} defaultValue was removed.`});else{const n=us(o.defaultValue,o.type),i=us(s.defaultValue,s.type);n!==i&&r.push({type:Qo.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} has changed defaultValue from ${n} to ${i}.`})}}else r.push({type:Ko.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)Jt(o)?r.push({type:Ko.REQUIRED_ARG_ADDED,description:`A required arg ${o.name} on ${e.name}.${t.name} was added.`}):r.push({type:Qo.OPTIONAL_ARG_ADDED,description:`An optional arg ${o.name} on ${e.name}.${t.name} was added.`});return r}function as(e,t){return kt(e)?kt(t)&&as(e.ofType,t.ofType)||_t(t)&&as(e,t.ofType):_t(e)?_t(t)&&as(e.ofType,t.ofType):Bt(t)&&e.name===t.name||_t(t)&&as(e,t.ofType)}function ls(e,t){return kt(e)?kt(t)&&ls(e.ofType,t.ofType):_t(e)?_t(t)&&ls(e.ofType,t.ofType)||!_t(t)&&ls(e.ofType,t):Bt(t)&&e.name===t.name}function cs(e){return yt(e)?"a Scalar type":bt(e)?"an Object type":xt(e)?"an Interface type":Tt(e)?"a Union type":Ct(e)?"an Enum type":St(e)?"an Input type":void M(!1,"Unexpected type: "+Ie(e))}function us(e,t){const n=Ln(e,t);return null!=n||M(!1),at(Ur(n))}function ds(e,t){const n=[],r=[],i=[],o=He(e,(({name:e})=>e)),s=He(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}}(Yo=Ko||(Ko={})).TYPE_REMOVED="TYPE_REMOVED",Yo.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",Yo.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",Yo.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",Yo.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",Yo.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",Yo.FIELD_REMOVED="FIELD_REMOVED",Yo.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",Yo.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",Yo.ARG_REMOVED="ARG_REMOVED",Yo.ARG_CHANGED_KIND="ARG_CHANGED_KIND",Yo.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",Yo.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",Yo.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",Yo.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",Yo.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED",(Xo=Qo||(Qo={})).VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",Xo.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",Xo.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",Xo.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",Xo.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",Xo.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE";const fs=Object.freeze(Object.defineProperty({__proto__:null,BREAK:rt,get BreakingChangeType(){return Ko},DEFAULT_DEPRECATION_REASON:kn,get DangerousChangeType(){return Qo},get DirectiveLocation(){return Q},ExecutableDefinitionsRule:kr,FieldsOnCorrectTypeRule:_r,FragmentsOnCompositeTypesRule:Nr,GRAPHQL_MAX_INT:fn,GRAPHQL_MIN_INT:pn,GraphQLBoolean:vn,GraphQLDeprecatedDirective:_n,GraphQLDirective:Tn,GraphQLEnumType:nn,GraphQLError:B,GraphQLFloat:mn,GraphQLID:yn,GraphQLIncludeDirective:Cn,GraphQLInputObjectType:sn,GraphQLInt:hn,GraphQLInterfaceType:Zt,GraphQLList:Mt,GraphQLNonNull:Ft,GraphQLObjectType:Wt,GraphQLOneOfDirective:Dn,GraphQLScalarType:qt,GraphQLSchema:Jn,GraphQLSkipDirective:Sn,GraphQLSpecifiedByDirective:Nn,GraphQLString:gn,GraphQLUnionType:en,get Kind(){return J},KnownArgumentNamesRule:Dr,KnownDirectivesRule:Ir,KnownFragmentNamesRule:Or,KnownTypeNamesRule:Lr,Lexer:de,Location:H,LoneAnonymousOperationRule:Fr,LoneSchemaDefinitionRule:Rr,MaxIntrospectionDepthRule:Pr,NoDeprecatedCustomRule:To,NoFragmentCyclesRule:jr,NoSchemaIntrospectionCustomRule:function(e){return{Field(t){const n=$t(e.getType());n&&Yn(n)&&e.reportError(new B(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}},NoUndefinedVariablesRule:Vr,NoUnusedFragmentsRule:Br,NoUnusedVariablesRule:$r,get OperationTypeNode(){return K},OverlappingFieldsCanBeMergedRule:qr,PossibleFragmentSpreadsRule:ni,PossibleTypeExtensionsRule:ri,ProvidedRequiredArgumentsRule:oi,ScalarLeafsRule:li,SchemaMetaFieldDef:Wn,SingleFieldSubscriptionsRule:Si,Source:Me,Token:q,get TokenKind(){return ee},TypeInfo:vr,get TypeKind(){return Un},TypeMetaFieldDef:zn,TypeNameMetaFieldDef:Gn,UniqueArgumentDefinitionNamesRule:_i,UniqueArgumentNamesRule:Ni,UniqueDirectiveNamesRule:Di,UniqueDirectivesPerLocationRule:Ai,UniqueEnumValueNamesRule:Ii,UniqueFieldDefinitionNamesRule:Oi,UniqueFragmentNamesRule:Mi,UniqueInputFieldNamesRule:Fi,UniqueOperationNamesRule:Ri,UniqueOperationTypesRule:Pi,UniqueTypeNamesRule:ji,UniqueVariableNamesRule:Vi,ValidationContext:Qi,ValuesOfCorrectTypeRule:Bi,VariablesAreInputTypesRule:Ui,VariablesInAllowedPositionRule:Hi,__Directive:Rn,__DirectiveLocation:Pn,__EnumValue:$n,__Field:Vn,__InputValue:Bn,__Schema:Fn,__Type:jn,__TypeKind:qn,assertAbstractType:Lt,assertCompositeType:function(e){if(!It(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL composite type.`);return e},assertDirective:function(e){if(!wn(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL directive.`);return e},assertEnumType:function(e){if(!Ct(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL Enum type.`);return e},assertEnumValueName:gt,assertInputObjectType:function(e){if(!St(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL Input Object type.`);return e},assertInputType:function(e){if(!Nt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL input type.`);return e},assertInterfaceType:wt,assertLeafType:function(e){if(!At(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL leaf type.`);return e},assertListType:function(e){if(!kt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL List type.`);return e},assertName:mt,assertNamedType:function(e){if(!Bt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL named type.`);return e},assertNonNullType:function(e){if(!_t(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL Non-Null type.`);return e},assertNullableType:jt,assertObjectType:Et,assertOutputType:function(e){if(!Dt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL output type.`);return e},assertScalarType:function(e){if(!yt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL Scalar type.`);return e},assertSchema:Xn,assertType:function(e){if(!vt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL type.`);return e},assertUnionType:function(e){if(!Tt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL Union type.`);return e},assertValidName:function(e){const t=Go(e);if(t)throw t;return e},assertValidSchema:tr,assertWrappingType:function(e){if(!Rt(e))throw new Error(`Expected ${Ie(e)} to be a GraphQL wrapping type.`);return e},astFromValue:Ln,buildASTSchema:Ao,buildClientSchema:So,buildSchema:function(e,t){return Ao(Re(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:fi,concatAST:function(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:J.DOCUMENT,definitions:t}},createSourceEventStream:wo,defaultFieldResolver:yo,defaultTypeResolver:vo,doTypesOverlap:dn,execute:ro,executeSync:io,extendSchema:function(e,t,n){Xn(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=Ji(e,t);if(0!==n.length)throw new Error(n.map((e=>e.message)).join("\n\n"))}(t,e);const r=e.toConfig(),i=ko(r,t,n);return r===i?e:new Jn(i)},findBreakingChanges:function(e,t){return Jo(e,t).filter((e=>e.type in Ko))},findDangerousChanges:function(e,t){return Jo(e,t).filter((e=>e.type in Qo))},formatError:function(e){return e.toJSON()},getArgumentValues:yi,getDirectiveValues:bi,getEnterLeaveForKind:st,getIntrospectionQuery:Co,getLocation:R,getNamedType:$t,getNullableType:Vt,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:vi,getVisitFn:function(e,t,n){const{enter:r,leave:i}=st(e,t);return n?i:r},graphql:function(e){return new Promise((t=>t(Eo(e))))},graphqlSync:function(e){const t=Eo(e);if(O(t))throw new Error("GraphQL execution failed to complete synchronously.");return t},introspectionFromSchema:function(e,t){const n=io({schema:e,document:Re(Co({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...t}))});return!n.errors&&n.data||M(!1),n.data},introspectionTypes:Kn,isAbstractType:Ot,isCompositeType:It,isConstValueNode:function e(t){return xr(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 Er(e)||wr(e)||Cr(e)},isDirective:wn,isEnumType:Ct,isEqualType:cn,isExecutableDefinitionNode:Er,isInputObjectType:St,isInputType:Nt,isInterfaceType:xt,isIntrospectionType:Yn,isLeafType:At,isListType:kt,isNamedType:Bt,isNonNullType:_t,isNullableType:Pt,isObjectType:bt,isOutputType:Dt,isRequiredArgument:Jt,isRequiredInputField:ln,isScalarType:yt,isSchema:Qn,isSelectionNode:function(e){return e.kind===J.FIELD||e.kind===J.FRAGMENT_SPREAD||e.kind===J.INLINE_FRAGMENT},isSpecifiedDirective:In,isSpecifiedScalarType:En,isType:vt,isTypeDefinitionNode:Tr,isTypeExtensionNode:Sr,isTypeNode:function(e){return e.kind===J.NAMED_TYPE||e.kind===J.LIST_TYPE||e.kind===J.NON_NULL_TYPE},isTypeSubTypeOf:un,isTypeSystemDefinitionNode:wr,isTypeSystemExtensionNode:Cr,isUnionType:Tt,isValidNameError:Go,isValueNode:xr,isWrappingType:Rt,lexicographicSortSchema:function(e){const t=e.toConfig(),n=qe(Oo(t.types),(e=>e.name),(function(e){if(yt(e)||Yn(e))return e;if(bt(e)){const t=e.toConfig();return new Wt({...t,interfaces:()=>l(t.interfaces),fields:()=>a(t.fields)})}if(xt(e)){const t=e.toConfig();return new Zt({...t,interfaces:()=>l(t.interfaces),fields:()=>a(t.fields)})}if(Tt(e)){const t=e.toConfig();return new en({...t,types:()=>l(t.types)})}if(Ct(e)){const t=e.toConfig();return new nn({...t,values:Io(t.values,(e=>e))})}if(St(e)){const t=e.toConfig();return new sn({...t,fields:()=>Io(t.fields,(e=>({...e,type:r(e.type)})))})}M(!1,"Unexpected type: "+Ie(e))}));return new Jn({...t,types:Object.values(n),directives:Oo(t.directives).map((function(e){const t=e.toConfig();return new Tn({...t,locations:Lo(t.locations,(e=>e)),args:s(t.args)})})),query:o(t.query),mutation:o(t.mutation),subscription:o(t.subscription)});function r(e){return kt(e)?new Mt(r(e.ofType)):_t(e)?new Ft(r(e.ofType)):i(e)}function i(e){return n[e.name]}function o(e){return e&&i(e)}function s(e){return Io(e,(e=>({...e,type:r(e.type)})))}function a(e){return Io(e,(e=>({...e,type:r(e.type),args:e.args&&s(e.args)})))}function l(e){return Oo(e).map(i)}},locatedError:to,parse:Re,parseConstValue:function(e,t){const n=new je(e,t);n.expectToken(ee.SOF);const r=n.parseConstValueLiteral();return n.expectToken(ee.EOF),r},parseType:function(e,t){const n=new je(e,t);n.expectToken(ee.SOF);const r=n.parseTypeReference();return n.expectToken(ee.EOF),r},parseValue:Pe,print:at,printError:function(e){return e.toString()},printIntrospectionSchema:function(e){return Fo(e,In,Yn)},printLocation:P,printSchema:function(e){return Fo(e,(e=>!In(e)),Mo)},printSourceLocation:j,printType:Po,recommendedRules:Wi,resolveObjMapThunk:Ht,resolveReadonlyArrayThunk:Ut,responsePathAsArray:di,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]=zo(i.selectionSet)}const r=Object.create(null);for(const i of t){const t=new Set;for(const e of zo(i.selectionSet))Wo(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:An,specifiedRules:zi,specifiedScalarTypes:bn,stripIgnoredCharacters:function(e){const t=Fe(e)?e:new Me(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 wo(e);return xo(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=>ro({...e,rootValue:t}))):t},syntaxError:U,typeFromAST:gr,validate:Xi,validateSchema:er,valueFromAST:mi,valueFromASTUntyped:ht,version:"16.11.0",versionInfo:A,visit:it,visitInParallel:ot,visitWithTypeInfo:br},Symbol.toStringTag,{value:"Module"}));var ps=new TextDecoder;function hs(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}const ms=Symbol(),gs=Symbol();const vs=e=>{const{pushValue:t,asyncIterableIterator:n}=function(){let e=!0;const t=[];let n=hs();const r=hs(),i=async function*(){for(;;)if(t.length>0)yield t.shift();else{const e=await Promise.race([n.promise,r.promise]);if(e===ms)break;if(e!==gs)throw e}}(),o=i.return.bind(i);i.return=(...t)=>(e=!1,r.resolve(ms),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(gs),n=hs())},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 ys=e=>t=>vs((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)}})))),bs=(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=ps.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(uL){r(uL)}},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 Es(e,t){if(e.wsClient)return ys(e.wsClient);if(e.subscriptionUrl)return async function(e,t){let n;try{const{createClient:r}=await Promise.resolve().then((()=>CP));return n=r({url:e,connectionParams:t}),ys(n)}catch(r){if((e=>"object"==typeof e&&null!==e&&"code"in e)(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?(r=n,e=>{const t=r.request(e);return vs((e=>t.subscribe(e).unsubscribe))}):void 0;var r}function xs(e){return JSON.stringify(e,null,2)}function ws(e){return e instanceof Error?function(e){return C(T({},e),{message:e.message,stack:e.stack})}(e):e}function Ts(e){return Array.isArray(e)?xs({errors:e.map((e=>ws(e)))}):xs({errors:[ws(e)]})}function Cs(e){return xs(e)}function Ss(e,t,n){const r=[];if(!e||!t)return{insertions:r,result:t};let i;try{i=Re(t)}catch(uL){return{insertions:r,result:t}}const o=n||ks,s=new vr(e);return it(i,{leave(e){s.leave(e)},enter(e){if(s.enter(e),"Field"===e.kind&&!e.selectionSet){const n=_s(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:" "+at(n).replaceAll("\n","\n"+i)})}}}}),{insertions:r,result:Ns(t,r)}}function ks(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))At(t[r].type)&&n.push(r);return n}function _s(e,t){const n=$t(e);if(!e||At(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:_s(i,t)}}))}:void 0}function Ns(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 Ds(e,t,n){var r;const i=n?$t(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(...Ds(e,a.selectionSet.selections,n));continue}}o.push(a)}return o}function As(e,t){const n=t?new vr(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=Ds(r,i,t),C(T({},e),{selections:i})},FragmentDefinition:()=>null},o=it(e,n?br(n,i):i);return it(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 Is{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(`${Os}:`)&&(e+=1);return e},clear(){for(const e in localStorage)0===e.indexOf(`${Os}:`)&&localStorage.removeItem(e)}}}get(e){if(!this.storage)return null;const t=`${Os}:${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=`${Os}:${e}`;if(t)try{this.storage.setItem(i,t)}catch(uL){r=uL instanceof Error?uL:new Error(`${uL}`),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,uL)}else this.storage.removeItem(i)}return{isQuotaError:n,error:r}}clear(){this.storage&&this.storage.clear()}}const Os="graphiql";class Ls{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 Ms{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 Ls("queries",this.storage,this.maxHistoryLength),this.favorite=new Ls("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,r){if(!e)return!1;try{Re(e)}catch(uL){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 Fs(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 Rs(e,t){return function(e,t){if(!t||""===t.trim()||":"===t.trim()||"{"===t.trim())return Ps(e,(e=>!e.isDeprecated));const n=e.map((e=>({proximity:Vs(js(e.label),t),entry:e})));return Ps(Ps(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,js(e.string))}function Ps(e,t){const n=e.filter(t);return 0===n.length?e:n}function js(e){return e.toLowerCase().replaceAll(/\W/g,"")}function Vs(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 Bs=(e,t,n)=>{if(!t)return null!=n?n:e;const r=$t(t);return bt(r)||St(r)||kt(r)||Ot(r)?e+" {\n $1\n}":null!=n?n:e},$s=(e,t,n)=>{if(kt(t)){const n=$t(t.ofType);return e+`[${Bs("",n,"$1")}]`}return Bs(e,t,n)};var Us,Hs,qs,Ws,zs,Gs,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,Fa,Ra,Pa,ja;(Us||(Us={})).is=function(e){return"string"==typeof e},(Hs||(Hs={})).is=function(e){return"string"==typeof e},(Ws=qs||(qs={})).MIN_VALUE=-2147483648,Ws.MAX_VALUE=2147483647,Ws.is=function(e){return"number"==typeof e&&Ws.MIN_VALUE<=e&&e<=Ws.MAX_VALUE},(Gs=zs||(zs={})).MIN_VALUE=0,Gs.MAX_VALUE=2147483647,Gs.is=function(e){return"number"==typeof e&&Gs.MIN_VALUE<=e&&e<=Gs.MAX_VALUE},(Ys=Ks||(Ks={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=zs.MAX_VALUE),t===Number.MAX_VALUE&&(t=zs.MAX_VALUE),{line:e,character:t}},Ys.is=function(e){var t=e;return lc.objectLiteral(t)&&lc.uinteger(t.line)&&lc.uinteger(t.character)},(Xs=Qs||(Qs={})).create=function(e,t,n,r){if(lc.uinteger(e)&&lc.uinteger(t)&&lc.uinteger(n)&&lc.uinteger(r))return{start:Ks.create(e,t),end:Ks.create(n,r)};if(Ks.is(e)&&Ks.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},Xs.is=function(e){var t=e;return lc.objectLiteral(t)&&Ks.is(t.start)&&Ks.is(t.end)},(Zs=Js||(Js={})).create=function(e,t){return{uri:e,range:t}},Zs.is=function(e){var t=e;return lc.objectLiteral(t)&&Qs.is(t.range)&&(lc.string(t.uri)||lc.undefined(t.uri))},(ta=ea||(ea={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},ta.is=function(e){var t=e;return lc.objectLiteral(t)&&Qs.is(t.targetRange)&&lc.string(t.targetUri)&&Qs.is(t.targetSelectionRange)&&(Qs.is(t.originSelectionRange)||lc.undefined(t.originSelectionRange))},(ra=na||(na={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},ra.is=function(e){var t=e;return lc.objectLiteral(t)&&lc.numberRange(t.red,0,1)&&lc.numberRange(t.green,0,1)&&lc.numberRange(t.blue,0,1)&&lc.numberRange(t.alpha,0,1)},(oa=ia||(ia={})).create=function(e,t){return{range:e,color:t}},oa.is=function(e){var t=e;return lc.objectLiteral(t)&&Qs.is(t.range)&&na.is(t.color)},(aa=sa||(sa={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},aa.is=function(e){var t=e;return lc.objectLiteral(t)&&lc.string(t.label)&&(lc.undefined(t.textEdit)||Ta.is(t))&&(lc.undefined(t.additionalTextEdits)||lc.typedArray(t.additionalTextEdits,Ta.is))},(ca=la||(la={})).Comment="comment",ca.Imports="imports",ca.Region="region",(da=ua||(ua={})).create=function(e,t,n,r,i,o){var s={startLine:e,endLine:t};return lc.defined(n)&&(s.startCharacter=n),lc.defined(r)&&(s.endCharacter=r),lc.defined(i)&&(s.kind=i),lc.defined(o)&&(s.collapsedText=o),s},da.is=function(e){var t=e;return lc.objectLiteral(t)&&lc.uinteger(t.startLine)&&lc.uinteger(t.startLine)&&(lc.undefined(t.startCharacter)||lc.uinteger(t.startCharacter))&&(lc.undefined(t.endCharacter)||lc.uinteger(t.endCharacter))&&(lc.undefined(t.kind)||lc.string(t.kind))},(pa=fa||(fa={})).create=function(e,t){return{location:e,message:t}},pa.is=function(e){var t=e;return lc.defined(t)&&Js.is(t.location)&&lc.string(t.message)},(ma=ha||(ha={})).Error=1,ma.Warning=2,ma.Information=3,ma.Hint=4,(va=ga||(ga={})).Unnecessary=1,va.Deprecated=2,(ya||(ya={})).is=function(e){var t=e;return lc.objectLiteral(t)&&lc.string(t.href)},(Ea=ba||(ba={})).create=function(e,t,n,r,i,o){var s={range:e,message:t};return lc.defined(n)&&(s.severity=n),lc.defined(r)&&(s.code=r),lc.defined(i)&&(s.source=i),lc.defined(o)&&(s.relatedInformation=o),s},Ea.is=function(e){var t,n=e;return lc.defined(n)&&Qs.is(n.range)&&lc.string(n.message)&&(lc.number(n.severity)||lc.undefined(n.severity))&&(lc.integer(n.code)||lc.string(n.code)||lc.undefined(n.code))&&(lc.undefined(n.codeDescription)||lc.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(lc.string(n.source)||lc.undefined(n.source))&&(lc.undefined(n.relatedInformation)||lc.typedArray(n.relatedInformation,fa.is))},(wa=xa||(xa={})).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 lc.defined(n)&&n.length>0&&(i.arguments=n),i},wa.is=function(e){var t=e;return lc.defined(t)&&lc.string(t.title)&&lc.string(t.command)},(Ca=Ta||(Ta={})).replace=function(e,t){return{range:e,newText:t}},Ca.insert=function(e,t){return{range:{start:e,end:e},newText:t}},Ca.del=function(e){return{range:e,newText:""}},Ca.is=function(e){var t=e;return lc.objectLiteral(t)&&lc.string(t.newText)&&Qs.is(t.range)},(ka=Sa||(Sa={})).create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},ka.is=function(e){var t=e;return lc.objectLiteral(t)&&lc.string(t.label)&&(lc.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(lc.string(t.description)||void 0===t.description)},(_a||(_a={})).is=function(e){var t=e;return lc.string(t)},(Da=Na||(Na={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},Da.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},Da.del=function(e,t){return{range:e,newText:"",annotationId:t}},Da.is=function(e){var t=e;return Ta.is(t)&&(Sa.is(t.annotationId)||_a.is(t.annotationId))},(Ia=Aa||(Aa={})).create=function(e,t){return{textDocument:e,edits:t}},Ia.is=function(e){var t=e;return lc.defined(t)&&Ha.is(t.textDocument)&&Array.isArray(t.edits)},(La=Oa||(Oa={})).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},La.is=function(e){var t=e;return t&&"create"===t.kind&&lc.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||lc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||lc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||_a.is(t.annotationId))},(Fa=Ma||(Ma={})).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},Fa.is=function(e){var t=e;return t&&"rename"===t.kind&&lc.string(t.oldUri)&&lc.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||lc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||lc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||_a.is(t.annotationId))},(Pa=Ra||(Ra={})).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},Pa.is=function(e){var t=e;return t&&"delete"===t.kind&&lc.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||lc.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||lc.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||_a.is(t.annotationId))},(ja||(ja={})).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 lc.string(e.kind)?Oa.is(e)||Ma.is(e)||Ra.is(e):Aa.is(e)})))};var Va,Ba,$a,Ua,Ha,qa,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,Fl,Rl,Pl,jl,Vl,Bl,$l,Ul,Hl,ql,Wl,zl,Gl,Kl,Yl,Ql,Xl,Jl,Zl,ec,tc,nc,rc,ic,oc,sc=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=Ta.insert(e,t):_a.is(n)?(i=n,r=Na.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Na.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=Ta.replace(e,t):_a.is(n)?(i=n,r=Na.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Na.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=Ta.del(e):_a.is(t)?(r=t,n=Na.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=Na.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}(),ac=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(_a.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 ac(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Aa.is(e)){var n=new sc(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new sc(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(Ha.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 sc(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 sc(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new ac,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(Sa.is(t)||_a.is(t)?r=t:n=t,void 0===r?i=Oa.create(e,n):(o=_a.is(r)?r:this._changeAnnotations.manage(r),i=Oa.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(Sa.is(n)||_a.is(n)?i=n:r=n,void 0===i?o=Ma.create(e,t,r):(s=_a.is(i)?i:this._changeAnnotations.manage(i),o=Ma.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(Sa.is(t)||_a.is(t)?r=t:n=t,void 0===r?i=Ra.create(e,n):(o=_a.is(r)?r:this._changeAnnotations.manage(r),i=Ra.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}(),(Ba=Va||(Va={})).create=function(e){return{uri:e}},Ba.is=function(e){var t=e;return lc.defined(t)&&lc.string(t.uri)},(Ua=$a||($a={})).create=function(e,t){return{uri:e,version:t}},Ua.is=function(e){var t=e;return lc.defined(t)&&lc.string(t.uri)&&lc.integer(t.version)},(qa=Ha||(Ha={})).create=function(e,t){return{uri:e,version:t}},qa.is=function(e){var t=e;return lc.defined(t)&&lc.string(t.uri)&&(null===t.version||lc.integer(t.version))},(za=Wa||(Wa={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},za.is=function(e){var t=e;return lc.defined(t)&&lc.string(t.uri)&&lc.string(t.languageId)&&lc.integer(t.version)&&lc.string(t.text)},(Ka=Ga||(Ga={})).PlainText="plaintext",Ka.Markdown="markdown",Ka.is=function(e){var t=e;return t===Ka.PlainText||t===Ka.Markdown},(Ya||(Ya={})).is=function(e){var t=e;return lc.objectLiteral(e)&&Ga.is(t.kind)&&lc.string(t.value)},(Xa=Qa||(Qa={})).Text=1,Xa.Method=2,Xa.Function=3,Xa.Constructor=4,Xa.Field=5,Xa.Variable=6,Xa.Class=7,Xa.Interface=8,Xa.Module=9,Xa.Property=10,Xa.Unit=11,Xa.Value=12,Xa.Enum=13,Xa.Keyword=14,Xa.Snippet=15,Xa.Color=16,Xa.File=17,Xa.Reference=18,Xa.Folder=19,Xa.EnumMember=20,Xa.Constant=21,Xa.Struct=22,Xa.Event=23,Xa.Operator=24,Xa.TypeParameter=25,(Za=Ja||(Ja={})).PlainText=1,Za.Snippet=2,(el||(el={})).Deprecated=1,(nl=tl||(tl={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},nl.is=function(e){var t=e;return t&&lc.string(t.newText)&&Qs.is(t.insert)&&Qs.is(t.replace)},(il=rl||(rl={})).asIs=1,il.adjustIndentation=2,(ol||(ol={})).is=function(e){var t=e;return t&&(lc.string(t.detail)||void 0===t.detail)&&(lc.string(t.description)||void 0===t.description)},(sl||(sl={})).create=function(e){return{label:e}},(al||(al={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(cl=ll||(ll={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},cl.is=function(e){var t=e;return lc.string(t)||lc.objectLiteral(t)&&lc.string(t.language)&&lc.string(t.value)},(ul||(ul={})).is=function(e){var t=e;return!!t&&lc.objectLiteral(t)&&(Ya.is(t.contents)||ll.is(t.contents)||lc.typedArray(t.contents,ll.is))&&(void 0===e.range||Qs.is(e.range))},(dl||(dl={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(fl||(fl={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return lc.defined(t)&&(i.documentation=t),lc.defined(n)?i.parameters=n:i.parameters=[],i},(hl=pl||(pl={})).Text=1,hl.Read=2,hl.Write=3,(ml||(ml={})).create=function(e,t){var n={range:e};return lc.number(t)&&(n.kind=t),n},(vl=gl||(gl={})).File=1,vl.Module=2,vl.Namespace=3,vl.Package=4,vl.Class=5,vl.Method=6,vl.Property=7,vl.Field=8,vl.Constructor=9,vl.Enum=10,vl.Interface=11,vl.Function=12,vl.Variable=13,vl.Constant=14,vl.String=15,vl.Number=16,vl.Boolean=17,vl.Array=18,vl.Object=19,vl.Key=20,vl.Null=21,vl.EnumMember=22,vl.Struct=23,vl.Event=24,vl.Operator=25,vl.TypeParameter=26,(yl||(yl={})).Deprecated=1,(bl||(bl={})).create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o},(El||(El={})).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}}},(wl=xl||(xl={})).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},wl.is=function(e){var t=e;return t&&lc.string(t.name)&&lc.number(t.kind)&&Qs.is(t.range)&&Qs.is(t.selectionRange)&&(void 0===t.detail||lc.string(t.detail))&&(void 0===t.deprecated||lc.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(Cl=Tl||(Tl={})).Empty="",Cl.QuickFix="quickfix",Cl.Refactor="refactor",Cl.RefactorExtract="refactor.extract",Cl.RefactorInline="refactor.inline",Cl.RefactorRewrite="refactor.rewrite",Cl.Source="source",Cl.SourceOrganizeImports="source.organizeImports",Cl.SourceFixAll="source.fixAll",(kl=Sl||(Sl={})).Invoked=1,kl.Automatic=2,(Nl=_l||(_l={})).create=function(e,t,n){var r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},Nl.is=function(e){var t=e;return lc.defined(t)&&lc.typedArray(t.diagnostics,ba.is)&&(void 0===t.only||lc.typedArray(t.only,lc.string))&&(void 0===t.triggerKind||t.triggerKind===Sl.Invoked||t.triggerKind===Sl.Automatic)},(Al=Dl||(Dl={})).create=function(e,t,n){var r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):xa.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},Al.is=function(e){var t=e;return t&&lc.string(t.title)&&(void 0===t.diagnostics||lc.typedArray(t.diagnostics,ba.is))&&(void 0===t.kind||lc.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||xa.is(t.command))&&(void 0===t.isPreferred||lc.boolean(t.isPreferred))&&(void 0===t.edit||ja.is(t.edit))},(Ol=Il||(Il={})).create=function(e,t){var n={range:e};return lc.defined(t)&&(n.data=t),n},Ol.is=function(e){var t=e;return lc.defined(t)&&Qs.is(t.range)&&(lc.undefined(t.command)||xa.is(t.command))},(Ml=Ll||(Ll={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},Ml.is=function(e){var t=e;return lc.defined(t)&&lc.uinteger(t.tabSize)&&lc.boolean(t.insertSpaces)},(Rl=Fl||(Fl={})).create=function(e,t,n){return{range:e,target:t,data:n}},Rl.is=function(e){var t=e;return lc.defined(t)&&Qs.is(t.range)&&(lc.undefined(t.target)||lc.string(t.target))},(jl=Pl||(Pl={})).create=function(e,t){return{range:e,parent:t}},jl.is=function(e){var t=e;return lc.objectLiteral(t)&&Qs.is(t.range)&&(void 0===t.parent||jl.is(t.parent))},(Bl=Vl||(Vl={})).namespace="namespace",Bl.type="type",Bl.class="class",Bl.enum="enum",Bl.interface="interface",Bl.struct="struct",Bl.typeParameter="typeParameter",Bl.parameter="parameter",Bl.variable="variable",Bl.property="property",Bl.enumMember="enumMember",Bl.event="event",Bl.function="function",Bl.method="method",Bl.macro="macro",Bl.keyword="keyword",Bl.modifier="modifier",Bl.comment="comment",Bl.string="string",Bl.number="number",Bl.regexp="regexp",Bl.operator="operator",Bl.decorator="decorator",(Ul=$l||($l={})).declaration="declaration",Ul.definition="definition",Ul.readonly="readonly",Ul.static="static",Ul.deprecated="deprecated",Ul.abstract="abstract",Ul.async="async",Ul.modification="modification",Ul.documentation="documentation",Ul.defaultLibrary="defaultLibrary",(Hl||(Hl={})).is=function(e){var t=e;return lc.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(Wl=ql||(ql={})).create=function(e,t){return{range:e,text:t}},Wl.is=function(e){var t=e;return null!=t&&Qs.is(t.range)&&lc.string(t.text)},(Gl=zl||(zl={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Gl.is=function(e){var t=e;return null!=t&&Qs.is(t.range)&&lc.boolean(t.caseSensitiveLookup)&&(lc.string(t.variableName)||void 0===t.variableName)},(Yl=Kl||(Kl={})).create=function(e,t){return{range:e,expression:t}},Yl.is=function(e){var t=e;return null!=t&&Qs.is(t.range)&&(lc.string(t.expression)||void 0===t.expression)},(Xl=Ql||(Ql={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},Xl.is=function(e){var t=e;return lc.defined(t)&&Qs.is(e.stoppedLocation)},(Zl=Jl||(Jl={})).Type=1,Zl.Parameter=2,Zl.is=function(e){return 1===e||2===e},(tc=ec||(ec={})).create=function(e){return{value:e}},tc.is=function(e){var t=e;return lc.objectLiteral(t)&&(void 0===t.tooltip||lc.string(t.tooltip)||Ya.is(t.tooltip))&&(void 0===t.location||Js.is(t.location))&&(void 0===t.command||xa.is(t.command))},(rc=nc||(nc={})).create=function(e,t,n){var r={position:e,label:t};return void 0!==n&&(r.kind=n),r},rc.is=function(e){var t=e;return lc.objectLiteral(t)&&Ks.is(t.position)&&(lc.string(t.label)||lc.typedArray(t.label,ec.is))&&(void 0===t.kind||Jl.is(t.kind))&&void 0===t.textEdits||lc.typedArray(t.textEdits,Ta.is)&&(void 0===t.tooltip||lc.string(t.tooltip)||Ya.is(t.tooltip))&&(void 0===t.paddingLeft||lc.boolean(t.paddingLeft))&&(void 0===t.paddingRight||lc.boolean(t.paddingRight))},(ic||(ic={})).is=function(e){var t=e;return lc.objectLiteral(t)&&Hs.is(t.uri)&&lc.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 dc(e,t,n,r)},e.is=function(e){var t=e;return!!(lc.defined(t)&&lc.string(t.uri)&&(lc.undefined(t.languageId)||lc.string(t.languageId))&&lc.uinteger(t.lineCount)&&lc.func(t.getText)&&lc.func(t.positionAt)&&lc.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}}(oc||(oc={}));var lc,cc,uc,dc=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 Ks.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 Ks.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}();cc=lc||(lc={}),uc=Object.prototype.toString,cc.defined=function(e){return void 0!==e},cc.undefined=function(e){return void 0===e},cc.boolean=function(e){return!0===e||!1===e},cc.string=function(e){return"[object String]"===uc.call(e)},cc.number=function(e){return"[object Number]"===uc.call(e)},cc.numberRange=function(e,t,n){return"[object Number]"===uc.call(e)&&t<=e&&e<=n},cc.integer=function(e){return"[object Number]"===uc.call(e)&&-2147483648<=e&&e<=2147483647},cc.uinteger=function(e){return"[object Number]"===uc.call(e)&&0<=e&&e<=2147483647},cc.func=function(e){return"[object Function]"===uc.call(e)},cc.objectLiteral=function(e){return null!==e&&"object"==typeof e},cc.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)};class fc{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 pc(e){return{ofRule:e}}function hc(e,t){return{ofRule:e,isList:!0,separator:t}}function mc(e,t){return{style:t,match:t=>t.kind===e}}function gc(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const vc=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,yc={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:/^#.*/},bc={Document:[hc("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:[xc("query"),pc(wc("def")),pc("VariableDefinitions"),hc("Directive"),"SelectionSet"],Mutation:[xc("mutation"),pc(wc("def")),pc("VariableDefinitions"),hc("Directive"),"SelectionSet"],Subscription:[xc("subscription"),pc(wc("def")),pc("VariableDefinitions"),hc("Directive"),"SelectionSet"],VariableDefinitions:[gc("("),hc("VariableDefinition"),gc(")")],VariableDefinition:["Variable",gc(":"),"Type",pc("DefaultValue")],Variable:[gc("$","variable"),wc("variable")],DefaultValue:[gc("="),"Value"],SelectionSet:[gc("{"),hc("Selection"),gc("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[wc("property"),gc(":"),wc("qualifier"),pc("Arguments"),hc("Directive"),pc("SelectionSet")],Field:[wc("property"),pc("Arguments"),hc("Directive"),pc("SelectionSet")],Arguments:[gc("("),hc("Argument"),gc(")")],Argument:[wc("attribute"),gc(":"),"Value"],FragmentSpread:[gc("..."),wc("def"),hc("Directive")],InlineFragment:[gc("..."),pc("TypeCondition"),hc("Directive"),"SelectionSet"],FragmentDefinition:[xc("fragment"),pc(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}(wc("def"),[xc("on")])),"TypeCondition",hc("Directive"),"SelectionSet"],TypeCondition:[xc("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:[mc("Number","number")],StringValue:[{style:"string",match:e=>"String"===e.kind,update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[mc("Name","builtin")],NullValue:[mc("Name","keyword")],EnumValue:[wc("string-2")],ListValue:[gc("["),hc("Value"),gc("]")],ObjectValue:[gc("{"),hc("ObjectField"),gc("}")],ObjectField:[wc("attribute"),gc(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[gc("["),"Type",gc("]"),pc(gc("!"))],NonNullType:["NamedType",pc(gc("!"))],NamedType:[(Ec="atom",{style:Ec,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:[gc("@","meta"),wc("meta"),pc("Arguments")],DirectiveDef:[xc("directive"),gc("@","meta"),wc("meta"),pc("ArgumentsDef"),xc("on"),hc("DirectiveLocation",gc("|"))],InterfaceDef:[xc("interface"),wc("atom"),pc("Implements"),hc("Directive"),gc("{"),hc("FieldDef"),gc("}")],Implements:[xc("implements"),hc("NamedType",gc("&"))],DirectiveLocation:[wc("string-2")],SchemaDef:[xc("schema"),hc("Directive"),gc("{"),hc("OperationTypeDef"),gc("}")],OperationTypeDef:[wc("keyword"),gc(":"),wc("atom")],ScalarDef:[xc("scalar"),wc("atom"),hc("Directive")],ObjectTypeDef:[xc("type"),wc("atom"),pc("Implements"),hc("Directive"),gc("{"),hc("FieldDef"),gc("}")],FieldDef:[wc("property"),pc("ArgumentsDef"),gc(":"),"Type",hc("Directive")],ArgumentsDef:[gc("("),hc("InputValueDef"),gc(")")],InputValueDef:[wc("attribute"),gc(":"),"Type",pc("DefaultValue"),hc("Directive")],UnionDef:[xc("union"),wc("atom"),hc("Directive"),gc("="),hc("UnionMember",gc("|"))],UnionMember:["NamedType"],EnumDef:[xc("enum"),wc("atom"),hc("Directive"),gc("{"),hc("EnumValueDef"),gc("}")],EnumValueDef:[wc("string-2"),hc("Directive")],InputDef:[xc("input"),wc("atom"),hc("Directive"),gc("{"),hc("InputValueDef"),gc("}")],ExtendDef:[xc("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 Ec;function xc(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function wc(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function Tc(e={eatWhitespace:e=>e.eatWhile(vc),lexRules:yc,parseRules:bc,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return kc(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?_c(t):t.needsAdvance&&(t.needsAdvance=!1,Nc(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/),kc(Sc,t,"Invalid"),"invalidchar"}if("Comment"===l.kind)return kc(Sc,t,"Comment"),"comment";const c=Cc({},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){kc(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?Nc(t,!0):t.needsAdvance=!0,n.style}Ac(t)}return Cc(t,c),kc(Sc,t,"Invalid"),"invalidchar"}(t,n,e)}}function Cc(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}const Sc={Invalid:[],Comment:[]};function kc(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 _c(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 Nc(e,t){var n;if(Dc(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);)_c(e),e.rule&&(Dc(e)?(null===(n=e.rule)||void 0===n?void 0:n[e.step].separator)&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function Dc(e){const t=Array.isArray(e.rule)&&"string"!=typeof e.rule[e.step]&&e.rule[e.step];return t&&t.isList}function Ac(e){for(;e.rule&&(!Array.isArray(e.rule)||!e.rule[e.step].ofRule);)_c(e);e.rule&&Nc(e,!1)}function Ic(e,t){const n=e.split("\n"),r=Tc();let i=r.startState(),o="",s=new fc("");for(let a=0;a<n.length;a++){for(s=new fc(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 Oc,Lc;(Lc=Oc||(Oc={})).TYPE_SYSTEM="TYPE_SYSTEM",Lc.EXECUTABLE="EXECUTABLE",Lc.UNKNOWN="UNKNOWN";const Mc=[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];function Fc(e,t){return(null==t?void 0:t.endsWith(".graphqls"))?Oc.TYPE_SYSTEM:(e=>{let t=Oc.UNKNOWN;if(e)try{it(Re(e),{enter(e){if("Document"!==e.kind)return!!Mc.includes(e.kind)&&(t=Oc.TYPE_SYSTEM,rt);t=Oc.EXECUTABLE}})}catch(n){return t}return t})(e)}function Rc(e,t,n,r,i){const o=r||function(e,t,n=0){let r=null,i=null,o=null;const s=Ic(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 jc(t,(t=>{var p;switch(t.kind){case Vc.QUERY:case"ShortQuery":d=e.getQueryType();break;case Vc.MUTATION:d=e.getMutationType();break;case Vc.SUBSCRIPTION:d=e.getSubscriptionType();break;case Vc.INLINE_FRAGMENT:case Vc.FRAGMENT_DEFINITION:t.type&&(d=e.getType(t.type));break;case Vc.FIELD:case Vc.ALIASED_FIELD:d&&t.name?(s=u?Pc(e,u,t.name):null,d=s?s.type:null):s=null;break;case Vc.SELECTION_SET:u=$t(d);break;case Vc.DIRECTIVE:i=t.name?e.getDirective(t.name):null;break;case Vc.INTERFACE_DEF:t.name&&(l=null,f=new Zt({name:t.name,interfaces:[],fields:{}}));break;case Vc.OBJECT_TYPE_DEF:t.name&&(f=null,l=new Wt({name:t.name,interfaces:[],fields:{}}));break;case Vc.ARGUMENTS:if(t.prevState)switch(t.prevState.kind){case Vc.FIELD:r=s&&s.args;break;case Vc.DIRECTIVE:r=i&&i.args;break;case Vc.ALIASED_FIELD:{const n=null===(p=t.prevState)||void 0===p?void 0:p.name;if(!n){r=null;break}const i=u?Pc(e,u,n):null;if(!i){r=null;break}r=i.args;break}default:r=null}else r=null;break;case Vc.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 Vc.VARIABLE_DEFINITION:case Vc.VARIABLE:d=a;break;case Vc.ENUM_VALUE:const h=$t(a);o=h instanceof nn?h.getValues().find((e=>e.value===t.name)):null;break;case Vc.LIST_VALUE:const m=Vt(a);a=m instanceof Mt?m.ofType:null;break;case Vc.OBJECT_VALUE:const g=$t(a);c=g instanceof sn?g.getFields():null;break;case Vc.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 Vc.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);return{token:o,state:s,typeInfo:a,mode:(null==i?void 0:i.mode)||Fc(e,null==i?void 0:i.uri)}}function Pc(e,t,n){return n===Wn.name&&e.getQueryType()===t?Wn:n===zn.name&&e.getQueryType()===t?zn:n===Gn.name&&It(t)?Gn:"getFields"in t?t.getFields()[n]:null}function jc(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 Vc=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 Bc;!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}(Bc||(Bc={}));const $c={command:"editor.action.triggerSuggest",title:"Suggestions"};function Uc(e,t,n,r,i,o){var s;const a=Object.assign(Object.assign({},o),{schema:e}),l=Rc(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===Vc.DOCUMENT)return d===Oc.TYPE_SYSTEM?function(e){return Rs(e,[{label:"extend",kind:Bc.Function},...Hc])}(f):d===Oc.EXECUTABLE?function(e){return Rs(e,qc)}(f):function(e){return Rs(e,[{label:"extend",kind:Bc.Function},...qc,...Hc])}(f);if(p===Vc.EXTEND_DEF)return function(e){return Rs(e,Hc)}(f);if((null===(s=null==m?void 0:m.prevState)||void 0===s?void 0:s.kind)===Vc.EXTENSION_DEFINITION&&c.name)return Rs(f,[]);if((null==m?void 0:m.kind)===J.SCALAR_TYPE_EXTENSION)return Rs(f,Object.values(e.getTypeMap()).filter(yt).map((e=>({label:e.name,kind:Bc.Function}))));if((null==m?void 0:m.kind)===J.OBJECT_TYPE_EXTENSION)return Rs(f,Object.values(e.getTypeMap()).filter((e=>bt(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Bc.Function}))));if((null==m?void 0:m.kind)===J.INTERFACE_TYPE_EXTENSION)return Rs(f,Object.values(e.getTypeMap()).filter(xt).map((e=>({label:e.name,kind:Bc.Function}))));if((null==m?void 0:m.kind)===J.UNION_TYPE_EXTENSION)return Rs(f,Object.values(e.getTypeMap()).filter(Tt).map((e=>({label:e.name,kind:Bc.Function}))));if((null==m?void 0:m.kind)===J.ENUM_TYPE_EXTENSION)return Rs(f,Object.values(e.getTypeMap()).filter((e=>Ct(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Bc.Function}))));if((null==m?void 0:m.kind)===J.INPUT_OBJECT_TYPE_EXTENSION)return Rs(f,Object.values(e.getTypeMap()).filter(St).map((e=>({label:e.name,kind:Bc.Function}))));if(p===Vc.IMPLEMENTS||p===Vc.NAMED_TYPE&&(null==m?void 0:m.kind)===Vc.IMPLEMENTS)return function(e,t,n,r,i){if(t.needsSeparator)return[];const o=n.getTypeMap(),s=Fs(o).filter(xt),a=s.map((({name:e})=>e)),l=new Set;Ic(r,((e,t)=>{var r,o,s,c,u;if(t.name&&(t.kind!==Vc.INTERFACE_DEF||a.includes(t.name)||l.add(t.name),t.kind===Vc.NAMED_TYPE&&(null===(r=t.prevState)||void 0===r?void 0:r.kind)===Vc.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 Zt(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new Zt({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 Wt(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new Zt({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 Rs(e,d.map((e=>{const t={label:e.name,kind:Bc.Interface,type:e};return(null==e?void 0:e.description)&&(t.documentation=e.description),t})))}(f,c,e,t,u);if(p===Vc.SELECTION_SET||p===Vc.FIELD||p===Vc.ALIASED_FIELD)return function(e,t,n){var r;if(t.parentType){const{parentType:i}=t;let o=[];return"getFields"in i&&(o=Fs(i.getFields())),It(i)&&o.push(Gn),i===(null===(r=null==n?void 0:n.schema)||void 0===r?void 0:r.getQueryType())&&o.push(Wn,zn),Rs(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:Bc.Field,labelDetails:{detail:" "+t.type.toString()},type:t.type};return(null==n?void 0:n.fillLeafsOnComplete)&&(o.insertText=(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}`))}) ${Bs("",e.type,"\n")}`})(t),o.insertText||(o.insertText=Bs(t.name,t.type,t.name+(e.state.needsAdvance?"":"\n"))),o.insertText&&(o.insertTextFormat=Ja.Snippet,o.insertTextMode=rl.adjustIndentation,o.command=$c)),o})))}return[]}(f,u,a);if(p===Vc.ARGUMENTS||p===Vc.ARGUMENT&&0===h){const{argDefs:e}=u;if(e)return Rs(f,e.map((e=>{var t;return{label:e.name,insertText:$s(e.name+": ",e.type),insertTextMode:rl.adjustIndentation,insertTextFormat:Ja.Snippet,command:$c,labelDetails:{detail:" "+String(e.type)},documentation:null!==(t=e.description)&&void 0!==t?t:void 0,kind:Bc.Variable,type:e.type}})))}if((p===Vc.OBJECT_VALUE||p===Vc.OBJECT_FIELD&&0===h)&&u.objectFieldDefs){const e=Fs(u.objectFieldDefs),t=p===Vc.OBJECT_VALUE?Bc.Value:Bc.Field;return Rs(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:$s(e.name+": ",e.type),insertTextMode:rl.adjustIndentation,insertTextFormat:Ja.Snippet,command:$c}})))}if(p===Vc.ENUM_VALUE||p===Vc.LIST_VALUE&&1===h||p===Vc.OBJECT_FIELD&&2===h||p===Vc.ARGUMENT&&2===h)return function(e,t,n,r){const i=$t(t.inputType),o=zc(n,r,e).filter((e=>e.detail===(null==i?void 0:i.name)));if(i instanceof nn){return Rs(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:Bc.EnumMember,type:i}})).concat(o))}if(i===vn)return Rs(e,o.concat([{label:"true",detail:String(vn),documentation:"Not false.",kind:Bc.Variable,type:vn},{label:"false",detail:String(vn),documentation:"Not true.",kind:Bc.Variable,type:vn}]));return o}(f,u,t,e);if(p===Vc.VARIABLE&&1===h){const n=$t(u.inputType);return Rs(f,zc(t,e,f).filter((e=>e.detail===(null==n?void 0:n.name))))}if(p===Vc.TYPE_CONDITION&&1===h||p===Vc.NAMED_TYPE&&null!=m&&m.kind===Vc.TYPE_CONDITION)return function(e,t,n){let r;if(t.parentType)if(Ot(t.parentType)){const e=Lt(t.parentType),i=n.getPossibleTypes(e),o=Object.create(null);for(const t of i)for(const e of t.getInterfaces())o[e.name]=e;r=i.concat(Fs(o))}else r=[t.parentType];else{r=Fs(n.getTypeMap()).filter((e=>It(e)&&!e.name.startsWith("__")))}return Rs(e,r.map((e=>{const t=$t(e);return{label:String(e),documentation:(null==t?void 0:t.description)||"",kind:Bc.Field}})))}(f,u,e);if(p===Vc.FRAGMENT_SPREAD&&1===h)return function(e,t,n,r,i){if(!r)return[];const o=n.getTypeMap(),s=function(e){let t;return jc(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 Ic(e,((e,n)=>{n.kind===Vc.FRAGMENT_DEFINITION&&n.name&&n.type&&t.push({kind:Vc.FRAGMENT_DEFINITION,name:{kind:J.NAME,value:n.name},selectionSet:{kind:Vc.SELECTION_SET,selections:[]},typeCondition:{kind:Vc.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===Vc.FRAGMENT_DEFINITION&&s.name===e.name.value)&&It(t.parentType)&&It(o[e.typeCondition.name.value])&&dn(n,t.parentType,o[e.typeCondition.name.value])));return Rs(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:Bc.Field,type:o[e.typeCondition.name.value]}))))}(f,u,e,t,Array.isArray(i)?i:(e=>{const t=[];if(e)try{it(Re(e),{FragmentDefinition(e){t.push(e)}})}catch(s){return[]}return t})(i));const g=Gc(c);return g.kind===Vc.FIELD_DEF?Rs(f,Object.values(e.getTypeMap()).filter((e=>Dt(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Bc.Function,insertText:(null==o?void 0:o.fillLeafsOnComplete)?e.name+"\n":e.name,insertTextMode:rl.adjustIndentation})))):g.kind===Vc.INPUT_VALUE_DEF&&2===h?Rs(f,Object.values(e.getTypeMap()).filter((e=>Nt(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Bc.Function,insertText:(null==o?void 0:o.fillLeafsOnComplete)?e.name+"\n$1":e.name,insertTextMode:rl.adjustIndentation,insertTextFormat:Ja.Snippet})))):p===Vc.VARIABLE_DEFINITION&&2===h||p===Vc.LIST_TYPE&&1===h||p===Vc.NAMED_TYPE&&m&&(m.kind===Vc.VARIABLE_DEFINITION||m.kind===Vc.LIST_TYPE||m.kind===Vc.NON_NULL_TYPE)?function(e,t){const n=t.getTypeMap(),r=Fs(n).filter(Nt);return Rs(e,r.map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:Bc.Variable}))))}(f,e):p===Vc.DIRECTIVE?function(e,t,n){var r;if(null===(r=t.prevState)||void 0===r?void 0:r.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 Vc.QUERY:return i.includes(Q.QUERY);case Vc.MUTATION:return i.includes(Q.MUTATION);case Vc.SUBSCRIPTION:return i.includes(Q.SUBSCRIPTION);case Vc.FIELD:case Vc.ALIASED_FIELD:return i.includes(Q.FIELD);case Vc.FRAGMENT_DEFINITION:return i.includes(Q.FRAGMENT_DEFINITION);case Vc.FRAGMENT_SPREAD:return i.includes(Q.FRAGMENT_SPREAD);case Vc.INLINE_FRAGMENT:return i.includes(Q.INLINE_FRAGMENT);case Vc.SCHEMA_DEF:return i.includes(Q.SCHEMA);case Vc.SCALAR_DEF:return i.includes(Q.SCALAR);case Vc.OBJECT_TYPE_DEF:return i.includes(Q.OBJECT);case Vc.FIELD_DEF:return i.includes(Q.FIELD_DEFINITION);case Vc.INTERFACE_DEF:return i.includes(Q.INTERFACE);case Vc.UNION_DEF:return i.includes(Q.UNION);case Vc.ENUM_DEF:return i.includes(Q.ENUM);case Vc.ENUM_VALUE:return i.includes(Q.ENUM_VALUE);case Vc.INPUT_DEF:return i.includes(Q.INPUT_OBJECT);case Vc.INPUT_VALUE_DEF:switch(null==r?void 0:r.kind){case Vc.ARGUMENTS_DEF:return i.includes(Q.ARGUMENT_DEFINITION);case Vc.INPUT_DEF:return i.includes(Q.INPUT_FIELD_DEFINITION)}}return!1}(t.prevState,e)));return Rs(e,r.map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:Bc.Function}))))}return[]}(f,c,e):p===Vc.DIRECTIVE_DEF?function(e,t,n){const r=n.getDirectives().find((e=>e.name===t.name));return Rs(e,(null==r?void 0:r.args.map((e=>({label:e.name,documentation:e.description||"",kind:Bc.Field}))))||[])}(f,c,e):[]}const Hc=[{label:"type",kind:Bc.Function},{label:"interface",kind:Bc.Function},{label:"union",kind:Bc.Function},{label:"input",kind:Bc.Function},{label:"scalar",kind:Bc.Function},{label:"schema",kind:Bc.Function}],qc=[{label:"query",kind:Bc.Function},{label:"mutation",kind:Bc.Function},{label:"subscription",kind:Bc.Function},{label:"fragment",kind:Bc.Function},{label:"{",kind:Bc.Constructor}];const Wc=(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 zc(e,t,n){let r,i=null;const o=Object.create({});return Ic(e,((e,s)=>{var a;if((null==s?void 0:s.kind)===Vc.VARIABLE&&s.name&&(i=s.name),(null==s?void 0:s.kind)===Vc.NAMED_TYPE&&i){const e=Wc(s,Vc.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:Bc.Variable},i=null,r=null}})),Fs(o)}function Gc(e){return e.prevState&&e.kind&&[Vc.NAMED_TYPE,Vc.LIST_TYPE,Vc.TYPE,Vc.NON_NULL_TYPE].includes(e.kind)?Gc(e.prevState):e}var Kc,Yc={exports:{}};const Qc=s(function(){if(Kc)return Yc.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 Kc=1,Yc.exports=e,Yc.exports.default=e,Object.defineProperty(Yc.exports,"__esModule",{value:!0}),Yc.exports}());class Xc{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 Jc(e,t)}setEnd(e,t){this.end=new Jc(e,t)}}class Jc{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 Zc(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=gr(e,i);t?n[r.name.value]=t:i.kind===J.NAMED_TYPE&&"Float"===i.name.value&&(n[r.name.value]=mn)}}return n}(t,e):void 0,r=[];return it(e,{OperationDefinition(e){r.push(e)}}),{variableToType:n,operations:r}}const eu="Error",tu="Warning",nu={[eu]:1,[tu]:2},ru=(e,t)=>{if(!e)throw new Error(t)};function iu(e,t=null,n,r,i){var o,s;let a=null,l="";i&&(l="string"==typeof i?i:i.reduce(((e,t)=>e+at(t)+"\n\n"),""));const c=l?`${e}\n\n${l}`:e;try{a=Re(c)}catch(u){if(u instanceof B){const e=function(e,t){const n=Tc(),r=n.startState(),i=t.split("\n");ru(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 fc(i[c]);!o.eol();){if("invalidchar"===n.token(o,r))break}ru(o,"Expected Parser stream to be available.");const s=e.line-1,a=o.getStartOfToken(),l=o.getCurrentPosition();return new Xc(new Jc(s,a),new Jc(s,l))}(null!==(s=null===(o=u.locations)||void 0===o?void 0:o[0])&&void 0!==s?s:{line:0},c);return[{severity:nu.Error,message:u.message,source:"GraphQL: Syntax",range:e}]}throw u}return function(e,t=null,n){if(!t)return[];const r=function(e,t,n){const r=zi.filter((e=>e!==Br&&e!==kr));return n&&Array.prototype.push.apply(r,n),Xi(e,t,r).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=>ou(e,nu.Error,"Validation"))),i=Xi(t,e,[To]).flatMap((e=>ou(e,nu.Warning,"Deprecation")));return r.concat(i)}(a,t,n)}function ou(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){ru(e.locations,"GraphQL validation error requires locations.");const o=e.locations[i],a=su(s),l=o.column+(a.end-a.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new Xc(new Jc(o.line-1,o.column-1),new Jc(o.line-1,l))})}}return r}function su(e){const t=e.loc;return ru(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 au,lu,cu,uu,du,fu,pu,hu;function mu(){if(fu)return du;fu=1;var e=uu?cu:(uu=1,cu=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 du=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 gu=function(){if(hu)return pu;hu=1;const{deleteProperty:e}=Reflect,t=lu?au:(lu=1,au=function(e){return"object"==typeof e?null===e:"function"!=typeof e}),n=mu(),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},pu=l}();const vu=s(gu);
|
||
/*!
|
||
* isobject <https://github.com/jonschlinkert/isobject>
|
||
*
|
||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
* Released under the MIT License.
|
||
*/var yu,bu,Eu,xu;var wu=function(){if(xu)return Eu;xu=1;const e=bu?yu:(bu=1,yu=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 Eu=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 Tu=s(wu);function Cu(t){const n=e.createContext(null);return n.displayName=t,n}function Su(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 ku=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},_u=e=>e?ku(e):ku,Nu=e=>e;const Du=t=>n=>function(t,n=Nu){const r=e.useSyncExternalStore(t.subscribe,(()=>n(t.getState())),(()=>n(t.getInitialState())));return e.useDebugValue(r),r}(t,n),Au=_u((()=>({storage:null}))),Iu=t=>{const n=h.c(3),{storage:r,children:i}=t,o=Ou(Mu);let s,a;return n[0]!==r?(s=()=>{Au.setState({storage:new Is(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},Ou=Du(Au),Lu=()=>Ou(Fu);function Mu(e){return Boolean(e.storage)}function Fu(e){return e.storage}const Ru="undefined"!=typeof navigator&&navigator.userAgent.includes("Mac"),Pu="graphiql",ju="sublime",Vu={[Ru?"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 Bu(e,t){const n=await Promise.resolve().then((()=>AP)).then((e=>"function"==typeof e?e:e.default));return await Promise.all(!1===(null==t?void 0:t.useCommonAddons)?e:[Promise.resolve().then((()=>MP)),Promise.resolve().then((()=>VP)),Promise.resolve().then((()=>HP)),Promise.resolve().then((()=>GP)),Promise.resolve().then((()=>ej)),Promise.resolve().then((()=>ij)),Promise.resolve().then((()=>cj)),Promise.resolve().then((()=>gj)),Promise.resolve().then((()=>yj)),Promise.resolve().then((()=>wj)),...e]),n}var $u,Uu,Hu,qu;var Wu=function(){if(qu)return Hu;qu=1;var e=Uu?$u:(Uu=1,$u=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 Hu=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 zu=s(Wu),Gu=_u(((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})))}}))),Ku=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)}Gu.setState({plugins:c,onTogglePluginVisibility:r,referencePlugin:a}),Gu.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},Yu=Du(Gu),Qu=_u(((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=Co({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:Cs(h);e({fetchError:t})}if(l!==t().requestCounter||!p)return;const m=So(p);e({schema:m}),null==i||i(m)}catch(c){if(l!==t().requestCounter)return;e({fetchError:Ts(c),isFetching:!1})}}}))),Xu=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:Xu},n[0]=g):g=n[0];const{headerEditor:v}=Wh(g);let y,b,E,x,w;return n[1]!==v?(y=()=>{v&&Qu.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=Qn(a)||null==a?a:void 0,t=!e||d?[]:er(e);Qu.setState((n=>{const{requestCounter:o}=n;return{fetcher:r,onSchemaChange:i,schema:e,shouldIntrospect:!Qn(a)&&null!==a,inputValueDeprecation:f,introspectionQueryName:p,schemaDescription:m,validationErrors:t,requestCounter:o+1}})),Qu.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(Zu,w),s},Ju=Du(Qu);function Zu(){const e=function(e){e.ctrlKey&&"R"===e.key&&Qu.getState().introspect()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}const ed={};function td(e,t){"string"!=typeof t&&(t=td.defaultChars);const n=function(e){let t=ed[e];if(t)return t;t=ed[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?"<22><>":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?"<22><><EFBFBD>":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+="<22><><EFBFBD><EFBFBD>":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="<22>"}}return t}))}td.defaultChars=";/?:@&=+$,#",td.componentChars="";const nd={};function rd(e,t,n){"string"!=typeof t&&(n=t,t=rd.defaultChars),void 0===n&&(n=!0);const r=function(e){let t=nd[e];if(t)return t;t=nd[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 id(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 od(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}rd.defaultChars=";/?:@&=+$,-_.!~*'()#",rd.componentChars="-_.!~*'()";const sd=/^([a-z0-9.+-]+:)/i,ad=/:[0-9]*$/,ld=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,cd=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),ud=["'"].concat(cd),dd=["%","/","?",";","#"].concat(ud),fd=["/","?","#"],pd=/^[+a-z0-9A-Z_-]{0,63}$/,hd=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,md={javascript:!0,"javascript:":!0},gd={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function vd(e,t){if(e&&e instanceof od)return e;const n=new od;return n.parse(e,t),n}od.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&1===e.split("#").length){const e=ld.exec(o);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let s=sd.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&&md[s]||(o=o.substr(2),this.slashes=!0)),!md[s]&&(i||s&&!gd[s])){let e,t,n=-1;for(let a=0;a<fd.length;a++)r=o.indexOf(fd[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<dd.length;a++)r=o.indexOf(dd[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(pd)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(pd)){const r=e.slice(0,t),i=e.slice(t+1),s=n.match(hd);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),gd[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},od.prototype.parseHost=function(e){let t=ad.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 yd=Object.freeze(Object.defineProperty({__proto__:null,decode:td,encode:rd,format:id,parse:vd},Symbol.toStringTag,{value:"Module"})),bd=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ed=/[\0-\x1F\x7F-\x9F]/,xd=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,wd=/[\$\+<->\^`\|~\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]/,Td=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Cd=Object.freeze(Object.defineProperty({__proto__:null,Any:bd,Cc:Ed,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:xd,S:wd,Z:Td},Symbol.toStringTag,{value:"Module"})),Sd=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ȀDMPTLJNjǑǖ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;扐blè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;戥ǹ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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ቻDzኀ\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ǣጓ\0y;䐎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;䅻Dzᕔ\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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ƀ;oș᳔ndĀ;ș᳑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;ẝẤijạả;怄;怅怃Ā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;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱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ↄⅪ←ٖ↛ǰ↉\0proø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⧓ସdz⧟\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᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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㚆㚝㚵㚼Dz㚋\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)))),kd=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));var _d;const Nd=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]]),Dd=null!==(_d=String.fromCodePoint)&&void 0!==_d?_d: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 Ad,Id;(Id=Ad||(Ad={}))[Id.NUM=35]="NUM",Id[Id.SEMI=59]="SEMI",Id[Id.EQUALS=61]="EQUALS",Id[Id.ZERO=48]="ZERO",Id[Id.NINE=57]="NINE",Id[Id.LOWER_A=97]="LOWER_A",Id[Id.LOWER_F=102]="LOWER_F",Id[Id.LOWER_X=120]="LOWER_X",Id[Id.LOWER_Z=122]="LOWER_Z",Id[Id.UPPER_A=65]="UPPER_A",Id[Id.UPPER_F=70]="UPPER_F",Id[Id.UPPER_Z=90]="UPPER_Z";var Od,Ld,Md,Fd,Rd,Pd;function jd(e){return e>=Ad.ZERO&&e<=Ad.NINE}function Vd(e){return e===Ad.EQUALS||function(e){return e>=Ad.UPPER_A&&e<=Ad.UPPER_Z||e>=Ad.LOWER_A&&e<=Ad.LOWER_Z||jd(e)}(e)}(Ld=Od||(Od={}))[Ld.VALUE_LENGTH=49152]="VALUE_LENGTH",Ld[Ld.BRANCH_LENGTH=16256]="BRANCH_LENGTH",Ld[Ld.JUMP_TABLE=127]="JUMP_TABLE",(Fd=Md||(Md={}))[Fd.EntityStart=0]="EntityStart",Fd[Fd.NumericStart=1]="NumericStart",Fd[Fd.NumericDecimal=2]="NumericDecimal",Fd[Fd.NumericHex=3]="NumericHex",Fd[Fd.NamedEntity=4]="NamedEntity",(Pd=Rd||(Rd={}))[Pd.Legacy=0]="Legacy",Pd[Pd.Strict=1]="Strict",Pd[Pd.Attribute=2]="Attribute";class Bd{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Md.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Rd.Strict}startEntity(e){this.decodeMode=e,this.state=Md.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Md.EntityStart:return e.charCodeAt(t)===Ad.NUM?(this.state=Md.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Md.NamedEntity,this.stateNamedEntity(e,t));case Md.NumericStart:return this.stateNumericStart(e,t);case Md.NumericDecimal:return this.stateNumericDecimal(e,t);case Md.NumericHex:return this.stateNumericHex(e,t);case Md.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Ad.LOWER_X?(this.state=Md.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Md.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(!(jd(i)||(r=i,r>=Ad.UPPER_A&&r<=Ad.UPPER_F||r>=Ad.LOWER_A&&r<=Ad.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(!jd(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===Ad.SEMI)this.consumed+=1;else if(this.decodeMode===Rd.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Nd.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Ad.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&Od.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=Ud(n,r,this.treeIndex+Math.max(1,i),o),this.treeIndex<0)return 0===this.result||this.decodeMode===Rd.Attribute&&(0===i||Vd(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Od.VALUE_LENGTH)>>14,0!==i){if(o===Ad.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Rd.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]&Od.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]&~Od.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Md.NamedEntity:return 0===this.result||this.decodeMode===Rd.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case Md.NumericDecimal:return this.emitNumericEntity(0,2);case Md.NumericHex:return this.emitNumericEntity(0,3);case Md.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Md.EntityStart:return 0}}}function $d(e){let t="";const n=new Bd(e,(e=>t+=Dd(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 Ud(e,t,n,r){const i=(t&Od.BRANCH_LENGTH)>>7,o=t&Od.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 Hd=$d(Sd);function qd(e,t=Rd.Legacy){return Hd(e,t)}function Wd(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}$d(kd);const zd=Object.prototype.hasOwnProperty;function Gd(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 Kd(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Yd(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(!!(65535&~e&&65534!=(65535&e))&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function Qd(e){if(e>65535){const t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Xd=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Jd=new RegExp(Xd.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),Zd=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function ef(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Jd,(function(e,t,n){return t||function(e,t){if(35===t.charCodeAt(0)&&Zd.test(t)){const n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Yd(n)?Qd(n):e}const n=qd(e);return n!==e?n:e}(e,n)}))}const tf=/[&<>"]/,nf=/[&<>"]/g,rf={"&":"&","<":"<",">":">",'"':"""};function of(e){return rf[e]}function sf(e){return tf.test(e)?e.replace(nf,of):e}const af=/[.?*+^$[\]\\(){}|-]/g;function lf(e){switch(e){case 9:case 32:return!0}return!1}function cf(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 uf(e){return xd.test(e)||wd.test(e)}function df(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 ff(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const pf={mdurl:yd,ucmicro:Cd},hf=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Kd,assign:Gd,escapeHtml:sf,escapeRE:function(e){return e.replace(af,"\\$&")},fromCodePoint:Qd,has:function(e,t){return zd.call(e,t)},isMdAsciiPunct:df,isPunctChar:uf,isSpace:lf,isString:Wd,isValidEntityCode:Yd,isWhiteSpace:cf,lib:pf,normalizeReference:ff,unescapeAll:ef,unescapeMd:function(e){return e.indexOf("\\")<0?e:e.replace(Xd,"$1")}},Symbol.toStringTag,{value:"Module"}));const mf=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=ef(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=ef(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+=ef(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+=ef(e.slice(t,o)),s}},Symbol.toStringTag,{value:"Module"})),gf={};function vf(){this.rules=Gd({},gf)}function yf(){this.__rules__=[],this.__cache__=null}function bf(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 Ef(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}gf.code_inline=function(e,t,n,r,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+sf(o.content)+"</code>"},gf.code_block=function(e,t,n,r,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+sf(e[t].content)+"</code></pre>\n"},gf.fence=function(e,t,n,r,i){const o=e[t],s=o.info?ef(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)||sf(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`},gf.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)},gf.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},gf.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},gf.text=function(e,t){return sf(e[t].content)},gf.html_block=function(e,t){return e[t].content},gf.html_inline=function(e,t){return e[t].content},vf.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+sf(e.attrs[t][0])+'="'+sf(e.attrs[t][1])+'"';return r},vf.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},vf.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},vf.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},vf.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},yf.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},yf.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))}))}))},yf.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},yf.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},yf.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},yf.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},yf.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},yf.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},yf.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},yf.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},bf.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},bf.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},bf.prototype.attrSet=function(e,t){const n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},bf.prototype.attrGet=function(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n},bf.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},Ef.prototype.Token=bf;const xf=/\r\n?|\n/g,wf=/\0/g;function Tf(e){return/^<\/a\s*>/i.test(e)}const Cf=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Sf=/\((c|tm|r)\)/i,kf=/\((c|tm|r)\)/gi,_f={c:"©",r:"®",tm:"™"};function Nf(e,t){return _f[t.toLowerCase()]}function Df(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(kf,Nf)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}function Af(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||Cf.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 If=/['"]/,Of=/['"]/g;function Lf(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Mf(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;){Of.lastIndex=l;const u=Of.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=df(h)||uf(String.fromCharCode(h)),v=df(m)||uf(String.fromCharCode(m)),y=cf(h),b=cf(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=Lf(o.content,u.index,f),e[d.token].content=Lf(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=Lf(o.content,u.index,"’"))}else p&&(o.content=Lf(o.content,u.index,"’"))}}}const Ff=[["normalize",function(e){let t;t=e.src.replace(xf,"\n"),t=t.replace(wf,"<22>"),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--,Tf(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=Kd(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&&(Sf.test(e.tokens[t].content)&&Df(e.tokens[t].children),Cf.test(e.tokens[t].content)&&Af(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&&If.test(e.tokens[t].content)&&Mf(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 Rf(){this.ruler=new yf;for(let e=0;e<Ff.length;e++)this.ruler.push(Ff[e][0],Ff[e][1])}function Pf(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(lf(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}Rf.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},Rf.prototype.State=Ef,Pf.prototype.push=function(e,t,n){const r=new bf(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},Pf.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},Pf.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},Pf.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){if(!lf(this.src.charCodeAt(e)))break}return e},Pf.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!lf(this.src.charCodeAt(--e)))return e+1;return e},Pf.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},Pf.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},Pf.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(lf(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("")},Pf.prototype.Token=bf;function jf(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Vf(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 Bf(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(!lf(e.src.charCodeAt(r)))return-1}return r}function $f(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),!lf(o))?-1:i}const Uf="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Hf="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",qf=new RegExp("^(?:"+Uf+"|"+Hf+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),Wf=new RegExp("^(?:"+Uf+"|"+Hf+")"),zf=[[/^<(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(Wf.source+"\\s*$"),/^$/,!1]];const Gf=[["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&&!lf(a))return!1;if(45===s&&lf(a))return!1;for(;o<e.eMarks[i];){const t=e.src.charCodeAt(o);if(124!==t&&45!==t&&58!==t&&!lf(t))return!1;o++}let l=jf(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=jf(e,t).trim(),-1===l.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;c=Vf(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=jf(e,i).trim(),!l)break;if(e.sCount[i]-e.blkIndent>=4)break;if(c=Vf(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(!lf(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&&!lf(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=$f(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=Bf(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=$f(e,l),f<0)break;s=e.bMarks[l]+e.tShift[l]}else if(f=Bf(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(!lf(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(!lf(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(!lf(l.charCodeAt(i)))break;i++}if(i<o&&10!==l.charCodeAt(i)&&m)for(m="",i=f,s=p;i<o;){if(!lf(l.charCodeAt(i)))break;i++}if(i<o&&10!==l.charCodeAt(i))return!1;const v=ff(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<zf.length&&!zf[a][0].test(s);a++);if(a===zf.length)return!1;if(r)return zf[a][2];let l=t+1;if(!zf[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),zf[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&&!lf(s))return!1;if(r)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&lf(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 Kf(){this.ruler=new yf;for(let e=0;e<Gf.length;e++)this.ruler.push(Gf[e][0],Gf[e][1],{alt:(Gf[e][2]||[]).slice()})}function Yf(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 Qf(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}}Kf.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)}},Kf.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)},Kf.prototype.State=Pf,Yf.prototype.pushPending=function(){const e=new bf("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Yf.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new bf(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},Yf.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=df(i)||uf(String.fromCharCode(i)),c=df(a)||uf(String.fromCharCode(a)),u=cf(i),d=cf(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}},Yf.prototype.Token=bf;const Xf=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;const Jf=[];for(let GV=0;GV<256;GV++)Jf.push(0);function Zf(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){Jf[e.charCodeAt(0)]=1}));const ep={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;Zf(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Zf(e,t[r].delimiters)}};function tp(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 np={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;tp(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&tp(e,t[r].delimiters)}};const rp=/^([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])?)*)$/,ip=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const op=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,sp=/^&([a-z][a-z0-9]{1,31});/i;function ap(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 lp=[["text",function(e,t){let n=e.pos;for(;n<e.posMax&&!Qf(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(Xf);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&&lf(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),lf(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!==Jf[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",ep.tokenize],["emphasis",np.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),lf(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),lf(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),lf(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[ff(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),lf(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),lf(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),lf(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[ff(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(ip.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(rp.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(qf);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(op);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=Yd(t)?Qd(t):Qd(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(sp);if(r){const n=qd(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}]],cp=[["balance_pairs",function(e){const t=e.tokens_meta,n=e.tokens_meta.length;ap(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ap(t[r].delimiters)}],["strikethrough",ep.postProcess],["emphasis",np.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 up(){this.ruler=new yf;for(let e=0;e<lp.length;e++)this.ruler.push(lp[e][0],lp[e][1]);this.ruler2=new yf;for(let e=0;e<cp.length;e++)this.ruler2.push(cp[e][0],cp[e][1])}function dp(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function fp(e){return Object.prototype.toString.call(e)}function pp(e){return"[object Function]"===fp(e)}function hp(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}up.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},up.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()},up.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)},up.prototype.State=Yf;const mp={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const gp={"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}}},vp="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function yp(e){const t=e.re=function(e){const t={};e=e||{},t.src_Any=bd.source,t.src_Cc=Ed.source,t.src_Z=Td.source,t.src_P=xd.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("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]"),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]"===fp(n))return!function(e){return"[object RegExp]"===fp(e)}(n.validate)?pp(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(pp(n.normalize)?r.normalize=n.normalize:n.normalize?o(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===fp(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(hp).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 bp(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 Ep(e,t){const n=new bp(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function xp(e,t){if(!(this instanceof xp))return new xp(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||mp.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=dp({},mp,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=dp({},gp,e),this.__compiled__={},this.__tlds__=vp,this.__tlds_replaced__=!1,this.re={},yp(this)}xp.prototype.add=function(e,t){return this.__schemas__[e]=t,yp(this),this},xp.prototype.set=function(e){return this.__opts__=dp(this.__opts__,e),this},xp.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},xp.prototype.pretest=function(e){return this.re.pretest.test(e)},xp.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},xp.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(Ep(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(Ep(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},xp.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,Ep(this,0)):null},xp.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(),yp(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,yp(this),this)},xp.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},xp.prototype.onCompile=function(){};const wp=2147483647,Tp=36,Cp=/^xn--/,Sp=/[^\0-\x7F]/,kp=/[\x2E\u3002\uFF0E\uFF61]/g,_p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Np=Math.floor,Dp=String.fromCharCode;function Ap(e){throw new RangeError(_p[e])}function Ip(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(kp,".")).split("."),t).join(".");return r+i}function Op(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 Lp=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},Mp=function(e,t,n){let r=0;for(e=n?Np(e/700):e>>1,e+=Np(e/t);e>455;r+=Tp)e=Np(e/35);return Np(r+36*e/(e+38))},Fp=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&&Ap("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=Tp;;i+=Tp){l>=n&&Ap("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:Tp;s>=Tp&&Ap("invalid-input"),s>Np((wp-r)/t)&&Ap("overflow"),r+=s*t;const c=i<=o?1:i>=o+26?26:i-o;if(s<c)break;const u=Tp-c;t>Np(wp/u)&&Ap("overflow"),t*=u}const c=t.length+1;o=Mp(r-s,c,0==s),Np(r/c)>wp-i&&Ap("overflow"),i+=Np(r/c),r%=c,t.splice(r++,0,i)}var a;return String.fromCodePoint(...t)},Rp=function(e){const t=[],n=(e=Op(e)).length;let r=128,i=0,o=72;for(const l of e)l<128&&t.push(Dp(l));const s=t.length;let a=s;for(s&&t.push("-");a<n;){let n=wp;for(const t of e)t>=r&&t<n&&(n=t);const l=a+1;n-r>Np((wp-i)/l)&&Ap("overflow"),i+=(n-r)*l,r=n;for(const c of e)if(c<r&&++i>wp&&Ap("overflow"),c===r){let e=i;for(let n=Tp;;n+=Tp){const r=n<=o?1:n>=o+26?26:n-o;if(e<r)break;const i=e-r,s=Tp-r;t.push(Dp(Lp(r+i%s,0))),e=Np(i/s)}t.push(Dp(Lp(e,0))),o=Mp(i,l,a===s),i=0,++a}++i,++r}return t.join("")},Pp=function(e){return Ip(e,(function(e){return Sp.test(e)?"xn--"+Rp(e):e}))},jp=function(e){return Ip(e,(function(e){return Cp.test(e)?Fp(e.slice(4).toLowerCase()):e}))},Vp={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"]}}}},Bp=/^(vbscript|javascript|file|data):/,$p=/^data:image\/(gif|png|jpeg|webp);/;function Up(e){const t=e.trim().toLowerCase();return!Bp.test(t)||$p.test(t)}const Hp=["http:","https:","mailto:"];function qp(e){const t=vd(e,!0);if(t.hostname&&(!t.protocol||Hp.indexOf(t.protocol)>=0))try{t.hostname=Pp(t.hostname)}catch(n){}return rd(id(t))}function Wp(e){const t=vd(e,!0);if(t.hostname&&(!t.protocol||Hp.indexOf(t.protocol)>=0))try{t.hostname=jp(t.hostname)}catch(n){}return td(id(t),td.defaultChars+"%")}function zp(e,t){if(!(this instanceof zp))return new zp(e,t);t||Wd(e)||(t=e||{},e="default"),this.inline=new up,this.block=new Kf,this.core=new Rf,this.renderer=new vf,this.linkify=new xp,this.validateLink=Up,this.normalizeLink=qp,this.normalizeLinkText=Wp,this.utils=hf,this.helpers=Gd({},mf),this.options={},this.configure(e),t&&this.set(t)}zp.prototype.set=function(e){return Gd(this.options,e),this},zp.prototype.configure=function(e){const t=this;if(Wd(e)){const t=e;if(!(e=Vp[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},zp.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},zp.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},zp.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},zp.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},zp.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},zp.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},zp.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const Gp=new zp({breaks:!1,linkify:!0});function Kp(e,t){let n;return function(...r){n&&clearTimeout(n),n=setTimeout((()=>{n=null,t(...r)}),e)}}function Yp(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 Qp(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 Xp(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}=Wh(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}=Au.getState(),o=Kp(500,(t=>{null!==r&&e.set(r,t)})),s=Kp(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 Jp(t,n){const r=h.c(7),{schema:i,setSchemaReference:o}=Ju(),s=Yu();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))}Bu([],{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=>{_t(e)?(l.textContent="!"+l.textContent,t(e.ofType)):kt(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=Gp.render(e.description)):(c.style.display="none",c.innerHTML="")),u&&d&&(e.deprecationReason?(u.style.display="block",d.innerHTML=Gp.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 Zp(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 eh=ih,th=oh,nh=ah,rh=lh;function ih(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||eh;let s;t[2]!==o?(s={nonNull:!0,caller:o},t[2]=o,t[3]=s):s=t[3];const{queryEditor:a}=Wh(s);let l;return t[4]!==i||t[5]!==a?(l=()=>{if(!a)return;const e=a.getValue();zu(e),null==i||i(e)},t[4]=i,t[5]=a,t[6]=l):l=t[6],l}function oh(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||th;let o;t[2]!==i?(o={nonNull:!0,caller:i},t[2]=i,t[3]=o):o=t[3];const{queryEditor:s}=Wh(o),{schema:a}=Ju();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(at(As(e,a)))},t[4]=s,t[5]=a,t[6]=l):l=t[6],l}function sh(e){return at(Re(e))}function ah(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?sh:i,s=r||nh;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}=Wh(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 lh(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}=Ju(),s=i||rh;let a;t[2]!==s?(a={nonNull:!0,caller:s},t[2]=s,t[3]=a):a=t[3];const{queryEditor:l}=Wh(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}=Ss(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 ch=t=>{const n=Wh({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 uh=dh;function dh(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?Pu:o,u=void 0===s?ju:s,d=void 0!==l&&l,f=n||uh;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}=Wh(p),b=Yh(),E=n||uh;let x;r[4]!==E?(x={caller:E},r[4]=E,r[5]=x):x=r[5];const w=oh(x),T=n||uh;let C;r[6]!==T?(C={caller:T},r[6]=T,r[7]=C):C=r[7];const S=ah(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,Bu([Promise.resolve().then((()=>_j))]).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:Vu});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",fh),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),Qp(g,"keyMap",u),Xp(g,a,y?ph:null,"headers",uh),r[14]===Symbol.for("react.memo_cache_sentinel")?(D=["Cmd-Enter","Ctrl-Enter"],r[14]=D):D=r[14],Zp(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],Zp(g,A,S),r[16]===Symbol.for("react.memo_cache_sentinel")?(I=["Shift-Ctrl-M"],r[16]=I):I=r[16],Zp(g,I,w),k}function fh(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 ph="headers",hh=Array.from({length:11},((e,t)=>String.fromCharCode(8192+t))).concat(["\u2028","\u2029"," "," "]),mh=new RegExp("["+hh.join("")+"]","g");function gh(e){return e.replace(mh," ")}const vh=yh;function yh(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?Pu:o,p=void 0===s?ju:s,m=void 0!==d&&d,{schema:g,setSchemaReference:v}=Ju(),y=n||vh;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:_}=Wh(b),N=Yh(),D=Lu(),A=Yu(),I=n||vh;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=ih(O),M=n||vh;let F;r[7]!==M?(F={caller:M},r[7]=M,r[8]=F):F=r[8];const R=oh(F),P=n||vh;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=ah(j),B=e.useRef(null),$=e.useRef(void 0),U=e.useRef(wh);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,Bu([Promise.resolve().then((()=>Ij)),Promise.resolve().then((()=>Fj)),Promise.resolve().then((()=>Rj)),Promise.resolve().then((()=>Vj)),Promise.resolve().then((()=>tV)),Promise.resolve().then((()=>lV)),Promise.resolve().then((()=>uV))]).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:Oc.EXECUTABLE}},info:{schema:void 0,renderDescription:xh,onClick(e){U.current(e)}},jump:{schema:void 0,onClick(e){U.current(e)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...Vu,"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",Eh),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",bh),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),Qp(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=Re(n);return Object.assign(Object.assign({},Zc(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=Kp(100,(t=>{const n=t.getValue();D.set(Ch,n);const r=t.operationName,i=e(t);void 0!==(null==i?void 0:i.operationName)&&D.set(Sh,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,$),Jp(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],Zp(w,J,X),r[37]===Symbol.for("react.memo_cache_sentinel")?(Z=["Shift-Ctrl-C"],r[37]=Z):Z=r[37],Zp(w,Z,L),r[38]===Symbol.for("react.memo_cache_sentinel")?(ee=["Shift-Ctrl-P","Shift-Ctrl-F"],r[38]=ee):ee=r[38],Zp(w,ee,V),r[39]===Symbol.for("react.memo_cache_sentinel")?(te=["Shift-Ctrl-M"],r[39]=te):te=r[39],Zp(w,te,R),B}function bh(e,t){var n;if("paste"===t.origin){const e=t.text.map(gh);null==(n=t.update)||n.call(t,t.from,t.to,e)}}function Eh(e,t){Th.test(t.key)&&e.execCommand("autocomplete")}function xh(e){return Gp.render(e)}function wh(){}const Th=/^[a-zA-Z0-9_@(]$/,Ch="query",Sh="operationName";function kh({defaultQuery:e,defaultHeaders:t,headers:n,defaultTabs:r,query:i,variables:o,shouldPersistHeaders:s}){const{storage:a}=Au.getState(),l=a.get(Ph);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(_h)){const r=Mh({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=Mh({query:n.query,variables:n.variables,headers:n.headers}),n.hash===r&&(s=t)}if(s>=0)e.activeTabIndex=s;else{const t=i?Fh(i):null;e.tabs.push({id:Lh(),hash:r,title:t||Rh,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(Ih)}}var c}function _h(e){return e&&"object"==typeof e&&!Array.isArray(e)&&Nh(e,"id")&&Nh(e,"title")&&Dh(e,"query")&&Dh(e,"variables")&&Dh(e,"headers")&&Dh(e,"operationName")&&Dh(e,"response")}function Nh(e,t){return t in e&&"string"==typeof e[t]}function Dh(e,t){return t in e&&("string"==typeof e[t]||null===e[t])}function Ah(e,t=!1){return JSON.stringify(e,((e,n)=>"hash"===e||"response"===e||!t&&"headers"===e?null:n))}function Ih({query:e=null,variables:t=null,headers:n=null}={}){const r=e?Fh(e):null;return{id:Lh(),hash:Mh({query:e,variables:t,headers:n}),title:r||Rh,query:e,variables:t,headers:n,operationName:r,response:null}}function Oh(e,t){return{...e,tabs:e.tabs.map(((n,r)=>{if(r!==e.activeTabIndex)return n;const i={...n,...t};return{...i,hash:Mh(i),title:i.operationName||(i.query?Fh(i.query):void 0)||Rh}}))}}function Lh(){const e=()=>Math.floor(65536*(1+Math.random())).toString(16).slice(1);return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}function Mh(e){return[e.query??"",e.variables??"",e.headers??""].join("|")}function Fh(e){const t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);return(null==t?void 0:t[2])??null}const Rh="<untitled>",Ph="tabState";const jh=Vh;function Vh(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?Pu:o,d=void 0===s?ju:s,f=void 0!==c&&c,p=n||jh;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}=Wh(m),b=Yh(),E=n||jh;let x;r[4]!==E?(x={caller:E},r[4]=E,r[5]=x):x=r[5];const w=oh(x),T=n||jh;let C;r[6]!==T?(C={caller:T},r[6]=T,r[7]=C):C=r[7];const S=ah(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,Bu([Promise.resolve().then((()=>mV)),Promise.resolve().then((()=>jV)),Promise.resolve().then((()=>UV))]).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:Vu});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",Bh),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),Qp(v,"keyMap",d),Xp(v,l,$h,"variables",jh),Jp(v,a),r[14]===Symbol.for("react.memo_cache_sentinel")?(D=["Cmd-Enter","Ctrl-Enter"],r[14]=D):D=r[14],Zp(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],Zp(v,A,S),r[16]===Symbol.for("react.memo_cache_sentinel")?(I=["Shift-Ctrl-M"],r[16]=I):I=r[16],Zp(v,I,w),k}function Bh(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 $h="variables",Uh='# 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',Hh=Cu("EditorContext"),qh=t=>{const n=h.c(88),r=Lu(),[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(zh);return!1!==t.shouldPersistHeaders&&e?"true"===r.get(zh):Boolean(t.shouldPersistHeaders)},n[0]=t.shouldPersistHeaders,n[1]=r,n[2]=f):f=n[2];const[m,g]=e.useState(f);let v;Yp(i,t.headers),Yp(s,t.query),Yp(l,t.response),Yp(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}=Au.getState();Kp(500,(e=>{n.set(Ph,e)}))(Ah(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(Ch)??null,n=t.variables??r.get($h)??null,i=t.headers??r.get(ph)??null,o=t.response??"",s=kh({query:e,variables:n,headers:i,defaultTabs:t.defaultTabs,defaultQuery:t.defaultQuery||Uh,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(ph,(null==i?void 0:i.getValue())??"");const e=Ah(x,!0);r.set(Ph,e)}else r.set(ph,""),function(){const{storage:e}=Au.getState(),t=e.get(Ph);if(t){const n=JSON.parse(t);e.set(Ph,JSON.stringify(n,((e,t)=>"headers"===e?null:t)))}}();g(e),r.set(zh,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 Oh(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 F=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 R;n[35]!==I||n[36]!==O||n[37]!==A||n[38]!==F||n[39]!==y||n[40]!==D?(R=()=>{w((e=>{const t=D(e),n={tabs:[...t.tabs,Ih({headers:I,query:O??Uh})],activeTabIndex:t.tabs.length};return y(n),F(n.tabs[n.activeTabIndex]),null==A||A(n),n}))},n[35]=I,n[36]=O,n[37]=A,n[38]=F,n[39]=y,n[40]=D,n[41]=R):R=n[41];const P=R;let j;n[42]!==A||n[43]!==F||n[44]!==y?(j=e=>{w((t=>{const n={...t,activeTabIndex:e};return y(n),F(n.tabs[n.activeTabIndex]),null==A||A(n),n}))},n[42]=A,n[43]=F,n[44]=y,n[45]=j):j=n[45];const V=j;let B;n[46]!==A||n[47]!==F||n[48]!==y?(B=e=>{w((t=>{const n=t.tabs[t.activeTabIndex],r={tabs:e,activeTabIndex:e.indexOf(n)};return y(r),F(r.tabs[r.activeTabIndex]),null==A||A(r),r}))},n[46]=A,n[47]=F,n[48]=y,n[49]=B):B=n[49];const $=B;let U;n[50]!==A||n[51]!==F||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),F(n.tabs[n.activeTabIndex]),null==A||A(n),n}))},n[50]=A,n[51]=F,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=Oh(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)it(Re(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(Hh.Provider,{value:te,children:L}),n[85]=L,n[86]=te,n[87]=ne):ne=n[87],ne};const Wh=Su(Hh),zh="shouldPersistHeaders",Gh=Cu("ExecutionContext"),Kh=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:Kh},n[0]=a):a=n[0];const{externalFragments:l,headerEditor:c,queryEditor:u,responseEditor:d,variableEditor:f,updateActiveTabValues:m}=Wh(a);let g;n[1]!==i?(g={getDefaultFieldNames:i,caller:Kh},n[1]=i,n[2]=g):g=n[2];const v=lh(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=Qh({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=Qh({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;it(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(Qc(t.get(s)));const o=[];for(const s of i)it(s,{FragmentSpread(e){!r.has(e.name.value)&&t.get(e.name.value)&&(i.add(Qc(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(Zh).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)Jh(i,e);b(!1),e(Cs(i))}else{const t=Cs(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(Ts(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(Ts(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(Gh.Provider,{value:O,children:o}),n[23]=o,n[24]=O,n[25]=L):L=n[25],L};const Yh=Su(Gh);function Qh({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 Xh=new WeakMap;function Jh(e,t){var n,r,i;let o=["data",...t.path??[]];for(const l of[e,t])if(l.pending){let t=Xh.get(e);void 0===t&&(t=new Map,Xh.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=Xh.get(e))?void 0:n.get(r),void 0===o)throw new Error("Invalid incremental delivery format.");Tu(e,o.join(".")).push(...s)}else{o=["data",...t.path??[]];for(const t of s)vu(e,o.join("."),t),o[o.length-1]++}}const{data:a}=t;if(a){const{id:n}=t;if(n){if(o=null==(r=Xh.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])}vu(e,o.join("."),a,{merge:!0})}if(t.errors&&(e.errors||(e.errors=[]),e.errors.push(...t.errors)),t.extensions&&vu(e,"extensions",t.extensions,{merge:!0}),t.incremental)for(const l of t.incremental)Jh(e,l);if(t.completed)for(const{id:l,errors:c}of t.completed)null==(i=Xh.get(e))||i.delete(l),c&&(e.errors||(e.errors=[]),e.errors.push(...c))}function Zh(e){return at(e)}const em=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 F;t[21]!==l||t[22]!==c||t[23]!==b?(F={getDefaultFieldNames:c,fetcher:l,operationName:b},t[21]=l,t[22]=c,t[23]=b,t[24]=F):F=t[24];const R=F;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(Ku,{...j,children:n}),t[30]=n,t[31]=j,t[32]=V):V=t[32],t[33]!==R||t[34]!==V?(B=p.jsx(Kh,{...R,children:V}),t[33]=R,t[34]=V,t[35]=B):B=t[35],t[36]!==M||t[37]!==B?($=p.jsx(Xu,{...M,children:B}),t[36]=M,t[37]=B,t[38]=$):$=t[38],t[39]!==O||t[40]!==$?(U=p.jsx(qh,{...O,children:$}),t[39]=O,t[40]=$,t[41]=U):U=t[41],t[42]!==_||t[43]!==U?(H=p.jsx(Iu,{storage:_,children:U}),t[42]=_,t[43]=U,t[44]=H):H=t[44],H};function tm(t){const n=h.c(11),r=void 0===t?null:t,i=Lu();let o;n[0]!==r||n[1]!==i?(o=()=>{const e=i.get(nm);switch(e){case"light":return"light";case"dark":return"dark";default:return"string"==typeof e&&i.set(nm,""),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(nm,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 nm="theme",rm=Mm((({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"})))),im=Mm((({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})))),om=Mm((({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})))),sm=Mm((({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})))),am=Mm((({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"})))),lm=Mm((({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})))),cm=Mm((({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})))),um=Mm((({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"})))),dm=Mm((({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})))),fm=Mm((({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"})))),pm=Mm((({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"})))),hm=Mm((({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})))),mm=Mm((({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"})))),gm=Mm((({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"})))),vm=Mm((({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})))),ym=Mm((({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"})))),bm=Mm((({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"})))),Em=Mm((({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})))),xm=Mm((({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})))),wm=Mm((({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"})))),Tm=Mm((({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"})))),Cm=Mm((({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"})))),Sm=Mm((({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"})))),km=Mm((({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})))),_m=Mm((({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})))),Nm=Mm((({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"})))),Dm=Mm((({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"})))),Am=Mm((({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})))),Im=Mm((({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"})))),Om=Mm((({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"})))),Lm=Mm((({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 Mm(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 Fm(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=Fm(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Rm(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Fm(e))&&(r&&(r+=" "),r+=t);return r}const Pm=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:Pm},n[3]=o):o=n[3];const{headerEditor:s}=Wh(o),a=dh(r,Pm);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=Rm("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},jm=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=Vm(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=Vm(e);return!!t&&function(e){return/\.(bmp|gif|jpe?g|png|svg|webp)$/.test(e.pathname)}(t)}});function Vm(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 Bm=e=>{const t=h.c(2),n=yh(e,Bm);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 $m,Um={};var Hm=function(){if($m)return Um;$m=1;var e=t;return Um.createRoot=e.createRoot,Um.hydrateRoot=e.hydrateRoot,Um}();const qm=Wm;function Wm(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?Pu:s,c=void 0===a?ju:a,{fetchError:u,validationErrors:d}=Ju(),f=n||qm;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}=Wh(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,Bu([Promise.resolve().then((()=>ej)),Promise.resolve().then((()=>GP)),Promise.resolve().then((()=>yj)),Promise.resolve().then((()=>Fj)),Promise.resolve().then((()=>cj)),Promise.resolve().then((()=>gj)),Promise.resolve().then((()=>wj)),Promise.resolve().then((()=>WV)),Promise.resolve().then((()=>Qj))],{useCommonAddons:!1}).then((t=>{if(!e)return;const n=document.createElement("div"),r=Hm.createRoot(n);t.registerHelper("info","graphql-results",((e,t,i,o)=>{const s=E.current,a=[s&&p.jsx(s,{pos:o,token:e}),jm.shouldRender(e)&&p.jsx(jm,{token:e},"image-preview")].filter(zm);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:Vu});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),Qp(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(Ts(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 zm(e){return Boolean(e)}const Gm=e=>{const t=h.c(2),n=Wm(e,Gm);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},Km=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:Km},n[3]=o):o=n[3];const{variableEditor:s}=Wh(o),a=Vh(r,Km);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=Rm("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 Ym(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=Lu();let m;n[0]!==p||n[1]!==c?(m=Kp(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===Qm||"first"===o?"first":e===Xm||"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===Qm||e===Xm?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!==Qm&&e!==Xm&&(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(Qm);else if(p<f)x("second"),g(Xm);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 Qm="hide-first",Xm="hide-second",Jm=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=Rm("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}));Jm.displayName="UnStyledButton";const Zm=e.forwardRef(((e,t)=>{const n=h.c(7);let r,i;return n[0]!==e.className||n[1]!==e.state?(r=Rm("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}));Zm.displayName="Button";const eg=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=Rm("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 tg(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 ng(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function rg(...e){return t=>{let n=!1;const r=e.map((e=>{const r=ng(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():ng(e[t],null)}}}}function ig(...e){return i.useCallback(rg(...e),e)}function og(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}\``)}]},sg(r,...t)]}function sg(...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}eg.displayName="ButtonGroup";var ag=(null==globalThis?void 0:globalThis.document)?i.useLayoutEffect:()=>{},lg=i[" useId ".trim().toString()]||(()=>{}),cg=0;function ug(e){const[t,n]=i.useState(lg());return ag((()=>{n((e=>e??String(cg++)))}),[e]),e||(t?`radix-${t}`:"")}var dg=i[" useInsertionEffect ".trim().toString()]||ag;function fg({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 dg((()=>{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 pg(e){const t=hg(e),n=i.forwardRef(((e,n)=>{const{children:r,...o}=e,s=i.Children.toArray(r),a=s.find(vg);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 hg(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?rg(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 mg=Symbol("radix.slottable");function gg(e){const t=({children:e})=>p.jsx(p.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=mg,t}function vg(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===mg}var yg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=pg(`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 bg(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}function Eg(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 xg,wg="dismissableLayer.update",Tg="dismissableLayer.pointerDownOutside",Cg="dismissableLayer.focusOutside",Sg=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kg=i.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=i.useContext(Sg),[d,f]=i.useState(null),h=(null==d?void 0:d.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,m]=i.useState({}),g=ig(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=Eg(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Ng(Tg,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=Eg(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Ng(Cg,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=Eg(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&&(xg=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),_g(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=xg)}}),[d,h,n,u]),i.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),_g())}),[d,u]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(wg,e),()=>document.removeEventListener(wg,e)}),[]),p.jsx(yg.div,{...c,ref:g,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:tg(e.onFocusCapture,C.onFocusCapture),onBlurCapture:tg(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:tg(e.onPointerDownCapture,T.onPointerDownCapture)})}));kg.displayName="DismissableLayer";function _g(){const e=new CustomEvent(wg);document.dispatchEvent(e)}function Ng(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?bg(i,o):i.dispatchEvent(o)}i.forwardRef(((e,t)=>{const n=i.useContext(Sg),r=i.useRef(null),o=ig(t,r);return i.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),p.jsx(yg.div,{...e,ref:o})})).displayName="DismissableLayerBranch";var Dg="focusScope.autoFocusOnMount",Ag="focusScope.autoFocusOnUnmount",Ig={bubbles:!1,cancelable:!0},Og=i.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[l,c]=i.useState(null),u=Eg(o),d=Eg(s),f=i.useRef(null),h=ig(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:Rg(f.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Rg(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Rg(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){Pg.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Dg,Ig);l.addEventListener(Dg,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rg(r,{select:t}),document.activeElement!==n)return}((e=Lg(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Rg(l))}return()=>{l.removeEventListener(Dg,u),setTimeout((()=>{const e=new CustomEvent(Ag,Ig);l.addEventListener(Ag,d),l.dispatchEvent(e),e.defaultPrevented||Rg(t??document.body,{select:!0}),l.removeEventListener(Ag,d),Pg.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=Lg(e),n=Mg(t,e),r=Mg(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||i!==o?e.shiftKey&&i===r&&(e.preventDefault(),n&&Rg(o,{select:!0})):(e.preventDefault(),n&&Rg(r,{select:!0})):i===t&&e.preventDefault()}}),[n,r,m.paused]);return p.jsx(yg.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})}));function Lg(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 Mg(e,t){for(const n of e)if(!Fg(n,{upTo:t}))return n}function Fg(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 Rg(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()}}Og.displayName="FocusScope";var Pg=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=jg(e,t),e.unshift(t)},remove(t){var n;e=jg(e,t),null==(n=e[0])||n.resume()}}}();function jg(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Vg=i.forwardRef(((e,n)=>{var r;const{container:o,...s}=e,[a,l]=i.useState(!1);ag((()=>l(!0)),[]);const c=o||a&&(null==(r=null==globalThis?void 0:globalThis.document)?void 0:r.body);return c?t.createPortal(p.jsx(yg.div,{...s,ref:n}),c):null}));Vg.displayName="Portal";var Bg=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=$g(r.current);s.current="mounted"===l?e:"none"}),[l]),ag((()=>{const t=r.current,n=o.current;if(n!==e){const r=s.current,i=$g(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]),ag((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const s=$g(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=$g(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=ig(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 $g(e){return(null==e?void 0:e.animationName)||"none"}Bg.displayName="Presence";var Ug=0;function Hg(){i.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qg()),document.body.insertAdjacentElement("beforeend",e[1]??qg()),Ug++,()=>{1===Ug&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ug--}}),[])}function qg(){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 Wg=function(){return Wg=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},Wg.apply(this,arguments)};function zg(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 Gg="right-scroll-bar-position",Kg="width-before-scroll-bar";function Yg(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Qg="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,Xg=new WeakMap;function Jg(t,n){var r,i,o,s=(r=null,i=function(e){return t.forEach((function(t){return Yg(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 Qg((function(){var e=Xg.get(s);if(e){var n=new Set(e),r=new Set(t),i=s.current;n.forEach((function(e){r.has(e)||Yg(e,null)})),r.forEach((function(e){n.has(e)||Yg(e,i)}))}Xg.set(s,t)}),[t]),s}function Zg(e){return e}var ev=function(e){var t=e.sideCar,n=zg(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,Wg({},n))};ev.isSideCarExport=!0;var tv=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Zg);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=Wg({async:!0,ssr:!1},e),t}(),nv=function(){},rv=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:nv,onWheelCapture:nv,onTouchMoveCapture:nv}),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=zg(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=Jg([n,t]),T=Wg(Wg({},E),o);return i.createElement(i.Fragment,null,d&&i.createElement(x,{sideCar:tv,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(l),Wg(Wg({},T),{ref:w})):i.createElement(y,Wg({},T,{className:c,ref:w}),l))}));rv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rv.classNames={fullWidth:Kg,zeroRight:Gg};function iv(){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 ov=function(){var e=0,t=null;return{add:function(n){var r,i;0==e&&(t=iv())&&(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)}}},sv=function(){var e,t=(e=ov(),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}},av={left:0,top:0,right:0,gap:0},lv=function(e){return parseInt(e||"",10)||0},cv=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return av;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[lv(n),lv(r),lv(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])}},uv=sv(),dv="data-scroll-locked",fv=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(dv,"] {\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(Gg," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(Kg," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(Gg," .").concat(Gg," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Kg," .").concat(Kg," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(dv,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},pv=function(){var e=parseInt(document.body.getAttribute(dv)||"0",10);return isFinite(e)?e:0},hv=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(dv,(pv()+1).toString()),function(){var e=pv()-1;e<=0?document.body.removeAttribute(dv):document.body.setAttribute(dv,e.toString())}}),[]);var s=i.useMemo((function(){return cv(o)}),[o]);return i.createElement(uv,{styles:fv(s,!t,o,n?"":"!important")})},mv=!1;if("undefined"!=typeof window)try{var gv=Object.defineProperty({},"passive",{get:function(){return mv=!0,!0}});window.addEventListener("test",gv,gv),window.removeEventListener("test",gv,gv)}catch(zV){mv=!1}var vv=!!mv&&{passive:!1},yv=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])},bv=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Ev(e,r)){var i=xv(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ev=function(e,t){return"v"===e?function(e){return yv(e,"overflowY")}(t):function(e){return yv(e,"overflowX")}(t)},xv=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},wv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tv=function(e){return[e.deltaX,e.deltaY]},Cv=function(e){return e&&"current"in e?e.current:e},Sv=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},kv=0,_v=[];function Nv(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Dv=(Av=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(kv++)[0],s=i.useState(sv)[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(Cv),!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=wv(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=bv(d,u);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=bv(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){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=i*r,s=n.target,a=t.contains(s),l=!1,c=o>0,u=0,d=0;do{var f=xv(e,s),p=f[0],h=f[1]-f[2]-i*p;(p||h)&&Ev(e,s)&&(u+=h,d+=p),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(p,t,e,"h"===p?l:c)}),[]),c=i.useCallback((function(e){var n=e;if(_v.length&&_v[_v.length-1]===s){var r="deltaY"in n?Tv(n):wv(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(Cv).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:Nv(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=wv(e),r.current=void 0}),[]),f=i.useCallback((function(t){u(t.type,Tv(t),t.target,l(t,e.lockRef.current))}),[]),p=i.useCallback((function(t){u(t.type,wv(t),t.target,l(t,e.lockRef.current))}),[]);i.useEffect((function(){return _v.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,vv),document.addEventListener("touchmove",c,vv),document.addEventListener("touchstart",d,vv),function(){_v=_v.filter((function(e){return e!==s})),document.removeEventListener("wheel",c,vv),document.removeEventListener("touchmove",c,vv),document.removeEventListener("touchstart",d,vv)}}),[]);var h=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(s,{styles:Sv(o)}):null,h?i.createElement(hv,{gapMode:e.gapMode}):null)},tv.useMedium(Av),ev);var Av,Iv=i.forwardRef((function(e,t){return i.createElement(rv,Wg({},e,{ref:t,sideCar:Dv}))}));Iv.classNames=rv.classNames;var Ov=new WeakMap,Lv=new WeakMap,Mv={},Fv=0,Rv=function(e){return e&&(e.host||Rv(e.parentNode))},Pv=function(e,t,n,r){var i=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Rv(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]);Mv[n]||(Mv[n]=new WeakMap);var o=Mv[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=(Ov.get(e)||0)+1,c=(o.get(e)||0)+1;Ov.set(e,l),o.set(e,c),s.push(e),1===l&&i&&Lv.set(e,!0),1===c&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}catch(uL){console.error("aria-hidden: cannot operate on ",e,uL)}}))};return u(t),a.clear(),Fv++,function(){s.forEach((function(e){var t=Ov.get(e)-1,i=o.get(e)-1;Ov.set(e,t),o.set(e,i),t||(Lv.has(e)||e.removeAttribute(r),Lv.delete(e)),i||e.removeAttribute(n)})),--Fv||(Ov=new WeakMap,Ov=new WeakMap,Lv=new WeakMap,Mv={})}},jv=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]"))),Pv(r,i,n,"aria-hidden")):function(){return null}},Vv="Dialog",[Bv,$v]=og(Vv),[Uv,Hv]=Bv(Vv),qv=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]=fg({prop:r,defaultProp:o??!1,onChange:s,caller:Vv});return p.jsx(Uv,{scope:t,triggerRef:l,contentRef:c,contentId:ug(),titleId:ug(),descriptionId:ug(),open:u,onOpenChange:d,onOpenToggle:i.useCallback((()=>d((e=>!e))),[d]),modal:a,children:n})};qv.displayName=Vv;var Wv="DialogTrigger",zv=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hv(Wv,n),o=ig(t,i.triggerRef);return p.jsx(yg.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fy(i.open),...r,ref:o,onClick:tg(e.onClick,i.onOpenToggle)})}));zv.displayName=Wv;var Gv="DialogPortal",[Kv,Yv]=Bv(Gv,{forceMount:void 0}),Qv=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Hv(Gv,t);return p.jsx(Kv,{scope:t,forceMount:n,children:i.Children.map(r,(e=>p.jsx(Bg,{present:n||s.open,children:p.jsx(Vg,{asChild:!0,container:o,children:e})})))})};Qv.displayName=Gv;var Xv="DialogOverlay",Jv=i.forwardRef(((e,t)=>{const n=Yv(Xv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Hv(Xv,e.__scopeDialog);return o.modal?p.jsx(Bg,{present:r||o.open,children:p.jsx(ey,{...i,ref:t})}):null}));Jv.displayName=Xv;var Zv=pg("DialogOverlay.RemoveScroll"),ey=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hv(Xv,n);return p.jsx(Iv,{as:Zv,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(yg.div,{"data-state":fy(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),ty="DialogContent",ny=i.forwardRef(((e,t)=>{const n=Yv(ty,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Hv(ty,e.__scopeDialog);return p.jsx(Bg,{present:r||o.open,children:o.modal?p.jsx(ry,{...i,ref:t}):p.jsx(iy,{...i,ref:t})})}));ny.displayName=ty;var ry=i.forwardRef(((e,t)=>{const n=Hv(ty,e.__scopeDialog),r=i.useRef(null),o=ig(t,n.contentRef,r);return i.useEffect((()=>{const e=r.current;if(e)return jv(e)}),[]),p.jsx(oy,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tg(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:tg(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:tg(e.onFocusOutside,(e=>e.preventDefault()))})})),iy=i.forwardRef(((e,t)=>{const n=Hv(ty,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return p.jsx(oy,{...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()}})})),oy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,l=Hv(ty,n),c=i.useRef(null),u=ig(t,c);return Hg(),p.jsxs(p.Fragment,{children:[p.jsx(Og,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(kg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":fy(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(gy,{titleId:l.titleId}),p.jsx(vy,{contentRef:c,descriptionId:l.descriptionId})]})]})})),sy="DialogTitle",ay=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hv(sy,n);return p.jsx(yg.h2,{id:i.titleId,...r,ref:t})}));ay.displayName=sy;var ly="DialogDescription",cy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hv(ly,n);return p.jsx(yg.p,{id:i.descriptionId,...r,ref:t})}));cy.displayName=ly;var uy="DialogClose",dy=i.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hv(uy,n);return p.jsx(yg.button,{type:"button",...r,ref:t,onClick:tg(e.onClick,(()=>i.onOpenChange(!1)))})}));function fy(e){return e?"open":"closed"}dy.displayName=uy;var py="DialogTitleWarning",[hy,my]=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}\``)}]}(py,{contentName:ty,titleName:sy,docsSlug:"dialog"}),gy=({titleId:e})=>{const t=my(py),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},vy=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${my("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},yy=qv,by=zv,Ey=Qv,xy=Jv,wy=ny,Ty=ay,Cy=cy,Sy=dy,ky=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"}),_y=i.forwardRef(((e,t)=>p.jsx(yg.span,{...e,ref:t,style:{...ky,...e.style}})));_y.displayName="VisuallyHidden";var Ny=_y;const Dy=e.forwardRef(((e,t)=>{const n=h.c(8);let r,i,o,s;return n[0]!==e.className?(r=Rm("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(Ny,{children:"Close dialog"}),o=p.jsx(am,{}),n[2]=i,n[3]=o):(i=n[2],o=n[3]),n[4]!==e||n[5]!==t||n[6]!==r?(s=p.jsx(Sy,{asChild:!0,children:p.jsxs(Jm,{...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}));Dy.displayName="Dialog.Close";const Ay=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(xy,{className:"graphiql-dialog-overlay"}),t[3]=i):i=t[3],t[4]!==n?(o=p.jsxs(Ey,{children:[i,p.jsx(wy,{className:"graphiql-dialog",children:n})]}),t[4]=n,t[5]=o):o=t[5],t[6]!==r||t[7]!==o?(s=p.jsx(yy,{...r,children:o}),t[6]=r,t[7]=o,t[8]=s):s=t[8],s},Iy=Object.assign(Ay,{Close:Dy,Title:Ty,Trigger:by,Description:Cy});function Oy(t){const n=t+"CollectionProvider",[r,i]=og(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=pg(l),u=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,i=ig(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=pg(d),m=e.forwardRef(((t,n)=>{const{scope:r,children:i,...o}=t,a=e.useRef(null),l=ig(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 Ly=i.createContext(void 0);function My(e){const t=i.useContext(Ly);return e||t||"ltr"}const Fy=["top","right","bottom","left"],Ry=Math.min,Py=Math.max,jy=Math.round,Vy=Math.floor,By=e=>({x:e,y:e}),$y={left:"right",right:"left",bottom:"top",top:"bottom"},Uy={start:"end",end:"start"};function Hy(e,t,n){return Py(e,Ry(t,n))}function qy(e,t){return"function"==typeof e?e(t):e}function Wy(e){return e.split("-")[0]}function zy(e){return e.split("-")[1]}function Gy(e){return"x"===e?"y":"x"}function Ky(e){return"y"===e?"height":"width"}function Yy(e){return["top","bottom"].includes(Wy(e))?"y":"x"}function Qy(e){return Gy(Yy(e))}function Xy(e){return e.replace(/start|end/g,(e=>Uy[e]))}function Jy(e){return e.replace(/left|right|bottom|top/g,(e=>$y[e]))}function Zy(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}}function eb(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 tb(e,t,n){let{reference:r,floating:i}=e;const o=Yy(t),s=Qy(t),a=Ky(s),l=Wy(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(zy(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1)}return p}async function nb(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}=qy(t,e),h=Zy(p),m=a[f?"floating"===d?"reference":"floating":d],g=eb(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=eb(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 rb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ib(e){return Fy.some((t=>e[t]>=0))}function ob(){return"undefined"!=typeof window}function sb(e){return cb(e)?(e.nodeName||"").toLowerCase():"#document"}function ab(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function lb(e){var t;return null==(t=(cb(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function cb(e){return!!ob()&&(e instanceof Node||e instanceof ab(e).Node)}function ub(e){return!!ob()&&(e instanceof Element||e instanceof ab(e).Element)}function db(e){return!!ob()&&(e instanceof HTMLElement||e instanceof ab(e).HTMLElement)}function fb(e){return!(!ob()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ab(e).ShadowRoot)}function pb(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=bb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function hb(e){return["table","td","th"].includes(sb(e))}function mb(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(uL){return!1}}))}function gb(e){const t=vb(),n=ub(e)?bb(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 vb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function yb(e){return["html","body","#document"].includes(sb(e))}function bb(e){return ab(e).getComputedStyle(e)}function Eb(e){return ub(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xb(e){if("html"===sb(e))return e;const t=e.assignedSlot||e.parentNode||fb(e)&&e.host||lb(e);return fb(t)?t.host:t}function wb(e){const t=xb(e);return yb(t)?e.ownerDocument?e.ownerDocument.body:e.body:db(t)&&pb(t)?t:wb(t)}function Tb(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=wb(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=ab(i);if(o){const e=Cb(s);return t.concat(s,s.visualViewport||[],pb(i)?i:[],e&&n?Tb(e):[])}return t.concat(i,Tb(i,[],n))}function Cb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sb(e){const t=bb(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=db(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=jy(n)!==o||jy(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function kb(e){return ub(e)?e:e.contextElement}function _b(e){const t=kb(e);if(!db(t))return By(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Sb(t);let s=(o?jy(n.width):n.width)/r,a=(o?jy(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Nb=By(0);function Db(e){const t=ab(e);return vb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Nb}function Ab(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=kb(e);let s=By(1);t&&(r?ub(r)&&(s=_b(r)):s=_b(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ab(e))&&t}(o,n,r)?Db(o):By(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=ab(o),t=r&&ub(r)?ab(r):r;let n=e,i=Cb(n);for(;i&&r&&t!==n;){const e=_b(i),t=i.getBoundingClientRect(),r=bb(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=ab(i),i=Cb(n)}}return eb({width:u,height:d,x:l,y:c})}function Ib(e,t){const n=Eb(e).scrollLeft;return t?t.left+n:Ab(lb(e)).left+n}function Ob(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Ib(e,r)),y:r.top+t.scrollTop}}function Lb(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ab(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=vb();(!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=Eb(e),r=e.ownerDocument.body,i=Py(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Py(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ib(e);const a=-n.scrollTop;return"rtl"===bb(r).direction&&(s+=Py(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(lb(e));else if(ub(t))r=function(e,t){const n=Ab(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=db(e)?_b(e):By(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=Db(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eb(r)}function Mb(e,t){const n=xb(e);return!(n===t||!ub(n)||yb(n))&&("fixed"===bb(n).position||Mb(n,t))}function Fb(e,t,n){const r=db(t),i=lb(t),o="fixed"===n,s=Ab(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=By(0);function c(){l.x=Ib(i)}if(r||!r&&!o)if(("body"!==sb(t)||pb(i))&&(a=Eb(t)),r){const e=Ab(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?By(0):Ob(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 Rb(e){return"static"===bb(e).position}function Pb(e,t){if(!db(e)||"fixed"===bb(e).position)return null;if(t)return t(e);let n=e.offsetParent;return lb(e)===n&&(n=n.ownerDocument.body),n}function jb(e,t){const n=ab(e);if(mb(e))return n;if(!db(e)){let t=xb(e);for(;t&&!yb(t);){if(ub(t)&&!Rb(t))return t;t=xb(t)}return n}let r=Pb(e,t);for(;r&&hb(r)&&Rb(r);)r=Pb(r,t);return r&&yb(r)&&Rb(r)&&!gb(r)?n:r||function(e){let t=xb(e);for(;db(t)&&!yb(t);){if(gb(t))return t;if(mb(t))return null;t=xb(t)}return null}(e)||n}const Vb={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,s=lb(r),a=!!t&&mb(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=By(1);const u=By(0),d=db(r);if((d||!d&&!o)&&(("body"!==sb(r)||pb(s))&&(l=Eb(r)),db(r))){const e=Ab(r);c=_b(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!s||d||o?By(0):Ob(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:lb,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?mb(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Tb(e,[],!1).filter((e=>ub(e)&&"body"!==sb(e))),i=null;const o="fixed"===bb(e).position;let s=o?xb(e):e;for(;ub(s)&&!yb(s);){const t=bb(s),n=gb(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||pb(s)&&!n&&Mb(e,s))?r=r.filter((e=>e!==s)):i=t,s=xb(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=o[0],a=o.reduce(((e,n)=>{const r=Lb(t,n,i);return e.top=Py(r.top,e.top),e.right=Ry(r.right,e.right),e.bottom=Ry(r.bottom,e.bottom),e.left=Py(r.left,e.left),e}),Lb(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:jb,getElementRects:async function(e){const t=this.getOffsetParent||jb,n=this.getDimensions,r=await n(e.floating);return{reference:Fb(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}=Sb(e);return{width:t,height:n}},getScale:_b,isElement:ub,isRTL:function(e){return"rtl"===bb(e).direction}};function Bb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $b(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=kb(e),u=i||o?[...c?Tb(c):[],...Tb(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=lb(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:-Vy(d)+"px "+-Vy(i.clientWidth-(u+f))+"px "+-Vy(i.clientHeight-(d+p))+"px "+-Vy(u)+"px",threshold:Py(0,Ry(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||Bb(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?Ab(e):null;return l&&function t(){const r=Ab(e);m&&!Bb(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 Ub=nb,Hb=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=Wy(n),a=zy(n),l="y"===Yy(n),c=["left","top"].includes(s)?-1:1,u=o&&l?-1:1,d=qy(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}}}}},qb=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}=qy(e,t),c={x:n,y:r},u=await nb(t,l),d=Yy(Wy(i)),f=Gy(d);let p=c[f],h=c[d];if(o){const e="y"===f?"bottom":"right";p=Hy(p+u["y"===f?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";h=Hy(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}}}}}},Wb=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}=qy(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const v=Wy(i),y=Yy(a),b=Wy(a)===a,E=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!m?[Jy(a)]:function(e){const t=Jy(e);return[Xy(e),t,Xy(t)]}(a)),w="none"!==h;!f&&w&&x.push(...function(e,t,n,r){const i=zy(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[]}}(Wy(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Xy)))),o}(a,m,h,E));const T=[a,...x],C=await nb(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=zy(e),i=Qy(e),o=Ky(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Jy(s)),[s,Jy(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!==Yy(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=Yy(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{}}}},zb=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}=qy(e,t),u=await nb(t,c),d=Wy(i),f=zy(i),p="y"===Yy(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=Ry(m-u[g],y),x=Ry(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=Py(u.left,0),t=Py(u.right,0),n=Py(u.top,0),r=Py(u.bottom,0);p?C=h-2*(0!==e||0!==t?e+t:Py(u.left,u.right)):T=m-2*(0!==n||0!==r?n+r:Py(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}}:{}}}},Gb=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=qy(e,t);switch(r){case"referenceHidden":{const e=rb(await nb(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ib(e)}}}case"escaped":{const e=rb(await nb(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ib(e)}}}default:return{}}}}},Kb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=qy(e,t)||{};if(null==c)return{};const d=Zy(u),f={x:n,y:r},p=Qy(i),h=Ky(p),m=await s.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",E=o.reference[h]+o.reference[p]-f[p]-o.floating[h],x=f[p]-o.reference[p],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let T=w?w[b]:0;T&&await(null==s.isElement?void 0:s.isElement(w))||(T=a.floating[b]||o.floating[h]);const C=E/2-x/2,S=T/2-m[h]/2-1,k=Ry(d[v],S),_=Ry(d[y],S),N=k,D=T-m[h]-_,A=T/2-m[h]/2+C,I=Hy(N,A,D),O=!l.arrow&&null!=zy(i)&&A!==I&&o.reference[h]/2-(A<N?k:_)-m[h]/2<0,L=O?A<N?A-N:A-D:0;return{[p]:f[p]+L,data:{[p]:I,centerOffset:A-I-L,...O&&{alignmentOffset:L}},reset:O}}}),Yb=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=qy(e,t),u={x:n,y:r},d=Yy(i),f=Gy(d);let p=u[f],h=u[d];const m=qy(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+g.mainAxis,n=o.reference[f]+o.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,y;const e="y"===f?"width":"height",t=["top","left"].includes(Wy(i)),n=o.reference[d]-o.floating[e]+(t&&(null==(v=s.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(y=s.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Qb=(e,t,n)=>{const r=new Map,i={platform:Vb,...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}=tb(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}=tb(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})};var Xb="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Jb(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(!Jb(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)&&!Jb(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Zb(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eE(e,t){const n=Zb(e);return Math.round(t*n)/n}function tE(e){const t=i.useRef(e);return Xb((()=>{t.current=e})),t}function nE(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);Jb(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=tE(u),D=tE(s),A=tE(d),I=i.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};D.current&&(e.platform=D.current),Qb(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};O.current&&!Jb(k.current,t)&&(k.current=t,o.flushSync((()=>{p(t)})))}))}),[h,t,n,D,A]);Xb((()=>{!1===d&&k.current.isPositioned&&(k.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const O=i.useRef(!1);Xb((()=>(O.current=!0,()=>{O.current=!1})),[]),Xb((()=>{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]),F=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=eE(M.floating,f.x),r=eE(M.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Zb(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:F})),[f,I,L,M,F])}const rE=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?Kb({element:n.current,padding:r}).fn(t):{}:n?Kb({element:n,padding:r}).fn(t):{};var i}}),iE=(e,t)=>({...Hb(e),options:[e,t]}),oE=(e,t)=>({...qb(e),options:[e,t]}),sE=(e,t)=>({...Wb(e),options:[e,t]}),aE=(e,t)=>({...zb(e),options:[e,t]}),lE=(e,t)=>({...Gb(e),options:[e,t]}),cE=(e,t)=>({...rE(e),options:[e,t]});var uE=i.forwardRef(((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return p.jsx(yg.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"})})}));uE.displayName="Arrow";var dE=uE;var fE="Popper",[pE,hE]=og(fE),[mE,gE]=pE(fE),vE=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return p.jsx(mE,{scope:t,anchor:r,onAnchorChange:o,children:n})};vE.displayName=fE;var yE="PopperAnchor",bE=i.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=gE(yE,n),a=i.useRef(null),l=ig(t,a);return i.useEffect((()=>{s.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:p.jsx(yg.div,{...o,ref:l})}));bE.displayName=yE;var EE="PopperContent",[xE,wE]=pE(EE),TE=i.forwardRef(((e,t)=>{var n,r,o,s,a,l;const{__scopePopper:c,side:u="bottom",sideOffset:d=0,align:f="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:E=!1,updatePositionStrategy:x="optimized",onPlaced:w,...T}=e,C=gE(EE,c),[S,k]=i.useState(null),_=ig(t,(e=>k(e))),[N,D]=i.useState(null),A=function(e){const[t,n]=i.useState(void 0);return ag((()=>{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}(N),I=(null==A?void 0:A.width)??0,O=(null==A?void 0:A.height)??0,L=u+("center"!==f?"-"+f:""),M="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},F=Array.isArray(v)?v:[v],R=F.length>0,P={padding:M,boundary:F.filter(_E),altBoundary:R},{refs:j,floatingStyles:V,placement:B,isPositioned:$,middlewareData:U}=nE({strategy:"fixed",placement:L,whileElementsMounted:(...e)=>$b(...e,{animationFrame:"always"===x}),elements:{reference:C.anchor},middleware:[iE({mainAxis:d+O,alignmentAxis:h}),g&&oE({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?{...Yb(H),options:[H,q]}:void 0,...P}),g&&sE({...P}),aE({...P,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`)}}),N&&cE({element:N,padding:m}),NE({arrowWidth:I,arrowHeight:O}),E&&lE({strategy:"referenceHidden",...P})]});var H,q;const[W,z]=DE(B),G=Eg(w);ag((()=>{$&&(null==G||G())}),[$,G]);const K=null==(n=U.arrow)?void 0:n.x,Y=null==(r=U.arrow)?void 0:r.y,Q=0!==(null==(o=U.arrow)?void 0:o.centerOffset),[X,J]=i.useState();return ag((()=>{S&&J(window.getComputedStyle(S).zIndex)}),[S]),p.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:$?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[null==(s=U.transformOrigin)?void 0:s.x,null==(a=U.transformOrigin)?void 0:a.y].join(" "),...(null==(l=U.hide)?void 0:l.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(xE,{scope:c,placedSide:W,onArrowChange:D,arrowX:K,arrowY:Y,shouldHideArrow:Q,children:p.jsx(yg.div,{"data-side":W,"data-align":z,...T,ref:_,style:{...T.style,animation:$?void 0:"none"}})})})}));TE.displayName=EE;var CE="PopperArrow",SE={top:"bottom",right:"left",bottom:"top",left:"right"},kE=i.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,i=wE(CE,n),o=SE[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(dE,{...r,ref:t,style:{...r.style,display:"block"}})})}));function _E(e){return null!==e}kE.displayName=CE;var NE=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]=DE(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 DE(e){const[t,n="center"]=e.split("-");return[t,n]}var AE=vE,IE=bE,OE=TE,LE=kE,ME="rovingFocusGroup.onEntryFocus",FE={bubbles:!1,cancelable:!0},RE="RovingFocusGroup",[PE,jE,VE]=Oy(RE),[BE,$E]=og(RE,[VE]),[UE,HE]=BE(RE),qE=i.forwardRef(((e,t)=>p.jsx(PE.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(PE.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(WE,{...e,ref:t})})})));qE.displayName=RE;var WE=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=ig(t,h),g=My(s),[v,y]=fg({prop:a,defaultProp:l??null,onChange:c,caller:RE}),[b,E]=i.useState(!1),x=Eg(u),w=jE(n),T=i.useRef(!1),[C,S]=i.useState(0);return i.useEffect((()=>{const e=h.current;if(e)return e.addEventListener(ME,x),()=>e.removeEventListener(ME,x)}),[x]),p.jsx(UE,{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(yg.div,{tabIndex:b||0===C?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:tg(e.onMouseDown,(()=>{T.current=!0})),onFocus:tg(e.onFocus,(e=>{const t=!T.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(ME,FE);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));YE([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}T.current=!1})),onBlur:tg(e.onBlur,(()=>E(!1)))})})})),zE="RovingFocusGroupItem",GE=i.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...l}=e,c=ug(),u=s||c,d=HE(zE,n),f=d.currentTabStopId===u,h=jE(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:v}=d;return i.useEffect((()=>{if(r)return m(),()=>g()}),[r,m,g]),p.jsx(PE.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:p.jsx(yg.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:tg(e.onMouseDown,(e=>{r?d.onItemFocus(u):e.preventDefault()})),onFocus:tg(e.onFocus,(()=>d.onItemFocus(u))),onKeyDown:tg(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:KE[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((()=>YE(i)))}var n,r})),children:"function"==typeof a?a({isCurrentTabStop:f,hasTabStop:null!=v}):a})})}));GE.displayName=zE;var KE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function YE(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 QE=qE,XE=GE,JE=["Enter"," "],ZE=["ArrowUp","PageDown","End"],ex=["ArrowDown","PageUp","Home",...ZE],tx={ltr:[...JE,"ArrowRight"],rtl:[...JE,"ArrowLeft"]},nx={ltr:["ArrowLeft"],rtl:["ArrowRight"]},rx="Menu",[ix,ox,sx]=Oy(rx),[ax,lx]=og(rx,[sx,hE,$E]),cx=hE(),ux=$E(),[dx,fx]=ax(rx),[px,hx]=ax(rx),mx=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,l=cx(t),[c,u]=i.useState(null),d=i.useRef(!1),f=Eg(s),h=My(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(AE,{...l,children:p.jsx(dx,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:p.jsx(px,{scope:t,onClose:i.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:r})})})};mx.displayName=rx;var gx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,i=cx(n);return p.jsx(IE,{...i,...r,ref:t})}));gx.displayName="MenuAnchor";var vx="MenuPortal",[yx,bx]=ax(vx,{forceMount:void 0}),Ex=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=fx(vx,t);return p.jsx(yx,{scope:t,forceMount:n,children:p.jsx(Bg,{present:n||o.open,children:p.jsx(Vg,{asChild:!0,container:i,children:r})})})};Ex.displayName=vx;var xx="MenuContent",[wx,Tx]=ax(xx),Cx=i.forwardRef(((e,t)=>{const n=bx(xx,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=fx(xx,e.__scopeMenu),s=hx(xx,e.__scopeMenu);return p.jsx(ix.Provider,{scope:e.__scopeMenu,children:p.jsx(Bg,{present:r||o.open,children:p.jsx(ix.Slot,{scope:e.__scopeMenu,children:s.modal?p.jsx(Sx,{...i,ref:t}):p.jsx(kx,{...i,ref:t})})})})})),Sx=i.forwardRef(((e,t)=>{const n=fx(xx,e.__scopeMenu),r=i.useRef(null),o=ig(t,r);return i.useEffect((()=>{const e=r.current;if(e)return jv(e)}),[]),p.jsx(Nx,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:tg(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),kx=i.forwardRef(((e,t)=>{const n=fx(xx,e.__scopeMenu);return p.jsx(Nx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),_x=pg("MenuContent.ScrollLock"),Nx=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=fx(xx,n),b=hx(xx,n),E=cx(n),x=ux(n),w=ox(n),[T,C]=i.useState(null),S=i.useRef(null),k=ig(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?Iv:i.Fragment,M=g?{as:_x,allowPinchZoom:!0}:void 0,F=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)),[]),Hg();const R=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(wx,{scope:n,searchRef:N,onItemEnter:i.useCallback((e=>{R(e)&&e.preventDefault()}),[R]),onItemLeave:i.useCallback((e=>{var t;R(e)||(null==(t=S.current)||t.focus(),C(null))}),[R]),onTriggerLeave:i.useCallback((e=>{R(e)&&e.preventDefault()}),[R]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback((e=>{A.current=e}),[]),children:p.jsx(L,{...M,children:p.jsx(Og,{asChild:!0,trapped:o,onMountAutoFocus:tg(s,(e=>{var t;e.preventDefault(),null==(t=S.current)||t.focus({preventScroll:!0})})),onUnmountAutoFocus:a,children:p.jsx(kg,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:p.jsx(QE,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:C,onEntryFocus:tg(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:p.jsx(OE,{role:"menu","aria-orientation":"vertical","data-state":ew(y.open),"data-radix-menu-content":"",dir:b.dir,...E,...v,ref:k,style:{outline:"none",...v.style},onKeyDown:tg(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&&F(e.key));const i=S.current;if(e.target!==i)return;if(!ex.includes(e.key))return;e.preventDefault();const o=w().filter((e=>!e.disabled)).map((e=>e.ref.current));ZE.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:tg(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(_.current),N.current="")})),onPointerMove:tg(e.onPointerMove,rw((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}})))})})})})})})}));Cx.displayName=xx;var Dx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(yg.div,{role:"group",...r,ref:t})}));Dx.displayName="MenuGroup";var Ax=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(yg.div,{...r,ref:t})}));Ax.displayName="MenuLabel";var Ix="MenuItem",Ox="menu.itemSelect",Lx=i.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=i.useRef(null),a=hx(Ix,e.__scopeMenu),l=Tx(Ix,e.__scopeMenu),c=ig(t,s),u=i.useRef(!1);return p.jsx(Mx,{...o,ref:c,disabled:n,onClick:tg(e.onClick,(()=>{const e=s.current;if(!n&&e){const t=new CustomEvent(Ox,{bubbles:!0,cancelable:!0});e.addEventListener(Ox,(e=>null==r?void 0:r(e)),{once:!0}),bg(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:tg(e.onPointerUp,(e=>{var t;u.current||null==(t=e.currentTarget)||t.click()})),onKeyDown:tg(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||JE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));Lx.displayName=Ix;var Mx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=Tx(Ix,n),l=ux(n),c=i.useRef(null),u=ig(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(ix.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(XE,{asChild:!0,...l,focusable:!r,children:p.jsx(yg.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:tg(e.onPointerMove,rw((e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:tg(e.onPointerLeave,rw((e=>a.onItemLeave(e)))),onFocus:tg(e.onFocus,(()=>f(!0))),onBlur:tg(e.onBlur,(()=>f(!1)))})})})})),Fx=i.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return p.jsx(Hx,{scope:e.__scopeMenu,checked:n,children:p.jsx(Lx,{role:"menuitemcheckbox","aria-checked":tw(n)?"mixed":n,...i,ref:t,"data-state":nw(n),onSelect:tg(i.onSelect,(()=>null==r?void 0:r(!!tw(n)||!n)),{checkForDefaultPrevented:!1})})})}));Fx.displayName="MenuCheckboxItem";var Rx="MenuRadioGroup",[Px,jx]=ax(Rx,{value:void 0,onValueChange:()=>{}}),Vx=i.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Eg(r);return p.jsx(Px,{scope:e.__scopeMenu,value:n,onValueChange:o,children:p.jsx(Dx,{...i,ref:t})})}));Vx.displayName=Rx;var Bx="MenuRadioItem",$x=i.forwardRef(((e,t)=>{const{value:n,...r}=e,i=jx(Bx,e.__scopeMenu),o=n===i.value;return p.jsx(Hx,{scope:e.__scopeMenu,checked:o,children:p.jsx(Lx,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":nw(o),onSelect:tg(r.onSelect,(()=>{var e;return null==(e=i.onValueChange)?void 0:e.call(i,n)}),{checkForDefaultPrevented:!1})})})}));$x.displayName=Bx;var Ux="MenuItemIndicator",[Hx,qx]=ax(Ux,{checked:!1}),Wx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=qx(Ux,n);return p.jsx(Bg,{present:r||tw(o.checked)||!0===o.checked,children:p.jsx(yg.span,{...i,ref:t,"data-state":nw(o.checked)})})}));Wx.displayName=Ux;var zx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(yg.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));zx.displayName="MenuSeparator";var Gx=i.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,i=cx(n);return p.jsx(LE,{...i,...r,ref:t})}));Gx.displayName="MenuArrow";var[Kx,Yx]=ax("MenuSub"),Qx="MenuSubTrigger",Xx=i.forwardRef(((e,t)=>{const n=fx(Qx,e.__scopeMenu),r=hx(Qx,e.__scopeMenu),o=Yx(Qx,e.__scopeMenu),s=Tx(Qx,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(gx,{asChild:!0,...u,children:p.jsx(Mx,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ew(n.open),...e,ref:rg(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:tg(e.onPointerMove,rw((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:tg(e.onPointerLeave,rw((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:tg(e.onKeyDown,(t=>{var i;const o=""!==s.searchRef.current;e.disabled||o&&" "===t.key||tx[r.dir].includes(t.key)&&(n.onOpenChange(!0),null==(i=n.content)||i.focus(),t.preventDefault())}))})})}));Xx.displayName=Qx;var Jx="MenuSubContent",Zx=i.forwardRef(((e,t)=>{const n=bx(xx,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=fx(xx,e.__scopeMenu),a=hx(xx,e.__scopeMenu),l=Yx(Jx,e.__scopeMenu),c=i.useRef(null),u=ig(t,c);return p.jsx(ix.Provider,{scope:e.__scopeMenu,children:p.jsx(Bg,{present:r||s.open,children:p.jsx(ix.Slot,{scope:e.__scopeMenu,children:p.jsx(Nx,{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:tg(e.onFocusOutside,(e=>{e.target!==l.trigger&&s.onOpenChange(!1)})),onEscapeKeyDown:tg(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:tg(e.onKeyDown,(e=>{var t;const n=e.currentTarget.contains(e.target),r=nx[a.dir].includes(e.key);n&&r&&(s.onOpenChange(!1),null==(t=l.trigger)||t.focus(),e.preventDefault())}))})})})})}));function ew(e){return e?"open":"closed"}function tw(e){return"indeterminate"===e}function nw(e){return tw(e)?"indeterminate":e?"checked":"unchecked"}function rw(e){return t=>"mouse"===t.pointerType?e(t):void 0}Zx.displayName=Jx;var iw=mx,ow=gx,sw=Ex,aw=Cx,lw=Dx,cw=Ax,uw=Lx,dw=Fx,fw=Vx,pw=$x,hw=Wx,mw=zx,gw=Gx,vw=Xx,yw=Zx,bw="DropdownMenu",[Ew,xw]=og(bw,[lx]),ww=lx(),[Tw,Cw]=Ew(bw),Sw=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=ww(t),u=i.useRef(null),[d,f]=fg({prop:o,defaultProp:s??!1,onChange:a,caller:bw});return p.jsx(Tw,{scope:t,triggerId:ug(),triggerRef:u,contentId:ug(),open:d,onOpenChange:f,onOpenToggle:i.useCallback((()=>f((e=>!e))),[f]),modal:l,children:p.jsx(iw,{...c,open:d,onOpenChange:f,dir:r,modal:l,children:n})})};Sw.displayName=bw;var kw="DropdownMenuTrigger",_w=i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=Cw(kw,n),s=ww(n);return p.jsx(ow,{asChild:!0,...s,children:p.jsx(yg.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:rg(t,o.triggerRef),onPointerDown:tg(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(o.onOpenToggle(),o.open||e.preventDefault())})),onKeyDown:tg(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));_w.displayName=kw;var Nw=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ww(t);return p.jsx(sw,{...r,...n})};Nw.displayName="DropdownMenuPortal";var Dw="DropdownMenuContent",Aw=i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Cw(Dw,n),s=ww(n),a=i.useRef(!1);return p.jsx(aw,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:tg(e.onCloseAutoFocus,(e=>{var t;a.current||null==(t=o.triggerRef.current)||t.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:tg(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)"}})}));Aw.displayName=Dw;i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(lw,{...i,...r,ref:t})})).displayName="DropdownMenuGroup";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(cw,{...i,...r,ref:t})})).displayName="DropdownMenuLabel";var Iw=i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(uw,{...i,...r,ref:t})}));Iw.displayName="DropdownMenuItem";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(dw,{...i,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(fw,{...i,...r,ref:t})})).displayName="DropdownMenuRadioGroup";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(pw,{...i,...r,ref:t})})).displayName="DropdownMenuRadioItem";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(hw,{...i,...r,ref:t})})).displayName="DropdownMenuItemIndicator";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(mw,{...i,...r,ref:t})})).displayName="DropdownMenuSeparator";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(gw,{...i,...r,ref:t})})).displayName="DropdownMenuArrow";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(vw,{...i,...r,ref:t})})).displayName="DropdownMenuSubTrigger";i.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ww(n);return p.jsx(yw,{...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 Ow=Sw,Lw=_w,Mw=Nw,Fw=Aw,Rw=Iw;const Pw=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=Rm("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(Lw,{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}));Pw.displayName="DropdownMenuButton";const jw=Object.assign(Ow,{Button:Pw,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=Rm("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(Rw,{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=Rm("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(Mw,{children:p.jsx(Fw,{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}}),Vw=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=Rm(a,l,o.className),n[5]=o.className,n[6]=a,n[7]=l,n[8]=c):c=n[8],n[9]!==r?(u=Gp.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}));Vw.displayName="MarkdownContent";const Bw=e.forwardRef(((e,t)=>{const n=h.c(6);let r,i;return n[0]!==e.className?(r=Rm("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}));Bw.displayName="Spinner";const $w=e.createContext({});function Uw(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const Hw="undefined"!=typeof window,qw=Hw?e.useLayoutEffect:e.useEffect,Ww=e.createContext(null),zw=e.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gw(e,t){-1===e.indexOf(t)&&e.push(t)}function Kw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Yw=(e,t,n)=>n>t?t:n<e?e:n;const Qw={},Xw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Jw=e=>/^0[^.\s]+$/u.test(e);function Zw(e){let t;return()=>(void 0===t&&(t=e()),t)}const eT=e=>e,tT=(e,t)=>n=>t(e(n)),nT=(...e)=>e.reduce(tT),rT=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class iT{constructor(){this.subscriptions=[]}add(e){return Gw(this.subscriptions,e),()=>Kw(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 oT=e=>1e3*e,sT=e=>e/1e3;function aT(e,t){return t?e*(1e3/t):0}const lT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function cT(e,t,n,r){if(e===t&&n===r)return eT;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=lT(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>1e-7&&++a<12);return s}(t,0,1,e,n);return e=>0===e||1===e?e:lT(i(e),t,r)}const uT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dT=e=>t=>1-e(1-t),fT=cT(.33,1.53,.69,.99),pT=dT(fT),hT=uT(pT),mT=e=>(e*=2)<1?.5*pT(e):.5*(2-Math.pow(2,-10*(e-1))),gT=e=>1-Math.sin(Math.acos(e)),vT=dT(gT),yT=uT(gT),bT=cT(.42,0,1,1),ET=cT(0,0,.58,1),xT=cT(.42,0,.58,1),wT=e=>Array.isArray(e)&&"number"==typeof e[0],TT={linear:eT,easeIn:bT,easeInOut:xT,easeOut:ET,circIn:gT,circInOut:yT,circOut:vT,backIn:pT,backInOut:hT,backOut:fT,anticipate:mT},CT=e=>{if(wT(e)){e.length;const[t,n,r,i]=e;return cT(t,n,r,i)}return"string"==typeof e?TT[e]:e},ST=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function kT(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=ST.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,i=!1,s=!1)=>{const a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,r?i=!0:(r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(e)))}};return l}(o),e)),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=s,m=()=>{const o=Qw.useManualTiming?i.timestamp:performance.now();n=!1,Qw.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:ST.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<ST.length;t++)s[ST[t]].cancel(e)},state:i,steps:s}}const{schedule:_T,cancel:NT,state:DT,steps:AT}=kT("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:eT,!0);let IT;function OT(){IT=void 0}const LT={now:()=>(void 0===IT&<.set(DT.isProcessing||Qw.useManualTiming?DT.timestamp:performance.now()),IT),set:e=>{IT=e,queueMicrotask(OT)}},MT=e=>t=>"string"==typeof t&&t.startsWith(e),FT=MT("--"),RT=MT("var(--"),PT=e=>!!RT(e)&&jT.test(e.split("/*")[0].trim()),jT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,VT={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},BT={...VT,transform:e=>Yw(0,1,e)},$T={...VT,default:1},UT=e=>Math.round(1e5*e)/1e5,HT=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const qT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,WT=(e,t)=>n=>Boolean("string"==typeof n&&qT.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),zT=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,o,s,a]=r.match(HT);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},GT={...VT,transform:e=>Math.round((e=>Yw(0,255,e))(e))},KT={test:WT("rgb","red"),parse:zT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+GT.transform(e)+", "+GT.transform(t)+", "+GT.transform(n)+", "+UT(BT.transform(r))+")"};const YT={test:WT("#"),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:KT.transform},QT=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),XT=QT("deg"),JT=QT("%"),ZT=QT("px"),eC=QT("vh"),tC=QT("vw"),nC=(()=>({...JT,parse:e=>JT.parse(e)/100,transform:e=>JT.transform(100*e)}))(),rC={test:WT("hsl","hue"),parse:zT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+JT.transform(UT(t))+", "+JT.transform(UT(n))+", "+UT(BT.transform(r))+")"},iC={test:e=>KT.test(e)||YT.test(e)||rC.test(e),parse:e=>KT.test(e)?KT.parse(e):rC.test(e)?rC.parse(e):YT.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?KT.transform(e):rC.transform(e)},oC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const sC="number",aC="color",lC=/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 cC(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(lC,(e=>(iC.test(e)?(r.color.push(o),i.push(aC),n.push(iC.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(sC),n.push(parseFloat(e))),++o,"${}"))).split("${}");return{values:n,split:s,indexes:r,types:i}}function uC(e){return cC(e).values}function dC(e){const{split:t,types:n}=cC(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===sC?UT(e[o]):t===aC?iC.transform(e[o]):e[o]}return i}}const fC=e=>"number"==typeof e?0:e;const pC={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(HT))?void 0:t.length)||0)+((null==(n=e.match(oC))?void 0:n.length)||0)>0},parse:uC,createTransformer:dC,getAnimatableNone:function(e){const t=uC(e);return dC(e)(t.map(fC))}};function hC(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 mC(e,t){return n=>n>0?t:e}const gC=(e,t,n)=>e+(t-e)*n,vC=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},yC=[YT,KT,rC];function bC(e){const t=(n=e,yC.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===rC&&(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=hC(a,r,e+1/3),o=hC(a,r,e),s=hC(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 EC=(e,t)=>{const n=bC(e),r=bC(t);if(!n||!r)return mC(e,t);const i={...n};return e=>(i.red=vC(n.red,r.red,e),i.green=vC(n.green,r.green,e),i.blue=vC(n.blue,r.blue,e),i.alpha=gC(n.alpha,r.alpha,e),KT.transform(i))},xC=new Set(["none","hidden"]);function wC(e,t){return n=>gC(e,t,n)}function TC(e){return"number"==typeof e?wC:"string"==typeof e?PT(e)?mC:iC.test(e)?EC:kC:Array.isArray(e)?CC:"object"==typeof e?iC.test(e)?EC:SC:mC}function CC(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>TC(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function SC(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=TC(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const kC=(e,t)=>{const n=pC.createTransformer(t),r=cC(e),i=cC(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?xC.has(e)&&!i.values.length||xC.has(t)&&!r.values.length?function(e,t){return xC.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):nT(CC(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):mC(e,t)};function _C(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return gC(e,t,n);return TC(e)(e,t)}const NC=e=>{const t=({timestamp:t})=>e(t);return{start:()=>_T.update(t,!0),stop:()=>NT(t),now:()=>DT.isProcessing?DT.timestamp:LT.now()}},DC=(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)})`},AC=2e4;function IC(e){let t=0;let n=e.next(t);for(;!n.done&&t<AC;)t+=50,n=e.next(t);return t>=AC?1/0:t}function OC(e,t,n){const r=Math.max(t-5,0);return aT(n-e(r),t-r)}const LC=100,MC=10,FC=1,RC=0,PC=800,jC=.3,VC=.3,BC={granular:.01,default:2},$C={granular:.005,default:.5},UC=.01,HC=10,qC=.05,WC=1;function zC({duration:e=PC,bounce:t=jC,velocity:n=RC,mass:r=FC}){let i,o,s=1-t;s=Yw(qC,WC,s),e=Yw(UC,HC,sT(e)),s<1?(i=t=>{const r=t*s,i=r*e;return.001-(r-n)/KC(t,s)*Math.exp(-i)},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=KC(Math.pow(t,2),s);return(.001-i(t)>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<GC;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=oT(e),isNaN(a))return{stiffness:LC,damping:MC,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const GC=12;function KC(e,t){return e*Math.sqrt(1-t*t)}const YC=["duration","bounce"],QC=["stiffness","damping","mass"];function XC(e,t){return t.some((t=>void 0!==e[t]))}function JC(e=VC,t=jC){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:RC,stiffness:LC,damping:MC,mass:FC,isResolvedFromDuration:!1,...e};if(!XC(e,QC)&&XC(e,YC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*Yw(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:FC,stiffness:i,damping:o}}else{const n=zC(e);t={...t,...n,mass:FC},t.isResolvedFromDuration=!0}return t}({...n,velocity:-sT(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),g=s-o,v=sT(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?BC.granular:BC.default),i||(i=y?$C.granular:$C.default),m<1){const e=KC(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?oT(h):OC(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(IC(E),AC),t=DC((t=>E.next(e*t).value),e,30);return e+"ms "+t},toTransition:()=>{}};return E}function ZC({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=JC({keyframes:[f.value,p(f.value)],velocity:OC(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 eS(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(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||Qw.mix||_C,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]||eT:t;n=nT(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=rT(e[r],e[r+1],n);return a[r](i)};return n?t=>c(Yw(e[0],e[o-1],t)):c}function tS(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=rT(0,t,r);e.push(gC(n,1,i))}}(t,e.length-1),t}function nS({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(CT):CT(r),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:tS(t),e),a=eS(s,t,{ease:Array.isArray(i)?i:(l=t,c=i,l.map((()=>c||xT)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}JC.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(IC(r),AC);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:sT(i)}}(e,100,JC);return e.ease=t.ease,e.duration=oT(t.duration),e.type="keyframes",e};const rS=e=>null!==e;function iS(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(rS),s=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return s&&void 0!==r?r:o[s]}const oS={decay:ZC,inertia:ZC,tween:nS,keyframes:nS,spring:JC};function sS(e){"string"==typeof e.type&&(e.type=oS[e.type])}class aS{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 lS=e=>e/100;class cS extends aS{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!==LT.now()&&this.tick(LT.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;sS(e);const{type:t=nS,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e;let{keyframes:s}=e;const a=t||nS;a!==nS&&"number"!=typeof s[0]&&(this.mixKeyframes=nT(lS,_C(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=IC(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=Yw(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!==ZC&&(E.value=iS(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 sT(this.calculatedDuration)}get time(){return sT(this.currentTime)}set time(e){e=oT(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(LT.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=sT(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=NC,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(LT.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 uS=e=>180*e/Math.PI,dS=e=>{const t=uS(Math.atan2(e[1],e[0]));return pS(t)},fS={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:dS,rotateZ:dS,skewX:e=>uS(Math.atan(e[1])),skewY:e=>uS(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},pS=e=>((e%=360)<0&&(e+=360),e),hS=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mS=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gS={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hS,scaleY:mS,scale:e=>(hS(e)+mS(e))/2,rotateX:e=>pS(uS(Math.atan2(e[6],e[5]))),rotateY:e=>pS(uS(Math.atan2(-e[2],e[0]))),rotateZ:dS,rotate:dS,skewX:e=>uS(Math.atan(e[4])),skewY:e=>uS(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function vS(e){return e.includes("scale")?1:0}function yS(e,t){if(!e||"none"===e)return vS(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=gS,i=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=fS,i=t}if(!i)return vS(t);const o=r[t],s=i[1].split(",").map(bS);return"function"==typeof o?o(s):s[o]}function bS(e){return parseFloat(e.trim())}const ES=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xS=(()=>new Set(ES))(),wS=e=>e===VT||e===ZT,TS=new Set(["x","y","z"]),CS=ES.filter((e=>!TS.has(e)));const SS={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})=>yS(t,"x"),y:(e,{transform:t})=>yS(t,"y")};SS.translateX=SS.x,SS.translateY=SS.y;const kS=new Set;let _S=!1,NS=!1,DS=!1;function AS(){if(NS){const e=Array.from(kS).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 CS.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)}))}NS=!1,_S=!1,kS.forEach((e=>e.complete(DS))),kS.clear()}function IS(){kS.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(NS=!0)}))}class OS{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?(kS.add(this),_S||(_S=!0,_T.read(IS),_T.resolveKeyframes(AS))):(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),kS.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,kS.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const LS=Zw((()=>void 0!==window.ScrollTimeline)),MS={};function FS(e,t){const n=Zw(e);return()=>MS[t]??n()}const RS=FS((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(uL){return!1}return!0}),"linearEasing"),PS=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:PS([0,.65,.55,1]),circOut:PS([.55,0,1,.45]),backIn:PS([.31,.01,.66,-.59]),backOut:PS([.33,1.53,.69,.99])};function VS(e,t){return e?"function"==typeof e?RS()?DC(e,t):"ease-out":wT(e)?PS(e):Array.isArray(e)?e.map((e=>VS(e,t)||jS.easeOut)):jS[e]:void 0}function BS(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=VS(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 $S(e){return"function"==typeof e&&"applyToOptions"in e}class US extends aS{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,e.type;const l=function({type:e,...t}){return $S(e)&&RS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=BS(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=iS(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(uL){}}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 sT(Number(n))}get time(){return sT(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=oT(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&&LS()?(this.animation.timeline=e,eT):t(this)}}const HS={anticipate:mT,backInOut:hT,circInOut:yT};function qS(e){"string"==typeof e.ease&&e.ease in HS&&(e.ease=HS[e.ease])}class WS extends US{constructor(e){qS(e),sS(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 cS({...o,autoplay:!1}),a=oT(this.finishedTime??this.time);t.setWithVelocity(s.sample(a-10).value,s.sample(a).value,10),s.stop()}}const zS=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!pC.test(e)&&"0"!==e||e.startsWith("url(")));const GS=new Set(["opacity","clipPath","filter","transform"]),KS=Zw((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class YS extends aS{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=LT.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)||OS;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=LT.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=zS(i,t),a=zS(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||$S(n))&&r)}(e,i,o,s)||(!Qw.instantAnimations&&a||null==c||c(iS(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 KS()&&n&&GS.has(n)&&("transform"!==n||!l)&&!a&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}(u)?new WS({...u,element:u.motionValue.owner.current}):new cS(u);d.finished.then((()=>this.notifyFinished())).catch(eT),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||(DS=!0,IS(),AS(),DS=!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 QS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function XS(e,t,n=1){const[r,i]=function(e){const t=QS.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 Xw(e)?parseFloat(e):e}return PT(i)?XS(i,t,n+1):i}function JS(e,t){return(null==e?void 0:e[t])??(null==e?void 0:e.default)??e}const ZS=new Set(["width","height","top","left","right","bottom",...ES]),ek=e=>t=>t.test(e),tk=[VT,ZT,JT,XT,tC,eC,{test:e=>"auto"===e,parse:e=>e}],nk=e=>tk.find(ek(e));const rk=new Set(["brightness","contrast","saturate","opacity"]);function ik(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(HT)||[];if(!r)return e;const i=n.replace(r,"");let o=rk.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const ok=/\b([a-z-]*)\(.*?\)/gu,sk={...pC,getAnimatableNone:e=>{const t=e.match(ok);return t?t.map(ik).join(" "):e}},ak={...VT,transform:Math.round},lk={borderWidth:ZT,borderTopWidth:ZT,borderRightWidth:ZT,borderBottomWidth:ZT,borderLeftWidth:ZT,borderRadius:ZT,radius:ZT,borderTopLeftRadius:ZT,borderTopRightRadius:ZT,borderBottomRightRadius:ZT,borderBottomLeftRadius:ZT,width:ZT,maxWidth:ZT,height:ZT,maxHeight:ZT,top:ZT,right:ZT,bottom:ZT,left:ZT,padding:ZT,paddingTop:ZT,paddingRight:ZT,paddingBottom:ZT,paddingLeft:ZT,margin:ZT,marginTop:ZT,marginRight:ZT,marginBottom:ZT,marginLeft:ZT,backgroundPositionX:ZT,backgroundPositionY:ZT,...{rotate:XT,rotateX:XT,rotateY:XT,rotateZ:XT,scale:$T,scaleX:$T,scaleY:$T,scaleZ:$T,skew:XT,skewX:XT,skewY:XT,distance:ZT,translateX:ZT,translateY:ZT,translateZ:ZT,x:ZT,y:ZT,z:ZT,perspective:ZT,transformPerspective:ZT,opacity:BT,originX:nC,originY:nC,originZ:ZT},zIndex:ak,fillOpacity:BT,strokeOpacity:BT,numOctaves:ak},ck={...lk,color:iC,backgroundColor:iC,outlineColor:iC,fill:iC,stroke:iC,borderColor:iC,borderTopColor:iC,borderRightColor:iC,borderBottomColor:iC,borderLeftColor:iC,filter:sk,WebkitFilter:sk},uk=e=>ck[e];function dk(e,t){let n=uk(e);return n!==sk&&(n=pC),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fk=new Set(["auto","none","0"]);class pk extends OS{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(),PT(n))){const r=XS(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!ZS.has(n)||2!==e.length)return;const[r,i]=e,o=nk(r),s=nk(i);if(o!==s)if(wS(o)&&wS(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||Jw(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&&!fk.has(t)&&cC(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=dk(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=SS[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]=SS[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:hk}=kT(queueMicrotask,!1),mk={x:!1,y:!1};function gk(){return mk.x||mk.y}function vk(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 yk(e){return!("touch"===e.pointerType||gk())}const bk=(e,t)=>!!t&&(e===t||bk(e,t.parentElement)),Ek=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,xk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const wk=new WeakSet;function Tk(e){return t=>{"Enter"===t.key&&e(t)}}function Ck(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Sk(e){return Ek(e)&&!gk()}function kk(e,t,n={}){const[r,i,o]=vk(e,n),s=e=>{const r=e.currentTarget;if(!Sk(e)||wk.has(r))return;wk.add(r);const o=t(r,e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Sk(e)&&wk.has(r)&&(wk.delete(r),"function"==typeof o&&o(e,{success:t}))},a=e=>{s(e,r===window||r===document||n.useGlobalTarget||bk(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=Tk((()=>{if(wk.has(n))return;Ck(n,"down");const e=Tk((()=>{Ck(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>Ck(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,i))),t=e,xk.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))})),o}const _k={current:void 0};class Nk{constructor(e,t={}){this.version="__VERSION__",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{var n,r;const i=LT.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=LT.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 iT);const n=this.events[e].add(t);return"change"===e?()=>{n(),_T.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 _k.current&&_k.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=LT.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return aT(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 Dk(e,t){return new Nk(e,t)}const Ak=[...tk,iC,pC],Ik=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Ok=e.createContext({strict:!1}),Lk={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"]},Mk={};for(const GV in Lk)Mk[GV]={isEnabled:e=>Lk[GV].some((t=>!!e[t]))};const Fk=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 Rk(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Fk.has(e)}let Pk=e=>!Rk(e);try{(jk=require("@emotion/is-prop-valid").default)&&(Pk=e=>e.startsWith("on")?!Rk(e):jk(e))}catch{}var jk;function Vk(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 Bk=e.createContext({});function $k(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Uk(e){return"string"==typeof e||Array.isArray(e)}const Hk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qk=["initial",...Hk];function Wk(e){return $k(e.animate)||qk.some((t=>Uk(e[t])))}function zk(e){return Boolean(Wk(e)||e.variants)}function Gk(t){const{initial:n,animate:r}=function(e,t){if(Wk(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Uk(t)?t:void 0,animate:Uk(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(Bk));return e.useMemo((()=>({initial:n,animate:r})),[Kk(n),Kk(r)])}function Kk(e){return Array.isArray(e)?e.join(" "):e}const Yk=Symbol.for("motionComponentSymbol");function Qk(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Xk(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):Qk(r)&&(r.current=e))}),[n])}const Jk=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Zk="data-"+Jk("framerAppearId"),e_=e.createContext({});function t_(t,n,r,i,o){var s,a;const{visualElement:l}=e.useContext(Bk),c=e.useContext(Ok),u=e.useContext(Ww),d=e.useContext(zw).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(e_);!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:n_(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Qk(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[Zk],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 qw((()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),hk.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 n_(e){if(e)return!1!==e.options.allowProjection?e.projection:n_(e.parent)}function r_({preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:i,Component:o}){function s(t,s){let a;const l={...e.useContext(zw),...t,layoutId:i_(t)},{isStatic:c}=l,u=Gk(t),d=i(t,c);if(!c&&Hw){e.useContext(Ok).strict;const t=function(e){const{drag:t,layout:n}=Mk;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=t_(o,d,l,n,t.ProjectionNode)}return p.jsxs(Bk.Provider,{value:u,children:[a&&u.visualElement?p.jsx(a,{visualElement:u.visualElement,...l}):null,r(o,t,Xk(d,u.visualElement,s),d,c,u.visualElement)]})}t&&function(e){for(const t in e)Mk[t]={...Mk[t],...e[t]}}(t),s.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const a=e.forwardRef(s);return a[Yk]=o,a}function i_({layoutId:t}){const n=e.useContext($w).id;return n&&void 0!==t?n+"-"+t:t}const o_={};function s_(e,{layout:t,layoutId:n}){return xS.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!o_[e]||"opacity"===e)}const a_=e=>Boolean(e&&e.getVelocity),l_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},c_=ES.length;function u_(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(xS.has(l))s=!0;else if(FT(l))i[l]=e;else{const t=Ik(e,lk[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<c_;o++){const s=ES[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=Ik(a,lk[s]);l||(i=!1,r+=`${l_[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 d_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function f_(e,t,n){for(const r in t)a_(t[r])||s_(r,n)||(e[r]=t[r])}function p_(t,n){const r={};return f_(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return u_(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),r}function h_(e,t){const n={},r=p_(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 m_=["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 g_(e){return"string"==typeof e&&!e.includes("-")&&!!(m_.indexOf(e)>-1||/[A-Z]/u.test(e))}const v_={offset:"stroke-dashoffset",array:"stroke-dasharray"},y_={offset:"strokeDashoffset",array:"strokeDasharray"};function b_(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,c){if(u_(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?v_:y_;e[o.offset]=ZT.transform(-r);const s=ZT.transform(t),a=ZT.transform(n);e[o.array]=`${s} ${a}`}(u,i,o,s,!1)}const E_=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),x_=e=>"string"==typeof e&&"svg"===e.toLowerCase();function w_(t,n,r,i){const o=e.useMemo((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return b_(e,n,x_(i),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};f_(e,t.style,t),o.style={...e,...o.style}}return o}function T_(t=!1){return(n,r,i,{latestValues:o},s)=>{const a=(g_(n)?w_:h_)(r,o,s,n),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Pk(i)||!0===n&&Rk(i)||!t&&!Rk(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((()=>a_(u)?u.get():u),[u]);return e.createElement(n,{...c,children:d})}}function C_(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function S_(e,t,n,r){if("function"==typeof t){const[i,o]=C_(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]=C_(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function k_(e){return a_(e)?e.get():e}const __=t=>(n,r)=>{const i=e.useContext(Bk),o=e.useContext(Ww),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:N_(n,r,i,e),renderState:t()}}(t,n,i,o);return r?s():Uw(s)};function N_(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=k_(o[f]);let{initial:s,animate:a}=e;const l=Wk(e),c=zk(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&&!$k(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=S_(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 D_(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(a_(i[s])||t.style&&a_(t.style[s])||s_(s,e)||void 0!==(null==(r=null==n?void 0:n.getValue(s))?void 0:r.liveStyle))&&(o[s]=i[s]);return o}const A_={useVisualState:__({scrapeMotionValuesFromProps:D_,createRenderState:d_})};function I_(e,t,n){const r=D_(e,t,n);for(const i in e)if(a_(e[i])||a_(t[i])){r[-1!==ES.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}const O_={useVisualState:__({scrapeMotionValuesFromProps:I_,createRenderState:E_})};function L_(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return r_({...g_(n)?O_:A_,preloadedFeatures:e,useRender:T_(r),createVisualElement:t,Component:n})}}function M_(e,t,n){const r=e.getProps();return S_(r,t,void 0!==n?n:r.custom,e)}const F_=e=>Array.isArray(e);function R_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Dk(n))}function P_(e,t){const n=e.getValue("willChange");if(r=n,Boolean(a_(r)&&r.add))return n.add(t);if(!n&&Qw.WillChange){const n=new Qw.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function j_(e){return e.props[Zk]}const V_=e=>null!==e;const B_={type:"spring",stiffness:500,damping:25,restSpeed:10},$_={type:"keyframes",duration:.8},U_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},H_=(e,{keyframes:t})=>t.length>2?$_:xS.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:B_:U_;const q_=(e,t,n,r={},i,o)=>s=>{const a=JS(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=oT(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,H_(e,u)),u.duration&&(u.duration=oT(u.duration)),u.repeatDelay&&(u.repeatDelay=oT(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)),(Qw.instantAnimations||Qw.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"}){const r=e.filter(V_);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(u.keyframes,a);if(void 0!==e)return void _T.update((()=>{u.onUpdate(e),u.onComplete()}))}return new YS(u)};function W_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function z_(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&&W_(c,u))continue;const i={delay:n,...JS(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=j_(e);if(t){const e=window.MotionHandoffAnimation(t,u,_T);null!==e&&(i.startTime=e,d=!0)}}P_(e,u),t.start(q_(u,t,r,e.shouldReduceMotion&&ZS.has(u)?{type:!1}:i,e,d));const f=t.animation;f&&l.push(f)}return s&&Promise.all(l).then((()=>{_T.update((()=>{s&&function(e,t){const n=M_(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o)R_(e,a,(s=o[a],F_(s)?s[s.length-1]||0:s));var s}(e,s)}))})),l}function G_(e,t,n={}){var r;const i=M_(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(z_(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(K_).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(G_(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 K_(e,t){return e.sortNodePosition(t)}function Y_(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 Q_=qk.length;function X_(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&X_(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Q_;n++){const r=qk[n],i=e.props[r];(Uk(i)||!1===i)&&(t[r]=i)}return t}const J_=[...Hk].reverse(),Z_=Hk.length;function eN(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=>G_(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=G_(e,t,n);else{const i="function"==typeof t?M_(e,t,n.custom):t;r=Promise.all(z_(e,i,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function tN(e){let t=eN(e),n=iN(),r=!0;const i=t=>(n,r)=>{var i;const o=M_(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=X_(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Z_;t++){const f=J_[t],p=n[f],h=void 0!==s[f]?s[f]:a[f],m=Uk(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||$k(h)||"boolean"==typeof h)continue;const y=nN(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=F_(t)&&F_(n)?!Y_(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=M_(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=iN(),r=!0}}}function nN(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Y_(t,e)}function rN(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iN(){return{animate:rN(!0),whileInView:rN(),whileHover:rN(),whileTap:rN(),whileDrag:rN(),whileFocus:rN(),exit:rN()}}class oN{constructor(e){this.isMounted=!1,this.node=e}update(){}}let sN=0;const aN={animation:{Feature:class extends oN{constructor(e){super(e),e.animationState||(e.animationState=tN(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();$k(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 oN{constructor(){super(...arguments),this.id=sN++}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 lN(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cN(e){return{point:{x:e.pageX,y:e.pageY}}}function uN(e,t,n,r){return lN(e,t,(e=>t=>Ek(t)&&e(t,cN(t)))(n),r)}function dN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function fN(e){return e.max-e.min}function pN(e,t,n,r=.5){e.origin=r,e.originPoint=gC(t.min,t.max,e.origin),e.scale=fN(n)/fN(t),e.translate=gC(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function hN(e,t,n,r){pN(e.x,t.x,n.x,r?r.originX:void 0),pN(e.y,t.y,n.y,r?r.originY:void 0)}function mN(e,t,n){e.min=n.min+t.min,e.max=e.min+fN(t)}function gN(e,t,n){e.min=t.min-n.min,e.max=e.min+fN(t)}function vN(e,t,n){gN(e.x,t.x,n.x),gN(e.y,t.y,n.y)}const yN=()=>({x:{min:0,max:0},y:{min:0,max:0}});function bN(e){return[e("x"),e("y")]}function EN(e){return void 0===e||1===e}function xN({scale:e,scaleX:t,scaleY:n}){return!EN(e)||!EN(t)||!EN(n)}function wN(e){return xN(e)||TN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function TN(e){return CN(e.x)||CN(e.y)}function CN(e){return e&&"0%"!==e}function SN(e,t,n){return n+t*(e-n)}function kN(e,t,n,r,i){return void 0!==i&&(e=SN(e,i,r)),SN(e,n,r)+t}function _N(e,t=0,n=1,r,i){e.min=kN(e.min,t,n,r,i),e.max=kN(e.max,t,n,r,i)}function NN(e,{x:t,y:n}){_N(e.x,t.translate,t.scale,t.originPoint),_N(e.y,n.translate,n.scale,n.originPoint)}const DN=.999999999999,AN=1.0000000000001;function IN(e,t){e.min=e.min+t,e.max=e.max+t}function ON(e,t,n,r,i=.5){_N(e,t,n,gC(e.min,e.max,i),r)}function LN(e,t){ON(e.x,t.x,t.scaleX,t.scale,t.originX),ON(e.y,t.y,t.scaleY,t.scale,t.originY)}function MN(e,t){return dN(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 FN=({current:e})=>e?e.ownerDocument.defaultView:null,RN=(e,t)=>Math.abs(e-t);class PN{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=BN(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=RN(e.x,t.x),r=RN(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}=DT;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=jN(t,this.transformPagePoint),_T.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=BN("pointercancel"===e.type?this.lastMoveEventInfo:jN(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Ek(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=jN(cN(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=DT;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,BN(o,this.history)),this.removeListeners=nT(uN(this.contextWindow,"pointermove",this.handlePointerMove),uN(this.contextWindow,"pointerup",this.handlePointerUp),uN(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),NT(this.updatePoint)}}function jN(e,t){return t?{point:t(e.point)}:e}function VN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function BN({point:e},t){return{point:e,delta:VN(e,UN(t)),offset:VN(e,$N(t)),velocity:HN(t,.1)}}function $N(e){return e[0]}function UN(e){return e[e.length-1]}function HN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=UN(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oT(t)));)n--;if(!r)return{x:0,y:0};const o=sT(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 qN(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 WN(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 zN=.35;function GN(e,t,n){return{min:KN(e,t),max:KN(e,n)}}function KN(e,t){return"number"==typeof e?e:e[t]||0}const YN=new WeakMap;class QN{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={x:{min:0,max:0},y:{min:0,max:0}},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 PN(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(cN(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?mk[o]?null:(mk[o]=!0,()=>{mk[o]=!1}):mk.x||mk.y?null:(mk.x=mk.y=!0,()=>{mk.x=mk.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),bN((e=>{let t=this.getAxisMotionValue(e).get()||0;if(JT.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=fN(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),i&&_T.postRender((()=>i(e,t))),P_(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:()=>bN((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:FN(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&&_T.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||!XN(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?gC(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?gC(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&&Qk(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:qN(e.x,n,i),y:qN(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=zN){return!1===e?e=0:!0===e&&(e=zN),{x:GN(e,"left","right"),y:GN(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bN((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||!Qk(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=MN(e,n),{scroll:i}=t;return i&&(IN(r.x,i.offset.x),IN(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:WN(e.x,t.x),y:WN(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=dN(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=bN((s=>{if(!XN(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 P_(this.visualElement,e),n.start(q_(e,n,0,t,this.visualElement,!1))}stopAnimation(){bN((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){bN((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){bN((t=>{const{drag:n}=this.getProps();if(!XN(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]-gC(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Qk(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};bN((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=fN(e),i=fN(t);return i>r?n=rT(t.min,t.max-r,e.min):r>i&&(n=rT(e.min,e.max-i,t.min)),Yw(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(),bN((t=>{if(!XN(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(gC(i,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;YN.set(this.visualElement,this);const e=uN(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Qk(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()),_T.read(t);const i=lN(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(bN((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=zN,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function XN(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const JN=e=>(t,n)=>{e&&_T.postRender((()=>e(t,n)))};const ZN={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function eD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const tD={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!ZT.test(e))return e;e=parseFloat(e)}return`${eD(e,t.target.x)}% ${eD(e,t.target.y)}%`}},nD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=pC.parse(e);if(i.length>5)return r;const o=pC.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=gC(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 rD 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)o_[t]=e[t],FT(t)&&(o_[t].isCSSVariable=!0)}(oD),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()})),ZN.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()||_T.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),hk.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 iD(t){const[n,r]=function(t=!0){const n=e.useContext(Ww);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($w);return p.jsx(rD,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(e_),isPresent:n,safeToRemove:r})}const oD={borderRadius:{...tD,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tD,borderTopRightRadius:tD,borderBottomLeftRadius:tD,borderBottomRightRadius:tD,boxShadow:nD};const sD=(e,t)=>e.depth-t.depth;class aD{constructor(){this.children=[],this.isDirty=!1}add(e){Gw(this.children,e),this.isDirty=!0}remove(e){Kw(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sD),this.isDirty=!1,this.children.forEach(e)}}const lD=["TopLeft","TopRight","BottomLeft","BottomRight"],cD=lD.length,uD=e=>"string"==typeof e?parseFloat(e):e,dD=e=>"number"==typeof e||ZT.test(e);function fD(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const pD=mD(0,.5,vT),hD=mD(.5,.95,eT);function mD(e,t,n){return r=>r<e?0:r>t?1:n(rT(e,t,r))}function gD(e,t){e.min=t.min,e.max=t.max}function vD(e,t){gD(e.x,t.x),gD(e.y,t.y)}function yD(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bD(e,t,n,r,i){return e=SN(e-=t,1/n,r),void 0!==i&&(e=SN(e,1/i,r)),e}function ED(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){JT.test(t)&&(t=parseFloat(t),t=gC(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=gC(o.min,o.max,r);e===o&&(a-=t),e.min=bD(e.min,t,n,a,i),e.max=bD(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}const xD=["x","scaleX","originX"],wD=["y","scaleY","originY"];function TD(e,t,n,r){ED(e.x,t,xD,n?n.x:void 0,r?r.x:void 0),ED(e.y,t,wD,n?n.y:void 0,r?r.y:void 0)}function CD(e){return 0===e.translate&&1===e.scale}function SD(e){return CD(e.x)&&CD(e.y)}function kD(e,t){return e.min===t.min&&e.max===t.max}function _D(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ND(e,t){return _D(e.x,t.x)&&_D(e.y,t.y)}function DD(e){return fN(e.x)/fN(e.y)}function AD(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ID{constructor(){this.members=[]}add(e){Gw(this.members,e),e.scheduleRender()}remove(e){if(Kw(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 OD=["","X","Y","Z"],LD={visibility:"hidden"};let MD=0;function FD(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function RD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=j_(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",_T,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&RD(r)}function PD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=MD++,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(BD),this.nodes.forEach(GD),this.nodes.forEach(KD),this.nodes.forEach($D)},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 aD)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new iT),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=LT.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(NT(r),e(o-t))};return _T.setup(r,!0),()=>NT(r)}(r,250),ZN.hasAnimatedSinceResize&&(ZN.hasAnimatedSinceResize=!1,this.nodes.forEach(zD))}))}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()||eA,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!ND(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={...JS(i,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||zD(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(),NT(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(YD),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&&RD(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(HD);this.isUpdating||this.nodes.forEach(qD),this.isUpdating=!1,this.nodes.forEach(WD),this.nodes.forEach(jD),this.nodes.forEach(VD),this.clearAllSnapshots();const e=LT.now();DT.delta=Yw(0,1e3/60,e-DT.timestamp),DT.timestamp=e,DT.isProcessing=!0,AT.update.process(DT),AT.preRender.process(DT),AT.render.process(DT),DT.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hk.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(UD),this.sharedNodes.forEach(QD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_T.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_T.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||fN(this.snapshot.measuredBox.x)||fN(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={x:{min:0,max:0},y:{min:0,max:0}},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&&!SD(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||wN(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)),rA((r=n).x),rA(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{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(oA))){const{scroll:e}=this.root;e&&(IN(n.x,e.offset.x),IN(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(vD(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&&vD(n,e),IN(n.x,i.offset.x),IN(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};vD(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&&LN(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),wN(e.latestValues)&&LN(n,e.latestValues)}return wN(this.latestValues)&&LN(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};vD(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!wN(e.latestValues))continue;xN(e.latestValues)&&e.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};vD(r,e.measurePageBox()),TD(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return wN(this.latestValues)&&TD(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!==DT.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=DT.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},vN(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),vD(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var s,a,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,mN(s.x,a.x,l.x),mN(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):vD(this.target,this.layout.layoutBox),NN(this.target,this.targetDelta)):vD(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={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},vN(this.relativeTargetOrigin,this.target,e.target),vD(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!xN(this.parent.latestValues)&&!TN(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===DT.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;vD(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&&LN(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,NN(e,s)),r&&wN(o.latestValues)&&LN(e,o.latestValues))}t.x<AN&&t.x>DN&&(t.x=1),t.y<AN&&t.y>DN&&(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={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(yD(this.prevProjectionDelta.x,this.projectionDelta.x),yD(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),hN(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&AD(this.projectionDelta.x,this.prevProjectionDelta.x)&&AD(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={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},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(ZD));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h,m,g;XD(o.x,e.x,n),XD(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vN(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,h=this.relativeTargetOrigin,m=s,g=n,JD(p.x,h.x,m.x,g),JD(p.y,h.y,m.y,g),d&&(l=this.relativeTarget,f=d,kD(l.x,f.x)&&kD(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),vD(d,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){i?(e.opacity=gC(0,n.opacity??1,pD(r)),e.opacityExit=gC(t.opacity??1,0,hD(r))):o&&(e.opacity=gC(t.opacity??1,n.opacity??1,r));for(let s=0;s<cD;s++){const i=`border${lD[s]}Radius`;let o=fD(t,i),a=fD(n,i);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||dD(o)===dD(a)?(e[i]=Math.max(gC(uD(o),uD(a),r),0),(JT.test(a)||JT.test(o))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=gC(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&&(NT(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_T.update((()=>{ZN.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=a_(e)?e:Dk(e);return r.start(q_("",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&&iA(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=fN(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=fN(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}vD(t,n),LN(t,i),hN(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ID);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&&FD("z",e,r,this.animationValues);for(let i=0;i<OD.length;i++)FD(`rotate${OD[i]}`,e,r,this.animationValues),FD(`skew${OD[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 LD;const t={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity="",t.pointerEvents=k_(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=k_(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!wN(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 o_){if(void 0===i[a])continue;const{correct:e,applyTo:n,isCSSVariable:o}=o_[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?k_(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(HD),this.root.sharedNodes.clear()}}}function jD(e){e.updateLayout()}function VD(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?bN((e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=fN(r);r.min=t[e].min,r.max=r.min+i})):iA(i,n.layoutBox,t)&&bN((r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=fN(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={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};hN(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?hN(a,e.applyTransform(r,!0),n.measuredBox):hN(a,t,n.layoutBox);const l=!SD(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={x:{min:0,max:0},y:{min:0,max:0}};vN(s,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};vN(a,t,o.layoutBox),ND(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 BD(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 $D(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function UD(e){e.clearSnapshot()}function HD(e){e.clearMeasurements()}function qD(e){e.isLayoutDirty=!1}function WD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function GD(e){e.resolveTargetDelta()}function KD(e){e.calcProjection()}function YD(e){e.resetSkewAndRotation()}function QD(e){e.removeLeadSnapshot()}function XD(e,t,n){e.translate=gC(t.translate,0,n),e.scale=gC(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function JD(e,t,n,r){e.min=gC(t.min,n.min,r),e.max=gC(t.max,n.max,r)}function ZD(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const eA={duration:.45,ease:[.4,0,.1,1]},tA=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nA=tA("applewebkit/")&&!tA("chrome/")?Math.round:eT;function rA(e){e.min=nA(e.min),e.max=nA(e.max)}function iA(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=DD(t),i=DD(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function oA(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const sA=PD({attachResizeListener:(e,t)=>lN(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),aA={current:void 0},lA=PD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!aA.current){const e=new sA({});e.mount(window),e.setOptions({layoutScroll:!0}),aA.current=e}return aA.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),cA={pan:{Feature:class extends oN{constructor(){super(...arguments),this.removePointerDownListener=eT}onPointerDown(e){this.session=new PN(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:FN(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:JN(e),onStart:JN(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&_T.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=uN(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 oN{constructor(e){super(e),this.removeGroupControls=eT,this.removeListeners=eT,this.controls=new QN(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eT}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:lA,MeasureLayout:iD}};function uA(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&_T.postRender((()=>i(t,cN(t))))}function dA(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&&_T.postRender((()=>i(t,cN(t))))}const fA=new WeakMap,pA=new WeakMap,hA=e=>{const t=fA.get(e.target);t&&t(e)},mA=e=>{e.forEach(hA)};function gA(e,t,n){const r=function({root:e,...t}){const n=e||document;pA.has(n)||pA.set(n,{});const r=pA.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(mA,{root:e,...t})),r[i]}(t);return fA.set(e,n),r.observe(e),()=>{fA.delete(e),r.unobserve(e)}}const vA={some:0,all:1};const yA={inView:{Feature:class extends oN{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:vA[r]};return gA(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 oN{mount(){const{current:e}=this.node;e&&(this.unmount=kk(e,((e,t)=>(dA(this.node,t,"Start"),(e,{success:t})=>dA(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends oN{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(uL){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=nT(lN(this.node.current,"focus",(()=>this.onFocus())),lN(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends oN{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,i,o]=vk(e,n),s=e=>{if(!yk(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const o=e=>{yk(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)=>(uA(this.node,t,"Start"),e=>uA(this.node,e,"End")))))}unmount(){}}}},bA={layout:{ProjectionNode:lA,MeasureLayout:iD}},EA={current:null},xA={current:!1};const wA=new WeakMap;const TA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class CA{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=OS,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=LT.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,_T.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=Wk(t),this.isVariantNode=zk(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]&&a_(e)&&e.set(a[d],!1)}}mount(e){this.current=e,wA.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))),xA.current||function(){if(xA.current=!0,Hw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>EA.current=e.matches;e.addListener(t),t()}else EA.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||EA.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),this.projection=void 0,NT(this.notifyUpdate),NT(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=xS.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&_T.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 Mk){const t=Mk[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):{x:{min:0,max:0},y:{min:0,max:0}}}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<TA.length;n++){const t=TA[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(a_(i))e.addValue(r,i);else if(a_(o))e.addValue(r,Dk(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,Dk(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=Dk(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&&(Xw(n)||Jw(n))?n=parseFloat(n):(r=n,!Ak.find(ek(r))&&pC.test(t)&&(n=dk(e,t))),this.setBaseTarget(e,a_(n)?n.get():n)),a_(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=S_(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||a_(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 iT),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class SA extends CA{constructor(){super(...arguments),this.KeyframeResolver=pk}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;a_(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}function kA(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 _A extends SA{constructor(){super(...arguments),this.type="html",this.renderInstance=kA}readValueFromInstance(e,t){if(xS.has(t))return((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return yS(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(FT(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return MN(e,t)}build(e,t,n){u_(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return D_(e,t,n)}}const NA=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 DA extends SA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yN}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(xS.has(t)){const e=uk(t);return e&&e.default||0}return t=NA.has(t)?t:Jk(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return I_(e,t,n)}build(e,t,n){b_(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){!function(e,t,n,r){kA(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(NA.has(i)?i:Jk(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=x_(e.tagName),super.mount(e)}}const AA=Vk(L_({...aN,...yA,...cA,...bA},((t,n)=>g_(t)?new DA(n):new _A(n,{allowProjection:t!==e.Fragment}))));function IA(t){const n=Uw((()=>Dk(t))),{isStatic:r}=e.useContext(zw);if(r){const[,r]=e.useState(t);e.useEffect((()=>n.on("change",r)),[])}return n}function OA(e,t){const n=IA(t()),r=()=>n.set(t());return r(),qw((()=>{const t=()=>_T.preRender(r,!1,!0),n=e.map((e=>e.on("change",t)));return()=>{n.forEach((e=>e())),NT(r)}})),n}function LA(e,t,n,r){if("function"==typeof e)return function(e){_k.current=[],e();const t=OA(_k.current,e);return _k.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=eS(e[1+n],e[2+n],e[3+n]);return t?i(r):i}(t,n,r);return Array.isArray(e)?MA(e,i):MA([e],(([e])=>i(e)))}function MA(e,t){const n=Uw((()=>[]));return OA(e,(()=>{n.length=0;const r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)}))}const FA=e.createContext(null);function RA({children:t,as:n="ul",axis:r="y",onReorder:i,values:o,...s},a){const l=Uw((()=>AA[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(VA)},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=gC(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(jA).filter((e=>-1!==o.indexOf(e)))))}};return e.useEffect((()=>{u.current=!1})),p.jsx(l,{...s,ref:a,ignoreStrict:!0,children:p.jsx(FA.Provider,{value:d,children:t})})}const PA=e.forwardRef(RA);function jA(e){return e.value}function VA(e,t){return e.layout.min-t.layout.min}function BA(e,t=0){return a_(e)?e:IA(t)}function $A({children:t,style:n={},value:r,as:i="li",onDrag:o,layout:s=!0,...a},l){const c=Uw((()=>AA[i])),u=e.useContext(FA),d={x:BA(n.x),y:BA(n.y)},f=LA([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 UA=e.forwardRef($A),HA=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=Rm("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(UA,{...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}));HA.displayName="Tab";const qA=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=Rm("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(Jm,{...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}));qA.displayName="Tab.Button";const WA=e.forwardRef(((e,t)=>{const n=h.c(7);let r,i,o;return n[0]!==e.className?(r=Rm("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(am,{}),n[2]=i):i=n[2],n[3]!==e||n[4]!==t||n[5]!==r?(o=p.jsx(Jm,{"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}));WA.displayName="Tab.Close";const zA=Object.assign(HA,{Button:qA,Close:WA}),GA=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=Rm("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(PA,{...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}));GA.displayName="Tabs";var[KA,YA]=og("Tooltip",[hE]),QA=hE(),XA="TooltipProvider",JA=700,ZA="tooltip.open",[eI,tI]=KA(XA),nI=e=>{const{__scopeTooltip:t,delayDuration:n=JA,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(eI,{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})};nI.displayName=XA;var rI="Tooltip",[iI,oI]=KA(rI),sI=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:l}=e,c=tI(rI,e.__scopeTooltip),u=QA(t),[d,f]=i.useState(null),h=ug(),m=i.useRef(0),g=a??c.disableHoverableContent,v=l??c.delayDuration,y=i.useRef(!1),[b,E]=fg({prop:r,defaultProp:o??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(ZA))):c.onClose(),null==s||s(e)},caller:rI}),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(AE,{...u,children:p.jsx(iI,{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})})};sI.displayName=rI;var aI="TooltipTrigger",lI=i.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=oI(aI,n),s=tI(aI,n),a=QA(n),l=ig(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(IE,{asChild:!0,...a,children:p.jsx(yg.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:tg(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))})),onPointerLeave:tg(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:tg(e.onPointerDown,(()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:tg(e.onFocus,(()=>{c.current||o.onOpen()})),onBlur:tg(e.onBlur,o.onClose),onClick:tg(e.onClick,o.onClose)})})}));lI.displayName=aI;var cI="TooltipPortal",[uI,dI]=KA(cI,{forceMount:void 0}),fI=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=oI(cI,t);return p.jsx(uI,{scope:t,forceMount:n,children:p.jsx(Bg,{present:n||o.open,children:p.jsx(Vg,{asChild:!0,container:i,children:r})})})};fI.displayName=cI;var pI="TooltipContent",hI=i.forwardRef(((e,t)=>{const n=dI(pI,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=oI(pI,e.__scopeTooltip);return p.jsx(Bg,{present:r||s.open,children:s.disableHoverableContent?p.jsx(bI,{side:i,...o,ref:t}):p.jsx(mI,{side:i,...o,ref:t})})})),mI=i.forwardRef(((e,t)=>{const n=oI(pI,e.__scopeTooltip),r=tI(pI,e.__scopeTooltip),o=i.useRef(null),s=ig(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(bI,{...e,ref:s})})),[gI,vI]=KA(rI,{isInside:!1}),yI=gg("TooltipContent"),bI=i.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=oI(pI,n),u=QA(n),{onClose:d}=c;return i.useEffect((()=>(document.addEventListener(ZA,d),()=>document.removeEventListener(ZA,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(kg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:p.jsxs(OE,{"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(yI,{children:r}),p.jsx(gI,{scope:n,isInside:!0,children:p.jsx(Ny,{id:c.contentId,role:"tooltip",children:o||r})})]})})}));hI.displayName=pI;var EI="TooltipArrow";i.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,i=QA(n);return vI(EI,n).isInside?null:p.jsx(LE,{...i,...r,ref:t})})).displayName=EI;var xI=nI,wI=sI,TI=lI,CI=fI,SI=hI;const kI=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(TI,{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(CI,{children:p.jsx(SI,{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(wI,{children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9],f},_I=Object.assign(kI,{Provider:xI}),NI=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=Rm("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(Jm,{...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(_I,{label:i,children:v}),r[16]=i,r[17]=v,r[18]=y):y=r[18],y}));NI.displayName="ToolbarButton";const DI=()=>{const e=h.c(19);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={nonNull:!0,caller:DI},e[0]=t):t=e[0];const{queryEditor:n,setOperationName:r}=Wh(t);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={nonNull:!0,caller:DI},e[1]=i):i=e[1];const{isFetching:o,isSubscribed:s,operationName:a,run:l,stop:c}=Yh(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(Im,{}):p.jsx(Tm,{}),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(jw,{children:[p.jsx(_I,{label:g,children:p.jsx(jw.Button,{...b})}),p.jsx(jw.Content,{children:d.map(((e,t)=>{const i=e.name?e.name.value:`<Unnamed ${e.operation}>`;return p.jsx(jw.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(_I,{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},AI=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=Rm("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(jw.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(_I,{label:i,children:a}),t[11]=i,t[12]=a,t[13]=l):l=t[13],t[14]!==r?(c=p.jsx(jw.Content,{children:r}),t[14]=r,t[15]=c):c=t[15],t[16]!==o||t[17]!==l||t[18]!==c?(u=p.jsxs(jw,{...o,children:[l,c]}),t[16]=o,t[17]=l,t[18]=c,t[19]=u):u=t[19],u}),{Item:jw.Item}),II=Object.freeze(Object.defineProperty({__proto__:null,ArgumentIcon:rm,Button:Zm,ButtonGroup:eg,ChevronDownIcon:im,ChevronLeftIcon:om,ChevronUpIcon:sm,CloseIcon:am,CopyIcon:lm,DeprecatedArgumentIcon:cm,DeprecatedEnumValueIcon:um,DeprecatedFieldIcon:dm,Dialog:Iy,DialogRoot:Ay,DirectiveIcon:fm,DocsFilledIcon:pm,DocsIcon:hm,DropdownMenu:jw,EditorContext:Hh,EditorContextProvider:qh,EnumValueIcon:mm,ExecuteButton:DI,ExecutionContext:Gh,ExecutionContextProvider:Kh,FieldIcon:gm,GraphiQLProvider:em,HeaderEditor:Pm,HistoryIcon:vm,ImagePreview:jm,ImplementsIcon:ym,KeyboardShortcutIcon:bm,MagnifyingGlassIcon:Em,MarkdownContent:Vw,MergeIcon:xm,PenIcon:wm,PlayIcon:Tm,PluginContextProvider:Ku,PlusIcon:Cm,PrettifyIcon:Sm,QueryEditor:Bm,ReloadIcon:km,ResponseEditor:Gm,RootTypeIcon:_m,SchemaContextProvider:Xu,SettingsIcon:Nm,Spinner:Bw,StarFilledIcon:Dm,StarIcon:Am,StopIcon:Im,StorageContextProvider:Iu,Tab:zA,Tabs:GA,ToolbarButton:NI,ToolbarMenu:AI,Tooltip:_I,TooltipRoot:kI,TrashIcon:Om,TypeIcon:Lm,UnStyledButton:Jm,VariableEditor:Km,cn:Rm,createBoundedUseStore:Du,createContextHook:Su,createNullableContext:Cu,debounce:Kp,isMacOs:Ru,useAutoCompleteLeafs:lh,useCopyQuery:ih,useDragResize:Ym,useEditorContext:Wh,useEditorState:ch,useExecutionContext:Yh,useHeaderEditor:dh,useHeadersEditorState:()=>ch("header"),useMergeQuery:oh,useOperationsEditorState:()=>ch("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:Yu,usePrettifyEditors:ah,useQueryEditor:yh,useResponseEditor:Wm,useSchemaStore:Ju,useStorage:Lu,useTheme:tm,useVariableEditor:Vh,useVariablesEditorState:()=>ch("variable")},Symbol.toStringTag,{value:"Module"})),OI=_u(((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({})}}}))),LI=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}=Yh(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}=Wh(l),d=c[u],f=Lu();let p;n[2]!==o||n[3]!==f?(p=new Ms(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=()=>{OI.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}=OI.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},MI=Du(OI),FI=()=>MI(PI);function RI(e){return e.historyStorage.queries}function PI(e){return e.actions}const jI=t=>{const n=h.c(39),{editLabel:r,toggleFavorite:i,deleteFromHistory:o,setActive:s}=FI();let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a={nonNull:!0,caller:jI},n[0]=a):a=n[0];const{headerEditor:l,queryEditor:c,variableEditor:u}=Wh(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 F,R,P;return n[25]!==M?(F=Rm("graphiql-history-item",M),n[25]=M,n[26]=F):F=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?(R=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(Jm,{type:"button",ref:f,onClick:T,children:"Save"}),p.jsx(Jm,{type:"button",ref:f,onClick:S,children:p.jsx(am,{})})]}):p.jsxs(p.Fragment,{children:[p.jsx(_I,{label:"Set active",children:p.jsx(Jm,{type:"button",className:"graphiql-history-item-label",onClick:D,"aria-label":"Set active",children:x})}),p.jsx(_I,{label:"Edit label",children:p.jsx(Jm,{type:"button",className:"graphiql-history-item-action",onClick:_,"aria-label":"Edit label",children:p.jsx(wm,{"aria-hidden":"true"})})}),p.jsx(_I,{label:t.item.favorite?"Remove favorite":"Add favorite",children:p.jsx(Jm,{type:"button",className:"graphiql-history-item-action",onClick:L,"aria-label":t.item.favorite?"Remove favorite":"Add favorite",children:t.item.favorite?p.jsx(Dm,{"aria-hidden":"true"}):p.jsx(Am,{"aria-hidden":"true"})})}),p.jsx(_I,{label:"Delete from history",children:p.jsx(Jm,{type:"button",className:"graphiql-history-item-action",onClick:I,"aria-label":"Delete from history",children:p.jsx(Om,{"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]=R):R=n[35],n[36]!==F||n[37]!==R?(P=p.jsx("li",{className:F,children:R}),n[36]=F,n[37]=R,n[38]=P):P=n[38],P};function VI(e,t){return{...e,index:t}}function BI(e){return e.favorite}function $I(e){return!e.favorite}function UI(e){return p.jsx(jI,{item:e},e.index)}function HI(e){return p.jsx(jI,{item:e},e.index)}const qI={title:"History",icon:vm,content:()=>{const t=h.c(13),n=MI(RI),{deleteFromHistory:r}=FI();let i;i=n.slice().map(VI).reverse();const o=i.filter(BI);o.length&&(i=i.filter($I));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(Zm,{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(UI)});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(HI)});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}},WI=[{name:"Docs"}],zI=_u(((e,t)=>({explorerNavStack:WI,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:WI}}))},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=[...WI];let i=null;for(const o of n)if(o!==WI[0])if(o.def)if(Bt(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(bt(i)||St(i)){const e=i.getFields()[o.name];if(!e)break;r.push({name:o.name,def:e})}else{if(yt(i)||Ct(i)||xt(i)||Tt(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}}))}}}))),GI=t=>{const n=h.c(7),{children:r}=t,{schema:i,validationErrors:o,schemaReference:s}=Ju();let a,l,c,u;return n[0]!==s?(a=()=>{const{resolveSchemaReferenceToNavItem:e}=zI.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}=zI.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},KI=Du(zI),YI=()=>KI(XI),QI=()=>KI(JI);function XI(e){return e.explorerNavStack}function JI(e){return e.actions}const ZI=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=Ln(r,i);e?(a=" = ",o="graphiql-doc-explorer-default-value",s=(e=>e?at(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 eO(e,t){return _t(e)?p.jsxs(p.Fragment,{children:[eO(e.ofType,t),"!"]}):kt(e)?p.jsxs(p.Fragment,{children:["[",eO(e.ofType,t),"]"]}):t(e)}const tO=e=>{const t=h.c(5),{type:n}=e,{push:r}=QI();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=eO(n,i),t[2]=i,t[3]=n,t[4]=o):o=t[4],o},nO=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(tO,{type:n.type}),t[2]=n.type,t[3]=s):s=t[3],t[4]!==n||t[5]!==r?(a=!1!==r&&p.jsx(ZI,{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(Vw,{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(Vw,{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},rO=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(Vw,{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},iO=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},oO=e=>{const t=h.c(10),{title:n,children:r}=e,i=sO[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},sO={Arguments:rm,"Deprecated Arguments":cm,"Deprecated Enum Values":um,"Deprecated Fields":dm,Directives:fm,"Enum Values":mm,Fields:gm,Implements:ym,Implementations:Lm,"Possible Types":Lm,"Root Types":_m,Type:Lm,"All Schema Types":Lm},aO=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(Vw,{type:"description",children:n.description}):null,t[0]=n.description,t[1]=r):r=t[1],t[2]!==n.deprecationReason?(i=p.jsx(rO,{preview:!1,children:n.deprecationReason}),t[2]=n.deprecationReason,t[3]=i):i=t[3],t[4]!==n.type?(o=p.jsx(oO,{title:"Type",children:p.jsx(tO,{type:n.type})}),t[4]=n.type,t[5]=o):o=t[5],t[6]!==n?(s=p.jsx(lO,{field:n}),a=p.jsx(cO,{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},lO=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(oO,{title:"Arguments",children:l.map(uO)}):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(oO,{title:"Deprecated Arguments",children:c.map(dO)}):p.jsx(Zm,{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},cO=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(fO),n[0]=i,n[1]=o):o=n[1],n[2]!==o?(s=p.jsx(oO,{title:"Directives",children:o}),n[2]=o,n[3]=s):s=n[3],s};function uO(e){return p.jsx(nO,{arg:e},e.name)}function dO(e){return p.jsx(nO,{arg:e},e.name)}function fO(e){return p.jsx("div",{children:p.jsx(iO,{directive:e})},e.name.value)}const pO=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(Vw,{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(tO,{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(tO,{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(tO,{type:u})]}),r[25]=u,r[26]=E):E=r[26],r[27]!==y||r[28]!==b||r[29]!==E?(v=p.jsxs(oO,{title:"Root Types",children:[y,b,E]}),r[27]=y,r[28]=b,r[29]=E,r[30]=v):v=r[30],d=oO,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(tO,{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},hO="undefined"!=typeof document?e.useLayoutEffect:()=>{};const mO=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},gO=e=>{if(e&&"window"in e&&e.window===e)return e;return mO(e).defaultView||window};function vO(e,t){return!(!t||!e)&&e.contains(t)}const yO=(e=document)=>e.activeElement;function bO(e){return e.target}function EO(e){let t=null;return()=>(null==t&&(t=e()),t)}const xO=EO((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})),wO=EO((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 TO(){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 CO(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function SO(t){let n=e.useRef({isFocused:!1,observer:null});hO((()=>{const e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(t){const n=e.useRef(null);return hO((()=>{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=CO(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 kO=null,_O=new Set,NO=new Map,DO=!1,AO=!1;const IO={Tab:!0,Escape:!0};function OO(e,t){for(let n of _O)n(e,t)}function LO(e){DO=!0,function(e){return!(e.metaKey||!xO()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(kO="keyboard",OO("keyboard",e))}function MO(e){kO="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(DO=!0,OO("pointer",e))}function FO(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(wO()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(DO=!0,kO="virtual")}function RO(e){e.target!==window&&e.target!==document&&e.isTrusted&&(DO||AO||(kO="virtual",OO("virtual",e)),DO=!1,AO=!1)}function PO(){DO=!1,AO=!0}function jO(e){if("undefined"==typeof window||NO.get(gO(e)))return;const t=gO(e),n=mO(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){DO=!0,r.apply(this,arguments)},n.addEventListener("keydown",LO,!0),n.addEventListener("keyup",LO,!0),n.addEventListener("click",FO,!0),t.addEventListener("focus",RO,!0),t.addEventListener("blur",PO,!1),"undefined"!=typeof PointerEvent&&(n.addEventListener("pointerdown",MO,!0),n.addEventListener("pointermove",MO,!0),n.addEventListener("pointerup",MO,!0)),t.addEventListener("beforeunload",(()=>{VO(e)}),{once:!0}),NO.set(t,{focus:r})}const VO=(e,t)=>{const n=gO(e),r=mO(e);t&&r.removeEventListener("DOMContentLoaded",t),NO.has(n)&&(n.HTMLElement.prototype.focus=NO.get(n).focus,r.removeEventListener("keydown",LO,!0),r.removeEventListener("keyup",LO,!0),r.removeEventListener("click",FO,!0),n.removeEventListener("focus",RO,!0),n.removeEventListener("blur",PO,!1),"undefined"!=typeof PointerEvent&&(r.removeEventListener("pointerdown",MO,!0),r.removeEventListener("pointermove",MO,!0),r.removeEventListener("pointerup",MO,!0)),NO.delete(n))};function BO(){return"pointer"!==kO}"undefined"!=typeof document&&function(e){const t=mO(e);let n;"loading"!==t.readyState?jO(e):(n=()=>{jO(e)},t.addEventListener("DOMContentLoaded",n))}();const $O=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function UO(t,n,r){jO(),e.useEffect((()=>{let e=(e,n)=>{(function(e,t,n){let r=mO(null==n?void 0:n.target);const i="undefined"!=typeof window?gO(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?gO(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?gO(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?gO(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||r.activeElement instanceof i&&!$O.has(r.activeElement.type)||r.activeElement instanceof o||r.activeElement instanceof s&&r.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof a&&!IO[n.key])})(!!(null==r?void 0:r.isTextInput),e,n)&&t(BO())};return _O.add(e),()=>{_O.delete(e)}}),n)}function HO(t){let{isDisabled:n,onBlurWithin:r,onFocusWithin:i,onFocusWithinChange:o}=t,s=e.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:l}=TO(),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=SO(c),d=e.useCallback((e=>{if(!e.currentTarget.contains(e.target))return;const t=mO(e.target),n=yO(t);if(!s.current.isFocusWithin&&n===bO(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&&!vO(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=CO(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 qO=!1,WO=0;function zO(e){"touch"===e.pointerType&&(qO=!0,setTimeout((()=>{qO=!1}),50))}function GO(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent&&document.addEventListener("pointerup",zO),WO++,()=>{WO--,WO>0||"undefined"!=typeof PointerEvent&&document.removeEventListener("pointerup",zO)}}function KO(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(GO,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=TO(),{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=>{qO&&"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(mO(t.target),"pointerover",(t=>{l.isHovered&&l.target&&!vO(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 YO(t={}){let{autoFocus:n=!1,isTextInput:r,within:i}=t,o=e.useRef({isFocused:!1,isFocusVisible:n||BO()}),[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]);UO((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=SO(s),l=e.useCallback((e=>{const t=mO(e.target),n=t?yO(t):yO();e.target===e.currentTarget&&n===bO(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}=HO({isDisabled:!i,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:i?p:f}}var QO=Object.defineProperty,XO=(e,t,n)=>(((e,t,n)=>{t in e?QO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let JO=new class{constructor(){XO(this,"current",this.detect()),XO(this,"handoffState","pending"),XO(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 ZO(e){var t,n;return JO.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 eL(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function tL(){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 eL((()=>{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=tL();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 nL(){let[t]=e.useState(tL);return e.useEffect((()=>()=>t.dispose()),[t]),t}let rL=(t,n)=>{JO.isServer?e.useEffect(t,n):e.useLayoutEffect(t,n)};function iL(t){let n=e.useRef(t);return rL((()=>{n.current=t}),[t]),n}let oL=function(t){let n=iL(t);return e.useCallback(((...e)=>n.current(...e)),[n])};let sL=e.createContext(void 0);function aL(){return e.useContext(sL)}function lL(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function cL(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,cL),r}var uL,dL,fL=((dL=fL||{})[dL.None=0]="None",dL[dL.RenderStrategy=1]="RenderStrategy",dL[dL.Static=2]="Static",dL),pL=((uL=pL||{})[uL.Unmount=0]="Unmount",uL[uL.Hidden=1]="Hidden",uL);function hL(){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:gL;let l=vL(t,e);if(o)return mL(l,n,r,s,a);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=l;if(e)return mL(t,n,r,s,a)}if(1&c){let{unmount:e=!0,...t}=l;return cL(e?0:1,{0:()=>null,1:()=>mL({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return mL(l,n,r,s,a)}({mergeRefs:t,...e})),[t])}function mL(t,n={},r,i,o){let{as:s=r,children:a,refName:l="ref",...c}=xL(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(EL(c)).length>0||Object.keys(EL(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)=>lL(n(...e),c.className):lL(n,c.className),i=r?{className:r}:{},s=vL(d.props,EL(xL(c,["ref"])));for(let e in f)e in s&&delete f[e];return e.cloneElement(d,Object.assign({},s,f,u,{ref:o(wL(d),u.ref)},i))}if(Object.keys(EL(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(EL(c)).concat(Object.keys(EL(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({},xL(c,["ref"]),s!==e.Fragment&&u,s!==e.Fragment&&f),d)}function gL(...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 vL(...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 yL(...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 bL(t){var n;return Object.assign(e.forwardRef(t),{displayName:null!=(n=t.displayName)?n:t.name})}function EL(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function xL(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function wL(t){return e.version.split(".")[0]>="19"?t.props.ref:t.ref}function TL(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))SL(n,CL(t,r),i);return n}function CL(e,t){return e?e+"["+t+"]":t}function SL(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())SL(e,CL(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,""]):TL(n,t,e)}var kL=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(kL||{});let _L=bL((function(e,t){var n;let{features:r=1,...i}=e,o={ref:t,"aria-hidden":!(2&~r)||(null!=(n=i["aria-hidden"])?n:void 0),hidden:!(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&~r)&&!!(2&~r)&&{display:"none"}}};return hL()({ourProps:o,theirProps:i,slot:{},defaultTag:"span",name:"Hidden"})})),NL=e.createContext(null);function DL({children:n}){let r=e.useContext(NL);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 AL({data:t,form:n,disabled:r,onReset:i,overrides:o}){let[s,a]=e.useState(null),l=nL();return e.useEffect((()=>{if(i&&s)return l.addEventListener(s,"reset",i)}),[s,n,i]),e.createElement(DL,null,e.createElement(IL,{setForm:a,formId:n}),TL(t).map((([t,i])=>e.createElement(_L,{features:kL.Hidden,...EL({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:r,name:t,value:i,...o})}))))}function IL({setForm:t,formId:n}){return e.useEffect((()=>{if(n){let e=document.getElementById(n);e&&t(e)}}),[t,n]),n?null:e.createElement(_L,{features:kL.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let n=e.closest("form");n&&t(n)}})}let OL=e.createContext(void 0);function LL(){return e.useContext(OL)}function ML(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 FL=Symbol();function RL(...t){let n=e.useRef(t);e.useEffect((()=>{n.current=t}),[t]);let r=oL((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[FL])))?void 0:r}let PL=e.createContext(null);function jL(){let t=e.useContext(PL);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,jL),e}return t}PL.displayName="DescriptionContext";let VL=bL((function(t,n){let r=e.useId(),i=aL(),{id:o=`headlessui-description-${r}`,...s}=t,a=jL(),l=RL(n);rL((()=>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 hL()({ourProps:d,theirProps:s,slot:u,defaultTag:"p",name:a.name||"Description"})}));Object.assign(VL,{});var BL,$L=((BL=$L||{}).Space=" ",BL.Enter="Enter",BL.Escape="Escape",BL.Backspace="Backspace",BL.Delete="Delete",BL.ArrowLeft="ArrowLeft",BL.ArrowUp="ArrowUp",BL.ArrowRight="ArrowRight",BL.ArrowDown="ArrowDown",BL.Home="Home",BL.End="End",BL.PageUp="PageUp",BL.PageDown="PageDown",BL.Tab="Tab",BL);let UL=e.createContext(null);function HL(){let t=e.useContext(UL);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,HL),e}return t}function qL(t){var n,r,i;let o=null!=(r=null==(n=e.useContext(UL))?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}UL.displayName="LabelContext";let WL=bL((function(t,n){var r;let i=e.useId(),o=HL(),s=LL(),a=aL(),{id:l=`headlessui-label-${i}`,htmlFor:c=(null!=s?s:null==(r=o.props)?void 0:r.htmlFor),passive:u=!1,...d}=t,f=RL(n);rL((()=>o.register(l)),[l,o.register]);let p=oL((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),hL()({ourProps:g,theirProps:d,slot:m,defaultTag:c?"label":"div",name:o.name||"Label"})})),zL=Object.assign(WL,{});function GL(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 KL(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const YL=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,i)),n)}},QL=e=>e,XL=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},JL=(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)}},ZL={passive:!0},eM="undefined"==typeof window||"onscrollend"in window,tM=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const o=e.options.useScrollendEvent&&eM?()=>{}:YL(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,ZL);const c=e.options.useScrollendEvent&&eM;return c&&n.addEventListener("scrollend",l,ZL),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},nM=(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"])},rM=(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 iM{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:QL,rangeExtractor:XL,onChange:()=>{},measureElement:nM,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=GL((()=>(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=GL((()=>[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=GL((()=>[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=GL((()=>[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=oM(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=GL((()=>{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=GL((()=>[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 KL(t[oM(0,t.length-1,(e=>KL(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]=KL(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 oM=(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 sM="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function aM(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 iM(r)));return o.setOptions(r),sM((()=>o._didMount()),[]),sM((()=>o._willUpdate())),o}({observeElementRect:JL,observeElementOffset:tM,scrollToFn:rM,...e})}function lM(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 cM(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 rL((()=>{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 uM=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 dM(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 fM(t){return e.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot)}let pM=new uM((()=>dM((()=>[]),{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 hM(t,n){let r=pM.get(n),i=e.useId(),o=fM(r);if(rL((()=>{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 mM=new Map,gM=new Map;function vM(e){var t;let n=null!=(t=gM.get(e))?t:0;return gM.set(e,n+1),0!==n||(mM.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>yM(e)}function yM(e){var t;let n=null!=(t=gM.get(e))?t:1;if(1===n?gM.delete(e):gM.set(e,n-1),1!==n)return;let r=mM.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,mM.delete(e))}let bM=["[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 EM,xM,wM,TM=((wM=TM||{})[wM.First=1]="First",wM[wM.Previous=2]="Previous",wM[wM.Next=4]="Next",wM[wM.Last=8]="Last",wM[wM.WrapAround=16]="WrapAround",wM[wM.NoScroll=32]="NoScroll",wM[wM.AutoFocus=64]="AutoFocus",wM),CM=((xM=CM||{})[xM.Error=0]="Error",xM[xM.Overflow=1]="Overflow",xM[xM.Success=2]="Success",xM[xM.Underflow=3]="Underflow",xM),SM=((EM=SM||{})[EM.Previous=-1]="Previous",EM[EM.Next=1]="Next",EM),kM=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(kM||{});var _M=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(_M||{});function NM(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function DM(){return NM()||/Android/gi.test(window.navigator.userAgent)}function AM(t,n,r,i){let o=iL(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));function IM(t,n,r){let i=hM(t,"outside-click"),o=iL(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=ZO(e))?void 0:n.body)&&cL(t,{0:()=>e.matches(bM),1(){let t=e;for(;null!==t;){if(t.matches(bM))return!0;t=t.parentElement}return!1}})}(r,kM.Loose)&&-1!==r.tabIndex&&e.preventDefault(),o.current(e,r)}),[o,n]),a=e.useRef(null);AM(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),AM(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),AM(i,"click",(e=>{DM()||a.current&&(s(e,(()=>a.current)),a.current=null)}),!0);let l=e.useRef({x:0,y:0});AM(i,"touchstart",(e=>{l.current.x=e.touches[0].clientX,l.current.y=e.touches[0].clientY}),!0),AM(i,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-l.current.x)>=30||Math.abs(n-l.current.y)>=30))return s(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(t,n,r,i){let o=iL(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 OM(...t){return e.useMemo((()=>ZO(...t)),[...t])}function LM(t){let n=e.useRef({value:"",selectionStart:null,selectionEnd:null});return function(t,n,r,i){let o=iL(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})})),oL((()=>{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 MM(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 FM(){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 RM(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let PM=dM((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:tL(),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:RM(n)},i=[NM()?{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=tL();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)}))}))}}:{},FM(),{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 jM(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=fM(PM),i=t?r.get(t):void 0,o=!!i&&i.count>0;rL((()=>{if(t&&e)return PM.dispatch("PUSH",t,n),()=>PM.dispatch("POP",t,n)}),[e,t])}(hM(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}function VM(e){return[e.screenX,e.screenY]}var BM,$M;PM.subscribe((()=>{let e=PM.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)&&PM.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&PM.dispatch("TEARDOWN",n)}})),"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(BM=null==process?void 0:process.env)?void 0:BM.NODE_ENV)&&void 0===(null==($M=null==Element?void 0:Element.prototype)?void 0:$M.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 UM=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(UM||{});function HM(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function qM(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=nL();return rL((()=>{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=tL();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=tL();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 WM(t,n){let r=e.useRef([]),i=oL(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])}const zM={...i},GM=zM.useInsertionEffect||(e=>e());function KM(e){const t=i.useRef((()=>{}));return GM((()=>{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 YM="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;let QM=!1,XM=0;const JM=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+XM++;const ZM=zM.useId||function(){const[e,t]=i.useState((()=>QM?JM():void 0));return YM((()=>{null==e&&t(JM())}),[]),i.useEffect((()=>{QM=!0}),[]),e};const eF=i.createContext(null),tF=i.createContext(null),nF="data-floating-ui-focusable";function rF(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ZM(),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!=((null==(c=i.useContext(eF))?void 0:c.id)||null);var c;const[u,d]=i.useState(r.reference),f=KM(((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)})),p=i.useMemo((()=>({setPositionReference:d})),[]),h=i.useMemo((()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference})),[u,r.reference,r.floating]);return i.useMemo((()=>({dataRef:s,open:t,onOpenChange:f,elements:h,events:a,floatingId:o,refs:p})),[t,f,h,a,o,p])}function iF(e){void 0===e&&(e={});const{nodeId:t}=e,n=rF({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,a]=i.useState(null),[l,c]=i.useState(null),u=(null==o?void 0:o.domReference)||s,d=i.useRef(null),f=i.useContext(tF);YM((()=>{u&&(d.current=u)}),[u]);const p=nE({...e,elements:{...o,...l&&{reference:l}}}),h=i.useCallback((e=>{const t=ub(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)}),[p.refs]),m=i.useCallback((e=>{(ub(e)||null===e)&&(d.current=e,a(e)),(ub(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!ub(e))&&p.refs.setReference(e)}),[p.refs]),g=i.useMemo((()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d})),[p.refs,m,h]),v=i.useMemo((()=>({...p.elements,domReference:u})),[p.elements,u]),y=i.useMemo((()=>({...p,...r,refs:g,elements:v,nodeId:t})),[p,g,v,t,r]);return YM((()=>{r.dataRef.current.floatingContext=y;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=y)})),i.useMemo((()=>({...p,context:y,refs:g,elements:v})),[p,g,v,y])}const oF="active",sF="selected";function aF(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[oF]:t,[sF]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[nF]:""},...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&&[oF,sF].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 lF(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function cF(e,t){const{open:n,elements:r}=e,{enabled:s=!0,overflowRef:a,scrollRef:l,onChange:c}=t,u=KM(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 uF=e.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});uF.displayName="FloatingContext";let dF=e.createContext(null);dF.displayName="PlacementContext";function fF({children:t,enabled:n=!0}){let[r,s]=e.useState(null),[a,l]=e.useState(0),c=e.useRef(null),[u,d]=e.useState(null);!function(e){rL((()=>{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])}(u);let f=n&&null!==r&&null!==u,{to:p="bottom",gap:h=0,offset:m=0,padding:g=0,inner:v}=function(e,t){var n,r,i;let o=pF(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=pF(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=pF(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:s,padding:a}}(r,u),[y,b="center"]=p.split(" ");rL((()=>{f&&l(0)}),[f]);let{refs:E,floatingStyles:x,context:w}=iF({open:f,placement:"selection"===y?"center"===b?"bottom":`bottom-${b}`:"center"===b?`${y}`:`${y}-${b}`,strategy:"absolute",transform:!1,middleware:[iE({mainAxis:"selection"===y?0:h,crossAxis:m}),oE({padding:g}),"selection"!==y&&sE({padding:g}),"selection"===y&&v?(S={...v,padding:g,overflowRef:c,offset:a,minItemsVisible:4,referenceOverflowThreshold:g,onFallbackChange(e){var t,n;if(!e)return;let r=w.elements.floating;if(!r)return;let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,o=Math.min(4,r.childElementCount),s=0,a=0;for(let l of null!=(n=null==(t=w.elements.floating)?void 0:t.childNodes)?n:[])if(l instanceof HTMLElement){let e=l.offsetTop,t=e+l.clientHeight+i,n=r.scrollTop,c=n+r.clientHeight;if(!(e>=n&&t<=c)){a=Math.max(0,Math.min(t,c)-Math.max(e,n)),s=l.clientHeight;break}o--}o>=1&&l((e=>{let t=s*o-a+i;return e>=t?e:t}))}},{name:"inner",options:S,async fn(e){const{listRef:t,overflowRef:n,onFallbackChange:r,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=qy(S,e),{rects:d,elements:{floating:f}}=e,p=t.current[s],h=(null==c?void 0:c.current)||f,m=f.clientTop||h.clientTop,g=0!==f.clientTop,v=0!==h.clientTop,y=f===h;if(!p)return{};const b={...e,...await iE(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-i).fn(e)},E=await Ub(lF(b,h.scrollHeight+m+f.clientTop),u),x=await Ub(b,{...u,elementContext:"reference"}),w=Py(0,E.top),T=b.y+w,C=(h.scrollHeight>h.clientHeight?e=>e:jy)(Py(0,h.scrollHeight+(g&&y||v?2*m:0)-w-Py(0,E.bottom)));if(h.style.maxHeight=C+"px",h.scrollTop=w,r){const e=h.offsetHeight<p.offsetHeight*Ry(a,t.current.length)-1||x.top>=-l||x.bottom>=-l;o.flushSync((()=>r(e)))}return n&&(n.current=await Ub(lF({...b,y:T},h.offsetHeight+m+f.clientTop),u)),{y:T}}}):null,aE({padding:g,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:$b}),[T=y,C=b]=w.placement.split("-");var S;"selection"===y&&(T="selection");let k=e.useMemo((()=>({anchor:[T,C].filter(Boolean).join(" ")})),[T,C]),_=cF(w,{overflowRef:c,onChange:l}),{getReferenceProps:N,getFloatingProps:D}=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=>aF(t,e,"reference")),t),s=i.useCallback((t=>aF(t,e,"floating")),n),a=i.useCallback((t=>aF(t,e,"item")),r);return i.useMemo((()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:a})),[o,s,a])}([_]),A=oL((e=>{d(e),E.setFloating(e)}));return i.createElement(dF.Provider,{value:s},i.createElement(uF.Provider,{value:{setFloating:A,setReference:E.setReference,styles:x,getReferenceProps:N,getFloatingProps:D,slot:k}},t))}function pF(t,n,r=void 0){let i=nL(),o=oL(((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=mF(e,t);return[n,r=>{let o=hF(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=mF(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 rL((()=>{let[e,r]=o(t,n);if(l(e),r)return r(l)}),[t,n]),a}function hF(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,...hF(r)]:[n]}return[]}function mF(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 gF({children:t,freeze:n}){let r=vF(n,t);return e.createElement(e.Fragment,null,r)}function vF(t,n){let[r,i]=e.useState(n);return!t&&r!==n&&i(n),t?r:n}let yF=e.createContext(null);yF.displayName="OpenClosedContext";var bF=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(bF||{});function EF({value:t,children:n}){return e.createElement(yF.Provider,{value:t},n)}var xF,wF,TF={exports:{}},CF={};var SF,kF,_F,NF=(wF||(wF=1,TF.exports=function(){if(xF)return CF;xF=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 CF.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},CF}()),TF.exports),DF=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},AF=(e,t,n)=>(DF(e,t,"read from private field"),n?n.call(e):t.get(e)),IF=(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)},OF=(e,t,n,r)=>(DF(e,t,"write to private field"),t.set(e,n),n);class LF{constructor(e){IF(this,SF,{}),IF(this,kF,new uM((()=>new Set))),IF(this,_F,new Set),OF(this,SF,e)}get state(){return AF(this,SF)}subscribe(e,t){let n={selector:e,callback:t,current:e(AF(this,SF))};return AF(this,_F).add(n),()=>{AF(this,_F).delete(n)}}on(e,t){return AF(this,kF).get(e).add(t),()=>{AF(this,kF).get(e).delete(t)}}send(e){OF(this,SF,this.reduce(AF(this,SF),e));for(let t of AF(this,_F)){let e=t.selector(AF(this,SF));MF(t.current,e)||(t.current=e,t.callback(e))}for(let t of AF(this,kF).get(e.type))t(AF(this,SF),e)}}function MF(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&&FF(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&FF(e.entries(),t.entries()):!(!RF(e)||!RF(t))&&FF(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function FF(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 RF(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function PF(e,t,n=MF){return NF.useSyncExternalStoreWithSelector(oL((t=>e.subscribe(jF,t))),oL((()=>e.state)),oL((()=>e.state)),oL(t),n)}function jF(e){return e}SF=new WeakMap,kF=new WeakMap,_F=new WeakMap;let VF=[];!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||VF[0]===e.target)return;let t=e.target;t=t.closest(bM),VF.unshift(null!=t?t:e.target),VF=VF.filter((e=>null!=e&&e.isConnected)),VF.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 BF,$F=((BF=$F||{})[BF.First=0]="First",BF[BF.Previous=1]="Previous",BF[BF.Next=2]="Next",BF[BF.Last=3]="Last",BF[BF.Specific=4]="Specific",BF[BF.Nothing=5]="Nothing",BF);function UF(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 HF,qF=((HF=qF||{})[HF.Left=0]="Left",HF[HF.Right=2]="Right",HF);function WF(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in i&&(e=>e.useSyncExternalStore)(i)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=i.useState(JO.isHandoffComplete);return t&&!1===JO.isHandoffComplete&&n(!1),i.useEffect((()=>{!0!==t&&n(!0)}),[t]),i.useEffect((()=>JO.handoff()),[]),!e&&t}let zF=e.createContext(!1);function GF(t){let n=e.useContext(zF),r=e.useContext(XF),[i,o]=e.useState((()=>{var e;if(!n&&null!==r)return null!=(e=r.current)?e:null;if(JO.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 KF=e.Fragment,YF=bL((function(n,r){let{ownerDocument:i=null,...o}=n,s=e.useRef(null),a=RL(function(e,t=!0){return Object.assign(e,{[FL]:t})}((e=>{s.current=e})),r),l=OM(s),c=null!=i?i:l,u=GF(c),[d]=e.useState((()=>{var e;return JO.isServer?null:null!=(e=null==c?void 0:c.createElement("div"))?e:null})),f=e.useContext(JF),p=WF();rL((()=>{!u||!d||u.contains(d)||(d.setAttribute("data-headlessui-portal",""),u.appendChild(d))}),[u,d]),rL((()=>{if(d&&f)return f.register(d)}),[f,d]),function(t){let n=oL(t),r=e.useRef(!1);e.useEffect((()=>(r.current=!1,()=>{r.current=!0,eL((()=>{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=hL();return p&&u&&d?t.createPortal(h({ourProps:{ref:a},theirProps:o,slot:{},defaultTag:KF,name:"Portal"}),d):null}));let QF=e.Fragment,XF=e.createContext(null);let JF=e.createContext(null),ZF=bL((function(t,n){let r=RL(n),{enabled:i=!0,ownerDocument:o,...s}=t,a=hL();return i?e.createElement(YF,{...s,ownerDocument:o,ref:r}):a({ourProps:{ref:r},theirProps:s,slot:{},defaultTag:KF,name:"Portal"})})),eR=bL((function(t,n){let{target:r,...i}=t,o={ref:RL(n)},s=hL();return e.createElement(XF.Provider,{value:r},s({ourProps:o,theirProps:i,defaultTag:QF,name:"Popover.Group"}))})),tR=Object.assign(ZF,{Group:eR});var nR,rR=Object.defineProperty,iR=(e,t,n)=>(((e,t,n)=>{t in e?rR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),oR=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(oR||{}),sR=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(sR||{}),aR=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(aR||{}),lR=((nR=lR||{})[nR.OpenCombobox=0]="OpenCombobox",nR[nR.CloseCombobox=1]="CloseCombobox",nR[nR.GoToOption=2]="GoToOption",nR[nR.SetTyping=3]="SetTyping",nR[nR.RegisterOption=4]="RegisterOption",nR[nR.UnregisterOption=5]="UnregisterOption",nR[nR.DefaultToFirstOption=6]="DefaultToFirstOption",nR[nR.SetActivationTrigger=7]="SetActivationTrigger",nR[nR.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",nR[nR.SetInputElement=9]="SetInputElement",nR[nR.SetButtonElement=10]="SetButtonElement",nR[nR.SetOptionsElement=11]="SetOptionsElement",nR);function cR(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 uR={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===$F.Specific?t.idx:UF(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=cR(e);if(null===s.activeOptionIndex){let e=s.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(s.activeOptionIndex=e)}let a=t.focus===$F.Specific?t.idx:UF(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=cR(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=cR(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 dR extends LF{constructor(){super(...arguments),iR(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return cL(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:$F.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})}}),iR(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 dR({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 cL(t.type,uR,e,t)}}const fR=e.createContext(null);function pR(t){let n=e.useContext(fR);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,hR),e}return n}function hR({virtual:t=null,__demoMode:n=!1}={}){return e.useMemo((()=>dR.new({virtual:t,__demoMode:n})),[])}let mR=e.createContext(null);function gR(t){let n=e.useContext(mR);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,gR),e}return n}mR.displayName="ComboboxDataContext";let vR=e.createContext(null);function yR(t){let n=pR("VirtualProvider"),r=gR("VirtualProvider"),{options:i}=r.virtual,o=PF(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=aM({enabled:0!==i.length,scrollPaddingStart:s,scrollPaddingEnd:a,count:i.length,estimateSize:()=>40,getScrollElement:()=>n.state.optionsElement,overscan:12}),[c,u]=e.useState(0);rL((()=>{u((e=>e+1))}),[i]);let d=l.getVirtualItems(),f=PF(n,(e=>e.activationTrigger===aR.Pointer)),p=PF(n,n.selectors.activeOptionIndex);return 0===d.length?null:e.createElement(vR.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 bR=e.Fragment;let ER=fL.RenderStrategy|fL.Static;let xR=bL((function(t,n){let r=aL(),{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,oL((e=>(s||o(e),null==n?void 0:n(e))))]}(i,s,b),w=hR({virtual:g,__demoMode:p}),T=e.useRef({static:!1,hold:!1}),C=function(t=lM){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=oL((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=>cL(D.mode,{[sR.Multi]:()=>E.some((t=>C(t,e))),[sR.Single]:()=>C(E,e)})),[E]),_=PF(w,(e=>e.virtual)),N=oL((()=>null==f?void 0:f())),D=e.useMemo((()=>({__demoMode:p,immediate:m,optionsPropsRef:T,value:E,defaultValue:b,disabled:d,invalid:u,mode:h?sR.Multi:sR.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]);rL((()=>{var e;g&&w.send({type:lR.UpdateVirtualConfiguration,options:g.options,disabled:null!=(e=g.disabled)?e:null})}),[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),rL((()=>{w.state.dataRef.current=D}),[D]);let[A,I,O,L]=PF(w,(e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]));IM(A===oR.Open,[I,O,L],(()=>w.actions.closeCombobox()));let M=PF(w,w.selectors.activeOptionIndex),F=PF(w,w.selectors.activeOption),R=e.useMemo((()=>({open:A===oR.Open,disabled:d,invalid:u,activeIndex:M,activeOption:F,value:E})),[D,d,E,u,F,A]),[P,j]=function({inherit:t=!1}={}){let n=qL(),[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=oL((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(UL.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]),$=hL();return e.createElement(j,{value:P,props:{htmlFor:null==O?void 0:O.id},slot:{open:A===oR.Open,disabled:d}},e.createElement(fF,null,e.createElement(mR.Provider,{value:D},e.createElement(fR.Provider,{value:w},e.createElement(EF,{value:cL(A,{[oR.Open]:bF.Open,[oR.Closed]:bF.Closed})},null!=l&&e.createElement(AL,{disabled:d,data:null!=E?{[l]:E}:{},form:a,onReset:B}),$({ourProps:V,theirProps:y,slot:R,defaultTag:bR,name:"Combobox"}))))))})),wR=bL((function(n,r){let i=pR("Combobox.Button"),o=gR("Combobox.Button"),[s,a]=e.useState(null),l=RL(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=PF(i,(e=>e.inputElement)),m=LM(h),g=oL((e=>{switch(e.key){case $L.Space:case $L.Enter:return e.preventDefault(),e.stopPropagation(),i.state.comboboxState===oR.Closed&&t.flushSync((()=>i.actions.openCombobox())),void m();case $L.ArrowDown:return e.preventDefault(),e.stopPropagation(),i.state.comboboxState===oR.Closed&&(t.flushSync((()=>i.actions.openCombobox())),i.state.dataRef.current.value||i.actions.goToOption({focus:$F.First})),void m();case $L.ArrowUp:return e.preventDefault(),e.stopPropagation(),i.state.comboboxState===oR.Closed&&(t.flushSync((()=>i.actions.openCombobox())),i.state.dataRef.current.value||i.actions.goToOption({focus:$F.Last})),void m();case $L.Escape:if(i.state.comboboxState!==oR.Open)return;return e.preventDefault(),i.state.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),t.flushSync((()=>i.actions.closeCombobox())),void m();default:return}})),v=oL((e=>{e.preventDefault(),!ML(e.currentTarget)&&(e.button===qF.Left&&(i.state.comboboxState===oR.Open?i.actions.closeCombobox():i.actions.openCombobox()),m())})),y=qL([u]),{isFocusVisible:b,focusProps:E}=YO({autoFocus:f}),{isHovered:x,hoverProps:w}=KO({isDisabled:d}),{pressed:T,pressProps:C}=function({disabled:t=!1}={}){let n=e.useRef(null),[r,i]=e.useState(!1),o=nL(),s=oL((()=>{n.current=null,i(!1),o.dispose()})),a=oL((e=>{if(o.dispose(),null===n.current){n.current=e.currentTarget,i(!0);{let t=ZO(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]=PF(i,(e=>[e.comboboxState,e.optionsElement])),_=e.useMemo((()=>({open:S===oR.Open,active:T||S===oR.Open,disabled:d,invalid:o.invalid,value:o.value,hover:x,focus:b})),[o,x,b,T,d,S]),N=yL({ref:l,id:u,type:MM(n,s),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==k?void 0:k.id,"aria-expanded":S===oR.Open,"aria-labelledby":y,disabled:d||void 0,autoFocus:f,onMouseDown:v,onKeyDown:g},E,w,C);return hL()({ourProps:N,theirProps:p,slot:_,defaultTag:"button",name:"Combobox.Button"})})),TR=bL((function(n,r){var i,o;let s=pR("Combobox.Input"),a=gR("Combobox.Input"),l=e.useId(),c=LL(),{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]=PF(s,(e=>[e.inputElement])),y=e.useRef(null),b=RL(y,r,e.useContext(uF).setReference,s.actions.setInputElement),E=OM(v),[x,w]=PF(s,(e=>[e.comboboxState,e.isTyping])),T=nL(),C=oL((()=>{s.actions.onChange(null),s.state.optionsElement&&(s.state.optionsElement.scrollTop=0),s.actions.goToOption({focus:$F.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]);WM((([e,t],[n,r])=>{if(s.state.isTyping)return;let i=y.current;i&&((r===oR.Open&&t===oR.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]),WM((([e],[t])=>{if(e===oR.Open&&t===oR.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),_=oL((()=>{k.current=!0})),N=oL((()=>{T.nextFrame((()=>{k.current=!1}))})),D=oL((e=>{switch(s.actions.setIsTyping(!0),e.key){case $L.Enter:if(s.state.comboboxState!==oR.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===sR.Single&&s.actions.closeCombobox();break;case $L.ArrowDown:return e.preventDefault(),e.stopPropagation(),cL(s.state.comboboxState,{[oR.Open]:()=>s.actions.goToOption({focus:$F.Next}),[oR.Closed]:()=>s.actions.openCombobox()});case $L.ArrowUp:return e.preventDefault(),e.stopPropagation(),cL(s.state.comboboxState,{[oR.Open]:()=>s.actions.goToOption({focus:$F.Previous}),[oR.Closed]:()=>{t.flushSync((()=>s.actions.openCombobox())),a.value||s.actions.goToOption({focus:$F.Last})}});case $L.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:$F.First});case $L.PageUp:return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:$F.First});case $L.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:$F.Last});case $L.PageDown:return e.preventDefault(),e.stopPropagation(),s.actions.goToOption({focus:$F.Last});case $L.Escape:return s.state.comboboxState!==oR.Open?void 0:(e.preventDefault(),s.state.optionsElement&&!a.optionsPropsRef.current.static&&e.stopPropagation(),a.mode===sR.Single&&null===a.value&&C(),s.actions.closeCombobox());case $L.Tab:if(s.state.comboboxState!==oR.Open)return;a.mode===sR.Single&&s.state.activationTrigger!==aR.Focus&&s.actions.selectActiveOption(),s.actions.closeCombobox()}})),A=oL((e=>{null==d||d(e),a.mode===sR.Single&&""===e.target.value&&C(),s.actions.openCombobox()})),I=oL((e=>{var t,n,r;let i=null!=(t=e.relatedTarget)?t:VF.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!==oR.Open))return e.preventDefault(),a.mode===sR.Single&&null===a.value&&C(),s.actions.closeCombobox()})),O=oL((e=>{var n,r,i;let o=null!=(n=e.relatedTarget)?n:VF.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!==oR.Open&&T.microTask((()=>{t.flushSync((()=>s.actions.openCombobox())),s.actions.setActivationTrigger(aR.Focus)}))})),L=qL(),M=function(){var t,n;return null!=(n=null==(t=e.useContext(PL))?void 0:t.value)?n:void 0}(),{isFocused:F,focusProps:R}=YO({autoFocus:h}),{isHovered:P,hoverProps:j}=KO({isDisabled:p}),V=PF(s,(e=>e.optionsElement)),B=e.useMemo((()=>({open:x===oR.Open,disabled:p,invalid:a.invalid,hover:P,focus:F,autofocus:h})),[a,P,F,h,p,a.invalid]),$=yL({ref:b,id:u,role:"combobox",type:m,"aria-controls":null==V?void 0:V.id,"aria-expanded":x===oR.Open,"aria-activedescendant":PF(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},R,j);return hL()({ourProps:$,theirProps:g,slot:B,defaultTag:"input",name:"Combobox.Input"})})),CR=zL,SR=bL((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=pR("Combobox.Options"),m=gR("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(dF),r=e.useMemo((()=>t),[JSON.stringify(t,((e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t}))]);rL((()=>{null==n||n(null!=r?r:null)}),[n,r]);let i=e.useContext(uF);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(uF);return e.useCallback(((...e)=>Object.assign({},t(...e),{"data-anchor":n.anchor})),[t,n])}(),w=RL(n,g?v:null,h.actions.setOptionsElement,E),[T,C,S,k,_]=PF(h,(e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger])),N=OM(C||S),D=OM(k),A=e.useContext(yF),[I,O]=qM(f,b,null!==A?(A&bF.Open)===bF.Open:T===oR.Open);!function(t,n,r){let i=iL((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=tL();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),jM(!m.__demoMode&&(d&&T===oR.Open),D),function(e,{allowed:t,disallowed:n}={}){let r=hM(e,"inert-others");rL((()=>{var e,i;if(!r)return;let o=tL();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&o.add(vM(t));let s=null!=(i=null==t?void 0:t())?i:[];for(let t of s){if(!t)continue;let e=ZO(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(vM(e));n=n.parentElement}}return o.dispose}),[r,t,n])}(!m.__demoMode&&(d&&T===oR.Open),{allowed:e.useCallback((()=>[C,S,k]),[C,S,k])}),rL((()=>{var e;m.optionsPropsRef.current.static=null!=(e=t.static)&&e}),[m.optionsPropsRef,t.static]),rL((()=>{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]),rL((()=>{if(!n||!t)return;let e=ZO(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===oR.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=qL([null==S?void 0:S.id]),M=e.useMemo((()=>({open:T===oR.Open,option:void 0})),[T]),F=oL((()=>{h.actions.setActivationTrigger(aR.Pointer)})),R=oL((e=>{e.preventDefault(),h.actions.setActivationTrigger(aR.Pointer)})),P=yL(g?x():{},{"aria-labelledby":L,role:"listbox","aria-multiselectable":m.mode===sR.Multi||void 0,id:a,ref:w,style:{...p.style,...y,"--input-width":cM(C,!0).width,"--button-width":cM(S,!0).width},onWheel:_===aR.Pointer?void 0:F,onMouseDown:R,...HM(O)}),j=I&&T===oR.Closed,V=vF(j,null==(r=m.virtual)?void 0:r.options),B=vF(j,m.value),$=oL((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(mR.Provider,{value:U},e.createElement(yR,{slot:M},p.children))});let H=hL(),q=e.useMemo((()=>m.mode===sR.Multi?m:{...m,isSelected:$}),[m,$]);return e.createElement(tR,{enabled:!!u&&(t.static||I),ownerDocument:N},e.createElement(mR.Provider,{value:q},H({ourProps:P,theirProps:{...p,children:e.createElement(gF,{freeze:j},"function"==typeof p.children?null==(o=p.children)?void 0:o.call(p,M):p.children)},slot:M,defaultTag:"div",features:ER,visible:I,name:"Combobox.Options"})))})),kR=bL((function(t,n){var r,i,o;let s=gR("Combobox.Option"),a=pR("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]=PF(a,(e=>[e.inputElement])),m=LM(h),g=PF(a,e.useCallback((e=>a.selectors.isActive(e,u,c)),[u,c])),v=s.isSelected(u),y=e.useRef(null),b=iL({disabled:d,value:u,domRef:y,order:f}),E=e.useContext(vR),x=RL(n,y,E?E.measureElement:null),w=oL((()=>{a.actions.setIsTyping(!1),a.actions.onChange(u)}));rL((()=>a.actions.registerOption(c,b)),[b,c]);let T=PF(a,e.useCallback((e=>a.selectors.shouldScrollIntoView(e,u,c)),[u,c]));rL((()=>{if(T)return tL().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=y.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[T,y]);let C=oL((e=>{e.preventDefault(),e.button===qF.Left&&(d||(w(),DM()||requestAnimationFrame((()=>m())),s.mode===sR.Single&&a.actions.closeCombobox()))})),S=oL((()=>{if(d)return a.actions.goToOption({focus:$F.Nothing});let e=s.calculateIndex(u);a.actions.goToOption({focus:$F.Specific,idx:e})})),k=function(){let t=e.useRef([-1,-1]);return{wasMoved(e){let n=VM(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=VM(e)}}}(),_=oL((e=>k.update(e))),N=oL((e=>{if(!k.wasMoved(e)||d||g)return;let t=s.calculateIndex(u);a.actions.goToOption({focus:$F.Specific,idx:t},aR.Pointer)})),D=oL((e=>{k.wasMoved(e)&&(d||g&&(s.optionsPropsRef.current.hold||a.actions.goToOption({focus:$F.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 hL()({ourProps:I,theirProps:p,slot:A,defaultTag:"div",name:"Combobox.Option"})})),_R=Object.assign(xR,{Input:TR,Button:wR,Label:CR,Options:SR,Option:kR});const NR=()=>{const t=h.c(32),n=YI(),{push:r}=QI(),i=e.useRef(null),o=function(){const e=h.c(5),t=YI(),{schema:n}=Ju();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&&DR(n,e)&&t.types.push({type:i}),!bt(i)&&!xt(i)&&!St(i))continue;const s=i.getFields();for(const n in s){const o=s[n];let a;if(!DR(n,e)){if(!("args"in o))continue;if(a=o.args.filter((t=>DR(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=Kp(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||bt(x.def)||xt(x.def)||St(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(Em,{}),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(TR,{autoComplete:"off",onChange:N,placeholder:(Ru?"⌘":"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(SR,{"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(OR),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(LR),c.fields.map(MR)]}),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(_R,{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 DR(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 AR=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},IR=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}),":"," ",eO(r.type,FR),")"]}):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 OR(e,t){return p.jsx(kR,{value:e,"data-cy":"doc-explorer-option",children:p.jsx(IR,{field:e.field,argument:e.argument})},`within-${t}`)}function LR(e,t){return p.jsx(kR,{value:e,"data-cy":"doc-explorer-option",children:p.jsx(AR,{type:e.type})},`type-${t}`)}function MR(e,t){return p.jsxs(kR,{value:e,"data-cy":"doc-explorer-option",children:[p.jsx(AR,{type:e.type}),".",p.jsx(IR,{field:e.field,argument:e.argument})]},`field-${t}`)}function FR(e){return p.jsx(AR,{type:e})}const RR=e=>{const t=h.c(6),{field:n}=e,{push:r}=QI();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},PR=e=>{const t=h.c(2),{type:n}=e;let r;return t[0]!==n?(r=Bt(n)?p.jsxs(p.Fragment,{children:[n.description?p.jsx(Vw,{type:"description",children:n.description}):null,p.jsx(jR,{type:n}),p.jsx(VR,{type:n}),p.jsx($R,{type:n}),p.jsx(HR,{type:n})]}):null,t[0]=n,t[1]=r):r=t[1],r},jR=e=>{const t=h.c(5),{type:n}=e;if(!bt(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(oO,{title:"Implements",children:n.getInterfaces().map(qR)}):null,t[2]=i.length,t[3]=n,t[4]=o):o=t[4],o},VR=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(!bt(r)&&!xt(r)&&!St(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(oO,{title:"Fields",children:c.map(WR)}):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(oO,{title:"Deprecated Fields",children:l.map(zR)}):p.jsx(Zm,{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},BR=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(GR):[];o="graphiql-doc-explorer-item",r=p.jsx(RR,{field:n}),i=e.length>0?p.jsxs(p.Fragment,{children:["(",p.jsx("span",{children:e.map((t=>1===e.length?p.jsx(nO,{arg:t,inline:!0},t.name):p.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:p.jsx(nO,{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(tO,{type:n.type}),t[4]=n.type,t[5]=s):s=t[5],t[6]!==n?(a=p.jsx(ZI,{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(Vw,{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(rO,{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},$R=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(!Ct(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(oO,{title:"Enum Values",children:u.map(KR)}):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(oO,{title:"Deprecated Enum Values",children:l.map(YR)}):p.jsx(Zm,{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},UR=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(Vw,{type:"description",children:n.description}),t[2]=n.description,t[3]=i):i=t[3],t[4]!==n.deprecationReason?(o=n.deprecationReason&&p.jsx(Vw,{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},HR=e=>{const t=h.c(6),{type:n}=e,{schema:r}=Ju();if(!r||!Ot(n))return null;const i=xt(n)?"Implementations":"Possible Types";let o,s;return t[0]!==r||t[1]!==n?(o=r.getPossibleTypes(n).map(QR),t[0]=r,t[1]=n,t[2]=o):o=t[2],t[3]!==i||t[4]!==o?(s=p.jsx(oO,{title:i,children:o}),t[3]=i,t[4]=o,t[5]=s):s=t[5],s};function qR(e){return p.jsx("div",{children:p.jsx(tO,{type:e})},e.name)}function WR(e){return p.jsx(BR,{field:e},e.name)}function zR(e){return p.jsx(BR,{field:e},e.name)}function GR(e){return!e.deprecationReason}function KR(e){return p.jsx(UR,{value:e},e.name)}function YR(e){return p.jsx(UR,{value:e},e.name)}function QR(e){return p.jsx("div",{children:p.jsx(tO,{type:e})},e.name)}const XR={title:"Documentation Explorer",icon:function(){const{visiblePlugin:e}=Yu();return e===XR?p.jsx(pm,{}):p.jsx(hm,{})},content:()=>{const e=h.c(38),{fetchError:t,isFetching:n,schema:r,validationErrors:i}=Ju(),o=YI(),{pop:s}=QI();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(Bw,{}),e[10]=t):t=e[10],a=t}else if(r){if(1===o.length){let t;e[12]!==r?(t=p.jsx(pO,{schema:r}),e[12]=r,e[13]=t):t=e[13],a=t}else if(vt(l.def)){let t;e[14]!==l.def?(t=p.jsx(PR,{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(aO,{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(om,{}),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(NR,{},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}},JR=["light","dark","system"],ZR="graphiql-session-tab-",eP=t=>{const n=h.c(234),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}=Wh(i);let v;n[1]===Symbol.for("react.memo_cache_sentinel")?(v={nonNull:!0},n[1]=v):v=n[1];const y=Yh(v),{isFetching:b,introspect:E}=Ju(),x=Lu(),{visiblePlugin:w,setVisiblePlugin:T,plugins:C}=Yu(),S=t.forcedTheme&&JR.includes(t.forcedTheme)?t.forcedTheme:void 0,{theme:k,setTheme:_}=tm(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=Ym(O);let M;n[9]===Symbol.for("react.memo_cache_sentinel")?(M={direction:"horizontal",storageKey:"editorFlex"},n[9]=M):M=n[9];const F=Ym(M);let R,P;R="variables"!==t.defaultEditorToolsVisibility&&"headers"!==t.defaultEditorToolsVisibility?"boolean"!=typeof t.defaultEditorToolsVisibility?o||s?void 0:"second":t.defaultEditorToolsVisibility?void 0:"second":void 0,n[10]!==R?(P={defaultSizeRelation:3,direction:"vertical",initiallyHidden:R,sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"},n[10]=R,n[11]=P):P=n[11];const j=Ym(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 sP.Logo:n.logo=r;break e;case sP.Toolbar:n.toolbar=e.cloneElement(r,{onCopyQuery:t.onCopyQuery,onPrettifyQuery:t.onPrettifyQuery});break e;case sP.Footer:n.footer=r;break e;default:n.children.push(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(sP.Logo,{}),n[24]=i):i=n[24],n[25]!==t.onCopyQuery||n[26]!==t.onPrettifyQuery?(o=p.jsx(sP.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,children:[]}),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,children:Q}=z;let X;n[28]!==L?(X=()=>{"first"===L.hiddenElement&&L.setHiddenElement(null)},n[28]=L,n[29]=X):X=n[29];const J=X;let Z;n[30]!==x?(Z=()=>{try{x.clear(),W("success")}catch{W("error")}},n[30]=x,n[31]=Z):Z=n[31];const ee=Z;let te;n[32]!==a?(te=e=>{a("true"===e.currentTarget.dataset.value)},n[32]=a,n[33]=te):te=n[33];const ne=te;let re;n[34]!==_?(re=e=>{const t=e.currentTarget.dataset.theme;_(t||null)},n[34]=_,n[35]=re):re=n[35];const ie=re;let oe;n[36]===Symbol.for("react.memo_cache_sentinel")?(oe=e=>{H(e.currentTarget.dataset.value)},n[36]=oe):oe=n[36];const se=oe;let ae;n[37]!==L||n[38]!==C||n[39]!==T||n[40]!==w?(ae=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]=ae):ae=n[41];const le=ae;let ce;n[42]!==j?(ce=e=>{"second"===j.hiddenElement&&j.setHiddenElement(null),$(e.currentTarget.dataset.name)},n[42]=j,n[43]=ce):ce=n[43];const ue=ce;let de;n[44]!==j?(de=()=>{j.setHiddenElement("second"===j.hiddenElement?null:"second")},n[44]=j,n[45]=de):de=n[45];const fe=de;let pe;n[46]===Symbol.for("react.memo_cache_sentinel")?(pe=e=>{e||H(null)},n[46]=pe):pe=n[46];const he=pe;let me;n[47]===Symbol.for("react.memo_cache_sentinel")?(me=e=>{e||(H(null),W(null))},n[47]=me):me=n[47];const ge=me,ve=t.confirmCloseTab;let ye;n[48]!==g||n[49]!==u||n[50]!==ve||n[51]!==y?(ye=async e=>{const t=e.currentTarget.previousSibling,n=Number(t.id.replace(ZR,""));(!ve||await ve(n))&&(g===n&&y.stop(),u(n))},n[48]=g,n[49]=u,n[50]=ve,n[51]=y,n[52]=ye):ye=n[52];const be=ye;let Ee;n[53]!==d||n[54]!==y?(Ee=e=>{const t=Number(e.currentTarget.id.replace(ZR,""));y.stop(),d(t)},n[53]=d,n[54]=y,n[55]=Ee):Ee=n[55];const xe=Ee;let we,Te,Ce;if(n[56]!==t.className?(we=Rm("graphiql-container",t.className),n[56]=t.className,n[57]=we):we=n[57],n[58]!==le||n[59]!==C||n[60]!==w){let e;n[62]!==le||n[63]!==w?(e=(e,t)=>{const n=e===w,r=`${n?"Hide":"Show"} ${e.title}`;return p.jsx(_I,{label:r,children:p.jsx(Jm,{type:"button",className:Rm(n&&"active"),onClick:le,"data-index":t,"aria-label":r,children:p.jsx(e.icon,{"aria-hidden":"true"})})},e.title)},n[62]=le,n[63]=w,n[64]=e):e=n[64],Te=C.map(e),n[58]=le,n[59]=C,n[60]=w,n[61]=Te}else Te=n[61];n[65]===Symbol.for("react.memo_cache_sentinel")?(Ce={marginTop:"auto"},n[65]=Ce):Ce=n[65];const Se=b&&"graphiql-spin";let ke,_e,Ne,De,Ae,Ie,Oe,Le,Me,Fe;n[66]!==Se?(ke=Rm(Se),n[66]=Se,n[67]=ke):ke=n[67],n[68]!==ke?(_e=p.jsx(km,{className:ke,"aria-hidden":"true"}),n[68]=ke,n[69]=_e):_e=n[69],n[70]!==E||n[71]!==b||n[72]!==_e?(Ne=p.jsx(_I,{label:"Re-fetch GraphQL schema",children:p.jsx(Jm,{type:"button",disabled:b,onClick:E,"aria-label":"Re-fetch GraphQL schema",style:Ce,children:_e})}),n[70]=E,n[71]=b,n[72]=_e,n[73]=Ne):Ne=n[73],n[74]===Symbol.for("react.memo_cache_sentinel")?(De=p.jsx(_I,{label:"Open short keys dialog",children:p.jsx(Jm,{type:"button","data-value":"short-keys",onClick:se,"aria-label":"Open short keys dialog",children:p.jsx(bm,{"aria-hidden":"true"})})}),n[74]=De):De=n[74],n[75]===Symbol.for("react.memo_cache_sentinel")?(Ae=p.jsx(_I,{label:"Open settings dialog",children:p.jsx(Jm,{type:"button","data-value":"settings",onClick:se,"aria-label":"Open settings dialog",children:p.jsx(Nm,{"aria-hidden":"true"})})}),n[75]=Ae):Ae=n[75],n[76]!==Te||n[77]!==Ne?(Ie=p.jsxs("div",{className:"graphiql-sidebar",children:[Te,Ne,De,Ae]}),n[76]=Te,n[77]=Ne,n[78]=Ie):Ie=n[78],n[79]===Symbol.for("react.memo_cache_sentinel")?(Oe={minWidth:"200px"},n[79]=Oe):Oe=n[79],n[80]!==A?(Le=A?p.jsx(A,{}):null,n[80]=A,n[81]=Le):Le=n[81],n[82]!==L.firstRef||n[83]!==Le?(Me=p.jsx("div",{ref:L.firstRef,className:"graphiql-plugin",style:Oe,children:Le}),n[82]=L.firstRef,n[83]=Le,n[84]=Me):Me=n[84],n[85]!==L.dragBarRef||n[86]!==w?(Fe=w&&p.jsx("div",{className:"graphiql-horizontal-drag-bar",ref:L.dragBarRef}),n[85]=L.dragBarRef,n[86]=w,n[87]=Fe):Fe=n[87];const Re=L.secondRef;let Pe,je,Ve,Be,$e;if(n[88]!==g||n[89]!==xe||n[90]!==be||n[91]!==m){let e;n[93]!==g||n[94]!==xe||n[95]!==be?(e=(e,t,n)=>p.jsxs(zA,{value:e,isActive:t===g,children:[p.jsx(zA.Button,{"aria-controls":"graphiql-session",id:`graphiql-session-tab-${t}`,title:e.title,onClick:xe,children:e.title}),n.length>1&&p.jsx(zA.Close,{onClick:be})]},e.id),n[93]=g,n[94]=xe,n[95]=be,n[96]=e):e=n[96],Pe=m.map(e),n[88]=g,n[89]=xe,n[90]=be,n[91]=m,n[92]=Pe}else Pe=n[92];n[97]!==c||n[98]!==Pe||n[99]!==m?(je=p.jsx(GA,{values:m,onReorder:c,"aria-label":"Select active operation",className:"no-scrollbar",children:Pe}),n[97]=c,n[98]=Pe,n[99]=m,n[100]=je):je=n[100],n[101]===Symbol.for("react.memo_cache_sentinel")?(Ve=p.jsx(Cm,{"aria-hidden":"true"}),n[101]=Ve):Ve=n[101],n[102]!==l?(Be=p.jsx(_I,{label:"New tab",children:p.jsx(Jm,{type:"button",className:"graphiql-tab-add",onClick:l,"aria-label":"New tab",children:Ve})}),n[102]=l,n[103]=Be):Be=n[103],n[104]!==G||n[105]!==je||n[106]!==Be?($e=p.jsxs("div",{className:"graphiql-session-header",children:[je,Be,G]}),n[104]=G,n[105]=je,n[106]=Be,n[107]=$e):$e=n[107];const Ue=`${ZR}${g}`,He=F.firstRef;let qe,We,ze,Ge;n[108]!==J||n[109]!==t.editorTheme||n[110]!==t.keyMap||n[111]!==t.onCopyQuery||n[112]!==t.onEditQuery||n[113]!==t.onPrettifyQuery||n[114]!==t.readOnly?(qe=p.jsx(Bm,{editorTheme:t.editorTheme,keyMap:t.keyMap,onClickReference:J,onCopyQuery:t.onCopyQuery,onPrettifyQuery:t.onPrettifyQuery,onEdit:t.onEditQuery,readOnly:t.readOnly}),n[108]=J,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]=qe):qe=n[115],n[116]===Symbol.for("react.memo_cache_sentinel")?(We=p.jsx(DI,{}),n[116]=We):We=n[116],n[117]!==K?(ze=p.jsxs("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands",children:[We,K]}),n[117]=K,n[118]=ze):ze=n[118],n[119]!==j.firstRef||n[120]!==qe||n[121]!==ze?(Ge=p.jsxs("section",{className:"graphiql-query-editor","aria-label":"Query Editor",ref:j.firstRef,children:[qe,ze]}),n[119]=j.firstRef,n[120]=qe,n[121]=ze,n[122]=Ge):Ge=n[122];const Ke=j.dragBarRef,Ye="variables"===B&&"second"!==j.hiddenElement&&"active";let Qe,Xe,Je;n[123]!==Ye?(Qe=Rm(Ye),n[123]=Ye,n[124]=Qe):Qe=n[124],n[125]!==ue||n[126]!==Qe?(Xe=p.jsx(Jm,{type:"button",className:Qe,onClick:ue,"data-name":"variables",children:"Variables"}),n[125]=ue,n[126]=Qe,n[127]=Xe):Xe=n[127],n[128]!==B||n[129]!==j.hiddenElement||n[130]!==ue||n[131]!==r?(Je=r&&p.jsx(Jm,{type:"button",className:Rm("headers"===B&&"second"!==j.hiddenElement&&"active"),onClick:ue,"data-name":"headers",children:"Headers"}),n[128]=B,n[129]=j.hiddenElement,n[130]=ue,n[131]=r,n[132]=Je):Je=n[132];const Ze="second"===j.hiddenElement?"Show editor tools":"Hide editor tools",et="second"===j.hiddenElement?"Show editor tools":"Hide editor tools";let tt,nt,rt,it;n[133]!==j.hiddenElement?(tt="second"===j.hiddenElement?p.jsx(sm,{className:"graphiql-chevron-icon","aria-hidden":"true"}):p.jsx(im,{className:"graphiql-chevron-icon","aria-hidden":"true"}),n[133]=j.hiddenElement,n[134]=tt):tt=n[134],n[135]!==et||n[136]!==tt||n[137]!==fe?(nt=p.jsx(Jm,{type:"button",onClick:fe,"aria-label":et,className:"graphiql-toggle-editor-tools",children:tt}),n[135]=et,n[136]=tt,n[137]=fe,n[138]=nt):nt=n[138],n[139]!==Ze||n[140]!==nt?(rt=p.jsx(_I,{label:Ze,children:nt}),n[139]=Ze,n[140]=nt,n[141]=rt):rt=n[141],n[142]!==j.dragBarRef||n[143]!==Xe||n[144]!==Je||n[145]!==rt?(it=p.jsxs("div",{ref:Ke,className:"graphiql-editor-tools",children:[Xe,Je,rt]}),n[142]=j.dragBarRef,n[143]=Xe,n[144]=Je,n[145]=rt,n[146]=it):it=n[146];const ot="variables"===B?"Variables":"Headers",st="variables"!==B;let at,lt,ct,ut,dt,ft,pt,ht,mt,gt,vt;n[147]!==J||n[148]!==t.editorTheme||n[149]!==t.keyMap||n[150]!==t.onEditVariables||n[151]!==t.readOnly||n[152]!==st?(at=p.jsx(Km,{editorTheme:t.editorTheme,isHidden:st,keyMap:t.keyMap,onEdit:t.onEditVariables,onClickReference:J,readOnly:t.readOnly}),n[147]=J,n[148]=t.editorTheme,n[149]=t.keyMap,n[150]=t.onEditVariables,n[151]=t.readOnly,n[152]=st,n[153]=at):at=n[153],n[154]!==B||n[155]!==r||n[156]!==t.editorTheme||n[157]!==t.keyMap||n[158]!==t.onEditHeaders||n[159]!==t.readOnly?(lt=r&&p.jsx(Pm,{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]=lt):lt=n[160],n[161]!==j.secondRef||n[162]!==ot||n[163]!==at||n[164]!==lt?(ct=p.jsxs("section",{className:"graphiql-editor-tool","aria-label":ot,ref:j.secondRef,children:[at,lt]}),n[161]=j.secondRef,n[162]=ot,n[163]=at,n[164]=lt,n[165]=ct):ct=n[165],n[166]!==F.firstRef||n[167]!==Ge||n[168]!==it||n[169]!==ct?(ut=p.jsxs("div",{className:"graphiql-editors",ref:He,children:[Ge,it,ct]}),n[166]=F.firstRef,n[167]=Ge,n[168]=it,n[169]=ct,n[170]=ut):ut=n[170],n[171]!==F.dragBarRef?(dt=p.jsx("div",{className:"graphiql-horizontal-drag-bar",ref:F.dragBarRef}),n[171]=F.dragBarRef,n[172]=dt):dt=n[172],n[173]!==y.isFetching?(ft=y.isFetching?p.jsx(Bw,{}):null,n[173]=y.isFetching,n[174]=ft):ft=n[174],n[175]!==t.editorTheme||n[176]!==t.keyMap||n[177]!==t.responseTooltip?(pt=p.jsx(Gm,{editorTheme:t.editorTheme,responseTooltip:t.responseTooltip,keyMap:t.keyMap}),n[175]=t.editorTheme,n[176]=t.keyMap,n[177]=t.responseTooltip,n[178]=pt):pt=n[178],n[179]!==F.secondRef||n[180]!==Y||n[181]!==ft||n[182]!==pt?(ht=p.jsxs("div",{className:"graphiql-response",ref:F.secondRef,children:[ft,pt,Y]}),n[179]=F.secondRef,n[180]=Y,n[181]=ft,n[182]=pt,n[183]=ht):ht=n[183],n[184]!==Ue||n[185]!==ut||n[186]!==dt||n[187]!==ht?(mt=p.jsxs("div",{role:"tabpanel",id:"graphiql-session","aria-labelledby":Ue,children:[ut,dt,ht]}),n[184]=Ue,n[185]=ut,n[186]=dt,n[187]=ht,n[188]=mt):mt=n[188],n[189]!==L.secondRef||n[190]!==$e||n[191]!==mt?(gt=p.jsxs("div",{ref:Re,className:"graphiql-sessions",children:[$e,mt]}),n[189]=L.secondRef,n[190]=$e,n[191]=mt,n[192]=gt):gt=n[192],n[193]!==Me||n[194]!==Fe||n[195]!==gt?(vt=p.jsxs("div",{className:"graphiql-main",children:[Me,Fe,gt]}),n[193]=Me,n[194]=Fe,n[195]=gt,n[196]=vt):vt=n[196];const yt="short-keys"===U;let bt,Et,xt;n[197]===Symbol.for("react.memo_cache_sentinel")?(bt=p.jsxs("div",{className:"graphiql-dialog-header",children:[p.jsx(Iy.Title,{className:"graphiql-dialog-title",children:"Short Keys"}),p.jsx(Iy.Close,{})]}),n[197]=bt):bt=n[197],n[198]!==t.keyMap?(Et=p.jsx("div",{className:"graphiql-dialog-section",children:p.jsx(rP,{keyMap:t.keyMap})}),n[198]=t.keyMap,n[199]=Et):Et=n[199],n[200]!==yt||n[201]!==Et?(xt=p.jsxs(Iy,{open:yt,onOpenChange:he,children:[bt,Et]}),n[200]=yt,n[201]=Et,n[202]=xt):xt=n[202];const wt="settings"===U;let Tt,Ct,St,kt;n[203]===Symbol.for("react.memo_cache_sentinel")?(Tt=p.jsxs("div",{className:"graphiql-dialog-header",children:[p.jsx(Iy.Title,{className:"graphiql-dialog-title",children:"Settings"}),p.jsx(Iy.Close,{})]}),n[203]=Tt):Tt=n[203],n[204]!==ne||n[205]!==t.showPersistHeadersSettings||n[206]!==f?(Ct=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(eg,{children:[p.jsx(Zm,{type:"button",id:"enable-persist-headers",className:Rm(f&&"active"),"data-value":"true",onClick:ne,children:"On"}),p.jsx(Zm,{type:"button",id:"disable-persist-headers",className:Rm(!f&&"active"),onClick:ne,children:"Off"})]})]}):null,n[204]=ne,n[205]=t.showPersistHeadersSettings,n[206]=f,n[207]=Ct):Ct=n[207],n[208]!==S||n[209]!==ie||n[210]!==k?(St=!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(eg,{children:[p.jsx(Zm,{type:"button",className:Rm(null===k&&"active"),onClick:ie,children:"System"}),p.jsx(Zm,{type:"button",className:Rm("light"===k&&"active"),"data-theme":"light",onClick:ie,children:"Light"}),p.jsx(Zm,{type:"button",className:Rm("dark"===k&&"active"),"data-theme":"dark",onClick:ie,children:"Dark"})]})]}),n[208]=S,n[209]=ie,n[210]=k,n[211]=St):St=n[211],n[212]===Symbol.for("react.memo_cache_sentinel")?(kt=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]=kt):kt=n[212];const _t=q||void 0,Nt="success"===q;let Dt,At,It,Ot,Lt;return n[213]!==q?(Dt={success:"Cleared data",error:"Failed"}[q]||"Clear data",n[213]=q,n[214]=Dt):Dt=n[214],n[215]!==ee||n[216]!==_t||n[217]!==Nt||n[218]!==Dt?(At=p.jsxs("div",{className:"graphiql-dialog-section",children:[kt,p.jsx(Zm,{type:"button",state:_t,disabled:Nt,onClick:ee,children:Dt})]}),n[215]=ee,n[216]=_t,n[217]=Nt,n[218]=Dt,n[219]=At):At=n[219],n[220]!==wt||n[221]!==Ct||n[222]!==St||n[223]!==At?(It=p.jsxs(Iy,{open:wt,onOpenChange:ge,children:[Tt,Ct,St,At]}),n[220]=wt,n[221]=Ct,n[222]=St,n[223]=At,n[224]=It):It=n[224],n[225]!==we||n[226]!==Ie||n[227]!==vt||n[228]!==xt||n[229]!==It?(Ot=p.jsxs("div",{className:we,children:[Ie,vt,xt,It]}),n[225]=we,n[226]=Ie,n[227]=vt,n[228]=xt,n[229]=It,n[230]=Ot):Ot=n[230],n[231]!==Q||n[232]!==Ot?(Lt=p.jsxs(_I.Provider,{children:[Ot,Q]}),n[231]=Q,n[232]=Ot,n[233]=Lt):Lt=n[233],Lt},tP=Ru?"⌘":"Ctrl",nP=Object.entries({"Search in editor":[tP,"F"],"Search in documentation":[tP,"K"],"Execute query":[tP,"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"]}),rP=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:nP.map(lP)})]}),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},iP=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"]}),oP=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 sP=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,F;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?(F=void 0===A?[]:A,r[30]=A,r[31]=F):F=r[31];const R=F,P=void 0===I?XR: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]!==R||r[33]!==P?(j=[P,qI,...R],r[32]=R,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(GI,{children:p.jsx(eP,{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(LI,{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(em,{...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?iP: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=oP,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=ih({onCopyQuery:t}),i=oh(),o=ah({onPrettifyQuery:n}),s=p.jsx(NI,{onClick:o,label:"Prettify query (Shift-Ctrl-P)",children:p.jsx(Sm,{className:"graphiql-toolbar-icon","aria-hidden":"true"})}),a=p.jsx(NI,{onClick:i,label:"Merge fragments into query (Shift-Ctrl-M)",children:p.jsx(xm,{className:"graphiql-toolbar-icon","aria-hidden":"true"})});return e({prettify:s,copy:p.jsx(NI,{onClick:r,label:"Copy query (Shift-Ctrl-C)",children:p.jsx(lm,{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 aP(t,n,r){return p.jsxs(e.Fragment,{children:[p.jsx("code",{className:"graphiql-key",children:t}),n!==r.length-1&&" + "]},t)}function lP(e){const[t,n]=e;return p.jsxs("tr",{children:[p.jsx("td",{children:n.map(aP)}),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 cP=Object.assign(sP,{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?bs(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 it(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 Es(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:fs,React:II});function uP(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function dP(e){return"object"===uP(e)}function fP(e,t){return e.length<124?e:t}const pP="graphql-transport-ws";var hP,mP,gP,vP;function yP(e){if(!dP(e))throw new Error(`Message is expected to be an object, but got ${uP(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 ${uP(e.type)}`);switch(e.type){case gP.ConnectionInit:case gP.ConnectionAck:case gP.Ping:case gP.Pong:if(null!=e.payload&&!dP(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 gP.Subscribe:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${uP(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!dP(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${uP(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 ${uP(e.payload.query)}`);if(null!=e.payload.variables&&!dP(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 ${uP(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==uP(e.payload.operationName))throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${uP(e.payload.operationName)}`);if(null!=e.payload.extensions&&!dP(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 ${uP(e.payload.extensions)}`);break;case gP.Next:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${uP(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!dP(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${uP(e.payload)}`);break;case gP.Error:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${uP(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 gP.Complete:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${uP(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 bP(e,t){return yP("string"==typeof e?JSON.parse(e,t):e)}function EP(e,t){return yP(e),JSON.stringify(e,t)}(mP=hP||(hP={}))[mP.InternalServerError=4500]="InternalServerError",mP[mP.InternalClientError=4005]="InternalClientError",mP[mP.BadRequest=4400]="BadRequest",mP[mP.BadResponse=4004]="BadResponse",mP[mP.Unauthorized=4401]="Unauthorized",mP[mP.Forbidden=4403]="Forbidden",mP[mP.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",mP[mP.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",mP[mP.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",mP[mP.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",mP[mP.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",(vP=gP||(gP={})).ConnectionInit="connection_init",vP.ConnectionAck="connection_ack",vP.Ping="ping",vP.Pong="pong",vP.Subscribe="subscribe",vP.Next="next",vP.Error="error",vP.Complete="complete";var xP=function(e){return this instanceof xP?(this.v=e,this):new xP(e)},wP=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 xP?Promise.resolve(e.value.v).then(l,c):u(o[0][2],e)}(i[e](t))}catch(uL){u(o[0][3],uL)}}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 TP(e){return dP(e)&&"code"in e&&"reason"in e}const CP=Object.freeze(Object.defineProperty({__proto__:null,get CloseCode(){return hP},GRAPHQL_TRANSPORT_WS_PROTOCOL:pP,get MessageType(){return gP},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=TP,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,pP);let o,c;function d(){isFinite(s)&&s>0&&(clearTimeout(c),c=setTimeout((()=>{i.readyState===E.OPEN&&(i.send(EP({type:gP.Ping})),x.emit("ping",!1,void 0))}),s))}w((e=>{T=void 0,clearTimeout(o),clearTimeout(c),r(e),TP(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(EP(e?{type:gP.ConnectionInit,payload:e}:{type:gP.ConnectionInit},g)),isFinite(l)&&l>0&&(o=setTimeout((()=>{i.close(hP.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")}),l)),d()}catch(zV){x.emit("error",zV),i.close(hP.InternalClientError,fP(zV instanceof Error?zV.message:new Error(zV).message,"Internal client error"))}};let f=!1;i.onmessage=({data:t})=>{try{const n=bP(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(EP(n.payload?{type:gP.Pong,payload:n.payload}:{type:gP.Pong})),x.emit("pong",!1,n.payload)));if(f)return;if(n.type!==gP.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(zV){i.onmessage=null,x.emit("error",zV),i.close(hP.BadResponse,fP(zV instanceof Error?zV.message:new Error(zV).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(TP(e)&&(t=e.code,![1e3,1001,1006,1005,1012,1013,1013].includes(t)&&t>=1e3&&t<=1999||[hP.InternalServerError,hP.InternalClientError,hP.BadRequest,hP.BadResponse,hP.Unauthorized,hP.SubprotocolNotAcceptable,hP.SubscriberAlreadyExists,hP.TooManyInitialisationRequests].includes(e.code)))throw e;var t;if(N)return!1;if(TP(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 gP.Next:return void t.next(e.payload);case gP.Error:return i=!0,r=!0,t.error(e.payload),void o();case gP.Complete:return r=!0,void o()}}));return s.send(EP({id:n,type:gP.Subscribe,payload:e},g)),o=()=>{r||s.readyState!==E.OPEN||s.send(EP({id:n,type:gP.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 wP(this,arguments,(function*(){for(;;){for(t.length||(yield xP(new Promise((e=>n.resolve=e))));t.length;)yield yield xP(t.shift());if(n.error)throw n.error;if(n.done)return yield xP(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:bP,stringifyMessage:EP,validateMessage:yP},Symbol.toStringTag,{value:"Module"}));var SP,kP={exports:{}};function _P(){return SP||(SP=1,kP.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(uL){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(uL){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var F=function(e){e.select()};function R(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?F=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(F=function(e){try{e.select()}catch(t){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=R(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 F,R=[],P=0;P<u;)if(s.test(d[P])){var j=P;for(++P;P<u&&s.test(d[P]);++P);R.push(new l(0,j,P))}else{var V=P,B=R.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&&(R.splice(B,0,new l(1,V,U)),B+=$);var H=U;for(++U;U<P&&a.test(d[U]);++U);R.splice(B,0,new l(2,H,U)),B+=$,V=U}else++U;V<P&&R.splice(B,0,new l(1,V,P))}return"ltr"==t&&(1==R[0].level&&(F=e.match(/^\s+/))&&(R[0].from=F[0].length,R.unshift(new l(0,0,F[0].length))),1==Y(R).level&&(F=e.match(/\s+$/))&&(Y(R).to-=F[0].length,R.push(new l(0,u-F[0].length,u)))),"rtl"==t?R.reverse():R}}();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(uL){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(uL){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Fe=function(){var e=D("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Re=null;function Pe(e){if(null!=Re)return Re;var t=N(e,D("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return Re=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 Ft(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 Rt(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=Rt(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?Rn(e,t,n,r):"class"==o?Fn(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,Fn(e,t)):n&&(t.text.className=n)}function Fn(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 Rn(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),Fn(e,t),Rn(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[Fr(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 Fr(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 Rr(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[Fr(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=Fr(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(Fr(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,Fr(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 Ri(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,R(Fi,e))}function Fi(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 Ri=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 Ri(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),Rr(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)}Ri.prototype.signal=function(e,t){Ee(e,t)&&this.events.push(arguments)},Ri.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&&Rr(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,Rr(e)}function bo(e){("rtl"==e.doc.direction?L:k)(e.display.lineDiv,"CodeMirror-rtl")}function Eo(e){Ai(e,(function(){bo(e),Rr(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 Fo(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 Ro(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)){Rr(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?Rr(e):o.line!=s.line||1!=t.text.length||mo(e.doc,t)?Rr(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),Ft(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)Rr(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&&Rr(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){Fo(this,dt(this,e),t&&dt(this,t),n)})),extendSelections:Li((function(e,t){Ro(this,pt(this,e),t)})),extendSelectionsBy:Li((function(e,t){Ro(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 Ra&&(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 Fs=65;Fs<=90;Fs++)Ls[Fs]=String.fromCharCode(Fs);for(var Rs=1;Rs<=12;Rs++)Ls[Rs+111]=Ls[Rs+63235]="F"+Rs;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||Fe||!(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&&Fo(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(R(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||Fo(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),Rr(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,Fa,!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 Fa(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),Rr(e),dr(e),setTimeout((function(){return vi(e)}),100)}function Ra(e,t){var n=this;if(!(this instanceof Ra))return new Ra(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 Ra.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);Fo(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)}))}Ra.defaults=Ia,Ra.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}}}Ra.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++,Rr(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 Rr(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;Rr(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();F(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(uL){}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=Fr(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=Fr(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 Rr(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(uL){}}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=Ra((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"),F(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&&F(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(uL){}},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(Ra),Ka(Ra);var al="iter insert remove copy getEditor constructor".split(" ");for(var ll in ws.prototype)ws.prototype.hasOwnProperty(ll)&&B(al,ll)<0&&(Ra.prototype[ll]=function(e){return function(){return e.apply(this.doc,arguments)}}(ws.prototype[ll]));return xe(ws),Ra.inputStyles={textarea:il,contenteditable:Xa},Ra.defineMode=function(e){Ra.defaults.mode||"null"==e||(Ra.defaults.mode=e),Be.apply(this,arguments)},Ra.defineMIME=$e,Ra.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ra.defineMIME("text/plain","null"),Ra.defineExtension=function(e,t){Ra.prototype[e]=t},Ra.defineDocExtension=function(e,t){ws.prototype[e]=t},Ra.fromTextArea=ol,sl(Ra),Ra.version="5.65.3",Ra}()),kP.exports}var NP=_P();const DP=s(NP),AP=r({__proto__:null,default:DP},[NP]);var IP,OP={};var LP=(IP||(IP=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 F=s.getCursor();i.from.ch!=F.ch&&(E=s.cursorCoords(F),f.style.left=(x=E.left-C)+"px",O=f.getBoundingClientRect())}}var R,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(){R=setTimeout((function(){r.close()}),100)}),s.on("focus",this.onFocus=function(){clearTimeout(R)})),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)}(_P())),OP);const MP=r({__proto__:null,default:s(LP)},[LP]);var FP,RP={};function PP(){return FP||(FP=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)}))}(_P())),RP}var jP=PP();const VP=r({__proto__:null,default:s(jP)},[jP]);var BP,$P={};var UP=(BP||(BP=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+"`")}(_P())),$P);const HP=r({__proto__:null,default:s(UP)},[UP]);var qP,WP={};var zP=(qP||(qP=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))}}))}(_P())),WP);const GP=r({__proto__:null,default:s(zP)},[zP]);var KP,YP,QP={},XP={};function JP(){return KP||(KP=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)}))}(_P())),XP}var ZP=(YP||(YP=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)}}}(_P(),JP())),QP);const ej=r({__proto__:null,default:s(ZP)},[ZP]);var tj,nj={};var rj=(tj||(tj=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)}))}(_P())),nj);const ij=r({__proto__:null,default:s(rj)},[rj]);var oj,sj={};function aj(){return oj||(oj=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)}))}(_P())),sj}var lj=aj();const cj=r({__proto__:null,default:s(lj)},[lj]);var uj,dj,fj={},pj={};function hj(){return uj||(uj=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}))}(_P())),pj}var mj=(dj||(dj=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"}(_P(),hj())),fj);const gj=r({__proto__:null,default:s(mj)},[mj]);var vj=hj();const yj=r({__proto__:null,default:s(vj)},[vj]);var bj,Ej={};var xj=(bj||(bj=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}(_P(),aj(),PP())),Ej);const wj=r({__proto__:null,default:s(xj)},[xj]);var Tj,Cj={};var Sj,kj=(Tj||(Tj=1,(Sj=_P()).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 F=new M("this",new M("arguments",null));function R(){k.state.context=new L(k.state.context,k.state.localVars,!1),k.state.localVars=F}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"),R,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(R,V(")"),ce(Be,")"),B,$("=>"),r,j);if("variable"==e)return _(R,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(R,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(")"),Fe,B):void 0}function Fe(e){return"var"==e?N(_e,Re):"variable"==e?N(Re):_(Re)}function Re(e,t){return")"==e?N():";"==e?N(Re):"in"==t||"of"==t?(k.marked="keyword",N(q,Re)):_(q,Re)}function Pe(e,t){return"*"==t?(k.marked="keyword",N(Pe)):"variable"==e?(A(t),N(Pe)):"("==e?N(R,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(R,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 R.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 Sj.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 Sj.StringStream("",2,null))}}})),Sj.registerHelper("wordChars","javascript",/[\w$]/),Sj.defineMIME("text/javascript","javascript"),Sj.defineMIME("text/ecmascript","javascript"),Sj.defineMIME("application/javascript","javascript"),Sj.defineMIME("application/x-javascript","javascript"),Sj.defineMIME("application/ecmascript","javascript"),Sj.defineMIME("application/json",{name:"javascript",json:!0}),Sj.defineMIME("application/x-json",{name:"javascript",json:!0}),Sj.defineMIME("application/manifest+json",{name:"javascript",json:!0}),Sj.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),Sj.defineMIME("text/typescript",{name:"javascript",typescript:!0}),Sj.defineMIME("application/typescript",{name:"javascript",typescript:!0})),Cj);const _j=r({__proto__:null,default:s(kj)},[kj]);var Nj,Dj={};var Aj=(Nj||(Nj=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)}))}(_P())),Dj);const Ij=r({__proto__:null,default:s(Aj)},[Aj]);var Oj,Lj={};var Mj=(Oj||(Oj=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(uL){}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)}}(_P(),aj(),hj())),Lj);const Fj=r({__proto__:null,default:s(Mj)},[Mj]);DP.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 Jc(o.line,a),c={list:Uc(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=DP.Pos(c.from.line,c.from.ch),c.to=DP.Pos(c.to.line,c.to.ch),DP.signal(e,"hasCompletion",e,c,s)),c}));const Rj=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Pj=["error","warning","information","hint"],jj={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};DP.registerHelper("lint","graphql",((e,t)=>{const{schema:n,validationRules:r,externalFragments:i}=t;return iu(e,n,r,0,i).map((e=>({message:e.message,severity:e.severity?Pj[e.severity-1]:Pj[0],type:e.source?jj[e.source]:void 0,from:DP.Pos(e.range.start.line,e.range.start.character),to:DP.Pos(e.range.end.line,e.range.end.character)})))}));const Vj=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Bj(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 $j(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return Bj(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?Uj(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?$t(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&&Uj(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?$t(n.inputType):null;n.enumValue=s instanceof nn?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?Vt(n.inputType):null;n.inputType=a instanceof Mt?a.ofType:null;break;case"ObjectValue":const l=n.inputType?$t(n.inputType):null;n.objectFieldDefs=l instanceof sn?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 Uj(e,t,n){return n===Wn.name&&e.getQueryType()===t?Wn:n===zn.name&&e.getQueryType()===t?zn:n===Gn.name&&It(t)?Gn:t&&t.getFields?t.getFields()[n]:void 0}function Hj(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:Kj(e.fieldDef)?null:e.parentType}}function qj(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}function Wj(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:Kj(e.fieldDef)?null:e.parentType}}function zj(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?$t(e.inputType):void 0}}function Gj(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}function Kj(e){return"__"===e.name.slice(0,2)}function Yj(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(){DP.off(document,"mousemove",o),DP.off(e.getWrapperElement(),"mouseout",s),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},a=function(){DP.off(document,"mousemove",o),DP.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(){DP.off(r,"mouseover",d),DP.off(r,"mouseout",f),DP.off(e.getWrapperElement(),"mouseout",f),r.style.opacity?(r.style.opacity="0",setTimeout((()=>{r.parentNode&&r.remove()}),600)):r.parentNode&&r.remove()};DP.on(r,"mouseover",d),DP.on(r,"mouseout",f),DP.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),DP.on(document,"mousemove",o),DP.on(e.getWrapperElement(),"mouseout",s)}DP.defineOption("info",!1,((e,t,n)=>{if(n&&n!==DP.Init){const t=e.state.info.onMouseOver;DP.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=Yj.bind(null,e),DP.on(e.getWrapperElement(),"mouseover",n.onMouseOver)}}));const Qj=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Xj(e,t,n,r){const i=document.createElement("span");i.className="type-name-pill",r instanceof Ft?(Jj(i,t,n,r.ofType),eV(i,"!")):r instanceof Mt?(eV(i,"["),Jj(i,t,n,r.ofType),eV(i,"]")):eV(i,(null==r?void 0:r.name)||"","type-name",n,Gj(t,r)),e.append(i)}function Jj(e,t,n,r){r instanceof Ft?(Jj(e,t,n,r.ofType),eV(e,"!")):r instanceof Mt?(eV(e,"["),Jj(e,t,n,r.ofType),eV(e,"]")):eV(e,(null==r?void 0:r.name)||"","type-name",n,Gj(t,r))}function Zj(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 eV(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))}DP.registerHelper("info","graphql",((e,t)=>{var n;if(!t.schema||!e.state)return;const{kind:r,step:i}=e.state,o=$j(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)||"";eV(e,i,"field-name",n,Hj(t))})(e,t,n),Xj(e,t,n,t.type)}(e,o,t);const n=document.createElement("div");return n.append(e),Zj(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)||"");eV(e,i,"directive-name",n,qj(t))}(e,o,t);const n=document.createElement("div");return n.append(e),Zj(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)||"";eV(e,i,"arg-name",n,Wj(t)),Xj(e,t,n,t.inputType)}(e,o,t);const n=document.createElement("div");return n.append(e),Zj(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)||"";Jj(e,t,n,t.inputType),eV(e,"."),eV(e,i,"enum-value",n,zj(t))}(e,o,t);const n=document.createElement("div");return n.append(e),Zj(n,t,o.enumValue),n}if("NamedType"===r&&o.type&&o.type.description){const e=document.createElement("div");e.className="CodeMirror-info-header",Jj(e,o,t,o.type);const n=document.createElement("div");return n.append(e),Zj(n,t,o.type),n}}));const tV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function nV(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&&sV(e)}function rV(e){e.state.jump.isHoldingModifier||!e.state.jump.cursor?e.state.jump.isHoldingModifier&&e.state.jump.marker&&aV(e):e.state.jump.cursor=null}function iV(e,t){if(e.state.jump.isHoldingModifier||t.key!==(oV?"Meta":"Control"))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&sV(e);const n=o=>{o.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&aV(e),DP.off(document,"keyup",n),DP.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)};DP.on(document,"keyup",n),DP.on(document,"click",r),e.on("mousedown",i)}DP.defineOption("jump",!1,((e,t,n)=>{if(n&&n!==DP.Init){const t=e.state.jump.onMouseOver;DP.off(e.getWrapperElement(),"mouseover",t);const n=e.state.jump.onMouseOut;DP.off(e.getWrapperElement(),"mouseout",n),DP.off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const n=e.state.jump={options:t,onMouseOver:nV.bind(null,e),onMouseOut:rV.bind(null,e),onKeyDown:iV.bind(null,e)};DP.on(e.getWrapperElement(),"mouseover",n.onMouseOver),DP.on(e.getWrapperElement(),"mouseout",n.onMouseOut),DP.on(document,"keydown",n.onKeyDown)}}));const oV="undefined"!=typeof navigator&&navigator.userAgent.includes("Mac");function sV(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 aV(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}DP.registerHelper("jump","graphql",((e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const{state:n}=e,{kind:r,step:i}=n,o=$j(t.schema,n);return"Field"===r&&0===i&&o.fieldDef||"AliasedField"===r&&2===i&&o.fieldDef?Hj(o):"Directive"===r&&1===i&&o.directiveDef?qj(o):"Argument"===r&&0===i&&o.argDef?Wj(o):"EnumValue"===r&&o.enumValue?zj(o):"NamedType"===r&&o.type?Gj(o):void 0}));const lV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function cV(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)}DP.defineMode("graphql",(e=>{const t=Tc({eatWhitespace:e=>e.eatWhile(vc),lexRules:yc,parseRules:bc,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:cV,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}}));const uV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function dV(e,t,n){const r=function(e,t){if(!t)return fV(e,(e=>!e.isDeprecated));const n=e.map((e=>({proximity:hV(pV(e.text),t),entry:e}))),r=fV(fV(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,pV(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 fV(e,t){const n=e.filter(t);return 0===n.length?e:n}function pV(e){return e.toLowerCase().replaceAll(/\W/g,"")}function hV(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}DP.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 dV(e,t,[{text:"{"}]);const{variableToType:s}=n;if(!s)return;const a=function(e,t){const n={type:null,fields:null};return Bj(t,(t=>{switch(t.kind){case"Variable":n.type=e[t.name];break;case"ListValue":{const e=n.type?Vt(n.type):void 0;n.type=e instanceof Mt?e.ofType:null;break}case"ObjectValue":{const e=n.type?$t(n.type):void 0;n.fields=e instanceof sn?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 dV(e,t,Object.keys(s).map((e=>({text:`"${e}": `,type:s[e]}))))}if(("ObjectValue"===i||"ObjectField"===i&&0===o)&&a.fields){return dV(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?$t(a.type):void 0;if(n instanceof sn)return dV(e,t,[{text:"{"}]);if(n instanceof nn){return dV(e,t,n.getValues().map((e=>({text:`"${e.name}"`,type:n,description:e.description}))))}if(n===vn)return dV(e,t,[{text:"true",type:vn,description:"Not false."},{text:"false",type:vn,description:"Not true."}])}}(n,r,t);return(null==i?void 0:i.list)&&i.list.length>0&&(i.from=DP.Pos(i.from.line,i.from.ch),i.to=DP.Pos(i.to.line,i.to.ch),DP.signal(e,"hasCompletion",e,i,r)),i}));const mV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let gV,vV,yV,bV,EV,xV,wV;function TV(){const e=yV,t=[];if(_V("{"),!AV("}")){do{t.push(CV())}while(AV(","));_V("}")}return{kind:"Object",start:e,end:EV,members:t}}function CV(){const e=yV,t="String"===wV?kV():null;_V("String"),_V(":");const n=SV();return{kind:"Member",start:e,end:EV,key:t,value:n}}function SV(){switch(wV){case"[":return function(){const e=yV,t=[];if(_V("["),!AV("]")){do{t.push(SV())}while(AV(","));_V("]")}return{kind:"Array",start:e,end:EV,values:t}}();case"{":return TV();case"String":case"Number":case"Boolean":case"Null":const e=kV();return OV(),e}_V("Value")}function kV(){return{kind:wV,start:yV,end:bV,value:JSON.parse(gV.slice(yV,bV))}}function _V(e){if(wV===e)return void OV();let t;if("EOF"===wV)t="[end of file]";else if(bV-yV>1)t="`"+gV.slice(yV,bV)+"`";else{const e=gV.slice(yV).match(/^.+?\b/);t="`"+(e?e[0]:gV[yV])+"`"}throw DV(`Expected ${e} but found ${t}.`)}class NV extends Error{constructor(e,t){super(e),this.position=t}}function DV(e){return new NV(e,{start:yV,end:bV})}function AV(e){if(wV===e)return OV(),!0}function IV(){return bV<vV&&(bV++,xV=bV===vV?0:gV.charCodeAt(bV)),xV}function OV(){for(EV=bV;9===xV||10===xV||13===xV||32===xV;)IV();if(0!==xV){switch(yV=bV,xV){case 34:return wV="String",function(){IV();for(;34!==xV&&xV>31;)if(92===xV)switch(xV=IV(),xV){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:IV();break;case 117:IV(),LV(),LV(),LV(),LV();break;default:throw DV("Bad character escape sequence.")}else{if(bV===vV)throw DV("Unterminated string.");IV()}if(34===xV)return void IV();throw DV("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 wV="Number",function(){45===xV&&IV();48===xV?IV():MV();46===xV&&(IV(),MV());69!==xV&&101!==xV||(xV=IV(),43!==xV&&45!==xV||IV(),MV())}();case 102:if("false"!==gV.slice(yV,yV+5))break;return bV+=4,IV(),void(wV="Boolean");case 110:if("null"!==gV.slice(yV,yV+4))break;return bV+=3,IV(),void(wV="Null");case 116:if("true"!==gV.slice(yV,yV+4))break;return bV+=3,IV(),void(wV="Boolean")}wV=gV[yV],IV()}else wV="EOF"}function LV(){if(xV>=48&&xV<=57||xV>=65&&xV<=70||xV>=97&&xV<=102)return IV();throw DV("Expected hexadecimal digit.")}function MV(){if(xV<48||xV>57)throw DV("Expected decimal digit.");do{IV()}while(xV>=48&&xV<=57)}function FV(e,t){if(!e||!t)return[];if(e instanceof Ft)return"Null"===t.kind?[[t,`Type "${e}" is non-nullable and cannot be null.`]]:FV(e.ofType,t);if("Null"===t.kind)return[];if(e instanceof Mt){const n=e.ofType;if("Array"===t.kind){return PV(t.values||[],(e=>FV(n,e)))}return FV(n,t)}if(e instanceof sn){if("Object"!==t.kind)return[[t,`Type "${e}" must be an Object.`]];const n=Object.create(null),r=PV(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 FV(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 Ft&&!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 nn||e instanceof qt)&&("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 RV(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}function PV(e,t){return Array.prototype.concat.apply([],e.map(t))}DP.registerHelper("lint","graphql-variables",((e,t,n)=>{if(!e)return[];let r;try{r=function(e){gV=e,vV=e.length,yV=bV=EV=-1,IV(),OV();const t=TV();return _V("EOF"),t}(e)}catch(o){if(o instanceof NV)return[RV(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 FV(s,o.value))i.push(RV(e,t,r));else i.push(RV(e,o.key,`Variable "$${n}" does not appear in any GraphQL query.`))}return i}(n,i,r):[]}));const jV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));DP.defineMode("graphql-variables",(e=>{const t=Tc({eatWhitespace:e=>e.eatSpace(),lexRules:VV,parseRules:BV,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:cV,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const VV={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/},BV={Document:[gc("{"),hc("Variable",pc(gc(","))),gc("}")],Variable:[$V("variable"),gc(":"),"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:[mc("Number","number")],StringValue:[mc("String","string")],BooleanValue:[mc("Keyword","builtin")],NullValue:[mc("Keyword","keyword")],ListValue:[gc("["),hc("Value",pc(gc(","))),gc("]")],ObjectValue:[gc("{"),hc("ObjectField",pc(gc(","))),gc("}")],ObjectField:[$V("attribute"),gc(":"),"Value"]};function $V(e){return{style:e,match:e=>"String"===e.kind,update(e,t){e.name=t.value.slice(1,-1)}}}const UV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));DP.defineMode("graphql-results",(e=>{const t=Tc({eatWhitespace:e=>e.eatSpace(),lexRules:HV,parseRules:qV,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:cV,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const HV={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/},qV={Document:[gc("{"),hc("Entry",gc(",")),gc("}")],Entry:[mc("String","def"),gc(":"),"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:[mc("Number","number")],StringValue:[mc("String","string")],BooleanValue:[mc("Keyword","builtin")],NullValue:[mc("Keyword","keyword")],ListValue:[gc("["),hc("Value",gc(",")),gc("]")],ObjectValue:[gc("{"),hc("ObjectField",gc(",")),gc("}")],ObjectField:[mc("String","property"),gc(":"),"Value"]},WV=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));return cP}));
|
||
//# sourceMappingURL=index.umd.js.map
|