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
/
product-filter-chips.js
/
/
(()=>{var e,t,o,r={8271:(e,t,o)=>{"use strict";var r=o(5573),c=o(790);const i=(0,c.jsx)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 10C7.10457 10 8 9.10457 8 8C8 6.89543 7.10457 6 6 6C4.89543 6 4 6.89543 4 8C4 9.10457 4.89543 10 6 10ZM20 8.75H11.1111V7.25L20 7.25V8.75ZM20 15.75L11.1111 15.75V14.25L20 14.25V15.75ZM8 15C8 16.1046 7.10457 17 6 17C4.89543 17 4 16.1046 4 15C4 13.8954 4.89543 13 6 13C7.10457 13 8 13.8954 8 15Z",fill:"currentColor"})}),s=window.wp.blocks,l=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-chips","title":"Chips","description":"Display filter options as chips.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filter-attribute","woocommerce/product-filter-taxonomy","woocommerce/product-filter-status"],"supports":{"interactivity":true},"usesContext":["filterData"],"attributes":{"chipText":{"type":"string"},"customChipText":{"type":"string"},"chipBackground":{"type":"string"},"customChipBackground":{"type":"string"},"chipBorder":{"type":"string"},"customChipBorder":{"type":"string"},"selectedChipText":{"type":"string"},"customSelectedChipText":{"type":"string"},"selectedChipBackground":{"type":"string"},"customSelectedChipBackground":{"type":"string"},"selectedChipBorder":{"type":"string"},"customSelectedChipBorder":{"type":"string"}},"viewScriptModule":"woocommerce/product-filter-chips","style":"file:../woocommerce/product-filter-chips-style.css","editorStyle":"file:../woocommerce/product-filter-chips-editor.css"}');var p=o(7723),d=o(6087),n=o(4921);const a=e=>{if("string"!=typeof e)return"";const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""},h=window.wp.blockEditor;function u(e,t=""){return e?.length?`var(--wp--preset--color--${e})`:t||""}function m(e){const{chipText:t,chipBackground:o,chipBorder:r,selectedChipText:c,selectedChipBackground:i,selectedChipBorder:s,customChipText:l,customChipBackground:p,customChipBorder:d,customSelectedChipText:n,customSelectedChipBackground:a,customSelectedChipBorder:h}=e,m={"--wc-product-filter-chips-text":u(t,l),"--wc-product-filter-chips-background":u(o,p),"--wc-product-filter-chips-border":u(r,d),"--wc-product-filter-chips-selected-text":u(c,n),"--wc-product-filter-chips-selected-background":u(i,a),"--wc-product-filter-chips-selected-border":u(s,h)};return Object.keys(m).reduce(((e,t)=>(m[t]&&(e[t]=m[t]),e)),{})}function C(e){const{chipText:t,chipBackground:o,chipBorder:r,selectedChipText:c,selectedChipBackground:i,selectedChipBorder:s,customChipText:l,customChipBackground:p,customChipBorder:d,customSelectedChipText:n,customSelectedChipBackground:a,customSelectedChipBorder:h}=e;return{"has-chip-text-color":t||l,"has-chip-background-color":o||p,"has-chip-border-color":r||d,"has-selected-chip-text-color":c||n,"has-selected-chip-background-color":i||a,"has-selected-chip-border-color":s||h}}o(4415);const g=(0,h.withColors)({chipText:"chip-text",chipBorder:"chip-border",chipBackground:"chip-background",selectedChipText:"selected-chip-text",selectedChipBorder:"selected-chip-border",selectedChipBackground:"selected-chip-background"})((e=>{const t=(0,h.__experimentalUseMultipleOriginColorsAndGradients)(),{context:o,clientId:r,attributes:i,setAttributes:s,chipText:l,setChipText:u,chipBackground:g,setChipBackground:f,chipBorder:w,setChipBorder:b,selectedChipText:x,setSelectedChipText:k,selectedChipBackground:B,setSelectedChipBackground:y,selectedChipBorder:_,setSelectedChipBorder:v}=e,{customChipText:S,customChipBackground:T,customChipBorder:j,customSelectedChipText:O,customSelectedChipBackground:M,customSelectedChipBorder:N}=i,{filterData:V}=o,{isLoading:A,items:P,showCounts:F}=V,L=(0,h.useBlockProps)({className:(0,n.A)("wc-block-product-filter-chips",{"is-loading":A,...C(i)}),style:m(i)}),D=(0,d.useMemo)((()=>[...Array(10)].map(((e,t)=>(0,c.jsx)("div",{className:"wc-block-product-filter-chips__item",style:{width:Math.floor(75*Math.random())+"%"},children:" "},t)))),[]);if(!P)return(0,c.jsx)(c.Fragment,{});const I=P.length>15;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{...L,children:[(0,c.jsxs)("div",{className:"wc-block-product-filter-chips__items",children:[A&&D,!A&&(I?P.slice(0,15):P).map(((e,t)=>(0,c.jsx)("div",{className:"wc-block-product-filter-chips__item","aria-checked":!!e.selected,children:(0,c.jsxs)("span",{className:"wc-block-product-filter-chips__label",children:[(0,c.jsx)("span",{className:"wc-block-product-filter-chips__text",children:"string"==typeof e.label?a(e.label):e.label}),F&&(0,c.jsx)("span",{className:"wc-block-product-filter-chips__count",children:` (${e.count})`})]})},t)))]}),!A&&I&&(0,c.jsx)("button",{className:"wc-block-product-filter-chips__show-more",children:(0,p.__)("Show more…","woocommerce")})]}),(0,c.jsx)(h.InspectorControls,{group:"color",children:t.hasColorsOrGradients&&(0,c.jsx)(h.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{label:(0,p.__)("Unselected Chip Text","woocommerce"),colorValue:l.color||S,onColorChange:e=>{u(e),s({customChipText:e})},resetAllFilter:()=>{u(""),s({customChipText:""})}},{label:(0,p.__)("Unselected Chip Border","woocommerce"),colorValue:w.color||j,onColorChange:e=>{b(e),s({customChipBorder:e})},resetAllFilter:()=>{b(""),s({customChipBorder:""})}},{label:(0,p.__)("Unselected Chip Background","woocommerce"),colorValue:g.color||T,onColorChange:e=>{f(e),s({customChipBackground:e})},resetAllFilter:()=>{f(""),s({customChipBackground:""})}},{label:(0,p.__)("Selected Chip Text","woocommerce"),colorValue:x.color||O,onColorChange:e=>{k(e),s({customSelectedChipText:e})},resetAllFilter:()=>{k(""),s({customSelectedChipText:""})}},{label:(0,p.__)("Selected Chip Border","woocommerce"),colorValue:_.color||N,onColorChange:e=>{v(e),s({customSelectedChipBorder:e})},resetAllFilter:()=>{v(""),s({customSelectedChipBorder:""})}},{label:(0,p.__)("Selected Chip Background","woocommerce"),colorValue:B.color||M,onColorChange:e=>{y(e),s({customSelectedChipBackground:e})},resetAllFilter:()=>{y(""),s({customSelectedChipBackground:""})}}],panelId:r,...t})})]})}));(0,s.registerBlockType)(l,{edit:g,icon:i,save:({attributes:e})=>{const t=h.useBlockProps.save({className:(0,n.A)("wc-block-product-filter-chips",e.className,C(e)),style:{...m(e)}});return(0,c.jsx)("div",{...t})}})},4415:()=>{},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},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}},c={};function i(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return r[e].call(o.exports,o,o.exports,i),o.exports}i.m=r,e=[],i.O=(t,o,r,c)=>{if(!o){var s=1/0;for(n=0;n<e.length;n++){for(var[o,r,c]=e[n],l=!0,p=0;p<o.length;p++)(!1&c||s>=c)&&Object.keys(i.O).every((e=>i.O[e](o[p])))?o.splice(p--,1):(l=!1,c<s&&(s=c));if(l){e.splice(n--,1);var d=r();void 0!==d&&(t=d)}}return t}c=c||0;for(var n=e.length;n>0&&e[n-1][2]>c;n--)e[n]=e[n-1];e[n]=[o,r,c]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.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 c=Object.create(null);i.r(c);var s={};t=t||[null,o({}),o([]),o(o)];for(var l=2&r&&e;"object"==typeof l&&!~t.indexOf(l);l=o(l))Object.getOwnPropertyNames(l).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,i.d(c,s),c},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=7857,(()=>{var e={7857:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var r,c,[s,l,p]=o,d=0;if(s.some((t=>0!==e[t]))){for(r in l)i.o(l,r)&&(i.m[r]=l[r]);if(p)var n=p(i)}for(t&&t(o);d<s.length;d++)c=s[d],i.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return i.O(n)},o=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var s=i.O(void 0,[94],(()=>i(8271)));s=i.O(s),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-filter-chips"]=s})();
/home/batcwwjx/www/wp-content/plugins/woocommerce/assets/client/blocks/product-filter-chips.js