uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
www
/
wp-content
/
plugins
/
woocommerce
/
assets
/
client
/
blocks
/
attribute-filter-frontend.js
/
/
var wc;(()=>{var e,t,r,o={8462:(e,t,r)=>{"use strict";var o=r(6087),s=r(7723);const n=window.wc.wcSettings,a=(0,n.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=a.pluginUrl+"assets/images/",c=(a.pluginUrl,n.STORE_PAGES.shop,n.STORE_PAGES.checkout,n.STORE_PAGES.checkout,n.STORE_PAGES.privacy,n.STORE_PAGES.privacy,n.STORE_PAGES.terms,n.STORE_PAGES.terms,n.STORE_PAGES.cart,n.STORE_PAGES.cart,n.STORE_PAGES.myaccount?.permalink?n.STORE_PAGES.myaccount.permalink:(0,n.getSetting)("wpLoginUrl","/wp-login.php"),(0,n.getSetting)("localPickupEnabled",!1),(0,n.getSetting)("shippingMethodsExist",!1),(0,n.getSetting)("shippingEnabled",!0),(0,n.getSetting)("countries",{})),l=(0,n.getSetting)("countryData",{}),u={...Object.fromEntries(Object.keys(l).filter((e=>!0===l[e].allowBilling)).map((e=>[e,c[e]||""]))),...Object.fromEntries(Object.keys(l).filter((e=>!0===l[e].allowShipping)).map((e=>[e,c[e]||""])))},d=(Object.fromEntries(Object.keys(u).map((e=>[e,l[e].states||{}]))),Object.fromEntries(Object.keys(u).map((e=>[e,l[e].locale||{}]))),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]});(0,n.getSetting)("addressFieldsLocations",d).address,(0,n.getSetting)("addressFieldsLocations",d).contact,(0,n.getSetting)("addressFieldsLocations",d).order,(0,n.getSetting)("additionalOrderFields",{}),(0,n.getSetting)("additionalContactFields",{}),(0,n.getSetting)("additionalAddressFields",{});var p=r(790);const m=({imageUrl:e=`${i}/block-error.svg`,header:t=(0,s.__)("Oops!","woocommerce"),text:r=(0,s.__)("There was an error loading the content.","woocommerce"),errorMessage:o,errorMessagePrefix:n=(0,s.__)("Error:","woocommerce"),button:a,showErrorBlock:c=!0})=>c?(0,p.jsxs)("div",{className:"wc-block-error wc-block-components-error",children:[e&&(0,p.jsx)("img",{className:"wc-block-error__image wc-block-components-error__image",src:e,alt:""}),(0,p.jsxs)("div",{className:"wc-block-error__content wc-block-components-error__content",children:[t&&(0,p.jsx)("p",{className:"wc-block-error__header wc-block-components-error__header",children:t}),r&&(0,p.jsx)("p",{className:"wc-block-error__text wc-block-components-error__text",children:r}),o&&(0,p.jsxs)("p",{className:"wc-block-error__message wc-block-components-error__message",children:[n?n+" ":"",o]}),a&&(0,p.jsx)("p",{className:"wc-block-error__button wc-block-components-error__button",children:a})]})]}):null;r(5893);class g extends o.Component{state={errorMessage:"",hasError:!1};static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("strong",{children:e.status}),": ",e.statusText]}),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:o=!0,text:s,errorMessagePrefix:n,renderError:a,button:i}=this.props,{errorMessage:c,hasError:l}=this.state;return l?"function"==typeof a?a({errorMessage:c}):(0,p.jsx)(m,{showErrorBlock:o,errorMessage:r?c:null,header:e,imageUrl:t,text:s,errorMessagePrefix:n,button:i}):this.props.children}}const b=g,w=[".wp-block-woocommerce-cart"],h=({Block:e,container:t,attributes:r={},props:s={},errorBoundaryProps:n={}})=>{const a=()=>{(0,o.useEffect)((()=>{t.classList&&t.classList.remove("is-loading")}),[]);const a=t.classList.contains("wp-block-woocommerce-checkout"),i=t.classList.contains("wp-block-woocommerce-cart");return a||i?(0,p.jsx)(b,{...n,children:(0,p.jsx)(e,{...s,attributes:r})}):(0,p.jsx)(b,{...n,children:(0,p.jsx)(o.Suspense,{fallback:(0,p.jsx)("div",{className:"wc-block-placeholder",children:"Loading..."}),children:e&&(0,p.jsx)(e,{...s,attributes:r})})})},i=(0,o.createRoot)(t);return i.render((0,p.jsx)(a,{})),i},f=({Block:e,containers:t,getProps:r=()=>({}),getErrorBoundaryProps:o=()=>({})})=>{if(0===t.length)return[];const s=[];return t.forEach(((t,n)=>{const a=r(t,n),i=o(t,n),c={...t.dataset,...a.attributes||{}};s.push({container:t,root:h({Block:e,container:t,props:a,attributes:c,errorBoundaryProps:i})})})),s};var y=r(923),_=r.n(y);function x(e){const t=(0,o.useRef)(e);return _()(e,t.current)||(t.current=e),t.current}const v=window.wc.wcBlocksData,E=window.wp.data,S=(0,o.createContext)("page"),k=()=>(0,o.useContext)(S),j=(S.Provider,e=>{const t=k();e=e||t;const r=(0,E.useSelect)((t=>t(v.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)),[e]),{setValueForQueryContext:s}=(0,E.useDispatch)(v.QUERY_STATE_STORE_KEY);return[r,(0,o.useCallback)((t=>{s(e,t)}),[e,s])]}),A=(e,t,r)=>{const s=k();r=r||s;const n=(0,E.useSelect)((o=>o(v.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)),[r,e]),{setQueryValue:a}=(0,E.useDispatch)(v.QUERY_STATE_STORE_KEY);return[n,(0,o.useCallback)((t=>{a(r,e,t)}),[r,e,a])]},O=window.wc.wcTypes,P=e=>{const{namespace:t,resourceName:r,resourceValues:s=[],query:n={},shouldSelect:a=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const i=(0,o.useRef)({results:[],isLoading:!0}),c=x(n),l=x(s),u=(()=>{const[,e]=(0,o.useState)();return(0,o.useCallback)((t=>{e((()=>{throw t}))}),[])})(),d=(0,E.useSelect)((e=>{if(!a)return null;const o=e(v.COLLECTIONS_STORE_KEY),s=[t,r,c,l],n=o.getCollectionError(...s);if(n){if(!(0,O.isError)(n))throw new Error("TypeError: `error` object is not an instance of Error constructor");u(n)}return{results:o.getCollection(...s),isLoading:!o.hasFinishedResolution("getCollection",s)}}),[t,r,l,c,a,u]);return null!==d&&(i.current=d),i.current};var T=r(4347),C=r(9456);const L=window.wc.blocksComponents;r(8502);const R=({name:e,count:t})=>(0,p.jsxs)(p.Fragment,{children:[e,null!==t&&Number.isFinite(t)&&(0,p.jsx)(L.Label,{label:t.toString(),screenReaderLabel:(0,s.sprintf)(/* translators: %s number of products. */ /* translators: %s number of products. */ (0,s._n)("%s product","%s products",t,"woocommerce"),t),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}})]});var B=r(4921);r(7165);const F=({className:e, /* translators: Reset button text for filters. */ label:t=(0,s.__)("Reset","woocommerce"),onClick:r,screenReaderLabel:o=(0,s.__)("Reset filter","woocommerce")})=>(0,p.jsx)("button",{className:(0,B.A)("wc-block-components-filter-reset-button",e),onClick:r,children:(0,p.jsx)(L.Label,{label:t,screenReaderLabel:o})});r(874);const N=({className:e,isLoading:t,disabled:r, /* translators: Submit button text for filters. */ label:o=(0,s.__)("Apply","woocommerce"),onClick:n,screenReaderLabel:a=(0,s.__)("Apply filter","woocommerce")})=>(0,p.jsx)("button",{type:"submit",className:(0,B.A)("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":t},e),disabled:r,onClick:n,children:(0,p.jsx)(L.Label,{label:o,screenReaderLabel:a})}),q=window.wp.htmlEntities,M=window.wp.url;var I=r(4530),U=r(2174);function Q(){return Math.floor(Math.random()*Date.now())}const G=(0,n.getSettingWithCoercion)("isRenderingPhpTemplate",!1,O.isBoolean),V="query_type_",D="filter_";function $(e){if(G){const t=new URL(e);t.pathname=t.pathname.replace(/\/page\/[0-9]+/i,""),t.searchParams.delete("paged"),t.searchParams.forEach(((e,r)=>{r.match(/^query(?:-[0-9]+)?-page$/)&&t.searchParams.delete(r)})),window.location.href=t.href}else window.history.replaceState({},"",e)}var K=r(4642);r(4357);const Y=({className:e,style:t,suggestions:r,multiple:o=!0,saveTransform:s=e=>e.trim().replace(/\s/g,"-"),messages:n={},validateInput:a=e=>r.includes(e),label:i="",...c})=>(0,p.jsx)("div",{className:(0,B.A)("wc-blocks-components-form-token-field-wrapper",e,{"single-selection":!o}),style:t,children:(0,p.jsx)(K.A,{label:i,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,__experimentalValidateInput:a,saveTransform:s,maxLength:o?void 0:1,suggestions:r,messages:n,...c})});r(9300);const W=({children:e})=>(0,p.jsx)("div",{className:"wc-block-filter-title-placeholder",children:e}),J=(0,n.getSetting)("attributes",[]).reduce(((e,t)=>{const r=(o=t)&&o.attribute_name?{id:parseInt(o.attribute_id,10),name:o.attribute_name,taxonomy:"pa_"+o.attribute_name,label:o.attribute_label,orderby:o.attribute_orderby}:null;var o;return r&&r.id&&e.push(r),e}),[]),H=(e=[],t,r,o=[],s="in")=>{if(!r||!r.taxonomy)return[];const n=e.filter((e=>e.attribute!==r.taxonomy));return 0===o.length?t(n):(n.push({attribute:r.taxonomy,operator:s,slug:o.map((({slug:e})=>e)).sort()}),t((0,C.di)(n).asc("attribute"))),n},z=[{value:"preview-1",formattedValue:"preview-1",name:"Blue",label:(0,p.jsx)(R,{name:"Blue",count:3}),textLabel:"Blue (3)"},{value:"preview-2",formattedValue:"preview-2",name:"Green",label:(0,p.jsx)(R,{name:"Green",count:3}),textLabel:"Green (3)"},{value:"preview-3",formattedValue:"preview-3",name:"Red",label:(0,p.jsx)(R,{name:"Red",count:2}),textLabel:"Red (2)"}],X={count:0,has_archives:!0,id:0,label:"Preview",name:"preview",order:"menu_order",parent:0,taxonomy:"preview",type:""};r(2145);const Z=JSON.parse('{"uK":{"Do":{"A":"or"},"F8":{"A":3},"Ox":{"A":"list"},"dc":{"A":"multiple"}}}'),ee=e=>e.replace("pa_",""),te=(e,t=[])=>{const r={};t.forEach((e=>{const{attribute:t,slug:o,operator:s}=e,n=ee(t),a=o.join(","),i=`${V}${n}`,c="in"===s?"or":"and";r[`${D}${n}`]=a,r[i]=c}));const o=(0,M.removeQueryArgs)(e,...Object.keys(r));return(0,M.addQueryArgs)(o,r)},re=e=>{if(e){const r=(t=`filter_${e.name}`,window?(0,M.getQueryArg)(window.location.href,t):null);return("string"==typeof r?r.split(","):[]).map((e=>encodeURIComponent(e).toLowerCase()))}var t;return[]},oe=e=>e.trim().replace(/\s/g,"-").replace(/_/g,"-").replace(/-+/g,"-").replace(/[^a-zA-Z0-9-]/g,""),se=({isLoading:e=!1,options:t,checked:r,onChange:o})=>e?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:"is-loading"}),(0,p.jsx)("span",{className:"is-loading"})]}):(0,p.jsx)(L.CheckboxList,{className:"wc-block-attribute-filter-list",options:t,checked:r,onChange:o,isLoading:e,isDisabled:e}),ne=(0,o.createContext)({});(e=>{const t=Array.from(document.body.querySelectorAll(w.join(","))),{Block:r,getProps:o,getErrorBoundaryProps:s,selector:n,options:a={multiple:!0}}=e,i=(({Block:e,getProps:t,getErrorBoundaryProps:r,selector:o,wrappers:s,options:n})=>{let a=Array.from(document.body.querySelectorAll(o));return s&&s.length>0&&(a=a.filter((e=>!((e,t)=>t.some((t=>t.contains(e)&&!t.isSameNode(e))))(e,s)))),!1===n?.multiple&&(a=a.slice(0,1)),f({Block:e,containers:a,getProps:t,getErrorBoundaryProps:r})})({Block:r,getProps:o,getErrorBoundaryProps:s,selector:n,options:a,wrappers:t});t.forEach((t=>{t.addEventListener("wc-blocks_render_blocks_frontend",(()=>{(({Block:e,getProps:t,getErrorBoundaryProps:r,selector:o,wrapper:s,options:n})=>{let a=Array.from(s.querySelectorAll(o));!1===n?.multiple&&(a=a.slice(0,1)),f({Block:e,containers:a,getProps:t,getErrorBoundaryProps:r})})({...e,wrapper:t})}))}))})({selector:".wp-block-woocommerce-attribute-filter:not(.wp-block-woocommerce-filter-wrapper .wp-block-woocommerce-attribute-filter)",Block:({attributes:e,isEditor:t=!1,getNotice:r=()=>null})=>{const a=(0,n.getSettingWithCoercion)("hasFilterableProducts",!1,O.isBoolean),i=(0,n.getSettingWithCoercion)("isRenderingPhpTemplate",!1,O.isBoolean),c=(0,n.getSettingWithCoercion)("pageUrl",window.location.href,O.isString),[l,u]=(0,o.useState)(!1),d=e.isPreview&&!e.attributeId?X:(e=>{if(e)return J.find((t=>t.id===e))})(e.attributeId),m=(0,o.useMemo)((()=>re(d)),[d]),[g,b]=(0,o.useState)(m),[w,h]=(0,o.useState)(Q()),[f,y]=(0,o.useState)(e.isPreview&&!e.attributeId?z:[]),[v]=j(),[E,S]=A("attributes",[]),{results:L,isLoading:G}=P({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[d?.id||0],shouldSelect:e.attributeId>0,query:{orderby:d?.orderby||"menu_order"}}),K=(0,n.getSettingWithCoercion)("queryState",{},O.isObject),{data:Z,isLoading:ae}=(({queryAttribute:e,queryTaxonomy:t,queryPrices:r,queryStock:s,queryRating:n,queryState:a,isEditor:i=!1})=>{let c=k();c=`${c}-collection-data`;const[l]=j(c),[u,d]=A("calculate_attribute_counts",[],c),[p,m]=A("calculate_taxonomy_counts",[],c),[g,b]=A("calculate_price_range",null,c),[w,h]=A("calculate_stock_status_counts",null,c),[f,y]=A("calculate_rating_counts",null,c),_=x(e||{}),v=x(t),E=x(r),S=x(s),L=x(n);(0,o.useEffect)((()=>{"object"==typeof _&&Object.keys(_).length&&(u.find((e=>(0,O.objectHasProp)(_,"taxonomy")&&e.taxonomy===_.taxonomy))||d([...u,_]))}),[_,u,d]),(0,o.useEffect)((()=>{v&&!p.includes(v)&&m([...p,v])}),[v,p,m]),(0,o.useEffect)((()=>{g!==E&&void 0!==E&&b(E)}),[E,b,g]),(0,o.useEffect)((()=>{w!==S&&void 0!==S&&h(S)}),[S,h,w]),(0,o.useEffect)((()=>{f!==L&&void 0!==L&&y(L)}),[L,y,f]);const[R,B]=(0,o.useState)(i),[F]=(0,T.d7)(R,200);R||B(!0);const N=(0,o.useMemo)((()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=(0,C.di)(e.calculate_attribute_counts.map((({taxonomy:e,queryType:t})=>({taxonomy:e,query_type:t})))).asc(["taxonomy","query_type"])),Array.isArray(e.calculate_taxonomy_counts)&&(t.calculate_taxonomy_counts=e.calculate_taxonomy_counts),t})(l)),[l]),{results:q,isLoading:M}=P({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...a,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...N},shouldSelect:F});return{data:q,isLoading:M}})({queryAttribute:{taxonomy:d?.taxonomy||"",queryType:e.queryType},queryState:{...K,...v},isEditor:t}),ie=(0,o.useCallback)((e=>(0,O.objectHasProp)(Z,"attribute_counts")&&Array.isArray(Z.attribute_counts)?Z.attribute_counts.find((({term:t})=>t===e)):null),[Z]);(0,o.useEffect)((()=>{if(G||ae)return;if(!Array.isArray(L))return;const t=L.map((t=>{const r=ie(t.id);if(!(r||g.includes(t.slug)||(o=t.slug,v?.attributes&&v.attributes.some((({attribute:e,slug:t=[]})=>e===d?.taxonomy&&t.includes(o))))))return null;var o;const s=r?r.count:0;return{formattedValue:oe(t.slug),value:t.slug,name:(0,q.decodeEntities)(t.name),label:(0,p.jsx)(R,{name:(0,q.decodeEntities)(t.name),count:e.showCounts?s:null}),textLabel:e.showCounts?`${(0,q.decodeEntities)(t.name)} (${s})`:(0,q.decodeEntities)(t.name)}})).filter((e=>!!e));y(t),h(Q())}),[d?.taxonomy,L,G,e.showCounts,ae,ie,g,v.attributes]);const ce=(0,o.useCallback)((e=>Array.isArray(L)?L.reduce(((t,r)=>(e.includes(r.slug)&&t.push(r),t)),[]):[]),[L]),le=(0,o.useCallback)(((e,t=!1)=>{if(e=e.map((e=>({...e,slug:e.slug.map((e=>decodeURIComponent(e)))}))),t){if(!d?.taxonomy)return;const t=Object.keys((0,M.getQueryArgs)(window.location.href)),r=ee(d.taxonomy),o=t.reduce(((e,t)=>t.includes(V+r)||t.includes(D+r)?(0,M.removeQueryArgs)(e,t):e),window.location.href);$(te(o,e))}else{const t=te(c,e);((e,t)=>{const r=Object.entries(t).reduce(((e,[t,r])=>t.includes("query_type")?e:{...e,[t]:r}),{});return Object.entries(r).reduce(((t,[r,o])=>e[r]===o&&t),!0)})((0,M.getQueryArgs)(window.location.href),(0,M.getQueryArgs)(t))||$(t)}}),[c,d?.taxonomy]),ue=t=>{const r=H(E,S,d,ce(t),"or"===e.queryType?"in":"and");le(r,0===t.length)},de=(0,o.useCallback)(((r,o=!1)=>{t||(b(r),!o&&e.showFilterButton||H(E,S,d,ce(r),"or"===e.queryType?"in":"and"))}),[t,b,E,S,d,ce,e.queryType,e.showFilterButton]),pe=x((0,o.useMemo)((()=>(0,O.isAttributeQueryCollection)(E)?E.filter((({attribute:e})=>e===d?.taxonomy)).flatMap((({slug:e})=>e)):[]),[E,d?.taxonomy])),me=function(e,t){const r=(0,o.useRef)();return(0,o.useEffect)((()=>{r.current===e||(r.current=e)}),[e,t]),r.current}(pe);(0,o.useEffect)((()=>{!me||_()(me,pe)||_()(g,pe)||de(pe)}),[g,pe,me,de]);const ge="single"!==e.selectType,be=(0,o.useCallback)((e=>{const t=g.includes(e);let r;ge?(r=g.filter((t=>t!==e)),t||(r.push(e),r.sort())):r=t?[]:[e],de(r)}),[g,ge,de]);(0,o.useEffect)((()=>{d&&!e.showFilterButton&&((({currentCheckedFilters:e,hasSetFilterDefaultsFromUrl:t})=>t&&0===e.length)({currentCheckedFilters:g,hasSetFilterDefaultsFromUrl:l})?le(E,!0):le(E,!1))}),[l,le,E,d,g,e.showFilterButton]),(0,o.useEffect)((()=>{if(!l&&!G)return m.length>0?(u(!0),void de(m,!0)):void(i||u(!0))}),[d,l,G,de,m,i]);const we=(()=>{const{wrapper:e}=(0,o.useContext)(ne);return t=>{e&&e.current&&(e.current.hidden=!t)}})();if(!a)return we(!1),null;if(!d)return t?r("noAttributes"):(we(!1),null);if(0===f.length&&!G&&t)return r("noProducts");const he=`h${e.headingLevel}`,fe=!e.isPreview&&G,ye=!e.isPreview&&ae,_e=(fe||ye)&&0===f.length;if(!_e&&0===f.length)return we(!1),null;const xe=ge?!_e&&g.length<f.length:!_e&&0===g.length,ve=(0,p.jsx)(he,{className:"wc-block-attribute-filter__title",children:e.heading}),Ee=_e?(0,p.jsx)(W,{children:ve}):ve;return we(!0),(0,p.jsxs)(p.Fragment,{children:[!t&&e.heading&&Ee,(0,p.jsx)("div",{className:(0,B.A)("wc-block-attribute-filter",`style-${e.displayStyle}`),children:"dropdown"===e.displayStyle?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Y,{label:d.label,className:(0,B.A)({"single-selection":!ge,"is-loading":_e}),suggestions:f.filter((e=>!g.includes(e.value))).map((e=>e.formattedValue)),disabled:_e,placeholder:(0,s.sprintf)(/* translators: %s attribute name. */ /* translators: %s attribute name. */ (0,s.__)("Select %s","woocommerce"),d.label),onChange:e=>{!ge&&e.length>1&&(e=[e[e.length-1]]);const t=[e=e.map((e=>{const t=f.find((t=>t.formattedValue===e));return t?t.value:e})),g].reduce(((e,t)=>e.filter((e=>!t.includes(e)))));if(1===t.length)return be(t[0]);const r=[g,e].reduce(((e,t)=>e.filter((e=>!t.includes(e)))));1===r.length&&be(r[0])},value:g,displayTransform:e=>{const t=f.find((t=>[t.value,t.formattedValue].includes(e)));return t?t.textLabel:e},saveTransform:oe,messages:{added:(0,s.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,s.__)("%s filter added.","woocommerce"),d.label),removed:(0,s.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,s.__)("%s filter removed.","woocommerce"),d.label),remove:(0,s.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,s.__)("Remove %s filter.","woocommerce"),d.label.toLocaleLowerCase()),__experimentalInvalid:(0,s.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,s.__)("Invalid %s filter.","woocommerce"),d.label.toLocaleLowerCase())}},w),xe&&(0,p.jsx)(I.A,{icon:U.A,size:30})]}):(0,p.jsx)(se,{options:f,checked:g,onChange:be,isLoading:_e,isDisabled:_e})}),(0,p.jsxs)("div",{className:"wc-block-attribute-filter__actions",children:[(g.length>0||t)&&!_e&&(0,p.jsx)(F,{onClick:()=>{b([]),h(Q()),l&&ue([])},screenReaderLabel:(0,s.__)("Reset attribute filter","woocommerce")}),e.showFilterButton&&(0,p.jsx)(N,{className:"wc-block-attribute-filter__button",isLoading:_e,disabled:(()=>{if(fe||ye)return!0;const e=re(d);return e.length===g.length&&g.every((t=>e.includes(t)))})(),onClick:()=>ue(g),screenReaderLabel:(0,s.sprintf)(/* translators: %s is the attribute label */ /* translators: %s is the attribute label */ (0,s.__)("Apply attribute filter: %s","woocommerce"),d.label)})]})]})},getProps:e=>{return{isEditor:!1,attributes:(t=e.dataset,{className:(0,O.isString)(t?.className)?t.className:"",attributeId:parseInt((0,O.isString)(t?.attributeId)?t.attributeId:"0",10),showCounts:"true"===t?.showCounts,queryType:(0,O.isString)(t?.queryType)&&t.queryType||Z.uK.Do.A,heading:(0,O.isString)(t?.heading)?t.heading:"",headingLevel:(0,O.isString)(t?.headingLevel)&&parseInt(t.headingLevel,10)||Z.uK.F8.A,displayStyle:(0,O.isString)(t?.displayStyle)&&t.displayStyle||Z.uK.Ox.A,showFilterButton:"true"===t?.showFilterButton,selectType:(0,O.isString)(t?.selectType)&&t.selectType||Z.uK.dc.A,isPreview:!1})};var t}})},5893:()=>{},8502:()=>{},9300:()=>{},7165:()=>{},874:()=>{},4357:()=>{},2145:()=>{},1609:e=>{"use strict";e.exports=window.React},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},8468:e=>{"use strict";e.exports=window.lodash},195:e=>{"use strict";e.exports=window.wp.a11y},9491:e=>{"use strict";e.exports=window.wp.compose},4040:e=>{"use strict";e.exports=window.wp.deprecated},8107:e=>{"use strict";e.exports=window.wp.dom},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},923:e=>{"use strict";e.exports=window.wp.isShallowEqual},8558:e=>{"use strict";e.exports=window.wp.keycodes},5573:e=>{"use strict";e.exports=window.wp.primitives},979:e=>{"use strict";e.exports=window.wp.warning}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return o[e].call(r.exports,r,r.exports,n),r.exports}n.m=o,e=[],n.O=(t,r,o,s)=>{if(!r){var a=1/0;for(u=0;u<e.length;u++){for(var[r,o,s]=e[u],i=!0,c=0;c<r.length;c++)(!1&s||a>=s)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(i=!1,s<a&&(a=s));if(i){e.splice(u--,1);var l=o();void 0!==l&&(t=l)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[r,o,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var s=Object.create(null);n.r(s);var a={};t=t||[null,r({}),r([]),r(r)];for(var i=2&o&&e;"object"==typeof i&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,n.d(s,a),s},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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=432,(()=>{var e={432:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,s,[a,i,c]=r,l=0;if(a.some((t=>0!==e[t]))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(c)var u=c(n)}for(t&&t(r);l<a.length;l++)s=a[l],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(u)},r=globalThis.webpackChunkwebpackWcBlocksFrontendJsonp=globalThis.webpackChunkwebpackWcBlocksFrontendJsonp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=n.O(void 0,[763],(()=>n(8462)));a=n.O(a),(wc=void 0===wc?{}:wc)["attribute-filter"]=a})();
/home/batcwwjx/www/wp-content/plugins/woocommerce/assets/client/blocks/attribute-filter-frontend.js