HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/school/wp-content/themes/blocksy/static/bundle/316.8b9a2f115e574e8194bb.js
"use strict";(globalThis.blocksyJsonP=globalThis.blocksyJsonP||[]).push([[316],{5316:function(t,e,n){n.r(e),n.d(e,{mount:function(){return l}});var o=n(2194),r=n.n(o),c=n(1601),u=n.n(c);let a=null,i=null;r()(document.body).on("updated_cart_totals",(function(){setTimeout((function(){[...document.querySelectorAll(`[name="${i}"]`)].map((function(t){t.focus()}))}),500),u().trigger("blocksy:frontend:init")})),r()(document.body).on("updated_checkout",(function(t,e){var n;if(null==e||null===(n=e.fragments)||void 0===n||!n[".woocommerce-checkout-review-order-table"])return;const o=document.createElement("div");o.innerHTML=e.fragments[".woocommerce-checkout-review-order-table"],[...o.querySelectorAll(".cart_item")].length?o.remove():window.location.reload()}));const l=function(t,e){let{event:n}=e;if(t.matches("input"))return void function(t,e){t.closest("tr")&&[...t.closest("tr").querySelectorAll(".quantity input")].filter((function(e){return e!==t})).map((function(t){return t.value=e.target.value})),document.activeElement===t&&(i=t.name),t.closest(".ct-cart-auto-update")&&(a&&clearTimeout(a),a=setTimeout((function(){r()("[name='update_cart']").trigger("click")}),300))}(t,n);if(!t.classList.contains("ct-increase")&&!t.classList.contains("ct-decrease"))return;const o=t.parentNode.querySelector("input"),c=parseFloat(o.value,10)||0;if(t.classList.contains("ct-increase")){const t=o.getAttribute("max")&&parseFloat(o.getAttribute("max"),0)||1/0;o.value=c<t?Math.round(100*(c+parseFloat(o.step||"1")))/100:t}if(t.classList.contains("ct-decrease")){const t=o.getAttribute("min")?Math.round(100*parseFloat(o.getAttribute("min"),0))/100:0;o.value=c>t?Math.round(100*(c-parseFloat(o.step||"1")))/100:t}r()(o).trigger("change"),r()(o).trigger("input"),o.dispatchEvent(new Event("input",{bubbles:!0})),o.closest("tr")&&[...o.closest("tr").querySelectorAll(".quantity input")].filter((function(t){return t!==o})).map((function(t){return t.value=o.value}))}}}]);