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-price.js
/
/
(()=>{var e,r,t,o={5154:(e,r,t)=>{"use strict";const o=window.wp.blocks;var c=t(5573),n=t(790);const s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-price","title":"Price Filter","description":"Let shoppers filter products by choosing a price range.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filters"],"supports":{"interactivity":true,"html":false},"usesContext":["query","filterParams"],"viewScriptModule":"woocommerce/product-filter-price"}'),i=window.wp.blockEditor;var a=t(6087),l=t(4347);const u=window.wc.wcTypes;var p=t(9456),d=t(923),m=t.n(d);function f(e){const r=(0,a.useRef)(e);return m()(e,r.current)||(r.current=e),r.current}const y=window.wc.wcBlocksData,w=window.wp.data,_=(0,a.createContext)("page"),g=()=>(0,a.useContext)(_),v=(_.Provider,e=>{const r=g();e=e||r;const t=(0,w.useSelect)((r=>r(y.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)),[e]),{setValueForQueryContext:o}=(0,w.useDispatch)(y.QUERY_STATE_STORE_KEY);return[t,(0,a.useCallback)((r=>{o(e,r)}),[e,o])]}),x=(e,r,t)=>{const o=g();t=t||o;const c=(0,w.useSelect)((o=>o(y.QUERY_STATE_STORE_KEY).getValueForQueryKey(t,e,r)),[t,e]),{setQueryValue:n}=(0,w.useDispatch)(y.QUERY_STATE_STORE_KEY);return[c,(0,a.useCallback)((r=>{n(t,e,r)}),[t,e,n])]},C=({queryAttribute:e,queryTaxonomy:r,queryPrices:t,queryStock:o,queryRating:c,queryState:n,isEditor:s=!1})=>{let i=g();i=`${i}-collection-data`;const[d]=v(i),[m,_]=x("calculate_attribute_counts",[],i),[C,h]=x("calculate_taxonomy_counts",[],i),[b,k]=x("calculate_price_range",null,i),[E,j]=x("calculate_stock_status_counts",null,i),[S,O]=x("calculate_rating_counts",null,i),P=f(e||{}),T=f(r),R=f(t),q=f(o),B=f(c);(0,a.useEffect)((()=>{"object"==typeof P&&Object.keys(P).length&&(m.find((e=>(0,u.objectHasProp)(P,"taxonomy")&&e.taxonomy===P.taxonomy))||_([...m,P]))}),[P,m,_]),(0,a.useEffect)((()=>{T&&!C.includes(T)&&h([...C,T])}),[T,C,h]),(0,a.useEffect)((()=>{b!==R&&void 0!==R&&k(R)}),[R,k,b]),(0,a.useEffect)((()=>{E!==q&&void 0!==q&&j(q)}),[q,j,E]),(0,a.useEffect)((()=>{S!==B&&void 0!==B&&O(B)}),[B,O,S]);const[V,A]=(0,a.useState)(s),[L]=(0,l.d7)(V,200);V||A(!0);const M=(0,a.useMemo)((()=>(e=>{const r=e;return Array.isArray(e.calculate_attribute_counts)&&(r.calculate_attribute_counts=(0,p.di)(e.calculate_attribute_counts.map((({taxonomy:e,queryType:r})=>({taxonomy:e,query_type:r})))).asc(["taxonomy","query_type"])),Array.isArray(e.calculate_taxonomy_counts)&&(r.calculate_taxonomy_counts=e.calculate_taxonomy_counts),r})(d)),[d]),{results:Y,isLoading:Q}=(e=>{const{namespace:r,resourceName:t,resourceValues:o=[],query:c={},shouldSelect:n=!0}=e;if(!r||!t)throw new Error("The options object must have valid values for the namespace and the resource properties.");const s=(0,a.useRef)({results:[],isLoading:!0}),i=f(c),l=f(o),p=(()=>{const[,e]=(0,a.useState)();return(0,a.useCallback)((r=>{e((()=>{throw r}))}),[])})(),d=(0,w.useSelect)((e=>{if(!n)return null;const o=e(y.COLLECTIONS_STORE_KEY),c=[r,t,i,l],s=o.getCollectionError(...c);if(s){if(!(0,u.isError)(s))throw new Error("TypeError: `error` object is not an instance of Error constructor");p(s)}return{results:o.getCollection(...c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[r,t,l,i,n,p]);return null!==d&&(s.current=d),s.current})({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...n,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...M},shouldSelect:L});return{data:Y,isLoading:Q}};var h=t(7723);const b=(e=[])=>(0,o.getBlockTypes)().map((e=>e.name)).filter((r=>!e.includes(r))),k=window.wc.priceFormat;function E(e,r){return("number"==typeof e?e:parseInt(e,10))/10**r.minorUnit}function j(e){if(!(0,u.objectHasProp)(e,"price_range"))return{minPrice:0,maxPrice:0,minRange:0,maxRange:0};const r=(0,k.getCurrencyFromPriceResponse)(e.price_range),t=(0,u.objectHasProp)(e.price_range,"min_price")&&(0,u.isString)(e.price_range.min_price)?E(e.price_range.min_price,r):0,o=(0,u.objectHasProp)(e.price_range,"max_price")&&(0,u.isString)(e.price_range.max_price)?E(e.price_range.max_price,r):0;return{minPrice:t,maxPrice:o,minRange:t,maxRange:o}}t(1652);const S=({children:e})=>(0,n.jsxs)("div",{className:"wc-block-product-filter-components-initial-disabled",children:[(0,n.jsx)("div",{className:"wc-block-product-filter-components-initial-disabled-overlay"}),e]});(0,o.registerBlockType)(s,{icon:()=>(0,n.jsxs)(c.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("line",{x1:"4",y1:"15.25",x2:"20",y2:"15.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)("line",{x1:"4",y1:"19.25",x2:"13",y2:"19.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)(c.Circle,{cx:"8.75",cy:"7.75",r:"4.75",stroke:"currentColor",strokeWidth:"1.4",fill:"none"}),(0,n.jsx)(c.Path,{d:"M7.99278 6.34419C7.8133 6.46983 7.75717 6.60229 7.75717 6.7002C7.75717 6.79811 7.8133 6.93057 7.99278 7.0562C8.17091 7.18089 8.43983 7.27162 8.75717 7.27162C9.2288 7.27162 9.67418 7.40475 10.0131 7.64199C10.3506 7.87828 10.6143 8.24582 10.6143 8.7002C10.6143 9.15457 10.3506 9.52211 10.0131 9.7584C9.77922 9.92211 9.49465 10.0362 9.18574 10.0913V10.2716C9.18574 10.5083 8.99386 10.7002 8.75717 10.7002C8.52047 10.7002 8.3286 10.5083 8.3286 10.2716V10.0913C8.01968 10.0362 7.73512 9.92211 7.50125 9.7584C7.16369 9.52211 6.90002 9.15457 6.90002 8.70019C6.90002 8.4635 7.0919 8.27162 7.3286 8.27162C7.56529 8.27162 7.75717 8.4635 7.75717 8.7002C7.75717 8.79811 7.8133 8.93057 7.99278 9.0562C8.17091 9.18089 8.43983 9.27162 8.75717 9.27162C9.07451 9.27162 9.34342 9.18089 9.52155 9.0562C9.70103 8.93057 9.75717 8.79811 9.75717 8.7002C9.75717 8.60229 9.70103 8.46983 9.52155 8.34419C9.34342 8.2195 9.07451 8.12877 8.75717 8.12877C8.28553 8.12877 7.84016 7.99564 7.50125 7.7584C7.16369 7.52211 6.90002 7.15457 6.90002 6.7002C6.90002 6.24582 7.16369 5.87828 7.50125 5.64199C7.73512 5.47828 8.01969 5.36415 8.3286 5.30912V5.12877C8.3286 4.89207 8.52047 4.7002 8.75717 4.7002C8.99386 4.7002 9.18574 4.89207 9.18574 5.12877V5.30912C9.49465 5.36415 9.77922 5.47828 10.0131 5.64199C10.3506 5.87828 10.6143 6.24582 10.6143 6.7002C10.6143 6.93689 10.4224 7.12877 10.1857 7.12877C9.94905 7.12877 9.75717 6.93689 9.75717 6.7002C9.75717 6.60229 9.70103 6.46983 9.52155 6.34419C9.34342 6.2195 9.07451 6.12877 8.75717 6.12877C8.43983 6.12877 8.17091 6.2195 7.99278 6.34419Z",fill:"currentColor"})]}),edit:()=>{const e=(0,i.useBlockProps)(),{data:r,isLoading:t}=C({queryPrices:!0,queryState:{},isEditor:!0});return(0,n.jsx)("div",{...e,children:(0,n.jsx)(S,{children:(0,n.jsx)(i.BlockContextProvider,{value:{filterData:{price:j(r),isLoading:t}},children:(0,n.jsx)(i.InnerBlocks,{allowedBlocks:b(),template:[["core/heading",{level:3,content:(0,h.__)("Price","woocommerce"),style:{spacing:{margin:{bottom:"0.625rem",top:"0"}}}}],["woocommerce/product-filter-price-slider",{}]]})})})})},save:()=>{const e=i.useBlockProps.save(),r=i.useInnerBlocksProps.save(e);return(0,n.jsx)("div",{...r})}})},1652:()=>{},1609:e=>{"use strict";e.exports=window.React},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},923:e=>{"use strict";e.exports=window.wp.isShallowEqual},5573:e=>{"use strict";e.exports=window.wp.primitives}},c={};function n(e){var r=c[e];if(void 0!==r)return r.exports;var t=c[e]={exports:{}};return o[e].call(t.exports,t,t.exports,n),t.exports}n.m=o,e=[],n.O=(r,t,o,c)=>{if(!t){var s=1/0;for(u=0;u<e.length;u++){for(var[t,o,c]=e[u],i=!0,a=0;a<t.length;a++)(!1&c||s>=c)&&Object.keys(n.O).every((e=>n.O[e](t[a])))?t.splice(a--,1):(i=!1,c<s&&(s=c));if(i){e.splice(u--,1);var l=o();void 0!==l&&(r=l)}}return r}c=c||0;for(var u=e.length;u>0&&e[u-1][2]>c;u--)e[u]=e[u-1];e[u]=[t,o,c]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},t=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 c=Object.create(null);n.r(c);var s={};r=r||[null,t({}),t([]),t(t)];for(var i=2&o&&e;"object"==typeof i&&!~r.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((r=>s[r]=()=>e[r]));return s.default=()=>e,n.d(c,s),c},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=5303,(()=>{var e={5303:0};n.O.j=r=>0===e[r];var r=(r,t)=>{var o,c,[s,i,a]=t,l=0;if(s.some((r=>0!==e[r]))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(a)var u=a(n)}for(r&&r(t);l<s.length;l++)c=s[l],n.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return n.O(u)},t=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var s=n.O(void 0,[94],(()=>n(5154)));s=n.O(s),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-filter-price"]=s})();
/home/batcwwjx/www/wp-content/plugins/woocommerce/assets/client/blocks/product-filter-price.js