physical-quantity 1.1.25 → 1.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Physical Quantity Web Component
2
2
 
3
- `physical-quantity(alias: uc-qty for quantity with built-in unit conversion)` is a web component that allows you to create and manipulate physical quantities with different units. It provides an input for the value and a dropdown for the unit, automatically converting between units in the same category.
3
+ `physical-quantity`(alias: `uc-qty` for quantity with built-in unit conversion) is a web component that allows you to create and manipulate physical quantities with different units. It provides an input for the value and a dropdown for the unit, automatically converting between units in the same category.
4
4
 
5
5
  It is a new HTML element for expressing physical quantities, featuring self-contained unit conversion, a compact and clean UI, no redundant dual units, and seamless integration across all websites and platforms.
6
6
  ![Physical Quantity (Gif Animation)](https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/PQE%2Fexamples%2FPhysicalQuantityElementDemo3-ezgif.com.gif?alt=media&token=b910c493-e990-490b-bf4d-015a4d4c10d2)
7
7
 
8
8
  ## Features
9
9
 
10
- - Create a physical quantity with a value and unit.
10
+ - Create a `physical quantity` with a value and unit.
11
11
  - Automatically convert between units within the same category.
12
12
  - Display values with customizable decimal places if not an integer; show integers without decimal parts.
13
13
  - Easy to integrate into any web project.
@@ -28,6 +28,12 @@ npm install physical-quantity
28
28
  ```
29
29
 
30
30
  ## Usage
31
+ ### For Web Visitors
32
+ The unit list displays available units for the physical quantity category. Users can easily switch between units to view the same quantity in different measurements.
33
+
34
+ When hovering over the unit list, an icon appears, providing access to a comprehensive unit converter. This tool allows users to convert quantities across 50+ categories.
35
+
36
+ ### For Developers
31
37
  After installation, you can import and use the physical-quantity component in your project.
32
38
 
33
39
  ### Importing the Component
@@ -85,50 +91,62 @@ Here's an example of how to use the component in an HTML file:
85
91
  ### Attributes
86
92
  The physical-quantity component supports the following attributes:
87
93
 
88
- - value: The initial value of the physical quantity. It can be any number.
89
- - unit: The initial unit of the physical quantity. It must be a valid unit within the supported unit category (e.g., mm, cm, m, in, ft for length).
90
- - decimal-places: web author can specify the decimal-places depending on the magnitude of the quantity. Default to be 3.
94
+ - <ins>_value_</ins>: The initial value of the physical quantity. It can be any number.
95
+ - <ins>_unit_</ins>: The initial unit of the physical quantity. It must be a valid unit within the supported unit category (e.g., mm, cm, m, in, ft for length).
96
+ - <ins>_decimal-places_</ins>: web author can specify the decimal-places depending on the magnitude of the quantity. Default to be 3.
91
97
 
92
98
  ### Supported Units
93
99
  Currently, the component supports the following categories and units:
94
- - Length
95
- - m (meter)
96
- - km (kilometers)
97
- - mm (millimeter)
98
- - cm (centimeter)
99
- - in (inch)
100
- - ft (foot)
101
- - Mass
102
- - kg (kilogram)
103
- - g (gram)
104
- - lbm (pound mass)
105
- - Pressure/Stress:
106
- - Pa
107
- - kPa
108
- - MPa
109
- - GPa
110
- - bar
111
- - mbar
112
- - atm
113
- - mm HG
114
- - cm HG
115
- - in HG
116
- - mm W.C.
117
- - m W.C.,
118
- - in W.C.
119
- - psf: pound per square foot
120
- - psi: pound per square foot
121
- - ksi: kilo-pound per square foot
122
- - ksi[kip/in²]
123
- - Density:
124
- - kg/
125
- - kg/L
126
- - g/cm³
127
- - g/mm³
128
- - lbm/ft³
129
- - lbm/in³
130
- - ... (more to update.)
131
-
100
+ | Category | Unit | Description |
101
+ |---|---|---|
102
+ | Length | m |meter|
103
+ | |km |kilometers|
104
+ | |mm |millimeter|
105
+ | |cm |centimeter|
106
+ | |in |inch|
107
+ | |ft |foot|
108
+ | Mass | kg |kilogram|
109
+ | | g |gram|
110
+ | |lbm |pound mass|
111
+ | Pressure/Stress | Pa ||
112
+ | | kPa ||
113
+ | | MPa ||
114
+ | | GPa ||
115
+ | | bar ||
116
+ | | mbar||
117
+ | | atm||
118
+ | | mm HG||
119
+ | | cm HG||
120
+ | | in HG||
121
+ | | mm W.C.||
122
+ | | m W.C.||
123
+ | | in W.C.||
124
+ | | psf| pound per square foot|
125
+ | | psi| pound per square foot|
126
+ | | ksi| kilo-pound per square foot|
127
+ | | ksi[kip/in²]||
128
+ | Density | kg/m³||
129
+ | | kg/L||
130
+ | | g/cm³||
131
+ | | g/mm³||
132
+ | | lbm/ft³||
133
+ | | lbm/in³||
134
+ | Time | s[second] ||
135
+ | | s||
136
+ | | minute||
137
+ | | h||
138
+ | | h[hour]||
139
+ | | day||
140
+ | | week||
141
+ | ElectricalCurrent | A ||
142
+ | | Ampere[amp]||
143
+ | | mA||
144
+ | | µA||
145
+ | | kA||
146
+ | | MA||
147
+ | | esu/s |
148
+ | more to update. | (feel free to send your request for other units) ||
149
+
132
150
  ## License
133
151
  This project is licensed under the MIT License. See the LICENSE file for more details.
134
152
 
@@ -136,8 +154,11 @@ This project is licensed under the MIT License. See the LICENSE file for more de
136
154
  Contributions are welcome! Please contact the developer for any bugs, features, or improvements.
137
155
 
138
156
  ## Change Log
139
- - v1.1.21(20250603): added alias uc-qty.
140
- - v1.1.19(20250602): changed to umd for unpkg, and es for module.
157
+ | Version | Date | Description |
158
+ |---|---|---|
159
+ | v1.1.28 |20240610| Tooltip for unit list provides a link to the unit converter page for all unit categories. Added more categories.|
160
+ | v1.1.21 |20240603| Added alias uc-qty. |
161
+ | v1.1.19 |20240602| Changed to umd for unpkg, and es for module. |
141
162
 
142
163
  ## Contact
143
164
  If you have any questions or feedback, feel free to contact me at don.wen@yahoo.com.
package/dist/pq.es.js CHANGED
@@ -1 +1 @@
1
- function _0x338d(_0x4e209f,_0x19f8e7){const _0x2dae66=_0x2dae();return _0x338d=function(_0x338d70,_0x3a2071){_0x338d70=_0x338d70-0x1ae;let _0x336365=_0x2dae66[_0x338d70];return _0x336365;},_0x338d(_0x4e209f,_0x19f8e7);}const _0x1df461=_0x338d;function _0x2dae(){const _0x3763b7=['value','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','open','lbm','3aOYPph','innerHTML','ksi','unitConversion','9jWsjId','units','style','mm\x20HG','24DFLHTa','1127192TvfcpP','kg/L','https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492','e3dLogoUrl','mbar','querySelectorAll','lbm/in³','bar','display','formatValue','\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>','5254470rAYyRH','join','mouseout','1481008lCZyjy','tooltipTimeout','.unit-container','change','unitCategory','render','in\x20W.C.','898848qUBbql','bind','attachShadow','in\x20HG','MPa','handleUnitChange','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','tagName','38699zqYuzB','m\x20W.C.','addEventListener','g/mm³','block','attributeChangedCallback','getUnitCategory','querySelector','cm\x20HG','atm','psf','>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','isInteger','none','GPa','pow','observedAttributes','decimal-places','uc-qty','decimalPlaces','1046328liSOlG','select','define','shadowRoot','</option>','target','toPrecision','35nqrvde','includes','closest','ksi[kip/in²]','toFixed','focus','removeEventListener','4qONgQl','1142670vacfQy','connectedCallback','\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','kPa','disconnectedCallback','unit'];_0x2dae=function(){return _0x3763b7;};return _0x2dae();}(function(_0x51bef8,_0x5874c5){const _0x3762fc=_0x338d,_0x2285d0=_0x51bef8();while(!![]){try{const _0x4f0926=-parseInt(_0x3762fc(0x1e0))/0x1*(parseInt(_0x3762fc(0x1af))/0x2)+-parseInt(_0x3762fc(0x1ba))/0x3*(-parseInt(_0x3762fc(0x1d1))/0x4)+parseInt(_0x3762fc(0x1ce))/0x5+parseInt(_0x3762fc(0x1f4))/0x6+parseInt(_0x3762fc(0x1fb))/0x7*(-parseInt(_0x3762fc(0x1d8))/0x8)+parseInt(_0x3762fc(0x1be))/0x9*(-parseInt(_0x3762fc(0x1b0))/0xa)+parseInt(_0x3762fc(0x1c3))/0xb*(-parseInt(_0x3762fc(0x1c2))/0xc);if(_0x4f0926===_0x5874c5)break;else _0x2285d0['push'](_0x2285d0['shift']());}catch(_0x397162){_0x2285d0['push'](_0x2285d0['shift']());}}}(_0x2dae,0x9b8d9));const s=0.45359237,o=25.4/0x3e8,n=0xc*o,c=0x18bcd,a=133.322387415;class r extends HTMLElement{constructor(){const _0x9513e9=_0x338d;super(),this[_0x9513e9(0x1da)]({'mode':_0x9513e9(0x1b8)}),this[_0x9513e9(0x1b6)]=0x0,this[_0x9513e9(0x1b5)]='mm',this[_0x9513e9(0x1d5)]='Length',this[_0x9513e9(0x1d2)]=null,this[_0x9513e9(0x1f3)]=0x3,this[_0x9513e9(0x1c6)]=_0x9513e9(0x1c5),this[_0x9513e9(0x1bf)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0x9513e9(0x1b9)],'Pressure':['Pa',_0x9513e9(0x1b3),_0x9513e9(0x1dc),_0x9513e9(0x1ee),_0x9513e9(0x1ca),_0x9513e9(0x1c7),_0x9513e9(0x1e9),_0x9513e9(0x1c1),_0x9513e9(0x1e8),_0x9513e9(0x1db),'mm\x20W.C.',_0x9513e9(0x1e1),_0x9513e9(0x1d7),_0x9513e9(0x1ea),'psi',_0x9513e9(0x1bc),_0x9513e9(0x1fe)],'Density':['kg/m³',_0x9513e9(0x1c4),'g/cm³',_0x9513e9(0x1e3),'lbm/ft³',_0x9513e9(0x1c9)]},this['unitConversion']={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':o,'ft':n},'Mass':{'kg':0x1,'g':0.001,'lbm':s},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':c,'mm\x20HG':a,'cm\x20HG':a*0xa,'in\x20HG':a*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':o*0x3e8*9.80665,'psf':s*9.80665/Math[_0x9513e9(0x1ef)](n,0x2),'psi':s*9.80665/Math[_0x9513e9(0x1ef)](o,0x2),'ksi':s*9.80665/Math[_0x9513e9(0x1ef)](o,0x2)*0x3e8,'ksi[kip/in²]':s*9.80665/Math[_0x9513e9(0x1ef)](o,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0x9513e9(0x1ef)](0.01,0x3),'g/mm³':0x1/0x3e8/Math['pow'](0.001,0x3),'lbm/ft³':s/Math[_0x9513e9(0x1ef)](n,0x3),'lbm/in³':s/Math[_0x9513e9(0x1ef)](o,0x3)}},this[_0x9513e9(0x1d6)]();}static get[_0x1df461(0x1f0)](){const _0x1326ba=_0x1df461;return[_0x1326ba(0x1b6),_0x1326ba(0x1b5),'decimal-places'];}[_0x1df461(0x1e5)](_0x311bdc,_0x530dc6,_0x341d11){const _0x126fbe=_0x1df461;_0x311bdc===_0x126fbe(0x1b6)?this['value']=parseFloat(_0x341d11):_0x311bdc==='unit'?(this['unit']=_0x341d11,this[_0x126fbe(0x1d5)]=this[_0x126fbe(0x1e6)](_0x341d11)):_0x311bdc===_0x126fbe(0x1f1)&&(this['decimalPlaces']=parseInt(_0x341d11)||0x3),this['render']();}[_0x1df461(0x1e6)](_0x469fd7){const _0x3c2c07=_0x1df461;for(const _0x240839 in this[_0x3c2c07(0x1bf)])if(this[_0x3c2c07(0x1bf)][_0x240839][_0x3c2c07(0x1fc)](_0x469fd7))return _0x240839;return null;}[_0x1df461(0x1b1)](){const _0xb1589e=_0x1df461;this[_0xb1589e(0x1f7)]['addEventListener'](_0xb1589e(0x1d4),this[_0xb1589e(0x1dd)][_0xb1589e(0x1d9)](this)),this[_0xb1589e(0x1d6)]();}[_0x1df461(0x1b4)](){const _0x1450f7=_0x1df461;this['shadowRoot'][_0x1450f7(0x1ae)](_0x1450f7(0x1d4),this[_0x1450f7(0x1dd)][_0x1450f7(0x1d9)](this));}['handleArrowClick'](_0x22f153){const _0x2610e9=_0x1df461;if(_0x22f153[_0x2610e9(0x1f9)][_0x2610e9(0x1fd)](_0x2610e9(0x1d3))){const _0x574b5b=this[_0x2610e9(0x1f7)][_0x2610e9(0x1e7)](_0x2610e9(0x1f5));_0x574b5b&&(_0x574b5b[_0x2610e9(0x200)](),_0x574b5b['click']());}}[_0x1df461(0x1dd)](_0x418ce7){const _0x387f6f=_0x1df461;if(_0x418ce7[_0x387f6f(0x1f9)][_0x387f6f(0x1df)]==='SELECT'){const _0x4f46e5=_0x418ce7[_0x387f6f(0x1f9)]['value'],_0xedf0ea=this['unitConversion'][this['unitCategory']][this[_0x387f6f(0x1b5)]]/this[_0x387f6f(0x1bd)][this['unitCategory']][_0x4f46e5];this[_0x387f6f(0x1b6)]=this['value']*_0xedf0ea,this[_0x387f6f(0x1b5)]=_0x4f46e5,this[_0x387f6f(0x1d6)]();}}[_0x1df461(0x1cc)](_0xa74156){const _0x44d984=_0x1df461;return Number[_0x44d984(0x1ec)](_0xa74156)?_0xa74156['toString']():Math['floor'](_0xa74156)!==0x0?_0xa74156[_0x44d984(0x1ff)](this[_0x44d984(0x1f3)])['replace'](/0+$/,'')['replace'](/\.$/,''):_0xa74156[_0x44d984(0x1fa)](0x3);}[_0x1df461(0x1d6)](){const _0x313fb2=_0x1df461;this['shadowRoot'][_0x313fb2(0x1bb)]=_0x313fb2(0x1cd)+this[_0x313fb2(0x1cc)](this[_0x313fb2(0x1b6)])+_0x313fb2(0x1b7)+this[_0x313fb2(0x1bf)][this[_0x313fb2(0x1d5)]]['map'](_0x4d62bc=>'<option\x20value=\x22'+_0x4d62bc+'\x22\x20'+(_0x4d62bc===this[_0x313fb2(0x1b5)]?'selected':'')+_0x313fb2(0x1eb)+_0x4d62bc+_0x313fb2(0x1f8))[_0x313fb2(0x1cf)]('')+_0x313fb2(0x1de)+this['e3dLogoUrl']+_0x313fb2(0x1b2);const _0x3fefb8=this['shadowRoot']['querySelector'](_0x313fb2(0x1d3)),_0x11ba32=this[_0x313fb2(0x1f7)][_0x313fb2(0x1c8)]('.tooltip')[0x0];_0x3fefb8[_0x313fb2(0x1e2)]('mouseover',()=>{const _0x18adad=_0x313fb2;this[_0x18adad(0x1d2)]=setTimeout(()=>{const _0x5665cf=_0x18adad;_0x11ba32[_0x5665cf(0x1c0)][_0x5665cf(0x1cb)]=_0x5665cf(0x1e4);},0x3e8);}),_0x3fefb8[_0x313fb2(0x1e2)](_0x313fb2(0x1d0),()=>{const _0x5df9fc=_0x313fb2;setTimeout(()=>{const _0x330c34=_0x338d;_0x11ba32[_0x330c34(0x1c0)][_0x330c34(0x1cb)]=_0x330c34(0x1ed);},0x3e8),clearTimeout(this[_0x5df9fc(0x1d2)]);}),_0x11ba32['addEventListener'](_0x313fb2(0x1d0),()=>{setTimeout(()=>{const _0x5639f7=_0x338d;_0x11ba32[_0x5639f7(0x1c0)][_0x5639f7(0x1cb)]=_0x5639f7(0x1ed);},0x3e8);});}}customElements[_0x1df461(0x1f6)]('physical-quantity',r);class h extends r{}customElements[_0x1df461(0x1f6)](_0x1df461(0x1f2),h);
1
+ const _0x4fd7ec=_0x1b6d;(function(_0x3fbde2,_0x199991){const _0xbdd86b=_0x1b6d,_0x3f11ad=_0x3fbde2();while(!![]){try{const _0x56a199=-parseInt(_0xbdd86b(0xae))/0x1*(-parseInt(_0xbdd86b(0x91))/0x2)+parseInt(_0xbdd86b(0x7c))/0x3+-parseInt(_0xbdd86b(0xb2))/0x4*(-parseInt(_0xbdd86b(0x8b))/0x5)+-parseInt(_0xbdd86b(0x81))/0x6+-parseInt(_0xbdd86b(0x75))/0x7+-parseInt(_0xbdd86b(0xb5))/0x8+parseInt(_0xbdd86b(0xbb))/0x9*(-parseInt(_0xbdd86b(0x80))/0xa);if(_0x56a199===_0x199991)break;else _0x3f11ad['push'](_0x3f11ad['shift']());}catch(_0x40fb3b){_0x3f11ad['push'](_0x3f11ad['shift']());}}}(_0x182e,0xb7833));const s=0.45359237,o=25.4/0x3e8,n=0xc*o,c=0x18bcd,a=133.322387415;class r extends HTMLElement{constructor(){const _0xbce791=_0x1b6d;super(),this['attachShadow']({'mode':_0xbce791(0xa8)}),this['value']=0x0,this[_0xbce791(0x82)]='mm',this[_0xbce791(0x7a)]=_0xbce791(0x72),this[_0xbce791(0x92)]=null,this['decimalPlaces']=0x3,this[_0xbce791(0xa6)]='https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492',this[_0xbce791(0xac)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0xbce791(0x97)],'Pressure':['Pa',_0xbce791(0x8e),_0xbce791(0xa9),'GPa',_0xbce791(0x73),_0xbce791(0x6e),_0xbce791(0x89),'mm\x20HG',_0xbce791(0x6f),_0xbce791(0x9e),_0xbce791(0x71),'m\x20W.C.','in\x20W.C.',_0xbce791(0xad),_0xbce791(0x79),_0xbce791(0xab),_0xbce791(0xbc)],'Density':[_0xbce791(0x90),_0xbce791(0x6a),_0xbce791(0x95),_0xbce791(0xbd),'lbm/ft³','lbm/in³'],'Time':[_0xbce791(0x99),'s',_0xbce791(0xa2),'h',_0xbce791(0xa4),_0xbce791(0x98),'week'],'ElectricalCurrent':['A','Ampere[amp]','mA','µA','kA','MA',_0xbce791(0xa5)]},this[_0xbce791(0x77)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':o,'ft':n},'Mass':{'kg':0x1,'g':0.001,'lbm':s},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':c,'mm\x20HG':a,'cm\x20HG':a*0xa,'in\x20HG':a*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':o*0x3e8*9.80665,'psf':s*9.80665/Math['pow'](n,0x2),'psi':s*9.80665/Math['pow'](o,0x2),'ksi':s*9.80665/Math[_0xbce791(0x87)](o,0x2)*0x3e8,'ksi[kip/in²]':s*9.80665/Math[_0xbce791(0x87)](o,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0xbce791(0x87)](0.01,0x3),'g/mm³':0x1/0x3e8/Math[_0xbce791(0x87)](0.001,0x3),'lbm/ft³':s/Math[_0xbce791(0x87)](n,0x3),'lbm/in³':s/Math[_0xbce791(0x87)](o,0x3)},'Time':{'s[second]':0x1,'s':0x1,'minute':0x3c,'h':0xe10,'h[hour]':0xe10,'day':0xe10*0x18,'week':0xe10*0x18*0x7},'ElectricalCurrent':{'A':0x1,'Ampere[amp]':0x1,'mA':0.001,'µA':0.000001,'kA':0x3e8,'MA':0xf4240,'esu/s':0x1/0xb2d05e00}},this['render']();}static get['observedAttributes'](){const _0x47429e=_0x1b6d;return[_0x47429e(0x88),'unit',_0x47429e(0xb0)];}['attributeChangedCallback'](_0x4047e5,_0xbe338d,_0x48d991){const _0x5cc497=_0x1b6d;_0x4047e5===_0x5cc497(0x88)?this['value']=parseFloat(_0x48d991):_0x4047e5===_0x5cc497(0x82)?(this[_0x5cc497(0x82)]=_0x48d991,this[_0x5cc497(0x7a)]=this['getUnitCategory'](_0x48d991)):_0x4047e5==='decimal-places'&&(this['decimalPlaces']=parseInt(_0x48d991)||0x3),this['render']();}[_0x4fd7ec(0xb3)](_0x4a7478){const _0x44e3a6=_0x4fd7ec;for(const _0x8ec474 in this[_0x44e3a6(0xac)])if(this['units'][_0x8ec474][_0x44e3a6(0x8a)](_0x4a7478))return _0x8ec474;return null;}[_0x4fd7ec(0x6b)](){const _0x5ee318=_0x4fd7ec;this[_0x5ee318(0x9f)]['addEventListener'](_0x5ee318(0x6c),this[_0x5ee318(0x7d)][_0x5ee318(0x7e)](this)),this[_0x5ee318(0xb6)]();}[_0x4fd7ec(0xba)](){const _0x483598=_0x4fd7ec;this[_0x483598(0x9f)][_0x483598(0x7f)](_0x483598(0x6c),this['handleUnitChange'][_0x483598(0x7e)](this));}[_0x4fd7ec(0x8c)](_0x3a510f){const _0x46fcd4=_0x4fd7ec;if(_0x3a510f['target'][_0x46fcd4(0x7b)](_0x46fcd4(0x70))){const _0x18d6d6=this[_0x46fcd4(0x9f)][_0x46fcd4(0x85)]('select');_0x18d6d6&&(_0x18d6d6[_0x46fcd4(0xa1)](),_0x18d6d6[_0x46fcd4(0xaf)]());}}['handleUnitChange'](_0x12f77b){const _0x466b4d=_0x4fd7ec;if(_0x12f77b[_0x466b4d(0x8d)]['tagName']===_0x466b4d(0x83)){const _0x33ac3f=_0x12f77b[_0x466b4d(0x8d)]['value'],_0x31f6cd=this[_0x466b4d(0x77)][this['unitCategory']][this['unit']]/this[_0x466b4d(0x77)][this[_0x466b4d(0x7a)]][_0x33ac3f];this['value']=this['value']*_0x31f6cd,this[_0x466b4d(0x82)]=_0x33ac3f,this['render']();}}['formatValue'](_0x1bc8cc){const _0x1a8d71=_0x4fd7ec;return Number[_0x1a8d71(0xbe)](_0x1bc8cc)?_0x1bc8cc[_0x1a8d71(0xb7)]():Math[_0x1a8d71(0x74)](_0x1bc8cc)!==0x0?_0x1bc8cc[_0x1a8d71(0xa3)](this['decimalPlaces'])['replace'](/0+$/,'')['replace'](/\.$/,''):_0x1bc8cc['toPrecision'](0x3);}[_0x4fd7ec(0xb6)](){const _0x1d0dfc=_0x4fd7ec;this['shadowRoot'][_0x1d0dfc(0xb1)]=_0x1d0dfc(0x9b)+this[_0x1d0dfc(0x78)](this[_0x1d0dfc(0x88)])+_0x1d0dfc(0x76)+this[_0x1d0dfc(0xac)][this[_0x1d0dfc(0x7a)]][_0x1d0dfc(0x96)](_0x976724=>'<option\x20value=\x22'+_0x976724+'\x22\x20'+(_0x976724===this[_0x1d0dfc(0x82)]?_0x1d0dfc(0x6d):'')+_0x1d0dfc(0xb4)+_0x976724+'</option>')[_0x1d0dfc(0xb8)]('')+_0x1d0dfc(0xa7)+this[_0x1d0dfc(0xa6)]+_0x1d0dfc(0x84);const _0x552928=this[_0x1d0dfc(0x9f)][_0x1d0dfc(0x85)](_0x1d0dfc(0x70)),_0x382205=this['shadowRoot']['querySelectorAll']('.tooltip')[0x0];_0x552928[_0x1d0dfc(0xb9)](_0x1d0dfc(0xa0),()=>{const _0x5269dd=_0x1d0dfc;this[_0x5269dd(0x92)]=setTimeout(()=>{const _0x1d7add=_0x5269dd;_0x382205[_0x1d7add(0x9c)]['display']=_0x1d7add(0x86);},0x3e8);}),_0x552928[_0x1d0dfc(0xb9)]('mouseout',()=>{setTimeout(()=>{const _0x576516=_0x1b6d;_0x382205[_0x576516(0x9c)][_0x576516(0x8f)]=_0x576516(0x9a);},0x7d0),clearTimeout(this['tooltipTimeout']);}),_0x382205['addEventListener'](_0x1d0dfc(0xaa),()=>{setTimeout(()=>{const _0x56a795=_0x1b6d;_0x382205[_0x56a795(0x9c)]['display']=_0x56a795(0x9a);},0x7d0);});}}customElements[_0x4fd7ec(0x94)](_0x4fd7ec(0x9d),r);function _0x1b6d(_0x1906bf,_0x2f6ee7){const _0x182e48=_0x182e();return _0x1b6d=function(_0x1b6dbe,_0x25bad8){_0x1b6dbe=_0x1b6dbe-0x6a;let _0x362035=_0x182e48[_0x1b6dbe];return _0x362035;},_0x1b6d(_0x1906bf,_0x2f6ee7);}class m extends r{}customElements[_0x4fd7ec(0x94)](_0x4fd7ec(0x93),m);export{r as default};function _0x182e(){const _0x563983=['define','g/cm³','map','lbm','day','s[second]','none','\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>','style','physical-quantity','in\x20HG','shadowRoot','mouseover','focus','minute','toFixed','h[hour]','esu/s','e3dLogoUrl','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/daily-calculations/unit-converter.html\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Unit\x20Converter\x20for\x20All\x20Categories\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','open','MPa','mouseout','ksi','units','psf','46vBXVcc','click','decimal-places','innerHTML','8LdCFxq','getUnitCategory','>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4777032PBuUCB','render','toString','join','addEventListener','disconnectedCallback','117siuMjv','ksi[kip/in²]','g/mm³','isInteger','kg/L','connectedCallback','change','selected','mbar','cm\x20HG','.unit-container','mm\x20W.C.','Length','bar','floor','6469785WFDLBL','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unitConversion','formatValue','psi','unitCategory','closest','3797292KMIQxD','handleUnitChange','bind','removeEventListener','132960rQpBoP','1862586Cgvbrj','unit','SELECT','\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','querySelector','block','pow','value','atm','includes','840835YEedRb','handleArrowClick','target','kPa','display','kg/m³','50184wDRjPa','tooltipTimeout','uc-qty'];_0x182e=function(){return _0x563983;};return _0x182e();}
package/dist/pq.umd.js CHANGED
@@ -1 +1 @@
1
- function _0x5594(_0x2fdfb1,_0x287d37){const _0xddf3e5=_0xddf3();return _0x5594=function(_0x5594ee,_0x2dac99){_0x5594ee=_0x5594ee-0x18f;let _0x21454f=_0xddf3e5[_0x5594ee];return _0x21454f;},_0x5594(_0x2fdfb1,_0x287d37);}(function(_0x5af819,_0xa6293a){const _0x3cde88=_0x5594,_0x5b2fbd=_0x5af819();while(!![]){try{const _0x429cbb=parseInt(_0x3cde88(0x1b2))/0x1*(parseInt(_0x3cde88(0x1e3))/0x2)+parseInt(_0x3cde88(0x1b8))/0x3+parseInt(_0x3cde88(0x1c1))/0x4*(-parseInt(_0x3cde88(0x1e1))/0x5)+parseInt(_0x3cde88(0x1bb))/0x6*(-parseInt(_0x3cde88(0x1e8))/0x7)+parseInt(_0x3cde88(0x1bf))/0x8+-parseInt(_0x3cde88(0x193))/0x9*(parseInt(_0x3cde88(0x1c9))/0xa)+-parseInt(_0x3cde88(0x1ba))/0xb*(-parseInt(_0x3cde88(0x1dc))/0xc);if(_0x429cbb===_0xa6293a)break;else _0x5b2fbd['push'](_0x5b2fbd['shift']());}catch(_0x53496f){_0x5b2fbd['push'](_0x5b2fbd['shift']());}}}(_0xddf3,0x7fed9),function(_0x33f870){const _0x5c52e5=_0x5594;typeof define==_0x5c52e5(0x198)&&define[_0x5c52e5(0x1c7)]?define(_0x33f870):_0x33f870();}(function(){'use strict';const _0x406ae4=_0x5594;const _0x2c5a78=0.45359237,_0x4eaaf9=25.4/0x3e8,_0x4660ab=0xc*_0x4eaaf9,_0x161bfa=0x18bcd,_0x5ae5f4=133.322387415;class _0x1e6783 extends HTMLElement{constructor(){const _0x49b087=_0x5594;super(),this[_0x49b087(0x1da)]({'mode':_0x49b087(0x1d7)}),this[_0x49b087(0x1e6)]=0x0,this['unit']='mm',this[_0x49b087(0x19d)]='Length',this[_0x49b087(0x1de)]=null,this[_0x49b087(0x1be)]=0x3,this[_0x49b087(0x190)]=_0x49b087(0x1b3),this[_0x49b087(0x1d4)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg','lbm'],'Pressure':['Pa',_0x49b087(0x1af),_0x49b087(0x1cd),_0x49b087(0x1b9),_0x49b087(0x197),_0x49b087(0x1cc),'atm',_0x49b087(0x1e0),_0x49b087(0x1d0),_0x49b087(0x1a0),'mm\x20W.C.',_0x49b087(0x1a5),_0x49b087(0x1c3),_0x49b087(0x1e2),'psi',_0x49b087(0x1df),_0x49b087(0x1a3)],'Density':[_0x49b087(0x19b),_0x49b087(0x1a8),_0x49b087(0x1aa),_0x49b087(0x192),_0x49b087(0x1d8),_0x49b087(0x1dd)]},this[_0x49b087(0x1b6)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':_0x4eaaf9,'ft':_0x4660ab},'Mass':{'kg':0x1,'g':0.001,'lbm':_0x2c5a78},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':_0x161bfa,'mm\x20HG':_0x5ae5f4,'cm\x20HG':_0x5ae5f4*0xa,'in\x20HG':_0x5ae5f4*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':_0x4eaaf9*0x3e8*9.80665,'psf':_0x2c5a78*9.80665/Math[_0x49b087(0x1ad)](_0x4660ab,0x2),'psi':_0x2c5a78*9.80665/Math['pow'](_0x4eaaf9,0x2),'ksi':_0x2c5a78*9.80665/Math[_0x49b087(0x1ad)](_0x4eaaf9,0x2)*0x3e8,'ksi[kip/in²]':_0x2c5a78*9.80665/Math['pow'](_0x4eaaf9,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math['pow'](0.01,0x3),'g/mm³':0x1/0x3e8/Math['pow'](0.001,0x3),'lbm/ft³':_0x2c5a78/Math['pow'](_0x4660ab,0x3),'lbm/in³':_0x2c5a78/Math[_0x49b087(0x1ad)](_0x4eaaf9,0x3)}},this['render']();}static get[_0x406ae4(0x1b4)](){const _0x5236f5=_0x406ae4;return[_0x5236f5(0x1e6),_0x5236f5(0x19a),_0x5236f5(0x199)];}[_0x406ae4(0x1bc)](_0x3f9129,_0x4788a7,_0x5b0287){const _0x5d020d=_0x406ae4;_0x3f9129===_0x5d020d(0x1e6)?this['value']=parseFloat(_0x5b0287):_0x3f9129==='unit'?(this[_0x5d020d(0x19a)]=_0x5b0287,this[_0x5d020d(0x19d)]=this['getUnitCategory'](_0x5b0287)):_0x3f9129===_0x5d020d(0x199)&&(this[_0x5d020d(0x1be)]=parseInt(_0x5b0287)||0x3),this[_0x5d020d(0x1d1)]();}[_0x406ae4(0x191)](_0x190f02){const _0x2280c5=_0x406ae4;for(const _0x38fa80 in this[_0x2280c5(0x1d4)])if(this[_0x2280c5(0x1d4)][_0x38fa80][_0x2280c5(0x1bd)](_0x190f02))return _0x38fa80;return null;}[_0x406ae4(0x1d5)](){const _0xed4911=_0x406ae4;this[_0xed4911(0x196)]['addEventListener'](_0xed4911(0x1e5),this['handleUnitChange'][_0xed4911(0x1a9)](this)),this[_0xed4911(0x1d1)]();}[_0x406ae4(0x19f)](){const _0x4e2cd2=_0x406ae4;this[_0x4e2cd2(0x196)][_0x4e2cd2(0x1ab)]('change',this[_0x4e2cd2(0x195)][_0x4e2cd2(0x1a9)](this));}[_0x406ae4(0x1a1)](_0x5d1caf){const _0x9b8815=_0x406ae4;if(_0x5d1caf['target']['closest'](_0x9b8815(0x1ae))){const _0x2a1c1f=this[_0x9b8815(0x196)][_0x9b8815(0x1b0)](_0x9b8815(0x1d2));_0x2a1c1f&&(_0x2a1c1f['focus'](),_0x2a1c1f['click']());}}[_0x406ae4(0x195)](_0x98c1a8){const _0x90427e=_0x406ae4;if(_0x98c1a8[_0x90427e(0x1e7)][_0x90427e(0x1ca)]==='SELECT'){const _0x3bfb88=_0x98c1a8[_0x90427e(0x1e7)][_0x90427e(0x1e6)],_0x2b6ac1=this[_0x90427e(0x1b6)][this['unitCategory']][this[_0x90427e(0x19a)]]/this[_0x90427e(0x1b6)][this['unitCategory']][_0x3bfb88];this[_0x90427e(0x1e6)]=this[_0x90427e(0x1e6)]*_0x2b6ac1,this[_0x90427e(0x19a)]=_0x3bfb88,this['render']();}}[_0x406ae4(0x1db)](_0x24f9c1){const _0x235fa7=_0x406ae4;return Number[_0x235fa7(0x1a4)](_0x24f9c1)?_0x24f9c1[_0x235fa7(0x1d3)]():Math[_0x235fa7(0x1c2)](_0x24f9c1)!==0x0?_0x24f9c1[_0x235fa7(0x18f)](this[_0x235fa7(0x1be)])[_0x235fa7(0x19e)](/0+$/,'')[_0x235fa7(0x19e)](/\.$/,''):_0x24f9c1[_0x235fa7(0x1a6)](0x3);}[_0x406ae4(0x1d1)](){const _0x5b6aaa=_0x406ae4;this[_0x5b6aaa(0x196)]['innerHTML']=_0x5b6aaa(0x1a2)+this[_0x5b6aaa(0x1db)](this[_0x5b6aaa(0x1e6)])+_0x5b6aaa(0x1b7)+this[_0x5b6aaa(0x1d4)][this[_0x5b6aaa(0x19d)]][_0x5b6aaa(0x1e9)](_0xaf4f3d=>_0x5b6aaa(0x1b5)+_0xaf4f3d+'\x22\x20'+(_0xaf4f3d===this[_0x5b6aaa(0x19a)]?_0x5b6aaa(0x1cb):'')+_0x5b6aaa(0x1c6)+_0xaf4f3d+_0x5b6aaa(0x1ce))[_0x5b6aaa(0x19c)]('')+_0x5b6aaa(0x1c0)+this['e3dLogoUrl']+_0x5b6aaa(0x1ac);const _0x1e332a=this[_0x5b6aaa(0x196)][_0x5b6aaa(0x1b0)](_0x5b6aaa(0x1ae)),_0x5e6d35=this[_0x5b6aaa(0x196)][_0x5b6aaa(0x1c5)](_0x5b6aaa(0x194))[0x0];_0x1e332a[_0x5b6aaa(0x1c4)](_0x5b6aaa(0x1b1),()=>{this['tooltipTimeout']=setTimeout(()=>{const _0x47303c=_0x5594;_0x5e6d35[_0x47303c(0x1c8)][_0x47303c(0x1e4)]=_0x47303c(0x1d6);},0x3e8);}),_0x1e332a['addEventListener']('mouseout',()=>{setTimeout(()=>{const _0x524eb8=_0x5594;_0x5e6d35[_0x524eb8(0x1c8)][_0x524eb8(0x1e4)]='none';},0x3e8),clearTimeout(this['tooltipTimeout']);}),_0x5e6d35[_0x5b6aaa(0x1c4)]('mouseout',()=>{setTimeout(()=>{const _0x572be8=_0x5594;_0x5e6d35[_0x572be8(0x1c8)][_0x572be8(0x1e4)]=_0x572be8(0x1cf);},0x3e8);});}}customElements[_0x406ae4(0x1d9)]('physical-quantity',_0x1e6783);class _0x4cc7df extends _0x1e6783{}customElements['define'](_0x406ae4(0x1a7),_0x4cc7df);}));function _0xddf3(){const _0x588241=['getUnitCategory','g/mm³','666NsoRpO','.tooltip','handleUnitChange','shadowRoot','bar','function','decimal-places','unit','kg/m³','join','unitCategory','replace','disconnectedCallback','in\x20HG','handleArrowClick','\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>','ksi[kip/in²]','isInteger','m\x20W.C.','toPrecision','uc-qty','kg/L','bind','g/cm³','removeEventListener','\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','pow','.unit-container','kPa','querySelector','mouseover','6990wsbRrL','https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492','observedAttributes','<option\x20value=\x22','unitConversion','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1868178XlunYr','GPa','552266XgwrOt','2258184DubyPr','attributeChangedCallback','includes','decimalPlaces','5851792UKQXSH','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','22412kVvdyQ','floor','in\x20W.C.','addEventListener','querySelectorAll','>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','amd','style','9820qsFEAP','tagName','selected','mbar','MPa','</option>','none','cm\x20HG','render','select','toString','units','connectedCallback','block','open','lbm/ft³','define','attachShadow','formatValue','24JryJvO','lbm/in³','tooltipTimeout','ksi','mm\x20HG','805SJnUAs','psf','228YhDVKh','display','change','value','target','14cAnVZi','map','toFixed','e3dLogoUrl'];_0xddf3=function(){return _0x588241;};return _0xddf3();}
1
+ function _0x34e1(_0x2fb2b6,_0x4ada79){const _0x1c2b5b=_0x1c2b();return _0x34e1=function(_0x34e1b5,_0x144c49){_0x34e1b5=_0x34e1b5-0xe8;let _0x3258bf=_0x1c2b5b[_0x34e1b5];return _0x3258bf;},_0x34e1(_0x2fb2b6,_0x4ada79);}function _0x1c2b(){const _0x1ec738=['shadowRoot','display','includes','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22unit-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','addEventListener','toString','in\x20W.C.','973qAvxkG','g/cm³','amd','attachShadow','minute','lbm','disconnectedCallback','esu/s','s[second]','replace','GPa','decimal-places','\x0a\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20:host\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-block;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.quantity\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.value\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-left:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin-right:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.unit-container\x20select\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background-color:\x20lightgray;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200.25em;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cursor:\x20pointer;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottom:\x2075%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20left:\x2085%;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20translateX(-50%);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20background-color:\x20#f5f5f5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20border-radius:\x204px;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-size:\x2012px;\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20blue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20.tooltip\x20a:hover\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22quantity\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22value\x22\x20style=\x22position:\x20relative;\x22>','<option\x20value=\x22','https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/shared%2Fassets%2Fimages%2Fe3d-logo2.png?alt=media&token=7064f466-6168-4b8a-b921-4e86115cb492','render','click','style','tooltipTimeout','handleArrowClick','e3dLogoUrl','select','411770llglws','4797051muDyfj','mouseout','kPa','open','MPa','5218670mbiJIn','decimalPlaces','observedAttributes','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</select>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20class=\x22tooltip\x22\x20href=\x22https://v2-docs.donwen.com/daily-calculations/unit-converter.html\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20title=\x22Unit\x20Converter\x20for\x20All\x20Categories\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22','bind','toPrecision','3082390Shugiw','focus','querySelector','m\x20W.C.','Length','none','43784yZTRdY','646697RxUbZd','g/mm³','mbar','formatValue','querySelectorAll','selected','atm','36gIUMNo','removeEventListener','day','bar','units','innerHTML','define','value','unitCategory','closest','Ampere[amp]','.unit-container','unitConversion','change','week','attributeChangedCallback','block','tagName','join','6mMiXUb','map','pow','floor','toFixed','handleUnitChange','function','connectedCallback','unit','3855200KFBIOZ','object','PhysicalQuantity','target','psf','in\x20HG','lbm/ft³'];_0x1c2b=function(){return _0x1ec738;};return _0x1c2b();}(function(_0x481959,_0x5301d1){const _0x168898=_0x34e1,_0x4a007a=_0x481959();while(!![]){try{const _0x5131e0=parseInt(_0x168898(0xf6))/0x1+parseInt(_0x168898(0x13d))/0x2+parseInt(_0x168898(0x13e))/0x3+-parseInt(_0x168898(0x119))/0x4+-parseInt(_0x168898(0xe9))/0x5*(parseInt(_0x168898(0x110))/0x6)+parseInt(_0x168898(0x127))/0x7*(-parseInt(_0x168898(0xf5))/0x8)+parseInt(_0x168898(0xfd))/0x9*(parseInt(_0x168898(0xef))/0xa);if(_0x5131e0===_0x5301d1)break;else _0x4a007a['push'](_0x4a007a['shift']());}catch(_0x349a9){_0x4a007a['push'](_0x4a007a['shift']());}}}(_0x1c2b,0xdfb32),function(_0x3d707b,_0x5809f2){const _0x114ff0=_0x34e1;typeof exports==_0x114ff0(0x11a)&&typeof module<'u'?module['exports']=_0x5809f2():typeof define==_0x114ff0(0x116)&&define[_0x114ff0(0x129)]?define(_0x5809f2):(_0x3d707b=typeof globalThis<'u'?globalThis:_0x3d707b||self,_0x3d707b[_0x114ff0(0x11b)]=_0x5809f2());}(this,function(){'use strict';const _0x31bf6f=_0x34e1;const _0x235a09=0.45359237,_0x570759=25.4/0x3e8,_0x58de78=0xc*_0x570759,_0x5b6f10=0x18bcd,_0x344972=133.322387415;class _0x183773 extends HTMLElement{constructor(){const _0x42af98=_0x34e1;super(),this[_0x42af98(0x12a)]({'mode':_0x42af98(0x141)}),this[_0x42af98(0x104)]=0x0,this[_0x42af98(0x118)]='mm',this[_0x42af98(0x105)]=_0x42af98(0xf3),this['tooltipTimeout']=null,this[_0x42af98(0xea)]=0x3,this['e3dLogoUrl']=_0x42af98(0x135),this[_0x42af98(0x101)]={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0x42af98(0x12c)],'Pressure':['Pa',_0x42af98(0x140),_0x42af98(0xe8),_0x42af98(0x131),_0x42af98(0x100),_0x42af98(0xf8),_0x42af98(0xfc),'mm\x20HG','cm\x20HG',_0x42af98(0x11e),'mm\x20W.C.',_0x42af98(0xf2),_0x42af98(0x126),_0x42af98(0x11d),'psi','ksi','ksi[kip/in²]'],'Density':['kg/m³','kg/L',_0x42af98(0x128),_0x42af98(0xf7),_0x42af98(0x11f),'lbm/in³'],'Time':[_0x42af98(0x12f),'s',_0x42af98(0x12b),'h','h[hour]',_0x42af98(0xff),_0x42af98(0x10b)],'ElectricalCurrent':['A',_0x42af98(0x107),'mA','µA','kA','MA',_0x42af98(0x12e)]},this[_0x42af98(0x109)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':_0x570759,'ft':_0x58de78},'Mass':{'kg':0x1,'g':0.001,'lbm':_0x235a09},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':_0x5b6f10,'mm\x20HG':_0x344972,'cm\x20HG':_0x344972*0xa,'in\x20HG':_0x344972*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':_0x570759*0x3e8*9.80665,'psf':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x58de78,0x2),'psi':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x570759,0x2),'ksi':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x570759,0x2)*0x3e8,'ksi[kip/in²]':_0x235a09*9.80665/Math[_0x42af98(0x112)](_0x570759,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0x42af98(0x112)](0.01,0x3),'g/mm³':0x1/0x3e8/Math[_0x42af98(0x112)](0.001,0x3),'lbm/ft³':_0x235a09/Math['pow'](_0x58de78,0x3),'lbm/in³':_0x235a09/Math[_0x42af98(0x112)](_0x570759,0x3)},'Time':{'s[second]':0x1,'s':0x1,'minute':0x3c,'h':0xe10,'h[hour]':0xe10,'day':0xe10*0x18,'week':0xe10*0x18*0x7},'ElectricalCurrent':{'A':0x1,'Ampere[amp]':0x1,'mA':0.001,'µA':0.000001,'kA':0x3e8,'MA':0xf4240,'esu/s':0x1/0xb2d05e00}},this[_0x42af98(0x136)]();}static get[_0x31bf6f(0xeb)](){const _0x112392=_0x31bf6f;return[_0x112392(0x104),'unit',_0x112392(0x132)];}[_0x31bf6f(0x10c)](_0x56f047,_0x2018a5,_0x3270c1){const _0x2859e2=_0x31bf6f;_0x56f047===_0x2859e2(0x104)?this['value']=parseFloat(_0x3270c1):_0x56f047==='unit'?(this[_0x2859e2(0x118)]=_0x3270c1,this[_0x2859e2(0x105)]=this['getUnitCategory'](_0x3270c1)):_0x56f047==='decimal-places'&&(this['decimalPlaces']=parseInt(_0x3270c1)||0x3),this[_0x2859e2(0x136)]();}['getUnitCategory'](_0xb5e736){const _0x3cbdd7=_0x31bf6f;for(const _0x29b5d9 in this[_0x3cbdd7(0x101)])if(this[_0x3cbdd7(0x101)][_0x29b5d9][_0x3cbdd7(0x122)](_0xb5e736))return _0x29b5d9;return null;}[_0x31bf6f(0x117)](){const _0x536de5=_0x31bf6f;this['shadowRoot'][_0x536de5(0x124)]('change',this['handleUnitChange']['bind'](this)),this[_0x536de5(0x136)]();}[_0x31bf6f(0x12d)](){const _0xa3c4e6=_0x31bf6f;this[_0xa3c4e6(0x120)][_0xa3c4e6(0xfe)](_0xa3c4e6(0x10a),this[_0xa3c4e6(0x115)][_0xa3c4e6(0xed)](this));}[_0x31bf6f(0x13a)](_0x140b15){const _0x389778=_0x31bf6f;if(_0x140b15['target'][_0x389778(0x106)](_0x389778(0x108))){const _0x223cc7=this[_0x389778(0x120)][_0x389778(0xf1)](_0x389778(0x13c));_0x223cc7&&(_0x223cc7[_0x389778(0xf0)](),_0x223cc7[_0x389778(0x137)]());}}['handleUnitChange'](_0xf8a45a){const _0x45c223=_0x31bf6f;if(_0xf8a45a[_0x45c223(0x11c)][_0x45c223(0x10e)]==='SELECT'){const _0x11def9=_0xf8a45a[_0x45c223(0x11c)][_0x45c223(0x104)],_0x17e89f=this[_0x45c223(0x109)][this[_0x45c223(0x105)]][this[_0x45c223(0x118)]]/this[_0x45c223(0x109)][this[_0x45c223(0x105)]][_0x11def9];this['value']=this['value']*_0x17e89f,this[_0x45c223(0x118)]=_0x11def9,this[_0x45c223(0x136)]();}}[_0x31bf6f(0xf9)](_0x206c93){const _0x2ceb0c=_0x31bf6f;return Number['isInteger'](_0x206c93)?_0x206c93[_0x2ceb0c(0x125)]():Math[_0x2ceb0c(0x113)](_0x206c93)!==0x0?_0x206c93[_0x2ceb0c(0x114)](this['decimalPlaces'])[_0x2ceb0c(0x130)](/0+$/,'')[_0x2ceb0c(0x130)](/\.$/,''):_0x206c93[_0x2ceb0c(0xee)](0x3);}[_0x31bf6f(0x136)](){const _0x4a3914=_0x31bf6f;this[_0x4a3914(0x120)][_0x4a3914(0x102)]=_0x4a3914(0x133)+this[_0x4a3914(0xf9)](this[_0x4a3914(0x104)])+_0x4a3914(0x123)+this[_0x4a3914(0x101)][this['unitCategory']][_0x4a3914(0x111)](_0x423dcc=>_0x4a3914(0x134)+_0x423dcc+'\x22\x20'+(_0x423dcc===this[_0x4a3914(0x118)]?_0x4a3914(0xfb):'')+'>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x423dcc+'</option>')[_0x4a3914(0x10f)]('')+_0x4a3914(0xec)+this[_0x4a3914(0x13b)]+'\x22\x20width=\x2212\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</a>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20</div>\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20';const _0x18d2ca=this['shadowRoot'][_0x4a3914(0xf1)](_0x4a3914(0x108)),_0x4c514c=this[_0x4a3914(0x120)][_0x4a3914(0xfa)]('.tooltip')[0x0];_0x18d2ca['addEventListener']('mouseover',()=>{const _0x3e423f=_0x4a3914;this[_0x3e423f(0x139)]=setTimeout(()=>{const _0x148602=_0x3e423f;_0x4c514c[_0x148602(0x138)][_0x148602(0x121)]=_0x148602(0x10d);},0x3e8);}),_0x18d2ca[_0x4a3914(0x124)](_0x4a3914(0x13f),()=>{setTimeout(()=>{const _0x3f59df=_0x34e1;_0x4c514c['style'][_0x3f59df(0x121)]=_0x3f59df(0xf4);},0x7d0),clearTimeout(this['tooltipTimeout']);}),_0x4c514c['addEventListener'](_0x4a3914(0x13f),()=>{setTimeout(()=>{const _0x51ef7a=_0x34e1;_0x4c514c[_0x51ef7a(0x138)]['display']=_0x51ef7a(0xf4);},0x7d0);});}}customElements['define']('physical-quantity',_0x183773);class _0x101b8c extends _0x183773{}return customElements[_0x31bf6f(0x103)]('uc-qty',_0x101b8c),_0x183773;}));
package/package.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "name": "physical-quantity",
3
- "version": "1.1.25",
3
+ "version": "1.1.29",
4
4
  "description": "A web component to represent a physical quantity with unit conversion.",
5
- "main": "./pq.js",
6
- "module": "./pq.js",
5
+ "main": "dist/pq.umd.js",
6
+ "module": "dist/pq.es.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/pq.es.js",
10
+ "require": "./dist/pq.umd.js"
11
+ }
12
+ },
7
13
  "files": [
8
14
  "dist/"
9
15
  ],
@@ -15,7 +21,9 @@
15
21
  },
16
22
  "keywords": [
17
23
  "web-component",
18
- "physical-quantity"
24
+ "physical-quantity",
25
+ "unit conversion",
26
+ "unit converter"
19
27
  ],
20
28
  "author": "E3d - Don Wen <don.wen@yahoo.com>",
21
29
  "license": "MIT",