quantum-component-library 1.4.47-qa → 1.4.48-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +115 -115
  2. package/dist/components.cjs +1 -1
  3. package/dist/components.js +1531 -1411
  4. package/dist/{dnd-core-vendor-CErAmYu_.js → dnd-core-vendor-CEbjUoFs.js} +2 -2
  5. package/dist/{dnd-core-vendor-2Ve0kqUN.cjs → dnd-core-vendor-gqRN0Czq.cjs} +1 -1
  6. package/dist/generated/gql.d.ts +17 -2
  7. package/dist/generated/graphql.d.ts +65 -1
  8. package/dist/generated-graphql.cjs +1 -1
  9. package/dist/generated-graphql.js +47 -44
  10. package/dist/generated.cjs +1 -1
  11. package/dist/generated.js +56 -53
  12. package/dist/graphql/fragments/index.d.ts +1 -0
  13. package/dist/graphql/fragments/metadata.d.ts +2 -0
  14. package/dist/graphql/queries/index.d.ts +1 -0
  15. package/dist/graphql/queries/metadata.d.ts +3 -0
  16. package/dist/{graphql-C6M9oyU0.cjs → graphql-Ce2MNCsk.cjs} +72 -49
  17. package/dist/{graphql-CvUc6Vdv.js → graphql-_vGi4u4K.js} +95 -70
  18. package/dist/graphql-vendor-AFHxLsy8.cjs +14 -0
  19. package/dist/graphql-vendor-hJezYUeG.js +669 -0
  20. package/dist/hooks.cjs +1 -1
  21. package/dist/hooks.js +61 -51
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +139 -131
  24. package/dist/lib/hooks/index.d.ts +1 -0
  25. package/dist/lib/hooks/use-ui-label-context.d.ts +6 -0
  26. package/dist/lib/providers/index.d.ts +1 -0
  27. package/dist/lib/providers/ui-label-provider/context.d.ts +9 -0
  28. package/dist/lib/providers/ui-label-provider/index.d.ts +2 -0
  29. package/dist/lib/providers/ui-label-provider/provider.d.ts +2 -0
  30. package/dist/lib/services/rom.json.d.ts +223 -223
  31. package/dist/lib/utils/cn.d.ts +2 -0
  32. package/dist/lib/utils/index.d.ts +1 -2
  33. package/dist/{lodash-vendor-CR237hSU.cjs → lodash-vendor-CF0pV_0E.cjs} +1 -1
  34. package/dist/{lodash-vendor-D4ZPCr77.js → lodash-vendor-apNdTTav.js} +1 -1
  35. package/dist/other-D9ROT7p0.js +20 -0
  36. package/dist/other-DyoApG-9.cjs +1 -0
  37. package/dist/providers.cjs +1 -1
  38. package/dist/providers.js +41 -8
  39. package/dist/quantum-component-library.css +1 -1
  40. package/dist/{react-dnd-vendor-D4nn9Mqx.js → react-dnd-vendor-BCrg2QCX.js} +2 -2
  41. package/dist/{react-dnd-vendor-BPzSDojS.cjs → react-dnd-vendor-PwwXhPmK.cjs} +1 -1
  42. package/dist/react-icons-vendor-BF_sZq07.cjs +1 -0
  43. package/dist/{react-icons-vendor-TETORdU9.js → react-icons-vendor-CMsTQrA0.js} +51 -43
  44. package/dist/{react-select-vendor-D_Q2fL5j.cjs → react-select-vendor-BeWvSe2q.cjs} +1 -1
  45. package/dist/{react-select-vendor-BlY9Il4Q.js → react-select-vendor-BxbsY5Z-.js} +1 -1
  46. package/dist/services-action-CfZFwhy-.js +40 -0
  47. package/dist/services-action-DBOzfgMl.cjs +1 -0
  48. package/dist/services-human-B98qxeuS.js +798 -0
  49. package/dist/services-human-CnvSTmoF.cjs +1 -0
  50. package/dist/services-rom-DmV5X8yu.cjs +1 -0
  51. package/dist/services-rom-omMeC-vQ.js +18 -0
  52. package/dist/services.cjs +1 -1
  53. package/dist/services.js +52 -844
  54. package/dist/types.cjs +1 -1
  55. package/dist/types.js +11 -11
  56. package/dist/utils-cn-CgdSr4hO.js +7 -0
  57. package/dist/utils-cn-FIKrq5Mb.cjs +1 -0
  58. package/dist/utils-conversion-CWypeWsT.cjs +1 -0
  59. package/dist/utils-conversion-ChFbq8I2.js +94 -0
  60. package/dist/utils-memo-BJJP2KfI.cjs +1 -0
  61. package/dist/utils-memo-DtXdOqCT.js +13 -0
  62. package/dist/utils-parameters-BBFuBK2B.js +21 -0
  63. package/dist/utils-parameters-dwKmz1VU.cjs +1 -0
  64. package/dist/utils-text-CN3zLiZ7.js +5 -0
  65. package/dist/utils-text-lORqO4uI.cjs +1 -0
  66. package/dist/utils.cjs +1 -1
  67. package/dist/utils.js +29 -126
  68. package/dist/vendor-BOD7IxCS.js +421 -0
  69. package/dist/vendor-IPtJZCbx.cjs +1 -0
  70. package/package.json +133 -133
  71. package/dist/graphql-vendor-B-QTAQSb.cjs +0 -19
  72. package/dist/graphql-vendor-B0NjgbDB.js +0 -1284
  73. package/dist/other-C4VnLmM6.js +0 -15
  74. package/dist/other-Dp3RPYfF.cjs +0 -1
  75. package/dist/react-icons-vendor-D2s8zw9h.cjs +0 -1
  76. package/dist/vendor-BjLvygDR.cjs +0 -1
  77. package/dist/vendor-VALJ9W3p.js +0 -526
@@ -1,5 +1,5 @@
1
1
  import { graphql as e } from "./generated.js";
2
- const i = e(`
2
+ const a = e(`
3
3
  fragment AssessmentAction on Action {
4
4
  id
5
5
  name
@@ -30,6 +30,9 @@ const i = e(`
30
30
  ...LibraryModuleCategory
31
31
  }
32
32
  quantumOwned
33
+ metadataGroups {
34
+ ...MetadataGroup
35
+ }
33
36
  }
34
37
  `);
35
38
  e(`
@@ -273,7 +276,7 @@ e(`
273
276
  name
274
277
  }
275
278
  `);
276
- const a = e(`
279
+ const i = e(`
277
280
  fragment UserGroup on Group {
278
281
  id
279
282
  name
@@ -281,6 +284,20 @@ const a = e(`
281
284
  quantumOwned
282
285
  }
283
286
  `), n = e(`
287
+ fragment MetadataGroup on MetadataGroup {
288
+ key
289
+ data {
290
+ ...MetadataItem
291
+ }
292
+ }
293
+ `), s = e(`
294
+ fragment MetadataItem on MetadataItem {
295
+ id
296
+ label
297
+ value
298
+ sort
299
+ }
300
+ `), r = e(`
284
301
  fragment LibraryModuleAction on ModuleAction {
285
302
  moduleId
286
303
  actionId
@@ -289,7 +306,7 @@ const a = e(`
289
306
  ...AssessmentAction
290
307
  }
291
308
  }
292
- `), s = e(`
309
+ `), o = e(`
293
310
  fragment LibraryActionModule on ActionModule {
294
311
  id
295
312
  name
@@ -302,7 +319,7 @@ const a = e(`
302
319
  }
303
320
  quantumOwned
304
321
  }
305
- `), r = e(`
322
+ `), d = e(`
306
323
  fragment LibraryModuleCategory on ModuleCategory {
307
324
  id
308
325
  name
@@ -604,61 +621,19 @@ e(`
604
621
  }
605
622
  }
606
623
  `);
607
- const o = e(`
608
- mutation createAction($fields: CreateActionInput!) {
609
- createAction(input: $fields) {
610
- ...AssessmentAction
611
- }
612
- }
613
- `), d = e(`
614
- mutation updateAction($id: ID!, $fields: UpdateActionInput!) {
615
- updateAction(id: $id, input: $fields) {
616
- ...AssessmentAction
617
- }
618
- }
619
- `), m = e(`
620
- mutation convertActionToQuantumOwned($id: ID!) {
621
- convertActionToQuantumOwned(id: $id) {
622
- ...AssessmentAction
623
- }
624
- }
625
- `), c = e(`
626
- mutation createLibraryModule($input: CreateModuleInput!) {
627
- createModule(input: $input) {
628
- ...LibraryActionModule
629
- }
630
- }
631
- `);
632
- e(`
633
- mutation deleteLibraryModule($id: ID!) {
634
- deleteModule(id: $id)
635
- }
636
- `);
637
- const l = e(`
638
- mutation updateLibraryModule($id: ID!, $input: UpdateModuleInput!) {
639
- updateModule(id: $id, input: $input) {
640
- ...LibraryActionModule
641
- }
642
- }
643
- `);
644
- e(`
645
- mutation copyModules($input: CopyModulesInput!) {
646
- copyModules(input: $input)
647
- }
648
- `);
649
- const u = e(`
624
+ const m = e(`
650
625
  query getActions {
651
626
  actions {
652
627
  ...AssessmentAction
653
628
  }
654
629
  }
655
- `), p = e(`
630
+ `), c = e(`
656
631
  query getQuantumOwnedActions {
657
632
  quantumOwnedActions {
658
633
  ...AssessmentAction
659
634
  }
660
635
  }
661
- `), A = e(`
636
+ `), l = e(`
662
637
  query getActionById($id: ID!) {
663
638
  getActionById(id: $id) {
664
639
  ...AssessmentAction
@@ -681,13 +656,13 @@ e(`
681
656
  }
682
657
  }
683
658
  `);
684
- const y = e(`
659
+ const u = e(`
685
660
  query getGroups {
686
661
  groups {
687
662
  ...UserGroup
688
663
  }
689
664
  }
690
- `), T = e(`
665
+ `), A = e(`
691
666
  query getModulesByGroup($groupId: ID!) {
692
667
  group(id: $groupId) {
693
668
  name
@@ -697,7 +672,7 @@ const y = e(`
697
672
  ...LibraryActionModule
698
673
  }
699
674
  }
700
- `), M = e(`
675
+ `), p = e(`
701
676
  query getActionsByGroup($groupId: ID!) {
702
677
  group(id: $groupId) {
703
678
  name
@@ -707,6 +682,12 @@ const y = e(`
707
682
  ...AssessmentAction
708
683
  }
709
684
  }
685
+ `), y = e(`
686
+ query getMetadataByKey($key: String!) {
687
+ getMetadataByKey(key: $key) {
688
+ ...MetadataGroup
689
+ }
690
+ }
710
691
  `);
711
692
  e(`
712
693
  query getLibraryModules {
@@ -715,36 +696,80 @@ e(`
715
696
  }
716
697
  }
717
698
  `);
718
- const g = e(`
699
+ const T = e(`
719
700
  query getLibraryModule($id: ID!) {
720
701
  module(id: $id) {
721
702
  ...LibraryActionModule
722
703
  }
723
704
  }
724
- `), I = e(`
705
+ `), M = e(`
725
706
  query getAllModuleCategories {
726
707
  moduleCategories {
727
708
  ...LibraryModuleCategory
728
709
  }
729
710
  }
711
+ `), g = e(`
712
+ mutation createAction($fields: CreateActionInput!) {
713
+ createAction(input: $fields) {
714
+ ...AssessmentAction
715
+ }
716
+ }
717
+ `), I = e(`
718
+ mutation updateAction($id: ID!, $fields: UpdateActionInput!) {
719
+ updateAction(id: $id, input: $fields) {
720
+ ...AssessmentAction
721
+ }
722
+ }
723
+ `), _ = e(`
724
+ mutation convertActionToQuantumOwned($id: ID!) {
725
+ convertActionToQuantumOwned(id: $id) {
726
+ ...AssessmentAction
727
+ }
728
+ }
729
+ `), v = e(`
730
+ mutation createLibraryModule($input: CreateModuleInput!) {
731
+ createModule(input: $input) {
732
+ ...LibraryActionModule
733
+ }
734
+ }
735
+ `);
736
+ e(`
737
+ mutation deleteLibraryModule($id: ID!) {
738
+ deleteModule(id: $id)
739
+ }
740
+ `);
741
+ const f = e(`
742
+ mutation updateLibraryModule($id: ID!, $input: UpdateModuleInput!) {
743
+ updateModule(id: $id, input: $input) {
744
+ ...LibraryActionModule
745
+ }
746
+ }
747
+ `);
748
+ e(`
749
+ mutation copyModules($input: CopyModulesInput!) {
750
+ copyModules(input: $input)
751
+ }
730
752
  `);
731
753
  export {
732
- i as A,
733
- o as C,
734
- y as G,
735
- r as M,
736
- l as U,
737
- M as a,
738
- m as b,
739
- a as c,
754
+ a as A,
755
+ g as C,
756
+ u as G,
757
+ d as M,
758
+ f as U,
759
+ p as a,
760
+ _ as b,
761
+ n as c,
740
762
  s as d,
741
- n as e,
742
- T as f,
743
- c as g,
744
- d as h,
745
- A as i,
763
+ i as e,
764
+ A as f,
765
+ v as g,
766
+ o as h,
767
+ r as i,
746
768
  I as j,
747
- p as k,
748
- u as l,
749
- g as m
769
+ l as k,
770
+ y as l,
771
+ c as m,
772
+ m as n,
773
+ T as o,
774
+ M as p
750
775
  };
@@ -0,0 +1,14 @@
1
+ "use strict";const A=require("./vendor-IPtJZCbx.cjs");var Z={OPERATION_DEFINITION:"OperationDefinition"};class J extends Error{constructor(t,n,a,c,l,s,f){super(t),this.name="GraphQLError",this.message=t,l&&(this.path=l),n&&(this.nodes=Array.isArray(n)?n:[n]),a&&(this.source=a),c&&(this.positions=c),s&&(this.originalError=s);var p=f;if(!p&&s){var v=s.extensions;v&&typeof v=="object"&&(p=v)}this.extensions=p||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var i,r;function m(e){return new J(`Syntax Error: Unexpected token at ${r} in ${e}`)}function R(e){if(e.lastIndex=r,e.test(i))return i.slice(r,r=e.lastIndex)}var _=/ +(?=[^\s])/y;function ee(e){for(var t=e.split(`
2
+ `),n="",a=0,c=0,l=t.length-1,s=0;s<t.length;s++)_.lastIndex=0,_.test(t[s])&&(s&&(!a||_.lastIndex<a)&&(a=_.lastIndex),c=c||s,l=s);for(var f=c;f<=l;f++)f!==c&&(n+=`
3
+ `),n+=t[f].slice(a).replace(/\\"""/g,'"""');return n}function u(){for(var e=0|i.charCodeAt(r++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|i.charCodeAt(r++))if(e===35)for(;(e=0|i.charCodeAt(r++))&&e!==10&&e!==13;);r--}function M(){for(var e=r,t=0|i.charCodeAt(r++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|i.charCodeAt(r++));if(e===r-1)throw m("Name");var n=i.slice(e,--r);return u(),n}function k(){return{kind:"Name",value:M()}}var te=/(?:"""|(?:[\s\S]*?[^\\])""")/y,re=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function x(e){var t;switch(i.charCodeAt(r)){case 91:r++,u();for(var n=[];i.charCodeAt(r)!==93;)n.push(x(e));return r++,u(),{kind:"ListValue",values:n};case 123:r++,u();for(var a=[];i.charCodeAt(r)!==125;){var c=k();if(i.charCodeAt(r++)!==58)throw m("ObjectField");u(),a.push({kind:"ObjectField",name:c,value:x(e)})}return r++,u(),{kind:"ObjectValue",fields:a};case 36:if(e)throw m("Variable");return r++,{kind:"Variable",name:k()};case 34:if(i.charCodeAt(r+1)===34&&i.charCodeAt(r+2)===34){if(r+=3,(t=R(te))==null)throw m("StringValue");return u(),{kind:"StringValue",value:ee(t.slice(0,-3)),block:!0}}else{var l=r,s;r++;var f=!1;for(s=0|i.charCodeAt(r++);s===92&&(r++,f=!0)||s!==10&&s!==13&&s!==34&&s;s=0|i.charCodeAt(r++));if(s!==34)throw m("StringValue");return t=i.slice(l,r),u(),{kind:"StringValue",value:f?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var p=r++,v;(v=0|i.charCodeAt(r++))>=48&&v<=57;);var h=i.slice(p,--r);if((v=i.charCodeAt(r))===46||v===69||v===101){if((t=R(re))==null)throw m("FloatValue");return u(),{kind:"FloatValue",value:h+t}}else return u(),{kind:"IntValue",value:h};case 110:if(i.charCodeAt(r+1)===117&&i.charCodeAt(r+2)===108&&i.charCodeAt(r+3)===108)return r+=4,u(),{kind:"NullValue"};break;case 116:if(i.charCodeAt(r+1)===114&&i.charCodeAt(r+2)===117&&i.charCodeAt(r+3)===101)return r+=4,u(),{kind:"BooleanValue",value:!0};break;case 102:if(i.charCodeAt(r+1)===97&&i.charCodeAt(r+2)===108&&i.charCodeAt(r+3)===115&&i.charCodeAt(r+4)===101)return r+=5,u(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:M()}}function W(e){if(i.charCodeAt(r)===40){var t=[];r++,u();do{var n=k();if(i.charCodeAt(r++)!==58)throw m("Argument");u(),t.push({kind:"Argument",name:n,value:x(e)})}while(i.charCodeAt(r)!==41);return r++,u(),t}}function b(e){if(i.charCodeAt(r)===64){var t=[];do r++,t.push({kind:"Directive",name:k(),arguments:W(e)});while(i.charCodeAt(r)===64);return t}}function ne(){for(var e=0;i.charCodeAt(r)===91;)e++,r++,u();var t={kind:"NamedType",name:k()};do if(i.charCodeAt(r)===33&&(r++,u(),t={kind:"NonNullType",type:t}),e){if(i.charCodeAt(r++)!==93)throw m("NamedType");u(),t={kind:"ListType",type:t}}while(e--);return t}function j(){if(i.charCodeAt(r++)!==123)throw m("SelectionSet");return u(),L()}function L(){var e=[];do if(i.charCodeAt(r)===46){if(i.charCodeAt(++r)!==46||i.charCodeAt(++r)!==46)throw m("SelectionSet");switch(r++,u(),i.charCodeAt(r)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:b(!1),selectionSet:j()});break;case 111:i.charCodeAt(r+1)===110?(r+=2,u(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:k()},directives:b(!1),selectionSet:j()})):e.push({kind:"FragmentSpread",name:k(),directives:b(!1)});break;case 123:r++,u(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:L()});break;default:e.push({kind:"FragmentSpread",name:k(),directives:b(!1)})}}else{var t=k(),n=void 0;i.charCodeAt(r)===58&&(r++,u(),n=t,t=k());var a=W(!1),c=b(!1),l=void 0;i.charCodeAt(r)===123&&(r++,u(),l=L()),e.push({kind:"Field",alias:n,name:t,arguments:a,directives:c,selectionSet:l})}while(i.charCodeAt(r)!==125);return r++,u(),{kind:"SelectionSet",selections:e}}function ie(){if(u(),i.charCodeAt(r)===40){var e=[];r++,u();do{var t=void 0;if(i.charCodeAt(r)===34&&(t=x(!0)),i.charCodeAt(r++)!==36)throw m("Variable");var n=k();if(i.charCodeAt(r++)!==58)throw m("VariableDefinition");u();var a=ne(),c=void 0;i.charCodeAt(r)===61&&(r++,u(),c=x(!0)),u();var l={kind:"VariableDefinition",variable:{kind:"Variable",name:n},type:a,defaultValue:c,directives:b(!0)};t&&(l.description=t),e.push(l)}while(i.charCodeAt(r)!==41);return r++,u(),e}}function ae(e){var t=k();if(i.charCodeAt(r++)!==111||i.charCodeAt(r++)!==110)throw m("FragmentDefinition");u();var n={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:k()},directives:b(!1),selectionSet:j()};return e&&(n.description=e),n}function B(){var e=[];do{var t=void 0;if(i.charCodeAt(r)===34&&(t=x(!0)),i.charCodeAt(r)===123){if(t)throw m("Document");r++,u(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:L()})}else{var n=M();switch(n){case"fragment":e.push(ae(t));break;case"query":case"mutation":case"subscription":var a,c=void 0;(a=i.charCodeAt(r))!==40&&a!==64&&a!==123&&(c=k());var l={kind:"OperationDefinition",operation:n,name:c,variableDefinitions:ie(),directives:b(!1),selectionSet:j()};t&&(l.description=t),e.push(l);break;default:throw m("Document")}}}while(r<i.length);return e}function oe(e,t){return i=e.body?e.body:e,r=0,u(),t&&t.noLocation?{kind:"Document",definitions:B()}:{kind:"Document",definitions:B(),loc:{start:0,end:i.length,startToken:void 0,endToken:void 0,source:{body:i,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function g(e,t,n){for(var a="",c=0;c<e.length;c++)c&&(a+=t),a+=n(e[c]);return a}function se(e){return JSON.stringify(e)}function ce(e){return`"""
4
+ `+e.replace(/"""/g,'\\"""')+`
5
+ """`}var S=`
6
+ `,d={OperationDefinition(e){var t="";e.description&&(t+=d.StringValue(e.description)+`
7
+ `),t+=e.operation,e.name&&(t+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=" "),t+="("+g(e.variableDefinitions,", ",d.VariableDefinition)+")"),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive));var n=d.SelectionSet(e.selectionSet);return t!=="query"?t+" "+n:n},VariableDefinition(e){var t="";return e.description&&(t+=d.StringValue(e.description)+" "),t+=d.Variable(e.variable)+": "+C(e.type),e.defaultValue&&(t+=" = "+C(e.defaultValue)),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t},Field(e){var t=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var n=g(e.arguments,", ",d.Argument);t.length+n.length+2>80?t+="("+(S+=" ")+g(e.arguments,S,d.Argument)+(S=S.slice(0,-2))+")":t+="("+n+")"}return e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=" "+d.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?ce(e.value).replace(/\n/g,S):se(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+g(e.values,", ",C)+"]",ObjectValue:e=>"{"+g(e.fields,", ",d.ObjectField)+"}",ObjectField:e=>e.name.value+": "+C(e.value),Document(e){return!e.definitions||!e.definitions.length?"":g(e.definitions,`
8
+
9
+ `,C)},SelectionSet:e=>"{"+(S+=" ")+g(e.selections,S,C)+(S=S.slice(0,-2))+"}",Argument:e=>e.name.value+": "+C(e.value),FragmentSpread(e){var t="..."+e.name.value;return e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t},InlineFragment(e){var t="...";return e.typeCondition&&(t+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t+=" "+d.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t="";return e.description&&(t+=d.StringValue(e.description)+`
10
+ `),t+="fragment "+e.name.value,t+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t+" "+d.SelectionSet(e.selectionSet)},Directive(e){var t="@"+e.name.value;return e.arguments&&e.arguments.length&&(t+="("+g(e.arguments,", ",d.Argument)+")"),t},NamedType:e=>e.name.value,ListType:e=>"["+C(e.type)+"]",NonNullType:e=>C(e.type)+"!"},C=e=>d[e.kind](e);function ue(e){return S=`
11
+ `,d[e.kind]?d[e.kind](e):""}var le=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new J(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new J(e);class de extends Error{constructor(t){var n=(t.graphQLErrors||[]).map(le),a=((c,l)=>{var s="";if(c)return`[Network] ${c.message}`;if(l)for(var f=0,p=l.length;f<p;f++)s&&(s+=`
12
+ `),s+=`[GraphQL] ${l[f].message}`;return s})(t.networkError,n);super(a),this.name="CombinedError",this.message=a,this.graphQLErrors=n,this.networkError=t.networkError,this.response=t.response}toString(){return this.message}}var I=(e,t)=>{for(var n=0|(t||5381),a=0,c=0|e.length;a<c;a++)n=(n<<5)+n+e.charCodeAt(a);return n},F=new Set,P=new WeakMap,w=(e,t)=>{if(e===null||F.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return w(e.toJSON());if(Array.isArray(e)){for(var n="[",a=0,c=e.length;a<c;a++)n.length>1&&(n+=","),n+=w(e[a])||"null";return n+="]"}var l=Object.keys(e).sort();if(!l.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var s=P.get(e)||Math.random().toString(36).slice(2);return P.set(e,s),w({__key:s})}F.add(e);for(var f="{",p=0,v=l.length;p<v;p++){var h=w(e[l[p]]);h&&(f.length>1&&(f+=","),f+=w(l[p])+":"+h)}return F.delete(e),f+="}"},fe=(e,t)=>(F.clear(),w(e)),ve=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,he=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,pe=(e,t)=>t%2==0?e.replace(he,`
13
+ `):e,z=e=>e.split(ve).map(pe).join("").trim(),U=new Map,T=new Map,K=e=>{var t;return typeof e=="string"?t=z(e):e.loc&&T.get(e.__key)===e?t=e.loc.source.body:(t=U.get(e)||z(ue(e)),U.set(e,t)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:"gql",locationOffset:{line:1,column:1}}}),t},H=e=>{var t;if(e.documentId)t=I(e.documentId);else if(t=I(K(e)),e.definitions){var n=ke(e);n&&(t=I(`
14
+ # ${n}`,t))}return t},me=e=>{var t,n;return typeof e=="string"?(t=H(e),n=T.get(t)||oe(e,{noLocation:!0})):(t=e.__key||H(e),n=T.get(t)||e),n.loc||K(n),n.__key=t,T.set(t,n),n},ge=(e,t,n)=>{var a=t||{},c=me(e),l=fe(a),s=c.__key;return l!=="{}"&&(s=I(l,s)),{key:s,query:c,variables:a,extensions:n}},ke=e=>{for(var t=0,n=e.definitions.length;t<n;t++){var a=e.definitions[t];if(a.kind===Z.OPERATION_DEFINITION)return a.name?a.name.value:void 0}},Ae=(e,t,n)=>({operation:e,data:void 0,error:new de({networkError:t,response:n}),extensions:void 0,hasNext:!1,stale:!1});function X(e,t,n){return{...t,kind:e,context:t.context?{...t.context,...n}:n||t.context}}var $=(e,t)=>X(e.kind,e,{...e.context,authAttempt:t});function ye(e){return({client:t,forward:n})=>{var a=new Set,c=A.makeSubject(),l=A.makeSubject(),s=new Map;function f(){v=void 0;var O=s;s=new Map,O.forEach(c.next)}function p(O){v=void 0;var D=s;s=new Map,D.forEach((N=>{l.next(Ae(N,O))}))}var v,h=null;return O=>{function D(){v=Promise.resolve().then((()=>e({mutate(o,E,y){var q=t.createRequestOperation("mutation",ge(o,E),y);return A.toPromise(A.take(1)(A.filter((V=>V.operation.key===q.key&&q.context._instance===V.operation.context._instance))(A.onStart((()=>{var V=Q(q);a.add(V.context._instance),c.next(V)}))(G))))},appendHeaders(o,E){var y=typeof o.context.fetchOptions=="function"?o.context.fetchOptions():o.context.fetchOptions||{};return X(o.kind,o,{...o.context,fetchOptions:{...y,headers:{...y.headers,...E}}})}}))).then((o=>{o&&(h=o),f()})).catch((o=>{process.env.NODE_ENV!=="production"&&console.warn("authExchange()’s initialization function has failed, which is unexpected.\nIf your initialization function is expected to throw/reject, catch this error and handle it explicitly.\nUnless this error is handled it’ll be passed onto any `OperationResult` instantly and authExchange() will block further operations and retry.",o),p(o)}))}D();function N(o){s.set(o.key,$(o,!0)),h&&!v&&(v=h.refreshAuth().then(f).catch(p))}function Q(o){return h?h.addAuthToOperation(o):o}var Y=A.filter(Boolean)(A.map((o=>o.kind==="teardown"?(s.delete(o.key),o):o.context._instance&&a.has(o.context._instance)?o:o.context.authAttempt?Q(o):v||!h?(v||D(),s.has(o.key)||s.set(o.key,$(o,!1)),null):(function(y){return!y.context.authAttempt&&h&&h.willAuthError&&h.willAuthError(y)})(o)?(N(o),null):Q($(o,!1))))(A.merge([c.source,O]))),G=n(Y);return A.merge([l.source,A.filter((o=>!a.has(o.operation.context._instance)&&o.error&&(function(y){return h&&h.didAuthError&&h.didAuthError(y.error,y.operation)})(o)&&!o.operation.context.authAttempt?(N(o.operation),!1):(a.has(o.operation.context._instance)&&a.delete(o.operation.context._instance),!0)))(G)])}}}exports.authExchange=ye;