PageSourceSearch

https://calc-js.signs.com/size-unit-toggle-min.js?v=1789092699276

js signs.com collected 2026-09-24 19:31:12 UTC 3,842 bytes, 1 lines download raw bytes

1"use strict";(this.webpackJsonpSharedCalc=this.webpackJsonpSharedCalc||[]).push([[392],{5969:function(e,t,r){r.r(t),r.d(t,{SizeUnitToggle:function(){return s}});var n=r(3),a=r(5896),c=r(4493),o=r(3760),i=r(9949),l=r(5337),f=r(659),u=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=function(){function e(e,t,r,a){var o=this;this.templateConfigHelper=e,this.calculator=t,this.calcDOMHelper=r,this.componentHelper=a,this.setData=function(e,t){o.id=e,o.data=t;var r=o.calculator.getData();o.prodAttrs=r.prod_attrs,o.selectedSpecs=r.selectedSpecs,o.mainElementRef=o.calcDOMHelper.getCalcDOM()},this.init=function(){var e=[],t=["WD","HT"];for(var r in o.prodAttrs){var a=o.prodAttrs[r];if(a.order_spec_code&&t.indexOf(a.order_spec_code[0])>=0&&"t"==a.field_type){var i=o.mainElementRef.querySelector(".text-attr-".concat(r));if(i){var l={attrId:r,textField:i.querySelector(".text-attribute-input"),selectedValue:o.selectedSpecs[r]};e.push(l)}}}if(e.length){var f=o.mainElementRef.querySelector(".size-unit-toggle");f&&f.addEventListener("change",function(){var t,r,a=o.calculator.getData(),i=f.checked?"ft":"in",l=a.product_id,u=o.templateConfigHelper.getMergedConfig().template_code.toLowerCase(),s="calc_".concat(l,"_").concat(u),d=document.querySelectorAll("#".concat(s," .dropdown-attr-size_unit .custom-select")),p=0;d.forEach(function(e){0!=p&&(e.name="size_unit_".concat(p)),p++});try{for(var v=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),h=v.next();!h.done;h=v.next()){var m=h.value,g=a?a.selectedSpecs[m.attrId]:m.selectedValue;"ft"==i&&(g=c.I.convertTo(i,g));var y=o.componentHelper.getComponentInstance(m.attrId);y&&(y.sizeUnit=i,y.textField.value=g),m.textField.value=g}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}n.U.dispatchEvent(o.mainElementRef,"calc.changeSpecs",{attribute_id:"size_unit",prod_attr_val_id:i}),n.U.dispatchEvent(o.mainElementRef,"calc.sizeUnitChange",{attribute_id:"size_unit",prod_attr_val_id:i})})}}}return function(e,t,r,n){var a,c=arguments.length,o=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(o=(c<3?a(o):c>3?a(t,r,o):a(t,r))||o);return c>3&&o&&Object.defineProperty(t,r,o),o}([(0,f.injectable)(),u("design:paramtypes",[o.j,i.t,l.a,a.w])],e)}()},4493:function(e,t,r){r.d(t,{I:function(){return a}});var n=r(659),a=function(){function e(){}return e.getNumericValue=function(e,t){void 0===t&&(t=3);var r=NaN,n=r,a=/^(-)?\s*(\d*)(\.\d+|(\s+\d*\s*)?\s*\/\s*\d+)?$/.exec(e);if(!a)return r;var c=a[1],o=a[2],i=a[3];if(!o&&!i)return r;if(n=!o&&i&&-1!==i.search(/^\./)?0:parseInt(o),isNaN(n))return r;if(!i)return n*("-"===c?-1:1);if(-1!==i.search(/^\./)){var l=parseFloat(i),f=Math.pow(10,t);n=Math.round((n+l)*f)/f}else if(-1!==i.search(/^\s*\//)){l=parseInt(o);var u=parseInt(i.replace("/",""));n=Math.round(1e3*l/u)/1e3}else{var s=i.split("/").map(function(e){return parseInt(e)});l=s[0],u=s[1],n=Math.round(1e3*(n+l/u))/1e3}return n*("-"===c?-1:1)},e.convertTo=function(e,t){void 0===e&&(e="in");var r=t;return"ft"==e?r/=12:r*=12,r},function(e,t,r,n){var a,c=arguments.length,o=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(o=(c<3?a(o):c>3?a(t,r,o):a(t,r))||o);return c>3&&o&&Object.defineProperty(t,r,o),o}([(0,n.injectable)()],e)}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.