const x=["Type","CategoryPathName","CategoryPathNameId","CategoryPathId","ValidFrom","ValidUntil","ProductGroup","FamilyPage","Documenttype","3D-CAD Modell_B","Inhalt_A","GTIN (EAN-Code)_A","Menge_A","Preis_N"],b=(e,a,i,d=[])=>(i||[]).filter(n=>!x.includes(n.associatedFieldName)).map(n=>{const o=(e||[]).find(u=>(u==null?void 0:u.name)===n.name)||(a||[]).find(u=>(u==null?void 0:u.name)===n.name);let c=!1,f=!1;const h=(n.elements||n.values).map(u=>{const{associatedFieldName:g}=n,l={...u,disabled:!0,selected:!1,selectedBool:!1,recordCount:null,totalHits:null,associatedFieldName:g},V=d.find(s=>{const F=s.fakeValue||s.name;return s.associatedFieldName===g&&(F===u.name||F===u.text||s.selectedMaxValue)}),t=o==null?void 0:o.elements.find(s=>s.text&&s.text===u.text||s.absoluteMaxValue);if(t){const s=!t.selectedBool&&t.absoluteMaxValue!==null&&(t.absoluteMaxValue===t.absoluteMinValue||(!Number.isInteger(t.absoluteMinValue)||!Number.isInteger(t.absoluteMaxValue))&&Math.ceil(t.absoluteMaxValue)<=Math.floor(t.absoluteMinValue)+1);s&&(f=!0),(n.type==="FLOAT"||n.type==="INTEGER")&&(l.absoluteMaxValue=t.absoluteMaxValue,l.absoluteMinValue=t.absoluteMinValue,l.selectedMaxValue=t.selectedMaxValue,l.selectedMinValue=t.selectedMinValue),l.recordCount=t.recordCount,l.totalHits=t.totalHits,l.disabled=s,c=c||!s}if(V&&(l.selected=!0,l.selectedBool=!0,l.disabled=!1,c=!0,n.type==="FLOAT"||n.type==="INTEGER")){const s=t||u;l.absoluteMaxValue=s.absoluteMaxValue,l.absoluteMinValue=s.absoluteMinValue,l.selectedMaxValue=V.selectedMaxValue,l.selectedMinValue=V.selectedMinValue}return l});return{...n,elements:h,disabled:!c,hidden:f}}).filter(n=>!n.hidden);var M={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"factFinderNgFacetFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"FactFinderNgFacet"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"associatedFieldName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"elements"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalHits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedBool"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absoluteMaxValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absoluteMinValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedMaxValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"selectedMinValue"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:244}};M.loc.source={body:`fragment factFinderNgFacetFragment on FactFinderNgFacet { name associatedFieldName type unit elements { text totalHits selectedBool absoluteMaxValue absoluteMinValue selectedMaxValue selectedMinValue } } `,name:"GraphQL request",locationOffset:{line:1,column:1}};function v(e,a){if(e.kind==="FragmentSpread")a.add(e.name.value);else if(e.kind==="VariableDefinition"){var i=e.type;i.kind==="NamedType"&&a.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(d){v(d,a)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(d){v(d,a)}),e.definitions&&e.definitions.forEach(function(d){v(d,a)})}var k={};(function(){M.definitions.forEach(function(a){if(a.name){var i=new Set;v(a,i),k[a.name.value]=i}})})();function N(e,a){for(var i=0;i<e.definitions.length;i++){var d=e.definitions[i];if(d.name&&d.name.value==a)return d}}function p(e,a){var i={kind:e.kind,definitions:[N(e,a)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var d=k[a]||new Set,m=new Set,r=new Set;for(d.forEach(function(o){r.add(o)});r.size>0;){var n=r;r=new Set,n.forEach(function(o){if(!m.has(o)){m.add(o);var c=k[o]||new Set;c.forEach(function(f){r.add(f)})}})}return m.forEach(function(o){var c=N(e,o);c&&i.definitions.push(c)}),i}p(M,"factFinderNgFacetFragment");export{M as d,b as m,x as t};