(()=>{var e,t,o,r={7426:(e,t,o)=>{"use strict";o.r(t);const r=window.wp.blocks,l=window.wc.wcSettings;var n=o(1609),c=o(5573);const a=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-active","version":"1.0.0","title":"Active (Experimental)","description":"Display the currently active filters.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filters"],"supports":{"interactivity":true,"color":{"text":true,"background":false}},"usesContext":["queryId"],"attributes":{"displayStyle":{"type":"string","default":"chips"}}}'),i=window.wp.blockEditor;var s=o(7723),m=o(851);const p=window.wp.components,u=({attributes:e,setAttributes:t})=>{const{displayStyle:o}=e;return(0,n.createElement)(i.InspectorControls,null,(0,n.createElement)(p.PanelBody,{title:(0,s.__)("Display Settings","woocommerce")},(0,n.createElement)(p.__experimentalToggleGroupControl,{label:(0,s.__)("Display Style","woocommerce"),value:o,onChange:e=>t({displayStyle:e})},(0,n.createElement)(p.__experimentalToggleGroupControlOption,{value:"list",label:(0,s.__)("List","woocommerce")}),(0,n.createElement)(p.__experimentalToggleGroupControlOption,{value:"chips",label:(0,s.__)("Chips","woocommerce")}))))},w=window.wc.blocksComponents;var d=o(7104),f=o(8098);const b=({type:e,name:t,prefix:o="",removeCallback:r=(()=>null),showLabel:l=!0,displayStyle:c})=>{const a=o?(0,n.createElement)(n.Fragment,null,o," ",t):t,i=(0,s.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,s.__)("Remove %s filter","woocommerce"),t);return(0,n.createElement)("li",{className:"list-item",key:`${e}: ${t}`},l&&(0,n.createElement)("span",{className:"list-item-type"},`${e}: `),"chips"===c?(0,n.createElement)(w.RemovableChip,{element:"span",text:a,onRemove:r,radius:"large",ariaLabel:i}):(0,n.createElement)("span",{className:"list-item-name"},(0,n.createElement)("button",{className:"list-item-remove",onClick:r},(0,n.createElement)(d.A,{className:"wc-block-components-chip__remove-icon",icon:f.A,size:16}),(0,n.createElement)(w.Label,{screenReaderLabel:i})),a))};o(8406),(()=>{const{experimentalBlocksEnabled:e}=(0,l.getSetting)("wcBlocksConfig",{experimentalBlocksEnabled:!1});return e})()&&(0,r.registerBlockType)(a,{icon:()=>(0,n.createElement)(c.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(c.Path,{d:"M9 17.5H11.5V16H9V17.5ZM5 6V7.5L17 7.5V6L5 6ZM7 12.5H15V11H7V12.5Z",fill:"currentColor"}),(0,n.createElement)(c.Path,{d:"M19.9982 13.1948L18.7945 12.2998L15.7111 16.1017L14.0969 14.8993L13.2002 16.1017L16.0185 18.2022L19.9982 13.1948Z",fill:"currentColor"})),edit:e=>{const{displayStyle:t}=e.attributes,o=(0,i.useBlockProps)({className:"wc-block-active-filters"});return(0,n.createElement)("div",{...o},(0,n.createElement)(u,{...e}),(0,n.createElement)(p.Disabled,null,(0,n.createElement)("ul",{className:(0,m.A)("filter-list",{"list-chips":"chips"===t})},(0,n.createElement)(b,{type:(0,s.__)("Size","woocommerce"),name:(0,s.__)("Small","woocommerce"),displayStyle:t}),(0,n.createElement)(b,{type:(0,s.__)("Color","woocommerce"),name:(0,s.__)("Blue","woocommerce"),displayStyle:t}))))}})},8406:()=>{},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 n(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,n),o.exports}n.m=r,e=[],n.O=(t,o,r,l)=>{if(!o){var c=1/0;for(m=0;m<e.length;m++){for(var[o,r,l]=e[m],a=!0,i=0;i<o.length;i++)(!1&l||c>=l)&&Object.keys(n.O).every((e=>n.O[e](o[i])))?o.splice(i--,1):(a=!1,l<c&&(c=l));if(a){e.splice(m--,1);var s=r();void 0!==s&&(t=s)}}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]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.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);n.r(l);var c={};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=>c[t]=()=>e[t]));return c.default=()=>e,n.d(l,c),l},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=7598,(()=>{var e={7598:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var r,l,[c,a,i]=o,s=0;if(c.some((t=>0!==e[t]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(i)var m=i(n)}for(t&&t(o);s<c.length;s++)l=c[s],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(m)},o=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var c=n.O(void 0,[94],(()=>n(7426)));c=n.O(c),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-filter-active"]=c})();