"use strict";(globalThis.webpackChunk_wpgraphql_wp_graphql=globalThis.webpackChunk_wpgraphql_wp_graphql||[]).push([[208],{3208(e,t,n){n.r(t);var r=n(3491),l=(n(5549),n(5917)),a=n(285),u=(n(1609),n(5795),Object.defineProperty);function i(e,t){var n,r;const l=e.levels;return((l&&0!==l.length?l[l.length-1]-((null===(n=this.electricInput)||void 0===n?void 0:n.test(t))?1:0):e.indentLevel)||0)*((null===(r=this.config)||void 0===r?void 0:r.indentUnit)||0)}r.C.defineMode("graphql-results",e=>{const t=(0,a.o)({eatWhitespace:e=>e.eatSpace(),lexRules:s,parseRules:o,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:i,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}),u(i,"name",{value:"indent",configurable:!0});const s={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},o={Document:[(0,l.p)("{"),(0,l.l)("Entry",(0,l.p)(",")),(0,l.p)("}")],Entry:[(0,l.t)("String","def"),(0,l.p)(":"),"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:[(0,l.t)("Number","number")],StringValue:[(0,l.t)("String","string")],BooleanValue:[(0,l.t)("Keyword","builtin")],NullValue:[(0,l.t)("Keyword","keyword")],ListValue:[(0,l.p)("["),(0,l.l)("Value",(0,l.p)(",")),(0,l.p)("]")],ObjectValue:[(0,l.p)("{"),(0,l.l)("ObjectField",(0,l.p)(",")),(0,l.p)("}")],ObjectField:[(0,l.t)("String","property"),(0,l.p)(":"),"Value"]}},285(e,t,n){n.d(t,{o:()=>i});var r=n(5917),l=n(5549),a=Object.defineProperty,u=(e,t)=>a(e,"name",{value:t,configurable:!0});function i(e={eatWhitespace:e=>e.eatWhile(r.i),lexRules:r.L,parseRules:r.P,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return c(e.parseRules,t,l.Kind.DOCUMENT),t},token:(t,n)=>s(t,n,e)}}function s(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:l,parseRules:a,eatWhitespace:u,editorConfig:i}=n;if(t.rule&&0===t.rule.length?d(t):t.needsAdvance&&(t.needsAdvance=!1,f(t,!0)),e.sol()){const n=(null==i?void 0:i.tabSize)||2;t.indentLevel=Math.floor(e.indentation()/n)}if(u(e))return"ws";const s=S(l,e);if(!s)return e.match(/\S+/)||e.match(/\s/),c(p,t,"Invalid"),"invalidchar";if("Comment"===s.kind)return c(p,t,"Comment"),"comment";const v=o({},t);if("Punctuation"===s.kind)if(/^[{([]/.test(s.value))void 0!==t.indentLevel&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(s.value)){const e=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&e.length>0&&e[e.length-1]<t.indentLevel&&(t.indentLevel=e[e.length-1])}for(;t.rule;){let n="function"==typeof t.rule?0===t.step?t.rule(s,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){c(a,t,n);continue}if(null===(r=n.match)||void 0===r?void 0:r.call(n,s))return n.update&&n.update(t,s),"Punctuation"===s.kind?f(t,!0):t.needsAdvance=!0,n.style}g(t)}return o(t,v),c(p,t,"Invalid"),"invalidchar"}function o(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}u(i,"onlineParser"),u(s,"getToken"),u(o,"assign");const p={Invalid:[],Comment:[]};function c(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 d(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 f(e,t){var n;if(v(e)&&e.rule){const n=e.rule[e.step];if(n.separator){const t=n.separator;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);)d(e),e.rule&&(v(e)?(null===(n=e.rule)||void 0===n?void 0:n[e.step].separator)&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function v(e){const t=Array.isArray(e.rule)&&"string"!=typeof e.rule[e.step]&&e.rule[e.step];return t&&t.isList}function g(e){for(;e.rule&&(!Array.isArray(e.rule)||!e.rule[e.step].ofRule);)d(e);e.rule&&f(e,!1)}function S(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r++){const l=t.match(e[n[r]]);if(l&&l instanceof Array)return{kind:n[r],value:l[0]}}}u(c,"pushRule"),u(d,"popRule"),u(f,"advanceRule"),u(v,"isList"),u(g,"unsuccessful"),u(S,"lex")}}]);