(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68198],{55219:function(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CategoryAttributes"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CategoryAttributes"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"image"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"metaTitle"},name:{kind:"Name",value:"meta_title"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"metaDescription"},name:{kind:"Name",value:"meta_description"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"cmsBlock"},name:{kind:"Name",value:"landing_page"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"displayMode"},name:{kind:"Name",value:"display_mode"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"imageMobile"},name:{kind:"Name",value:"image_mobile"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"brandCorner"},name:{kind:"Name",value:"brand_corner"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"brandTop"},name:{kind:"Name",value:"brand_top"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"topCategoryContent"},name:{kind:"Name",value:"top_category_content"},arguments:[],directives:[]}]}}],loc:{start:0,end:329}};n.loc.source={body:"fragment CategoryAttributes on CategoryAttributes {\n __typename\n description\n image\n metaTitle: meta_title,\n metaDescription: meta_description,\n cmsBlock: landing_page,\n displayMode: display_mode,\n imageMobile: image_mobile,\n brandCorner: brand_corner,\n brandTop: brand_top,\n topCategoryContent: top_category_content\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function t(e,n){for(var i=0;i0;){var s=l;l=new Set,s.forEach((function(e){r.has(e)||(r.add(e),(a[e]||new Set).forEach((function(e){l.add(e)})))}))}return r.forEach((function(n){var a=t(e,n);a&&i.definitions.push(a)})),i}(n,"CategoryAttributes")},42077:function(e,n,i){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getCategoryInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"storeId"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selectedFilters"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"FilterInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortBy"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"SortingInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"size"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"customerGroup"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sourceCode"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"categoryInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"storeId"},value:{kind:"Variable",name:{kind:"Name",value:"storeId"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"selectedFilters"},value:{kind:"Variable",name:{kind:"Name",value:"selectedFilters"}}},{kind:"Argument",name:{kind:"Name",value:"sortBy"},value:{kind:"Variable",name:{kind:"Name",value:"sortBy"}}},{kind:"Argument",name:{kind:"Name",value:"size"},value:{kind:"Variable",name:{kind:"Name",value:"size"}}},{kind:"Argument",name:{kind:"Name",value:"customerGroup"},value:{kind:"Variable",name:{kind:"Name",value:"customerGroup"}}},{kind:"Argument",name:{kind:"Name",value:"sourceCode"},value:{kind:"Variable",name:{kind:"Name",value:"sourceCode"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"categoryId"},name:{kind:"Name",value:"entity_id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"urlPath"},name:{kind:"Name",value:"url_path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"isActive"},name:{kind:"Name",value:"is_active"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"parentId"},name:{kind:"Name",value:"parent_id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productCount"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"childrenCount"},name:{kind:"Name",value:"children_count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"productIds"},name:{kind:"Name",value:"product_ids"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"attributes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CategoryAttributes"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"urls"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Urls"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"products"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"attributeId"},name:{kind:"Name",value:"attribute_id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"attributeValue"},name:{kind:"Name",value:"attribute_value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"columns"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"filters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"backendType"},name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"filterId"},name:{kind:"Name",value:"filter_id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"attributeId"},name:{kind:"Name",value:"attribute_id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"store_label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"style"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"options"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"swatch"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"bestSellersIds"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:1235}};a.loc.source={body:'#import "/var/www/html/themes/.generated/frontend/graphql/queries/category/fragments/attributes.graphql"\n#import "@frontend/graphql/general/fragments/url-rewrites.graphql"\n\nquery getCategoryInfo (\n $id:Int!,\n $storeId:Int,\n $page:Int,\n $selectedFilters:[FilterInput],\n $sortBy:[SortingInput],\n $size:Int,\n $customerGroup:Int\n $sourceCode:Int\n){\n categoryInfo (\n id:$id,\n storeId:$storeId,\n page:$page,\n selectedFilters:$selectedFilters,\n sortBy:$sortBy,\n size:$size,\n customerGroup:$customerGroup\n sourceCode:$sourceCode\n ){\n categoryId: entity_id\n urlPath: url_path\n name\n path\n isActive: is_active\n parentId: parent_id\n productCount\n childrenCount: children_count\n page\n productIds: product_ids\n attributes {\n ...CategoryAttributes\n }\n urls {\n ...Urls\n }\n products {\n id\n attributeId: attribute_id\n attributeValue: attribute_value\n columns,\n type\n }\n filters {\n backendType: type\n filterId: filter_id\n attributeId: attribute_id\n label: store_label\n name\n style\n options {\n label\n \t\t\t\tvalue\n swatch\n }\n }\n bestSellersIds\n }\n}',name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function d(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!t[n]&&(t[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}a.definitions=a.definitions.concat(d(i(55219).definitions)),a.definitions=a.definitions.concat(d(i(90760).definitions));var l={};function s(e,n){for(var i=0;i0;){var r=d;d=new Set,r.forEach((function(e){t.has(e)||(t.add(e),(l[e]||new Set).forEach((function(e){d.add(e)})))}))}return t.forEach((function(n){var a=s(e,n);a&&i.definitions.push(a)})),i}(a,"getCategoryInfo")},68198:function(e,n,i){"use strict";i.d(n,{H:function(){return S}});var a=i(44229),t=i(97939),d=i(70111),r=i(99268),l=i(92712),s=i(86330),u=i.n(s),o=i(37213),m=i.n(o),c=i(33795),k=i.n(c),v=i(89793),p=i.n(v),f=i(12446),g=i(42077),N=i.n(g),b=i(39926),y=i(23390),F=i(35134),h=i(45836),I=i(5815),S=function(e,n){return function(){var i=(0,a.Z)((function(i,a){var s,o,c,v,g,S,_,C,V,w,D,T,A,E,$,q;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:return[4,e.client.query({query:N(),variables:(0,d.Z)((0,t.Z)({},n),{size:k()(n,"size",I.Z.productsPerPage)}),fetchPolicy:(0,f.Z)()?"no-cache":"cache-first"})];case 1:return s=l.sent(),o=s.data,c=o.categoryInfo,v=n.page,g=n.customerGroup,S=n.storeId,_=n.selectedFilters,C=n.sourceCode,V=n.sortBy,v&&(c.page=v),w=m()(u()(c.products,{type:"cms"}),(function(e){return e.id})),D=u()(c.products,{type:"product"}),T=m()(k()(c,"bestSellersIds",[]),(function(e){return{id:e}})),[4,i((0,b.s)(e,{products:(0,r.Z)(D).concat((0,r.Z)(T)),storeId:S,customerGroup:g,sourceCode:C}))];case 2:return l.sent(),[4,i((0,h.p)(e,{ids:w,storeId:n.storeId}))];case 3:return l.sent(),A=a().filters,E=k()(A,"category.applied",{}),$=k()(A,"category.appliedSort",[]),q=!p()(_,E)||!p()(V,$),[4,i((0,y.PR)((0,d.Z)((0,t.Z)({},c),{filtersUpdate:q})))];case 4:return l.sent(),[4,i((0,F.sI)({type:"category",id:k()(c,"categoryId"),filters:k()(n,"selectedFilters")}))];case 5:return l.sent(),[2,c]}}))}));return function(e,n){return i.apply(this,arguments)}}()}}}]);