(()=>{var e,t,o,r={7196:(e,t,o)=>{"use strict";o.r(t);var r=o(1609);const l=window.wp.blocks;var c=o(7104),n=o(5573);const a=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.createElement)("path",{d:"M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),s=window.wc.wcSettings,i=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-active","version":"1.0.0","title":"Product Filter: Active Filters (Experimental)","description":"Display the currently active filters.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":2,"ancestor":["woocommerce/product-filter"],"supports":{"interactivity":true,"inserter":false,"color":{"text":true,"background":false}},"usesContext":["queryId"],"attributes":{"displayStyle":{"type":"string","default":"list"}}}'),m=window.wp.blockEditor;var p=o(7723),u=o(851);const w=window.wp.components,d=({attributes:e,setAttributes:t})=>{const{displayStyle:o}=e;return(0,r.createElement)(m.InspectorControls,null,(0,r.createElement)(w.PanelBody,{title:(0,p.__)("Display Settings","woocommerce")},(0,r.createElement)(w.__experimentalToggleGroupControl,{label:(0,p.__)("Display Style","woocommerce"),value:o,onChange:e=>t({displayStyle:e})},(0,r.createElement)(w.__experimentalToggleGroupControlOption,{value:"list",label:(0,p.__)("List","woocommerce")}),(0,r.createElement)(w.__experimentalToggleGroupControlOption,{value:"chips",label:(0,p.__)("Chips","woocommerce")}))))},b=window.wc.blocksComponents;var f=o(8098);const y=({type:e,name:t,prefix:o="",removeCallback:l=(()=>null),showLabel:n=!0,displayStyle:a})=>{const s=o?(0,r.createElement)(r.Fragment,null,o," ",t):t,i=(0,p.sprintf)(/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ /* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */
(0,p.__)("Remove %s filter","woocommerce"),t);return(0,r.createElement)("li",{className:"list-item",key:`${e}: ${t}`},n&&(0,r.createElement)("span",{className:"list-item-type"},`${e}: `),"chips"===a?(0,r.createElement)(b.RemovableChip,{element:"span",text:s,onRemove:l,radius:"large",ariaLabel:i}):(0,r.createElement)("span",{className:"list-item-name"},(0,r.createElement)("button",{className:"list-item-remove",onClick:l},(0,r.createElement)(c.A,{className:"wc-block-components-chip__remove-icon",icon:f.A,size:16}),(0,r.createElement)(b.Label,{screenReaderLabel:i})),s))};o(3111),(()=>{const{experimentalBlocksEnabled:e}=(0,s.getSetting)("wcBlocksConfig",{experimentalBlocksEnabled:!1});return e})()&&(0,l.registerBlockType)(i,{icon:{src:(0,r.createElement)(c.A,{icon:a,className:"wc-block-editor-components-block-icon"})},edit:e=>{const{displayStyle:t}=e.attributes,o=(0,m.useBlockProps)({className:"wc-block-active-filters"});return(0,r.createElement)("div",{...o},(0,r.createElement)(d,{...e}),(0,r.createElement)(w.Disabled,null,(0,r.createElement)("ul",{className:(0,u.A)("filter-list",{"list-chips":"chips"===t})},(0,r.createElement)(y,{type:(0,p.__)("Size","woocommerce"),name:(0,p.__)("Small","woocommerce"),displayStyle:t}),(0,r.createElement)(y,{type:(0,p.__)("Color","woocommerce"),name:(0,p.__)("Blue","woocommerce"),displayStyle:t}))))}})},3111:()=>{},1609:e=>{"use strict";e.exports=window.React},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return r[e].call(o.exports,o,o.exports,c),o.exports}c.m=r,e=[],c.O=(t,o,r,l)=>{if(!o){var n=1/0;for(m=0;m<e.length;m++){for(var[o,r,l]=e[m],a=!0,s=0;s<o.length;s++)(!1&l||n>=l)&&Object.keys(c.O).every((e=>c.O[e](o[s])))?o.splice(s--,1):(a=!1,l<n&&(n=l));if(a){e.splice(m--,1);var i=r();void 0!==i&&(t=i)}}return t}l=l||0;for(var m=e.length;m>0&&e[m-1][2]>l;m--)e[m]=e[m-1];e[m]=[o,r,l]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var l=Object.create(null);c.r(l);var n={};t=t||[null,o({}),o([]),o(o)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,c.d(l,n),l},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.j=7598,(()=>{var e={7598:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,l,[n,a,s]=o,i=0;if(n.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(s)var m=s(c)}for(t&&t(o);i<n.length;i++)l=n[i],c.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return c.O(m)},o=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=c.O(void 0,[94],(()=>c(7196)));n=c.O(n),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-filter-active"]=n})();