-
Notifications
You must be signed in to change notification settings - Fork 466
chore: update NPM dependencies #3302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR diff size of 8856 lines exceeds the maximum allowed for the inline comments feature.
| @@ -0,0 +1 @@ | |||
| "use strict";(globalThis.webpackChunkwp_graphql=globalThis.webpackChunkwp_graphql||[]).push([[331],{7331:(e,t,n)=>{n.d(t,{S:()=>vt,T:()=>ht,a:()=>yt});var i=Object.defineProperty,s=(e,t)=>i(e,"name",{value:t,configurable:!0});function r(e){return o(e,[])}function o(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return a(e,t);default:return String(e)}}function a(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(l(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:o(t,n)}else if(Array.isArray(e))return c(e,n);return u(e,n)}function l(e){return"function"==typeof e.toJSON}function u(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+p(e)+"]":"{ "+n.map((([e,n])=>e+": "+o(n,t))).join(", ")+" }"}function c(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),i=e.length-n,s=[];for(let i=0;i<n;++i)s.push(o(e[i],t));return 1===i?s.push("... 1 more item"):i>1&&s.push(`... ${i} more items`),"["+s.join(", ")+"]"}function p(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}function d(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}let f;var v;function h(e){return 9===e||32===e}function y(e){return e>=48&&e<=57}function m(e){return e>=97&&e<=122||e>=65&&e<=90}function T(e){return m(e)||95===e}function N(e){return m(e)||y(e)||95===e}function I(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),s=1===i.length,r=i.length>1&&i.slice(1).every((e=>0===e.length||h(e.charCodeAt(0)))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,l=e.endsWith("\\"),u=a||l,c=!(null!=t&&t.minimize)&&(!s||e.length>70||u||r||o);let p="";const d=s&&h(e.charCodeAt(0));return(c&&!d||r)&&(p+="\n"),p+=n,(c||u)&&(p+="\n"),'"""'+p+'"""'}function E(e){return`"${e.replace(g,b)}"`}s(r,"inspect"),s(o,"formatValue"),s(a,"formatObjectValue"),s(l,"isJSONable"),s(u,"formatObject"),s(c,"formatArray"),s(p,"getObjectTag"),s(d,"invariant"),(v=f||(f={})).QUERY="QUERY",v.MUTATION="MUTATION",v.SUBSCRIPTION="SUBSCRIPTION",v.FIELD="FIELD",v.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",v.FRAGMENT_SPREAD="FRAGMENT_SPREAD",v.INLINE_FRAGMENT="INLINE_FRAGMENT",v.VARIABLE_DEFINITION="VARIABLE_DEFINITION",v.SCHEMA="SCHEMA",v.SCALAR="SCALAR",v.OBJECT="OBJECT",v.FIELD_DEFINITION="FIELD_DEFINITION",v.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",v.INTERFACE="INTERFACE",v.UNION="UNION",v.ENUM="ENUM",v.ENUM_VALUE="ENUM_VALUE",v.INPUT_OBJECT="INPUT_OBJECT",v.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",s(h,"isWhiteSpace"),s(y,"isDigit$1"),s(m,"isLetter"),s(T,"isNameStart"),s(N,"isNameContinue"),s(I,"printBlockString"),s(E,"printString");const g=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function b(e){return O[e.charCodeAt(0)]}s(b,"escapedReplacer");const O=["\\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"];function S(e,t){if(!Boolean(e))throw new Error(t)}s(S,"devAssert");const A={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"]},L=new Set(Object.keys(A));function _(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&L.has(t)}let w;var D;let F;var x;s(_,"isNode"),(D=w||(w={})).QUERY="query",D.MUTATION="mutation",D.SUBSCRIPTION="subscription",(x=F||(F={})).NAME="Name",x.DOCUMENT="Document",x.OPERATION_DEFINITION="OperationDefinition",x.VARIABLE_DEFINITION="VariableDefinition",x.SELECTION_SET="SelectionSet",x.FIELD="Field",x.ARGUMENT="Argument",x.FRAGMENT_SPREAD="FragmentSpread",x.INLINE_FRAGMENT="InlineFragment",x.FRAGMENT_DEFINITION="FragmentDefinition",x.VARIABLE="Variable",x.INT="IntValue",x.FLOAT="FloatValue",x.STRING="StringValue",x.BOOLEAN="BooleanValue",x.NULL="NullValue",x.ENUM="EnumValue",x.LIST="ListValue",x.OBJECT="ObjectValue",x.OBJECT_FIELD="ObjectField",x.DIRECTIVE="Directive",x.NAMED_TYPE="NamedType",x.LIST_TYPE="ListType",x.NON_NULL_TYPE="NonNullType",x.SCHEMA_DEFINITION="SchemaDefinition",x.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",x.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",x.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",x.FIELD_DEFINITION="FieldDefinition",x.INPUT_VALUE_DEFINITION="InputValueDefinition",x.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",x.UNION_TYPE_DEFINITION="UnionTypeDefinition",x.ENUM_TYPE_DEFINITION="EnumTypeDefinition",x.ENUM_VALUE_DEFINITION="EnumValueDefinition",x.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",x.DIRECTIVE_DEFINITION="DirectiveDefinition",x.SCHEMA_EXTENSION="SchemaExtension",x.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",x.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",x.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",x.UNION_TYPE_EXTENSION="UnionTypeExtension",x.ENUM_TYPE_EXTENSION="EnumTypeExtension",x.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const R=Object.freeze({});function j(e,t,n=A){const i=new Map;for(const e of Object.values(F))i.set(e,U(t,e));let s,o,a,l=Array.isArray(e),u=[e],c=-1,p=[],d=e;const f=[],v=[];do{c++;const e=c===u.length,T=e&&0!==p.length;if(e){if(o=0===v.length?void 0:f[f.length-1],d=a,a=v.pop(),T)if(l){d=d.slice();let e=0;for(const[t,n]of p){const i=t-e;null===n?(d.splice(i,1),e++):d[i]=n}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[e,t]of p)d[e]=t}c=s.index,u=s.keys,p=s.edits,l=s.inArray,s=s.prev}else if(a){if(o=l?c:u[c],d=a[o],null==d)continue;f.push(o)}let N;if(!Array.isArray(d)){var h,y;_(d)||S(!1,`Invalid AST Node: ${r(d)}.`);const n=e?null===(h=i.get(d.kind))||void 0===h?void 0:h.leave:null===(y=i.get(d.kind))||void 0===y?void 0:y.enter;if(N=null==n?void 0:n.call(t,d,o,a,f,v),N===R)break;if(!1===N){if(!e){f.pop();continue}}else if(void 0!==N&&(p.push([o,N]),!e)){if(!_(N)){f.pop();continue}d=N}}var m;void 0===N&&T&&p.push([o,d]),e?f.pop():(s={inArray:l,index:c,keys:u,edits:p,prev:s},l=Array.isArray(d),u=l?d:null!==(m=n[d.kind])&&void 0!==m?m:[],c=-1,p=[],a&&v.push(a),a=d)}while(void 0!==s);return 0!==p.length?p[p.length-1][1]:e}function U(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 V(e){return j(e,C)}s(j,"visit"),s(U,"getEnterLeaveForKind"),s(V,"print");const C={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>$(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=k("(",$(e.variableDefinitions,", "),")"),n=$([e.operation,$([e.name,t]),$(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:i})=>e+": "+t+k(" = ",n)+k(" ",$(i," "))},SelectionSet:{leave:({selections:e})=>M(e)},Field:{leave({alias:e,name:t,arguments:n,directives:i,selectionSet:s}){const r=k("",e,": ")+t;let o=r+k("(",$(n,", "),")");return o.length>80&&(o=r+k("(\n",B($(n,"\n")),"\n)")),$([o,$(i," "),s]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+k(" ",$(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>$(["...",k("on ",e),$(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:i,selectionSet:s})=>`fragment ${e}${k("(",$(n,", "),")")} on ${t} ${k("",$(i," ")," ")}`+s},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?I(e):E(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+$(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+$(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+k("(",$(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>k("",e,"\n")+$(["schema",$(t," "),M(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>k("",e,"\n")+$(["scalar",t,$(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:i,fields:s})=>k("",e,"\n")+$(["type",t,k("implements ",$(n," & ")),$(i," "),M(s)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:i,directives:s})=>k("",e,"\n")+t+(G(n)?k("(\n",B($(n,"\n")),"\n)"):k("(",$(n,", "),")"))+": "+i+k(" ",$(s," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:i,directives:s})=>k("",e,"\n")+$([t+": "+n,k("= ",i),$(s," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:i,fields:s})=>k("",e,"\n")+$(["interface",t,k("implements ",$(n," & ")),$(i," "),M(s)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:i})=>k("",e,"\n")+$(["union",t,$(n," "),k("= ",$(i," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:i})=>k("",e,"\n")+$(["enum",t,$(n," "),M(i)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>k("",e,"\n")+$([t,$(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:i})=>k("",e,"\n")+$(["input",t,$(n," "),M(i)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:i,locations:s})=>k("",e,"\n")+"directive @"+t+(G(n)?k("(\n",B($(n,"\n")),"\n)"):k("(",$(n,", "),")"))+(i?" repeatable":"")+" on "+$(s," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>$(["extend schema",$(e," "),M(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>$(["extend scalar",e,$(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:i})=>$(["extend type",e,k("implements ",$(t," & ")),$(n," "),M(i)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:i})=>$(["extend interface",e,k("implements ",$(t," & ")),$(n," "),M(i)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>$(["extend union",e,$(t," "),k("= ",$(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>$(["extend enum",e,$(t," "),M(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>$(["extend input",e,$(t," "),M(n)]," ")}};function $(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function M(e){return k("{\n",B($(e,"\n")),"\n}")}function k(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function B(e){return k(" ",e.replace(/\n/g,"\n "))}function G(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}function P(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function J(e){return"object"==typeof e&&null!==e}function Q(e,t){const[n,i]=t?[e,t]:[void 0,e];let s=" Did you mean ";n&&(s+=n+" ");const r=i.map((e=>`"${e}"`));switch(r.length){case 0:return"";case 1:return s+r[0]+"?";case 2:return s+r[0]+" or "+r[1]+"?"}const o=r.slice(0,5),a=o.pop();return s+o.join(", ")+", or "+a+"?"}function Y(e){return e}s($,"join"),s(M,"block"),s(k,"wrap"),s(B,"indent"),s(G,"hasMultilineItems"),s(P,"isIterableObject"),s(J,"isObjectLike"),s(Q,"didYouMean"),s(Y,"identityFunc");const z=s((function(e,t){return e instanceof t}),"instanceOf");function q(e,t){const n=Object.create(null);for(const i of e)n[t(i)]=i;return n}function H(e,t,n){const i=Object.create(null);for(const s of e)i[t(s)]=n(s);return i}function X(e,t){const n=Object.create(null);for(const i of Object.keys(e))n[i]=t(e[i],i);return n}function W(e,t){let n=0,i=0;for(;n<e.length&&i<t.length;){let s=e.charCodeAt(n),r=t.charCodeAt(i);if(ee(s)&&ee(r)){let o=0;do{++n,o=10*o+s-K,s=e.charCodeAt(n)}while(ee(s)&&o>0);let a=0;do{++i,a=10*a+r-K,r=t.charCodeAt(i)}while(ee(r)&&a>0);if(o<a)return-1;if(o>a)return 1}else{if(s<r)return-1;if(s>r)return 1;++n,++i}}return e.length-t.length}s(q,"keyMap"),s(H,"keyValMap"),s(X,"mapValue"),s(W,"naturalCompare");const K=48,Z=57;function ee(e){return!isNaN(e)&&K<=e&&e<=Z}function te(e,t){const n=Object.create(null),i=new ne(e),s=Math.floor(.4*e.length)+1;for(const e of t){const t=i.measure(e,s);void 0!==t&&(n[e]=t)}return Object.keys(n).sort(((e,t)=>{const i=n[e]-n[t];return 0!==i?i:W(e,t)}))}s(ee,"isDigit"),s(te,"suggestionList");class ne{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=ie(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 i=ie(n),s=this._inputArray;if(i.length<s.length){const e=i;i=s,s=e}const r=i.length,o=s.length;if(r-o>t)return;const a=this._rows;for(let e=0;e<=o;e++)a[0][e]=e;for(let e=1;e<=r;e++){const n=a[(e-1)%3],r=a[e%3];let l=r[0]=e;for(let t=1;t<=o;t++){const o=i[e-1]===s[t-1]?0:1;let u=Math.min(n[t]+1,r[t-1]+1,n[t-1]+o);if(e>1&&t>1&&i[e-1]===s[t-2]&&i[e-2]===s[t-1]){const n=a[(e-2)%3][t-2];u=Math.min(u,n+1)}u<l&&(l=u),r[t]=u}if(l>t)return}const l=a[r%3][o];return l<=t?l:void 0}}function ie(e){const t=e.length,n=new Array(t);for(let i=0;i<t;++i)n[i]=e.charCodeAt(i);return n}function se(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;const t=Object.create(null);for(const[n,i]of Object.entries(e))t[n]=i;return t}s(ne,"LexicalDistance"),s(ie,"stringToArray"),s(se,"toObjMap");const re=/\r\n|[\n\r]/g;function oe(e,t){let n=0,i=1;for(const s of e.body.matchAll(re)){if("number"==typeof s.index||d(!1),s.index>=t)break;n=s.index+s[0].length,i+=1}return{line:i,column:t+1-n}}function ae(e){return le(e.source,oe(e.source,e.start))}function le(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,s=t.line-1,r=e.locationOffset.line-1,o=t.line+r,a=1===t.line?n:0,l=t.column+a,u=`${e.name}:${o}:${l}\n`,c=i.split(/\r\n|[\n\r]/g),p=c[s];if(p.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let e=0;e<p.length;e+=80)n.push(p.slice(e,e+80));return u+ue([[`${o} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return u+ue([[o-1+" |",c[s-1]],[`${o} |`,p],["|","^".padStart(l)],[`${o+1} |`,c[s+1]]])}function ue(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")}function ce(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}s(oe,"getLocation"),s(ae,"printLocation"),s(le,"printSourceLocation"),s(ue,"printPrefixedLines"),s(ce,"toNormalizedOptions");class pe extends Error{constructor(e,...t){var n,i,s;const{nodes:r,source:o,positions:a,path:l,originalError:u,extensions:c}=ce(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=u?u:void 0,this.nodes=de(Array.isArray(r)?r:r?[r]:void 0);const p=de(null===(n=this.nodes)||void 0===n?void 0:n.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=o?o:null==p||null===(i=p[0])||void 0===i?void 0:i.source,this.positions=null!=a?a:null==p?void 0:p.map((e=>e.start)),this.locations=a&&o?a.map((e=>oe(o,e))):null==p?void 0:p.map((e=>oe(e.source,e.start)));const d=J(null==u?void 0:u.extensions)?null==u?void 0:u.extensions:void 0;this.extensions=null!==(s=null!=c?c:d)&&void 0!==s?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,pe):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+ae(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+le(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 de(e){return void 0===e||0===e.length?void 0:e}function fe(e,t){switch(e.kind){case F.NULL:return null;case F.INT:return parseInt(e.value,10);case F.FLOAT:return parseFloat(e.value);case F.STRING:case F.ENUM:case F.BOOLEAN:return e.value;case F.LIST:return e.values.map((e=>fe(e,t)));case F.OBJECT:return H(e.fields,(e=>e.name.value),(e=>fe(e.value,t)));case F.VARIABLE:return null==t?void 0:t[e.name.value]}}function ve(e){if(null!=e||S(!1,"Must provide name."),"string"==typeof e||S(!1,"Expected name to be a string."),0===e.length)throw new pe("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!N(e.charCodeAt(t)))throw new pe(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!T(e.charCodeAt(0)))throw new pe(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function he(e){if("true"===e||"false"===e||"null"===e)throw new pe(`Enum values cannot be named: ${e}`);return ve(e)}function ye(e){return me(e)||Te(e)||Ne(e)||Ie(e)||Ee(e)||ge(e)||be(e)||Oe(e)}function me(e){return z(e,xe)}function Te(e){return z(e,Re)}function Ne(e){return z(e,ke)}function Ie(e){return z(e,Be)}function Ee(e){return z(e,Pe)}function ge(e){return z(e,Ye)}function be(e){return z(e,Le)}function Oe(e){return z(e,_e)}function Se(e){return me(e)||Ee(e)}function Ae(e){return Ne(e)||Ie(e)}s(pe,"GraphQLError"),s(de,"undefinedIfEmpty"),s(fe,"valueFromASTUntyped"),s(ve,"assertName"),s(he,"assertEnumValueName"),s(ye,"isType"),s(me,"isScalarType"),s(Te,"isObjectType"),s(Ne,"isInterfaceType"),s(Ie,"isUnionType"),s(Ee,"isEnumType"),s(ge,"isInputObjectType"),s(be,"isListType"),s(Oe,"isNonNullType"),s(Se,"isLeafType"),s(Ae,"isAbstractType");class Le{constructor(e){ye(e)||S(!1,`Expected ${r(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}s(Le,"GraphQLList");class _e{constructor(e){we(e)||S(!1,`Expected ${r(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 we(e){return ye(e)&&!Oe(e)}function De(e){return"function"==typeof e?e():e}function Fe(e){return"function"==typeof e?e():e}s(_e,"GraphQLNonNull"),s(we,"isNullableType"),s(De,"resolveReadonlyArrayThunk"),s(Fe,"resolveObjMapThunk");class xe{constructor(e){var t,n,i,s;const o=null!==(t=e.parseValue)&&void 0!==t?t:Y;this.name=ve(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:Y,this.parseValue=o,this.parseLiteral=null!==(i=e.parseLiteral)&&void 0!==i?i:(e,t)=>o(fe(e,t)),this.extensions=se(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(s=e.extensionASTNodes)&&void 0!==s?s:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||S(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${r(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||S(!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||S(!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()}}s(xe,"GraphQLScalarType");class Re{constructor(e){var t;this.name=ve(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=se(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=()=>Ue(e),this._interfaces=()=>je(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||S(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${r(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:$e(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function je(e){var t;const n=De(null!==(t=e.interfaces)&&void 0!==t?t:[]);return Array.isArray(n)||S(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Ue(e){const t=Fe(e.fields);return Ce(t)||S(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),X(t,((t,n)=>{var i;Ce(t)||S(!1,`${e.name}.${n} field config must be an object.`),null==t.resolve||"function"==typeof t.resolve||S(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${r(t.resolve)}.`);const s=null!==(i=t.args)&&void 0!==i?i:{};return Ce(s)||S(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:ve(n),description:t.description,type:t.type,args:Ve(s),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:se(t.extensions),astNode:t.astNode}}))}function Ve(e){return Object.entries(e).map((([e,t])=>({name:ve(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:se(t.extensions),astNode:t.astNode})))}function Ce(e){return J(e)&&!Array.isArray(e)}function $e(e){return X(e,(e=>({description:e.description,type:e.type,args:Me(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function Me(e){return H(e,(e=>e.name),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}s(Re,"GraphQLObjectType"),s(je,"defineInterfaces"),s(Ue,"defineFieldMap"),s(Ve,"defineArguments"),s(Ce,"isPlainObj"),s($e,"fieldsToFieldsConfig"),s(Me,"argsToArgsConfig");class ke{constructor(e){var t;this.name=ve(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=se(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=Ue.bind(void 0,e),this._interfaces=je.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||S(!1,`${this.name} must provide "resolveType" as a function, but got: ${r(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:$e(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}s(ke,"GraphQLInterfaceType");class Be{constructor(e){var t;this.name=ve(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=se(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._types=Ge.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||S(!1,`${this.name} must provide "resolveType" as a function, but got: ${r(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 Ge(e){const t=De(e.types);return Array.isArray(t)||S(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}s(Be,"GraphQLUnionType"),s(Ge,"defineTypes");class Pe{constructor(e){var t;this.name=ve(e.name),this.description=e.description,this.extensions=se(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._values=Qe(this.name,e.values),this._valueLookup=new Map(this._values.map((e=>[e.value,e]))),this._nameLookup=q(this._values,(e=>e.name))}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(e){return this._nameLookup[e]}serialize(e){const t=this._valueLookup.get(e);if(void 0===t)throw new pe(`Enum "${this.name}" cannot represent value: ${r(e)}`);return t.name}parseValue(e){if("string"!=typeof e){const t=r(e);throw new pe(`Enum "${this.name}" cannot represent non-string value: ${t}.`+Je(this,t))}const t=this.getValue(e);if(null==t)throw new pe(`Value "${e}" does not exist in "${this.name}" enum.`+Je(this,e));return t.value}parseLiteral(e,t){if(e.kind!==F.ENUM){const t=V(e);throw new pe(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+Je(this,t),{nodes:e})}const n=this.getValue(e.value);if(null==n){const t=V(e);throw new pe(`Value "${t}" does not exist in "${this.name}" enum.`+Je(this,t),{nodes:e})}return n.value}toConfig(){const e=H(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 Je(e,t){return Q("the enum value",te(t,e.getValues().map((e=>e.name))))}function Qe(e,t){return Ce(t)||S(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map((([t,n])=>(Ce(n)||S(!1,`${e}.${t} must refer to an object with a "value" key representing an internal value but got: ${r(n)}.`),{name:he(t),description:n.description,value:void 0!==n.value?n.value:t,deprecationReason:n.deprecationReason,extensions:se(n.extensions),astNode:n.astNode})))}s(Pe,"GraphQLEnumType"),s(Je,"didYouMeanEnumValue"),s(Qe,"defineEnumValues");class Ye{constructor(e){var t;this.name=ve(e.name),this.description=e.description,this.extensions=se(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=ze.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=X(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}}toString(){return this.name}toJSON(){return this.toString()}}function ze(e){const t=Fe(e.fields);return Ce(t)||S(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),X(t,((t,n)=>(!("resolve"in t)||S(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:ve(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:se(t.extensions),astNode:t.astNode})))}s(Ye,"GraphQLInputObjectType"),s(ze,"defineInputFieldMap");const qe=2147483647,He=-2147483648,Xe=new xe({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=tt(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 pe(`Int cannot represent non-integer value: ${r(t)}`);if(n>qe||n<He)throw new pe("Int cannot represent non 32-bit signed integer value: "+r(t));return n},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new pe(`Int cannot represent non-integer value: ${r(e)}`);if(e>qe||e<He)throw new pe(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==F.INT)throw new pe(`Int cannot represent non-integer value: ${V(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>qe||t<He)throw new pe(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),We=new xe({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=tt(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 pe(`Float cannot represent non numeric value: ${r(t)}`);return n},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new pe(`Float cannot represent non numeric value: ${r(e)}`);return e},parseLiteral(e){if(e.kind!==F.FLOAT&&e.kind!==F.INT)throw new pe(`Float cannot represent non numeric value: ${V(e)}`,e);return parseFloat(e.value)}}),Ke=new xe({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=tt(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 pe(`String cannot represent value: ${r(e)}`)},parseValue(e){if("string"!=typeof e)throw new pe(`String cannot represent a non string value: ${r(e)}`);return e},parseLiteral(e){if(e.kind!==F.STRING)throw new pe(`String cannot represent a non string value: ${V(e)}`,{nodes:e});return e.value}}),Ze=new xe({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=tt(e);if("boolean"==typeof t)return t;if(Number.isFinite(t))return 0!==t;throw new pe(`Boolean cannot represent a non boolean value: ${r(t)}`)},parseValue(e){if("boolean"!=typeof e)throw new pe(`Boolean cannot represent a non boolean value: ${r(e)}`);return e},parseLiteral(e){if(e.kind!==F.BOOLEAN)throw new pe(`Boolean cannot represent a non boolean value: ${V(e)}`,{nodes:e});return e.value}}),et=new xe({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=tt(e);if("string"==typeof t)return t;if(Number.isInteger(t))return String(t);throw new pe(`ID cannot represent value: ${r(e)}`)},parseValue(e){if("string"==typeof e)return e;if("number"==typeof e&&Number.isInteger(e))return e.toString();throw new pe(`ID cannot represent value: ${r(e)}`)},parseLiteral(e){if(e.kind!==F.STRING&&e.kind!==F.INT)throw new pe("ID cannot represent a non-string and non-integer value: "+V(e),{nodes:e});return e.value}});function tt(e){if(J(e)){if("function"==typeof e.valueOf){const t=e.valueOf();if(!J(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}function nt(e,t){if(Oe(t)){const n=nt(e,t.ofType);return(null==n?void 0:n.kind)===F.NULL?null:n}if(null===e)return{kind:F.NULL};if(void 0===e)return null;if(be(t)){const n=t.ofType;if(P(e)){const t=[];for(const i of e){const e=nt(i,n);null!=e&&t.push(e)}return{kind:F.LIST,values:t}}return nt(e,n)}if(ge(t)){if(!J(e))return null;const n=[];for(const i of Object.values(t.getFields())){const t=nt(e[i.name],i.type);t&&n.push({kind:F.OBJECT_FIELD,name:{kind:F.NAME,value:i.name},value:t})}return{kind:F.OBJECT,fields:n}}if(Se(t)){const n=t.serialize(e);if(null==n)return null;if("boolean"==typeof n)return{kind:F.BOOLEAN,value:n};if("number"==typeof n&&Number.isFinite(n)){const e=String(n);return it.test(e)?{kind:F.INT,value:e}:{kind:F.FLOAT,value:e}}if("string"==typeof n)return Ee(t)?{kind:F.ENUM,value:n}:t===et&&it.test(n)?{kind:F.INT,value:n}:{kind:F.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${r(n)}.`)}d(!1,"Unexpected input type: "+r(t))}Object.freeze([Ke,Xe,We,Ze,et]),s(tt,"serializeObject"),s(nt,"astFromValue");const it=/^-?(?:0|[1-9][0-9]*)$/,st=new Re({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:Ke,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new _e(new Le(new _e(at))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new _e(at),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:at,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:at,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new _e(new Le(new _e(rt))),resolve:e=>e.getDirectives()}})}),rt=new Re({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 _e(Ke),resolve:e=>e.name},description:{type:Ke,resolve:e=>e.description},isRepeatable:{type:new _e(Ze),resolve:e=>e.isRepeatable},locations:{type:new _e(new Le(new _e(ot))),resolve:e=>e.locations},args:{type:new _e(new Le(new _e(ut))),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))}})}),ot=new Pe({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:f.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:f.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:f.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:f.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:f.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:f.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:f.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:f.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:f.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:f.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:f.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:f.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:f.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:f.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:f.UNION,description:"Location adjacent to a union definition."},ENUM:{value:f.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:f.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:f.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:f.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),at=new Re({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 _e(ft),resolve:e=>me(e)?pt.SCALAR:Te(e)?pt.OBJECT:Ne(e)?pt.INTERFACE:Ie(e)?pt.UNION:Ee(e)?pt.ENUM:ge(e)?pt.INPUT_OBJECT:be(e)?pt.LIST:Oe(e)?pt.NON_NULL:void d(!1,`Unexpected type: "${r(e)}".`)},name:{type:Ke,resolve:e=>"name"in e?e.name:void 0},description:{type:Ke,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Ke,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Le(new _e(lt)),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Te(e)||Ne(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},interfaces:{type:new Le(new _e(at)),resolve(e){if(Te(e)||Ne(e))return e.getInterfaces()}},possibleTypes:{type:new Le(new _e(at)),resolve(e,t,n,{schema:i}){if(Ae(e))return i.getPossibleTypes(e)}},enumValues:{type:new Le(new _e(ct)),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Ee(e)){const n=e.getValues();return t?n:n.filter((e=>null==e.deprecationReason))}}},inputFields:{type:new Le(new _e(ut)),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ge(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},ofType:{type:at,resolve:e=>"ofType"in e?e.ofType:void 0}})}),lt=new Re({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 _e(Ke),resolve:e=>e.name},description:{type:Ke,resolve:e=>e.description},args:{type:new _e(new Le(new _e(ut))),args:{includeDeprecated:{type:Ze,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))},type:{type:new _e(at),resolve:e=>e.type},isDeprecated:{type:new _e(Ze),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ke,resolve:e=>e.deprecationReason}})}),ut=new Re({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 _e(Ke),resolve:e=>e.name},description:{type:Ke,resolve:e=>e.description},type:{type:new _e(at),resolve:e=>e.type},defaultValue:{type:Ke,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,i=nt(n,t);return i?V(i):null}},isDeprecated:{type:new _e(Ze),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ke,resolve:e=>e.deprecationReason}})}),ct=new Re({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 _e(Ke),resolve:e=>e.name},description:{type:Ke,resolve:e=>e.description},isDeprecated:{type:new _e(Ze),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ke,resolve:e=>e.deprecationReason}})});let pt;var dt;(dt=pt||(pt={})).SCALAR="SCALAR",dt.OBJECT="OBJECT",dt.INTERFACE="INTERFACE",dt.UNION="UNION",dt.ENUM="ENUM",dt.INPUT_OBJECT="INPUT_OBJECT",dt.LIST="LIST",dt.NON_NULL="NON_NULL";const ft=new Pe({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:pt.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:pt.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:pt.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:pt.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:pt.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:pt.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:pt.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:pt.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),vt={name:"__schema",type:new _e(st),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:i})=>i,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ht={name:"__type",type:at,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new _e(Ke),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:i})=>i.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},yt={name:"__typename",type:new _e(Ke),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:i})=>i.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Object.freeze([st,rt,ot,at,lt,ut,ct,ft])}}]); No newline at end of file | |||
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
| @@ -1 +1 @@ | |||
| (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,n=window.React,a=window.wp.i18n,i=window.wp.components,s=window.wp.apiFetch;var l=e.n(s);const r=window.ReactJSXRuntime,o=({plugin:e})=>{const{installing:s,activating:o,status:p,error:c,installPlugin:u,activatePlugin:d}=((e,t)=>{const[i,s]=(0,n.useState)(!1),[r,o]=(0,n.useState)(!1),[p,c]=(0,n.useState)(""),[u,d]=(0,n.useState)(""),w=(e,t="")=>{c(e),d(t)},h=async(n=t)=>{if(o(!0),w((0,a.__)("Activating...","wp-graphql")),!n){let t=new URL(e).pathname.split("/").filter(Boolean).pop();n=`${t}/${t}.php`}try{const t=await l()({path:`/wp/v2/plugins/${n}`,method:"PUT",data:{status:"active"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}});if("active"===t.status)return w((0,a.__)("Active","wp-graphql")),window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e?{...t,installed:!0,active:!0}:t)),!0;throw t.message.includes("Plugin file does not exist")?new Error((0,a.__)("Plugin file does not exist","wp-graphql")):new Error((0,a.__)("Activation failed","wp-graphql"))}catch(e){throw w((0,a.__)("Activation failed","wp-graphql"),e.message||(0,a.__)("Activation failed","wp-graphql")),e}finally{s(!1),o(!1)}};return{installing:i,activating:r,status:p,error:u,installPlugin:async()=>{s(!0),w((0,a.__)("Installing...","wp-graphql"));let n=new URL(e).pathname.split("/").filter(Boolean).pop();try{if("inactive"!==(await l()({path:"/wp/v2/plugins",method:"POST",data:{slug:n,status:"inactive"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}})).status)throw new Error((0,a.__)("Installation failed","wp-graphql"));await h(t)}catch(e){if(!e.message.includes("destination folder already exists"))throw w((0,a.__)("Installation failed","wp-graphql"),e.message||(0,a.__)("Installation failed","wp-graphql")),s(!1),e;await h(t)}},activatePlugin:h}})(e.plugin_url,e.plugin_path),[w,h]=(0,t.useState)(e.installed),[g,_]=(0,t.useState)(e.active),[m,x]=(0,t.useState)(!0);(0,t.useEffect)((()=>{h(e.installed),_(e.active)}),[e]);const b=new URL(e.plugin_url).host,{buttonText:f,buttonDisabled:v}=((e,t,n,i,s,l,r)=>{let o,p=!1,c=null;const u=e=>()=>window.open(e,"_blank");if(s)o=(0,a.__)("Installing...","wp-graphql"),p=!0;else if(l)o=(0,a.__)("Activating...","wp-graphql"),p=!0;else if(i)o=(0,a.__)("Active","wp-graphql"),p=!0;else if(n)o=(0,a.__)("Activate","wp-graphql"),c=r;else{const e=new URL(t).hostname.toLowerCase();switch(!0){case/github\.com$/.test(e):o=(0,a.__)("View on GitHub","wp-graphql"),c=u(t);break;case/bitbucket\.org$/.test(e):o=(0,a.__)("View on Bitbucket","wp-graphql"),c=u(t);break;case/gitlab\.com$/.test(e):o=(0,a.__)("View on GitLab","wp-graphql"),c=u(t);break;case/wordpress\.org$/.test(e):o=(0,a.__)("Install & Activate","wp-graphql"),c=r;break;default:o=(0,a.__)("View Plugin","wp-graphql"),c=u(t)}}return{buttonText:o,buttonDisabled:p,buttonOnClick:c}})(0,e.plugin_url,w,g,s,o),q=({author:e})=>e&&e.name&&e.homepage?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("em",{children:"By "}),(0,r.jsx)("cite",{children:(0,r.jsx)("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer",children:e.name})},e.homepage)]}):null;return(0,r.jsxs)("div",{className:"plugin-card",children:[(0,r.jsxs)("div",{className:"plugin-card-top",children:[(0,r.jsxs)("div",{className:"name column-name",children:[(0,r.jsx)("h2",{children:e.name}),(0,r.jsx)(q,{author:e.author}),e.experiment&&(0,r.jsx)("em",{className:"plugin-experimental",children:"(experimental)"})]}),(0,r.jsx)("div",{className:"action-links",children:(0,r.jsxs)("ul",{className:"plugin-action-buttons",children:[b.includes("wordpress.org")&&(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",className:"button "+(g?"button-disabled":"button-primary"),disabled:v,onClick:async()=>{const t=w,n=g;try{w?(await d(e.plugin_path),_(!0)):(await u(),h(!0),_(!0))}catch(e){h(t),_(n)}finally{window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e.plugin_url?{...t,installed:w,active:g}:t))}},children:[f,(s||o)&&(0,r.jsx)(i.Spinner,{})]})}),b.includes("github.com")&&(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:e.plugin_url,target:"_blank",rel:"noopener noreferrer",className:"button button-secondary",children:(0,a.__)("View on GitHub","wp-graphql")})}),e.support_url&&(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:e.support_url,target:"_blank",rel:"noopener noreferrer",className:"thickbox open-plugin-details-modal",children:(0,a.__)("Get Support","wp-graphql")})}),e.settings_url&&(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:e.settings_url,children:(0,a.__)("Settings","wp-graphql")})})]})}),(0,r.jsx)("div",{className:"desc column-description",children:(0,r.jsx)("p",{children:e.description})})]}),c&&m&&(0,r.jsx)(i.Notice,{status:"error",isDismissible:!0,onRemove:()=>x(!1),children:c})]})},p=()=>{const[e,t]=(0,n.useState)([]);return(0,n.useEffect)((()=>{window.wpgraphqlExtensions&&window.wpgraphqlExtensions.extensions&&t(window.wpgraphqlExtensions.extensions)}),[]),(0,r.jsx)("div",{className:"wp-clearfix",children:(0,r.jsx)("div",{className:"plugin-cards",children:e.map((e=>(0,r.jsx)(o,{plugin:e},e.plugin_url)))})})};document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("wpgraphql-extensions");e&&(0,t.createRoot)(e).render((0,t.createElement)(p))}))})(); No newline at end of file | |||
| (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.element,a=window.wp.i18n,l=window.wp.components,i=window.wp.apiFetch;var r=e.n(i);const s=({plugin:e})=>{const{installing:i,activating:s,status:o,error:p,installPlugin:c,activatePlugin:u}=((e,n)=>{const[l,i]=(0,t.useState)(!1),[s,o]=(0,t.useState)(!1),[p,c]=(0,t.useState)(""),[u,w]=(0,t.useState)(""),g=(e,t="")=>{c(e),w(t)},m=async(t=n)=>{if(o(!0),g((0,a.__)("Activating...","wp-graphql")),!t){let n=new URL(e).pathname.split("/").filter(Boolean).pop();t=`${n}/${n}.php`}try{const n=await r()({path:`/wp/v2/plugins/${t}`,method:"PUT",data:{status:"active"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}});if("active"===n.status)return g((0,a.__)("Active","wp-graphql")),window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e?{...t,installed:!0,active:!0}:t)),!0;throw n.message.includes("Plugin file does not exist")?new Error((0,a.__)("Plugin file does not exist","wp-graphql")):new Error((0,a.__)("Activation failed","wp-graphql"))}catch(e){throw g((0,a.__)("Activation failed","wp-graphql"),e.message||(0,a.__)("Activation failed","wp-graphql")),e}finally{i(!1),o(!1)}};return{installing:l,activating:s,status:p,error:u,installPlugin:async()=>{i(!0),g((0,a.__)("Installing...","wp-graphql"));let t=new URL(e).pathname.split("/").filter(Boolean).pop();try{if("inactive"!==(await r()({path:"/wp/v2/plugins",method:"POST",data:{slug:t,status:"inactive"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}})).status)throw new Error((0,a.__)("Installation failed","wp-graphql"));await m(n)}catch(e){if(!e.message.includes("destination folder already exists"))throw g((0,a.__)("Installation failed","wp-graphql"),e.message||(0,a.__)("Installation failed","wp-graphql")),i(!1),e;await m(n)}},activatePlugin:m}})(e.plugin_url,e.plugin_path),[w,g]=(0,n.useState)(e.installed),[m,d]=(0,n.useState)(e.active),[h,_]=(0,n.useState)(!0);(0,n.useEffect)((()=>{g(e.installed),d(e.active)}),[e]);const E=new URL(e.plugin_url).host,{buttonText:b,buttonDisabled:f}=((e,t,n,l,i,r,s)=>{let o,p=!1,c=null;const u=e=>()=>window.open(e,"_blank");if(i)o=(0,a.__)("Installing...","wp-graphql"),p=!0;else if(r)o=(0,a.__)("Activating...","wp-graphql"),p=!0;else if(l)o=(0,a.__)("Active","wp-graphql"),p=!0;else if(n)o=(0,a.__)("Activate","wp-graphql"),c=s;else{const e=new URL(t).hostname.toLowerCase();switch(!0){case/github\.com$/.test(e):o=(0,a.__)("View on GitHub","wp-graphql"),c=u(t);break;case/bitbucket\.org$/.test(e):o=(0,a.__)("View on Bitbucket","wp-graphql"),c=u(t);break;case/gitlab\.com$/.test(e):o=(0,a.__)("View on GitLab","wp-graphql"),c=u(t);break;case/wordpress\.org$/.test(e):o=(0,a.__)("Install & Activate","wp-graphql"),c=s;break;default:o=(0,a.__)("View Plugin","wp-graphql"),c=u(t)}}return{buttonText:o,buttonDisabled:p,buttonOnClick:c}})(0,e.plugin_url,w,m,i,s);return(0,t.createElement)("div",{className:"plugin-card"},(0,t.createElement)("div",{className:"plugin-card-top"},(0,t.createElement)("div",{className:"name column-name"},(0,t.createElement)("h2",null,e.name),(0,t.createElement)((({author:e})=>e&&e.name&&e.homepage?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("em",null,"By "),(0,t.createElement)("cite",{key:e.homepage},(0,t.createElement)("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer"},e.name))):null),{author:e.author}),e.experiment&&(0,t.createElement)("em",{className:"plugin-experimental"},"(experimental)")),(0,t.createElement)("div",{className:"action-links"},(0,t.createElement)("ul",{className:"plugin-action-buttons"},E.includes("wordpress.org")&&(0,t.createElement)("li",null,(0,t.createElement)("button",{type:"button",className:"button "+(m?"button-disabled":"button-primary"),disabled:f,onClick:async()=>{const t=w,n=m;try{w?(await u(e.plugin_path),d(!0)):(await c(),g(!0),d(!0))}catch(e){g(t),d(n)}finally{window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e.plugin_url?{...t,installed:w,active:m}:t))}}},b,(i||s)&&(0,t.createElement)(l.Spinner,null))),E.includes("github.com")&&(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.plugin_url,target:"_blank",rel:"noopener noreferrer",className:"button button-secondary"},(0,a.__)("View on GitHub","wp-graphql"))),e.support_url&&(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.support_url,target:"_blank",rel:"noopener noreferrer",className:"thickbox open-plugin-details-modal"},(0,a.__)("Get Support","wp-graphql"))),e.settings_url&&(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.settings_url},(0,a.__)("Settings","wp-graphql"))))),(0,t.createElement)("div",{className:"desc column-description"},(0,t.createElement)("p",null,e.description))),p&&h&&(0,t.createElement)(l.Notice,{status:"error",isDismissible:!0,onRemove:()=>_(!1)},p))},o=()=>{const[e,n]=(0,t.useState)([]);return(0,t.useEffect)((()=>{window.wpgraphqlExtensions&&window.wpgraphqlExtensions.extensions&&n(window.wpgraphqlExtensions.extensions)}),[]),(0,t.createElement)("div",{className:"wp-clearfix"},(0,t.createElement)("div",{className:"plugin-cards"},e.map((e=>(0,t.createElement)(s,{key:e.plugin_url,plugin:e})))))};document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("wpgraphql-extensions");e&&(n.createRoot?(0,n.createRoot)(e).render((0,t.createElement)(o,null)):(0,n.render)((0,t.createElement)(o,null),e))}))})(); No newline at end of file | |||
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
wordpress.org
| @@ -1 +1 @@ | |||
| (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,n=window.React,a=window.wp.i18n,i=window.wp.components,s=window.wp.apiFetch;var l=e.n(s);const r=window.ReactJSXRuntime,o=({plugin:e})=>{const{installing:s,activating:o,status:p,error:c,installPlugin:u,activatePlugin:d}=((e,t)=>{const[i,s]=(0,n.useState)(!1),[r,o]=(0,n.useState)(!1),[p,c]=(0,n.useState)(""),[u,d]=(0,n.useState)(""),w=(e,t="")=>{c(e),d(t)},h=async(n=t)=>{if(o(!0),w((0,a.__)("Activating...","wp-graphql")),!n){let t=new URL(e).pathname.split("/").filter(Boolean).pop();n=`${t}/${t}.php`}try{const t=await l()({path:`/wp/v2/plugins/${n}`,method:"PUT",data:{status:"active"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}});if("active"===t.status)return w((0,a.__)("Active","wp-graphql")),window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e?{...t,installed:!0,active:!0}:t)),!0;throw t.message.includes("Plugin file does not exist")?new Error((0,a.__)("Plugin file does not exist","wp-graphql")):new Error((0,a.__)("Activation failed","wp-graphql"))}catch(e){throw w((0,a.__)("Activation failed","wp-graphql"),e.message||(0,a.__)("Activation failed","wp-graphql")),e}finally{s(!1),o(!1)}};return{installing:i,activating:r,status:p,error:u,installPlugin:async()=>{s(!0),w((0,a.__)("Installing...","wp-graphql"));let n=new URL(e).pathname.split("/").filter(Boolean).pop();try{if("inactive"!==(await l()({path:"/wp/v2/plugins",method:"POST",data:{slug:n,status:"inactive"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}})).status)throw new Error((0,a.__)("Installation failed","wp-graphql"));await h(t)}catch(e){if(!e.message.includes("destination folder already exists"))throw w((0,a.__)("Installation failed","wp-graphql"),e.message||(0,a.__)("Installation failed","wp-graphql")),s(!1),e;await h(t)}},activatePlugin:h}})(e.plugin_url,e.plugin_path),[w,h]=(0,t.useState)(e.installed),[g,_]=(0,t.useState)(e.active),[m,x]=(0,t.useState)(!0);(0,t.useEffect)((()=>{h(e.installed),_(e.active)}),[e]);const b=new URL(e.plugin_url).host,{buttonText:f,buttonDisabled:v}=((e,t,n,i,s,l,r)=>{let o,p=!1,c=null;const u=e=>()=>window.open(e,"_blank");if(s)o=(0,a.__)("Installing...","wp-graphql"),p=!0;else if(l)o=(0,a.__)("Activating...","wp-graphql"),p=!0;else if(i)o=(0,a.__)("Active","wp-graphql"),p=!0;else if(n)o=(0,a.__)("Activate","wp-graphql"),c=r;else{const e=new URL(t).hostname.toLowerCase();switch(!0){case/github\.com$/.test(e):o=(0,a.__)("View on GitHub","wp-graphql"),c=u(t);break;case/bitbucket\.org$/.test(e):o=(0,a.__)("View on Bitbucket","wp-graphql"),c=u(t);break;case/gitlab\.com$/.test(e):o=(0,a.__)("View on GitLab","wp-graphql"),c=u(t);break;case/wordpress\.org$/.test(e):o=(0,a.__)("Install & Activate","wp-graphql"),c=r;break;default:o=(0,a.__)("View Plugin","wp-graphql"),c=u(t)}}return{buttonText:o,buttonDisabled:p,buttonOnClick:c}})(0,e.plugin_url,w,g,s,o),q=({author:e})=>e&&e.name&&e.homepage?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("em",{children:"By "}),(0,r.jsx)("cite",{children:(0,r.jsx)("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer",children:e.name})},e.homepage)]}):null;return(0,r.jsxs)("div",{className:"plugin-card",children:[(0,r.jsxs)("div",{className:"plugin-card-top",children:[(0,r.jsxs)("div",{className:"name column-name",children:[(0,r.jsx)("h2",{children:e.name}),(0,r.jsx)(q,{author:e.author}),e.experiment&&(0,r.jsx)("em",{className:"plugin-experimental",children:"(experimental)"})]}),(0,r.jsx)("div",{className:"action-links",children:(0,r.jsxs)("ul",{className:"plugin-action-buttons",children:[b.includes("wordpress.org")&&(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",className:"button "+(g?"button-disabled":"button-primary"),disabled:v,onClick:async()=>{const t=w,n=g;try{w?(await d(e.plugin_path),_(!0)):(await u(),h(!0),_(!0))}catch(e){h(t),_(n)}finally{window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e.plugin_url?{...t,installed:w,active:g}:t))}},children:[f,(s||o)&&(0,r.jsx)(i.Spinner,{})]})}),b.includes("github.com")&&(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:e.plugin_url,target:"_blank",rel:"noopener noreferrer",className:"button button-secondary",children:(0,a.__)("View on GitHub","wp-graphql")})}),e.support_url&&(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:e.support_url,target:"_blank",rel:"noopener noreferrer",className:"thickbox open-plugin-details-modal",children:(0,a.__)("Get Support","wp-graphql")})}),e.settings_url&&(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:e.settings_url,children:(0,a.__)("Settings","wp-graphql")})})]})}),(0,r.jsx)("div",{className:"desc column-description",children:(0,r.jsx)("p",{children:e.description})})]}),c&&m&&(0,r.jsx)(i.Notice,{status:"error",isDismissible:!0,onRemove:()=>x(!1),children:c})]})},p=()=>{const[e,t]=(0,n.useState)([]);return(0,n.useEffect)((()=>{window.wpgraphqlExtensions&&window.wpgraphqlExtensions.extensions&&t(window.wpgraphqlExtensions.extensions)}),[]),(0,r.jsx)("div",{className:"wp-clearfix",children:(0,r.jsx)("div",{className:"plugin-cards",children:e.map((e=>(0,r.jsx)(o,{plugin:e},e.plugin_url)))})})};document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("wpgraphql-extensions");e&&(0,t.createRoot)(e).render((0,t.createElement)(p))}))})(); No newline at end of file | |||
| (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.element,a=window.wp.i18n,l=window.wp.components,i=window.wp.apiFetch;var r=e.n(i);const s=({plugin:e})=>{const{installing:i,activating:s,status:o,error:p,installPlugin:c,activatePlugin:u}=((e,n)=>{const[l,i]=(0,t.useState)(!1),[s,o]=(0,t.useState)(!1),[p,c]=(0,t.useState)(""),[u,w]=(0,t.useState)(""),g=(e,t="")=>{c(e),w(t)},m=async(t=n)=>{if(o(!0),g((0,a.__)("Activating...","wp-graphql")),!t){let n=new URL(e).pathname.split("/").filter(Boolean).pop();t=`${n}/${n}.php`}try{const n=await r()({path:`/wp/v2/plugins/${t}`,method:"PUT",data:{status:"active"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}});if("active"===n.status)return g((0,a.__)("Active","wp-graphql")),window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e?{...t,installed:!0,active:!0}:t)),!0;throw n.message.includes("Plugin file does not exist")?new Error((0,a.__)("Plugin file does not exist","wp-graphql")):new Error((0,a.__)("Activation failed","wp-graphql"))}catch(e){throw g((0,a.__)("Activation failed","wp-graphql"),e.message||(0,a.__)("Activation failed","wp-graphql")),e}finally{i(!1),o(!1)}};return{installing:l,activating:s,status:p,error:u,installPlugin:async()=>{i(!0),g((0,a.__)("Installing...","wp-graphql"));let t=new URL(e).pathname.split("/").filter(Boolean).pop();try{if("inactive"!==(await r()({path:"/wp/v2/plugins",method:"POST",data:{slug:t,status:"inactive"},headers:{"X-WP-Nonce":wpgraphqlExtensions.nonce}})).status)throw new Error((0,a.__)("Installation failed","wp-graphql"));await m(n)}catch(e){if(!e.message.includes("destination folder already exists"))throw g((0,a.__)("Installation failed","wp-graphql"),e.message||(0,a.__)("Installation failed","wp-graphql")),i(!1),e;await m(n)}},activatePlugin:m}})(e.plugin_url,e.plugin_path),[w,g]=(0,n.useState)(e.installed),[m,d]=(0,n.useState)(e.active),[h,_]=(0,n.useState)(!0);(0,n.useEffect)((()=>{g(e.installed),d(e.active)}),[e]);const E=new URL(e.plugin_url).host,{buttonText:b,buttonDisabled:f}=((e,t,n,l,i,r,s)=>{let o,p=!1,c=null;const u=e=>()=>window.open(e,"_blank");if(i)o=(0,a.__)("Installing...","wp-graphql"),p=!0;else if(r)o=(0,a.__)("Activating...","wp-graphql"),p=!0;else if(l)o=(0,a.__)("Active","wp-graphql"),p=!0;else if(n)o=(0,a.__)("Activate","wp-graphql"),c=s;else{const e=new URL(t).hostname.toLowerCase();switch(!0){case/github\.com$/.test(e):o=(0,a.__)("View on GitHub","wp-graphql"),c=u(t);break;case/bitbucket\.org$/.test(e):o=(0,a.__)("View on Bitbucket","wp-graphql"),c=u(t);break;case/gitlab\.com$/.test(e):o=(0,a.__)("View on GitLab","wp-graphql"),c=u(t);break;case/wordpress\.org$/.test(e):o=(0,a.__)("Install & Activate","wp-graphql"),c=s;break;default:o=(0,a.__)("View Plugin","wp-graphql"),c=u(t)}}return{buttonText:o,buttonDisabled:p,buttonOnClick:c}})(0,e.plugin_url,w,m,i,s);return(0,t.createElement)("div",{className:"plugin-card"},(0,t.createElement)("div",{className:"plugin-card-top"},(0,t.createElement)("div",{className:"name column-name"},(0,t.createElement)("h2",null,e.name),(0,t.createElement)((({author:e})=>e&&e.name&&e.homepage?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("em",null,"By "),(0,t.createElement)("cite",{key:e.homepage},(0,t.createElement)("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer"},e.name))):null),{author:e.author}),e.experiment&&(0,t.createElement)("em",{className:"plugin-experimental"},"(experimental)")),(0,t.createElement)("div",{className:"action-links"},(0,t.createElement)("ul",{className:"plugin-action-buttons"},E.includes("wordpress.org")&&(0,t.createElement)("li",null,(0,t.createElement)("button",{type:"button",className:"button "+(m?"button-disabled":"button-primary"),disabled:f,onClick:async()=>{const t=w,n=m;try{w?(await u(e.plugin_path),d(!0)):(await c(),g(!0),d(!0))}catch(e){g(t),d(n)}finally{window.wpgraphqlExtensions.extensions=window.wpgraphqlExtensions.extensions.map((t=>t.plugin_url===e.plugin_url?{...t,installed:w,active:m}:t))}}},b,(i||s)&&(0,t.createElement)(l.Spinner,null))),E.includes("github.com")&&(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.plugin_url,target:"_blank",rel:"noopener noreferrer",className:"button button-secondary"},(0,a.__)("View on GitHub","wp-graphql"))),e.support_url&&(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.support_url,target:"_blank",rel:"noopener noreferrer",className:"thickbox open-plugin-details-modal"},(0,a.__)("Get Support","wp-graphql"))),e.settings_url&&(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.settings_url},(0,a.__)("Settings","wp-graphql"))))),(0,t.createElement)("div",{className:"desc column-description"},(0,t.createElement)("p",null,e.description))),p&&h&&(0,t.createElement)(l.Notice,{status:"error",isDismissible:!0,onRemove:()=>_(!1)},p))},o=()=>{const[e,n]=(0,t.useState)([]);return(0,t.useEffect)((()=>{window.wpgraphqlExtensions&&window.wpgraphqlExtensions.extensions&&n(window.wpgraphqlExtensions.extensions)}),[]),(0,t.createElement)("div",{className:"wp-clearfix"},(0,t.createElement)("div",{className:"plugin-cards"},e.map((e=>(0,t.createElement)(s,{key:e.plugin_url,plugin:e})))))};document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("wpgraphql-extensions");e&&(n.createRoot?(0,n.createRoot)(e).render((0,t.createElement)(o,null)):(0,n.render)((0,t.createElement)(o,null),e))}))})(); No newline at end of file | |||
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
github.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR diff size of 8873 lines exceeds the maximum allowed for the inline comments feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR diff size of 8872 lines exceeds the maximum allowed for the inline comments feature.
I'll see what I can find out. In my experience it's usually some dependency update that requires some adjustments to the tests. That I'll see if I can get the tests fixed 👀 |
After running the tests locally, I don't think this is related. 🤔 |
… initial load vs when it's toggled open and closed again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR diff size of 8976 lines exceeds the maximum allowed for the inline comments feature.
|
Code Climate has analyzed commit 55453ec and detected 0 issues on this pull request. View more on Code Climate. |
|
@justlevine I pushed a small tweak to the logic of the test and how it asserts visibility on the Documentation Explorer. |
The merge-base changed after approval.

What does this implement/fix? Explain your changes.
This PR updates the bundled NPM dependencies to their latest semver-compatible versions, with the following notes:
@wordpress/env- bump to latest@wordpress/jest-preset-default- bump to latestclsx- removed from dev-dependencies (unused)concurrently- bump to latest.docker-compose- removed from dev-dependencies (unused)Additionally, an .nvmrc file has been set to node v
20(and updated in CI) to match the types used in our package.json.Important
This PR is based on #3301 which should be merged first.
Relevant diff: 0cff73a
Does this close any currently open issues?
Any relevant logs, error output, GraphiQL screenshots, etc?
Any other comments?
…
Where has this been tested?
Operating System: Ubuntu 24.04 (wsl2 + devilbox +PHP 8.2.26)
WordPress Version: 6.0