physical-quantity 1.1.24 → 1.1.28
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 +32 -7
- package/dist/pq.es.js +287 -236
- package/dist/pq.umd.js +1 -352
- package/package.json +9 -3
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)
|
|
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
|

|
|
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,9 +91,9 @@ 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
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
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:
|
|
@@ -127,6 +133,22 @@ Currently, the component supports the following categories and units:
|
|
|
127
133
|
- g/mm³
|
|
128
134
|
- lbm/ft³
|
|
129
135
|
- lbm/in³
|
|
136
|
+
- Time:
|
|
137
|
+
- s[second]
|
|
138
|
+
- s
|
|
139
|
+
- minute
|
|
140
|
+
- h
|
|
141
|
+
- h[hour]
|
|
142
|
+
- day
|
|
143
|
+
- week,
|
|
144
|
+
- ElectricalCurrent:
|
|
145
|
+
- A
|
|
146
|
+
- Ampere[amp]
|
|
147
|
+
- mA
|
|
148
|
+
- µA
|
|
149
|
+
- kA
|
|
150
|
+
- MA
|
|
151
|
+
- esu/s"
|
|
130
152
|
- ... (more to update.)
|
|
131
153
|
|
|
132
154
|
## License
|
|
@@ -136,8 +158,11 @@ This project is licensed under the MIT License. See the LICENSE file for more de
|
|
|
136
158
|
Contributions are welcome! Please contact the developer for any bugs, features, or improvements.
|
|
137
159
|
|
|
138
160
|
## Change Log
|
|
139
|
-
|
|
140
|
-
|
|
161
|
+
| Version | Date | Description |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| v1.1.28 |20240610| Tooltip for unit list provides a link to the unit converter page for all unit categories. Added more categories.|
|
|
164
|
+
| v1.1.21 |20240603| Added alias uc-qty. |
|
|
165
|
+
| v1.1.19 |20240602| Changed to umd for unpkg, and es for module. |
|
|
141
166
|
|
|
142
167
|
## Contact
|
|
143
168
|
If you have any questions or feedback, feel free to contact me at don.wen@yahoo.com.
|
package/dist/pq.es.js
CHANGED
|
@@ -1,125 +1,138 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
3
|
-
return (
|
|
4
|
-
(_0x4030 = function (_0x4030be, _0x141d4c) {
|
|
5
|
-
_0x4030be = _0x4030be - 0x17c;
|
|
6
|
-
let _0x1e1738 = _0x42fcce[_0x4030be];
|
|
7
|
-
return _0x1e1738;
|
|
8
|
-
}),
|
|
9
|
-
_0x4030(_0x4ab988, _0x3106b9)
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
function _0x42fc() {
|
|
13
|
-
const _0x3b5091 = [
|
|
14
|
-
"ksi[kip/in²]",
|
|
15
|
-
"mouseout",
|
|
16
|
-
"shadowRoot",
|
|
17
|
-
"select",
|
|
18
|
-
"mbar",
|
|
19
|
-
"toPrecision",
|
|
20
|
-
"value",
|
|
21
|
-
"</option>",
|
|
22
|
-
"target",
|
|
1
|
+
function _0x1f76() {
|
|
2
|
+
const _0x102e4b = [
|
|
23
3
|
"<option\x20value=\x22",
|
|
24
4
|
"selected",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
5
|
+
"SELECT",
|
|
6
|
+
"\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>",
|
|
7
|
+
"mm\x20W.C.",
|
|
8
|
+
"MPa",
|
|
9
|
+
"e3dLogoUrl",
|
|
10
|
+
"\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",
|
|
11
|
+
"disconnectedCallback",
|
|
12
|
+
"unitCategory",
|
|
13
|
+
"toString",
|
|
14
|
+
"select",
|
|
15
|
+
"in\x20HG",
|
|
16
|
+
"getUnitCategory",
|
|
17
|
+
"lbm/in³",
|
|
18
|
+
"day",
|
|
19
|
+
"</option>",
|
|
20
|
+
"ksi",
|
|
21
|
+
"kPa",
|
|
22
|
+
"isInteger",
|
|
23
|
+
"mbar",
|
|
30
24
|
"Length",
|
|
31
|
-
"replace",
|
|
32
|
-
"addEventListener",
|
|
33
25
|
"\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",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"ksi",
|
|
37
|
-
"decimal-places",
|
|
38
|
-
"lbm/in³",
|
|
39
|
-
"kg/m³",
|
|
40
|
-
"mouseover",
|
|
41
|
-
"\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>",
|
|
42
|
-
"lbm",
|
|
26
|
+
"5586031gXaKwN",
|
|
27
|
+
"open",
|
|
43
28
|
"handleArrowClick",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
29
|
+
"toPrecision",
|
|
30
|
+
"none",
|
|
31
|
+
"m\x20W.C.",
|
|
32
|
+
"1052112JyJynC",
|
|
33
|
+
"esu/s",
|
|
34
|
+
"shadowRoot",
|
|
35
|
+
"includes",
|
|
36
|
+
"decimal-places",
|
|
37
|
+
"change",
|
|
50
38
|
"kg/L",
|
|
51
|
-
"formatValue",
|
|
52
39
|
"in\x20W.C.",
|
|
53
|
-
"
|
|
54
|
-
"tagName",
|
|
55
|
-
"230592wqBsLI",
|
|
40
|
+
"h[hour]",
|
|
56
41
|
"display",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
42
|
+
"bar",
|
|
43
|
+
"3639132yqLVJT",
|
|
44
|
+
"1662FoCryp",
|
|
45
|
+
"616eqDTxh",
|
|
46
|
+
"555BnxWir",
|
|
47
|
+
"3lSKTpX",
|
|
48
|
+
"week",
|
|
49
|
+
"lbm/ft³",
|
|
50
|
+
"define",
|
|
51
|
+
"243wuNgTe",
|
|
52
|
+
"minute",
|
|
53
|
+
"removeEventListener",
|
|
54
|
+
"pow",
|
|
55
|
+
"render",
|
|
56
|
+
"formatValue",
|
|
60
57
|
"unit",
|
|
58
|
+
"kg/m³",
|
|
59
|
+
"550qSUYFW",
|
|
60
|
+
"addEventListener",
|
|
61
|
+
"tagName",
|
|
62
|
+
"style",
|
|
63
|
+
"mouseout",
|
|
64
|
+
"tooltipTimeout",
|
|
65
|
+
"ksi[kip/in²]",
|
|
66
|
+
"lbm",
|
|
67
|
+
"bind",
|
|
68
|
+
"replace",
|
|
69
|
+
"connectedCallback",
|
|
70
|
+
"Ampere[amp]",
|
|
61
71
|
"decimalPlaces",
|
|
62
|
-
"
|
|
72
|
+
"s[second]",
|
|
63
73
|
"map",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
74
|
+
"19686ZRCLXs",
|
|
75
|
+
"g/cm³",
|
|
76
|
+
"psi",
|
|
77
|
+
"querySelector",
|
|
78
|
+
"block",
|
|
79
|
+
".unit-container",
|
|
80
|
+
"986410YDaVbP",
|
|
69
81
|
"unitConversion",
|
|
70
|
-
"
|
|
71
|
-
"pow",
|
|
82
|
+
"observedAttributes",
|
|
72
83
|
"join",
|
|
73
|
-
"
|
|
74
|
-
".tooltip",
|
|
75
|
-
"querySelectorAll",
|
|
76
|
-
"includes",
|
|
77
|
-
"toString",
|
|
78
|
-
"975366NMdCVH",
|
|
79
|
-
"1306074GsCYgw",
|
|
80
|
-
"handleUnitChange",
|
|
81
|
-
"</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",
|
|
82
|
-
"1121552UdgHOa",
|
|
83
|
-
"bar",
|
|
84
|
-
"style",
|
|
85
|
-
"tooltipTimeout",
|
|
86
|
-
"define",
|
|
87
|
-
"units",
|
|
88
|
-
"psf",
|
|
89
|
-
"unitCategory",
|
|
90
|
-
"\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.donwen.com/\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22",
|
|
91
|
-
"change",
|
|
92
|
-
"e3dLogoUrl",
|
|
84
|
+
"value",
|
|
93
85
|
"GPa",
|
|
94
|
-
"
|
|
86
|
+
"uc-qty",
|
|
87
|
+
"floor",
|
|
88
|
+
"units",
|
|
89
|
+
"target",
|
|
90
|
+
"handleUnitChange",
|
|
91
|
+
"focus",
|
|
92
|
+
"g/mm³",
|
|
93
|
+
"physical-quantity",
|
|
95
94
|
];
|
|
96
|
-
|
|
97
|
-
return
|
|
95
|
+
_0x1f76 = function () {
|
|
96
|
+
return _0x102e4b;
|
|
98
97
|
};
|
|
99
|
-
return
|
|
98
|
+
return _0x1f76();
|
|
99
|
+
}
|
|
100
|
+
const _0x4b6c41 = _0x4250;
|
|
101
|
+
function _0x4250(_0x17483a, _0x249ee0) {
|
|
102
|
+
const _0x1f76b8 = _0x1f76();
|
|
103
|
+
return (
|
|
104
|
+
(_0x4250 = function (_0x4250f4, _0x4dc54e) {
|
|
105
|
+
_0x4250f4 = _0x4250f4 - 0xfb;
|
|
106
|
+
let _0x50e178 = _0x1f76b8[_0x4250f4];
|
|
107
|
+
return _0x50e178;
|
|
108
|
+
}),
|
|
109
|
+
_0x4250(_0x17483a, _0x249ee0)
|
|
110
|
+
);
|
|
100
111
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
_0x51d612 = _0x5f14b2();
|
|
112
|
+
(function (_0x2decea, _0x2c8163) {
|
|
113
|
+
const _0x333bb7 = _0x4250,
|
|
114
|
+
_0x50ea67 = _0x2decea();
|
|
105
115
|
while (!![]) {
|
|
106
116
|
try {
|
|
107
|
-
const
|
|
108
|
-
parseInt(
|
|
109
|
-
|
|
110
|
-
(
|
|
111
|
-
(parseInt(
|
|
112
|
-
-parseInt(
|
|
113
|
-
|
|
114
|
-
parseInt(
|
|
115
|
-
-parseInt(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
const _0x257bd9 =
|
|
118
|
+
(-parseInt(_0x333bb7(0x10c)) / 0x1) *
|
|
119
|
+
(-parseInt(_0x333bb7(0xfd)) / 0x2) +
|
|
120
|
+
(parseInt(_0x333bb7(0x100)) / 0x3) *
|
|
121
|
+
(parseInt(_0x333bb7(0x14c)) / 0x4) +
|
|
122
|
+
(-parseInt(_0x333bb7(0xff)) / 0x5) *
|
|
123
|
+
(parseInt(_0x333bb7(0x11b)) / 0x6) +
|
|
124
|
+
parseInt(_0x333bb7(0xfc)) / 0x7 +
|
|
125
|
+
(-parseInt(_0x333bb7(0xfe)) / 0x8) *
|
|
126
|
+
(parseInt(_0x333bb7(0x104)) / 0x9) +
|
|
127
|
+
-parseInt(_0x333bb7(0x121)) / 0xa +
|
|
128
|
+
-parseInt(_0x333bb7(0x146)) / 0xb;
|
|
129
|
+
if (_0x257bd9 === _0x2c8163) break;
|
|
130
|
+
else _0x50ea67["push"](_0x50ea67["shift"]());
|
|
131
|
+
} catch (_0x10108e) {
|
|
132
|
+
_0x50ea67["push"](_0x50ea67["shift"]());
|
|
120
133
|
}
|
|
121
134
|
}
|
|
122
|
-
})(
|
|
135
|
+
})(_0x1f76, 0x413d6);
|
|
123
136
|
const s = 0.45359237,
|
|
124
137
|
o = 25.4 / 0x3e8,
|
|
125
138
|
n = 0xc * o,
|
|
@@ -127,47 +140,66 @@ const s = 0.45359237,
|
|
|
127
140
|
a = 133.322387415;
|
|
128
141
|
class r extends HTMLElement {
|
|
129
142
|
constructor() {
|
|
130
|
-
const
|
|
143
|
+
const _0x431f05 = _0x4250;
|
|
131
144
|
super(),
|
|
132
|
-
this[
|
|
133
|
-
(this[
|
|
134
|
-
(this[
|
|
135
|
-
(this[
|
|
136
|
-
(this[
|
|
137
|
-
(this[
|
|
138
|
-
(this[
|
|
139
|
-
|
|
145
|
+
this["attachShadow"]({ mode: _0x431f05(0x147) }),
|
|
146
|
+
(this["value"] = 0x0),
|
|
147
|
+
(this["unit"] = "mm"),
|
|
148
|
+
(this[_0x431f05(0x138)] = _0x431f05(0x144)),
|
|
149
|
+
(this[_0x431f05(0x111)] = null),
|
|
150
|
+
(this[_0x431f05(0x118)] = 0x3),
|
|
151
|
+
(this["e3dLogoUrl"] =
|
|
152
|
+
"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"),
|
|
153
|
+
(this[_0x431f05(0x129)] = {
|
|
140
154
|
Length: ["m", "km", "cm", "mm", "in", "ft"],
|
|
141
|
-
Mass: ["g", "kg",
|
|
155
|
+
Mass: ["g", "kg", _0x431f05(0x113)],
|
|
142
156
|
Pressure: [
|
|
143
157
|
"Pa",
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
158
|
+
_0x431f05(0x141),
|
|
159
|
+
_0x431f05(0x134),
|
|
160
|
+
_0x431f05(0x126),
|
|
161
|
+
_0x431f05(0xfb),
|
|
162
|
+
_0x431f05(0x143),
|
|
149
163
|
"atm",
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
164
|
+
"mm\x20HG",
|
|
165
|
+
"cm\x20HG",
|
|
166
|
+
_0x431f05(0x13b),
|
|
167
|
+
_0x431f05(0x133),
|
|
168
|
+
_0x431f05(0x14b),
|
|
169
|
+
_0x431f05(0x153),
|
|
170
|
+
"psf",
|
|
171
|
+
_0x431f05(0x11d),
|
|
172
|
+
_0x431f05(0x140),
|
|
173
|
+
_0x431f05(0x112),
|
|
160
174
|
],
|
|
161
175
|
Density: [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
176
|
+
_0x431f05(0x10b),
|
|
177
|
+
_0x431f05(0x152),
|
|
178
|
+
_0x431f05(0x11c),
|
|
179
|
+
_0x431f05(0x12d),
|
|
180
|
+
_0x431f05(0x102),
|
|
181
|
+
_0x431f05(0x13d),
|
|
182
|
+
],
|
|
183
|
+
Time: [
|
|
184
|
+
_0x431f05(0x119),
|
|
185
|
+
"s",
|
|
186
|
+
_0x431f05(0x105),
|
|
187
|
+
"h",
|
|
188
|
+
_0x431f05(0x154),
|
|
189
|
+
_0x431f05(0x13e),
|
|
190
|
+
_0x431f05(0x101),
|
|
191
|
+
],
|
|
192
|
+
ElectricalCurrent: [
|
|
193
|
+
"A",
|
|
194
|
+
_0x431f05(0x117),
|
|
195
|
+
"mA",
|
|
196
|
+
"µA",
|
|
197
|
+
"kA",
|
|
198
|
+
"MA",
|
|
199
|
+
_0x431f05(0x14d),
|
|
168
200
|
],
|
|
169
201
|
}),
|
|
170
|
-
(this[
|
|
202
|
+
(this[_0x431f05(0x122)] = {
|
|
171
203
|
Length: { m: 0x1, km: 0x3e8, cm: 0.01, mm: 0.001, in: o, ft: n },
|
|
172
204
|
Mass: { kg: 0x1, g: 0.001, lbm: s },
|
|
173
205
|
Pressure: {
|
|
@@ -184,139 +216,158 @@ class r extends HTMLElement {
|
|
|
184
216
|
"mm\x20W.C.": (0x1 / 0x3e8) * 0x3e8 * 9.80665,
|
|
185
217
|
"m\x20W.C.": 0x1 * 0x3e8 * 9.80665,
|
|
186
218
|
"in\x20W.C.": o * 0x3e8 * 9.80665,
|
|
187
|
-
psf: (s * 9.80665) / Math[
|
|
188
|
-
psi: (s * 9.80665) / Math[
|
|
189
|
-
ksi: ((s * 9.80665) / Math[
|
|
219
|
+
psf: (s * 9.80665) / Math[_0x431f05(0x107)](n, 0x2),
|
|
220
|
+
psi: (s * 9.80665) / Math[_0x431f05(0x107)](o, 0x2),
|
|
221
|
+
ksi: ((s * 9.80665) / Math[_0x431f05(0x107)](o, 0x2)) * 0x3e8,
|
|
190
222
|
"ksi[kip/in²]":
|
|
191
|
-
((s * 9.80665) / Math[
|
|
223
|
+
((s * 9.80665) / Math[_0x431f05(0x107)](o, 0x2)) * 0x3e8,
|
|
192
224
|
},
|
|
193
225
|
Density: {
|
|
194
226
|
"kg/m³": 0x1,
|
|
195
227
|
"kg/L": 0x3e8,
|
|
196
|
-
"g/cm³": 0x1 / 0x3e8 / Math[
|
|
197
|
-
"g/mm³": 0x1 / 0x3e8 / Math[
|
|
198
|
-
"lbm/ft³": s / Math[
|
|
199
|
-
"lbm/in³": s / Math[
|
|
228
|
+
"g/cm³": 0x1 / 0x3e8 / Math[_0x431f05(0x107)](0.01, 0x3),
|
|
229
|
+
"g/mm³": 0x1 / 0x3e8 / Math["pow"](0.001, 0x3),
|
|
230
|
+
"lbm/ft³": s / Math[_0x431f05(0x107)](n, 0x3),
|
|
231
|
+
"lbm/in³": s / Math["pow"](o, 0x3),
|
|
232
|
+
},
|
|
233
|
+
Time: {
|
|
234
|
+
"s[second]": 0x1,
|
|
235
|
+
s: 0x1,
|
|
236
|
+
minute: 0x3c,
|
|
237
|
+
h: 0xe10,
|
|
238
|
+
"h[hour]": 0xe10,
|
|
239
|
+
day: 0xe10 * 0x18,
|
|
240
|
+
week: 0xe10 * 0x18 * 0x7,
|
|
241
|
+
},
|
|
242
|
+
ElectricalCurrent: {
|
|
243
|
+
A: 0x1,
|
|
244
|
+
"Ampere[amp]": 0x1,
|
|
245
|
+
mA: 0.001,
|
|
246
|
+
µA: 0.000001,
|
|
247
|
+
kA: 0x3e8,
|
|
248
|
+
MA: 0xf4240,
|
|
249
|
+
"esu/s": 0x1 / 0xb2d05e00,
|
|
200
250
|
},
|
|
201
251
|
}),
|
|
202
|
-
this[
|
|
252
|
+
this[_0x431f05(0x108)]();
|
|
203
253
|
}
|
|
204
|
-
static get [
|
|
205
|
-
const
|
|
206
|
-
return [
|
|
254
|
+
static get [_0x4b6c41(0x123)]() {
|
|
255
|
+
const _0x2066cc = _0x4b6c41;
|
|
256
|
+
return ["value", "unit", _0x2066cc(0x150)];
|
|
207
257
|
}
|
|
208
|
-
["attributeChangedCallback"](
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
? (this[
|
|
212
|
-
:
|
|
213
|
-
? ((this[
|
|
214
|
-
(this[
|
|
215
|
-
:
|
|
216
|
-
(this[
|
|
217
|
-
this[
|
|
258
|
+
["attributeChangedCallback"](_0x78cea2, _0x143b0f, _0x7aeeca) {
|
|
259
|
+
const _0x30da38 = _0x4b6c41;
|
|
260
|
+
_0x78cea2 === _0x30da38(0x125)
|
|
261
|
+
? (this[_0x30da38(0x125)] = parseFloat(_0x7aeeca))
|
|
262
|
+
: _0x78cea2 === _0x30da38(0x10a)
|
|
263
|
+
? ((this[_0x30da38(0x10a)] = _0x7aeeca),
|
|
264
|
+
(this["unitCategory"] = this[_0x30da38(0x13c)](_0x7aeeca)))
|
|
265
|
+
: _0x78cea2 === _0x30da38(0x150) &&
|
|
266
|
+
(this["decimalPlaces"] = parseInt(_0x7aeeca) || 0x3),
|
|
267
|
+
this[_0x30da38(0x108)]();
|
|
218
268
|
}
|
|
219
|
-
["getUnitCategory"](
|
|
220
|
-
const
|
|
221
|
-
for (const
|
|
222
|
-
if (this[
|
|
223
|
-
return
|
|
269
|
+
["getUnitCategory"](_0x3f966e) {
|
|
270
|
+
const _0x45f4bc = _0x4b6c41;
|
|
271
|
+
for (const _0x26ef1e in this["units"])
|
|
272
|
+
if (this[_0x45f4bc(0x129)][_0x26ef1e][_0x45f4bc(0x14f)](_0x3f966e))
|
|
273
|
+
return _0x26ef1e;
|
|
224
274
|
return null;
|
|
225
275
|
}
|
|
226
|
-
[
|
|
227
|
-
const
|
|
228
|
-
this[
|
|
229
|
-
|
|
230
|
-
this[
|
|
276
|
+
[_0x4b6c41(0x116)]() {
|
|
277
|
+
const _0xe2203a = _0x4b6c41;
|
|
278
|
+
this[_0xe2203a(0x14e)][_0xe2203a(0x10d)](
|
|
279
|
+
_0xe2203a(0x151),
|
|
280
|
+
this[_0xe2203a(0x12b)]["bind"](this)
|
|
231
281
|
),
|
|
232
|
-
this[
|
|
282
|
+
this[_0xe2203a(0x108)]();
|
|
233
283
|
}
|
|
234
|
-
[
|
|
235
|
-
const
|
|
236
|
-
this[
|
|
237
|
-
|
|
238
|
-
this[
|
|
284
|
+
[_0x4b6c41(0x137)]() {
|
|
285
|
+
const _0x4b95a5 = _0x4b6c41;
|
|
286
|
+
this[_0x4b95a5(0x14e)][_0x4b95a5(0x106)](
|
|
287
|
+
_0x4b95a5(0x151),
|
|
288
|
+
this[_0x4b95a5(0x12b)][_0x4b95a5(0x114)](this)
|
|
239
289
|
);
|
|
240
290
|
}
|
|
241
|
-
[
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
const
|
|
245
|
-
|
|
291
|
+
[_0x4b6c41(0x148)](_0x51979d) {
|
|
292
|
+
const _0x2d6b88 = _0x4b6c41;
|
|
293
|
+
if (_0x51979d["target"]["closest"](_0x2d6b88(0x120))) {
|
|
294
|
+
const _0x2b867f = this[_0x2d6b88(0x14e)][_0x2d6b88(0x11e)](
|
|
295
|
+
_0x2d6b88(0x13a)
|
|
246
296
|
);
|
|
247
|
-
|
|
297
|
+
_0x2b867f && (_0x2b867f[_0x2d6b88(0x12c)](), _0x2b867f["click"]());
|
|
248
298
|
}
|
|
249
299
|
}
|
|
250
|
-
[
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
this[
|
|
256
|
-
this[
|
|
257
|
-
] / this[
|
|
258
|
-
(this[
|
|
259
|
-
(this[
|
|
260
|
-
this[
|
|
300
|
+
[_0x4b6c41(0x12b)](_0x33c451) {
|
|
301
|
+
const _0x278602 = _0x4b6c41;
|
|
302
|
+
if (_0x33c451[_0x278602(0x12a)][_0x278602(0x10e)] === _0x278602(0x131)) {
|
|
303
|
+
const _0x12ed75 = _0x33c451[_0x278602(0x12a)][_0x278602(0x125)],
|
|
304
|
+
_0x970344 =
|
|
305
|
+
this[_0x278602(0x122)][this[_0x278602(0x138)]][
|
|
306
|
+
this[_0x278602(0x10a)]
|
|
307
|
+
] / this[_0x278602(0x122)][this[_0x278602(0x138)]][_0x12ed75];
|
|
308
|
+
(this[_0x278602(0x125)] = this[_0x278602(0x125)] * _0x970344),
|
|
309
|
+
(this[_0x278602(0x10a)] = _0x12ed75),
|
|
310
|
+
this["render"]();
|
|
261
311
|
}
|
|
262
312
|
}
|
|
263
|
-
[
|
|
264
|
-
const
|
|
265
|
-
return Number[
|
|
266
|
-
?
|
|
267
|
-
: Math[
|
|
268
|
-
?
|
|
269
|
-
[
|
|
270
|
-
[
|
|
271
|
-
:
|
|
313
|
+
["formatValue"](_0x5b4c11) {
|
|
314
|
+
const _0x1924fb = _0x4b6c41;
|
|
315
|
+
return Number[_0x1924fb(0x142)](_0x5b4c11)
|
|
316
|
+
? _0x5b4c11[_0x1924fb(0x139)]()
|
|
317
|
+
: Math[_0x1924fb(0x128)](_0x5b4c11) !== 0x0
|
|
318
|
+
? _0x5b4c11["toFixed"](this[_0x1924fb(0x118)])
|
|
319
|
+
[_0x1924fb(0x115)](/0+$/, "")
|
|
320
|
+
[_0x1924fb(0x115)](/\.$/, "")
|
|
321
|
+
: _0x5b4c11[_0x1924fb(0x149)](0x3);
|
|
272
322
|
}
|
|
273
|
-
[
|
|
274
|
-
const
|
|
275
|
-
this["
|
|
276
|
-
|
|
277
|
-
this[
|
|
278
|
-
|
|
323
|
+
["render"]() {
|
|
324
|
+
const _0x52b9bf = _0x4b6c41;
|
|
325
|
+
this[_0x52b9bf(0x14e)]["innerHTML"] =
|
|
326
|
+
_0x52b9bf(0x132) +
|
|
327
|
+
this[_0x52b9bf(0x109)](this[_0x52b9bf(0x125)]) +
|
|
328
|
+
"</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" +
|
|
279
329
|
this["units"][this["unitCategory"]]
|
|
280
|
-
[
|
|
281
|
-
(
|
|
282
|
-
|
|
283
|
-
|
|
330
|
+
[_0x52b9bf(0x11a)](
|
|
331
|
+
(_0x2b379b) =>
|
|
332
|
+
_0x52b9bf(0x12f) +
|
|
333
|
+
_0x2b379b +
|
|
284
334
|
"\x22\x20" +
|
|
285
|
-
(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
335
|
+
(_0x2b379b === this[_0x52b9bf(0x10a)] ? _0x52b9bf(0x130) : "") +
|
|
336
|
+
">\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" +
|
|
337
|
+
_0x2b379b +
|
|
338
|
+
_0x52b9bf(0x13f)
|
|
289
339
|
)
|
|
290
|
-
[
|
|
291
|
-
|
|
292
|
-
this[
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
this[
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
this[
|
|
300
|
-
const
|
|
301
|
-
|
|
340
|
+
[_0x52b9bf(0x124)]("") +
|
|
341
|
+
_0x52b9bf(0x136) +
|
|
342
|
+
this[_0x52b9bf(0x135)] +
|
|
343
|
+
_0x52b9bf(0x145);
|
|
344
|
+
const _0x1ed17b =
|
|
345
|
+
this[_0x52b9bf(0x14e)]["querySelector"](".unit-container"),
|
|
346
|
+
_0x5dd3f8 = this[_0x52b9bf(0x14e)]["querySelectorAll"](".tooltip")[0x0];
|
|
347
|
+
_0x1ed17b[_0x52b9bf(0x10d)]("mouseover", () => {
|
|
348
|
+
const _0x5b79b5 = _0x52b9bf;
|
|
349
|
+
this[_0x5b79b5(0x111)] = setTimeout(() => {
|
|
350
|
+
const _0x3b827c = _0x5b79b5;
|
|
351
|
+
_0x5dd3f8[_0x3b827c(0x10f)]["display"] = _0x3b827c(0x11f);
|
|
302
352
|
}, 0x3e8);
|
|
303
353
|
}),
|
|
304
|
-
|
|
305
|
-
const
|
|
354
|
+
_0x1ed17b[_0x52b9bf(0x10d)](_0x52b9bf(0x110), () => {
|
|
355
|
+
const _0xc2a862 = _0x52b9bf;
|
|
306
356
|
setTimeout(() => {
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
clearTimeout(this[
|
|
357
|
+
const _0x5d5cff = _0x4250;
|
|
358
|
+
_0x5dd3f8[_0x5d5cff(0x10f)][_0x5d5cff(0x155)] = _0x5d5cff(0x14a);
|
|
359
|
+
}, 0x7d0),
|
|
360
|
+
clearTimeout(this[_0xc2a862(0x111)]);
|
|
311
361
|
}),
|
|
312
|
-
|
|
362
|
+
_0x5dd3f8[_0x52b9bf(0x10d)](_0x52b9bf(0x110), () => {
|
|
313
363
|
setTimeout(() => {
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
},
|
|
364
|
+
const _0x5aeb71 = _0x4250;
|
|
365
|
+
_0x5dd3f8[_0x5aeb71(0x10f)][_0x5aeb71(0x155)] = _0x5aeb71(0x14a);
|
|
366
|
+
}, 0x7d0);
|
|
317
367
|
});
|
|
318
368
|
}
|
|
319
369
|
}
|
|
320
|
-
customElements[
|
|
321
|
-
class
|
|
322
|
-
customElements[
|
|
370
|
+
customElements[_0x4b6c41(0x103)](_0x4b6c41(0x12e), r);
|
|
371
|
+
class m extends r {}
|
|
372
|
+
customElements[_0x4b6c41(0x103)](_0x4b6c41(0x127), m);
|
|
373
|
+
export { r as default };
|
package/dist/pq.umd.js
CHANGED
|
@@ -1,352 +1 @@
|
|
|
1
|
-
function _0x42a0() {
|
|
2
|
-
const _0x132851 = [
|
|
3
|
-
"block",
|
|
4
|
-
"GPa",
|
|
5
|
-
"m\x20W.C.",
|
|
6
|
-
"</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",
|
|
7
|
-
"unit",
|
|
8
|
-
"139010VJeOrf",
|
|
9
|
-
"decimal-places",
|
|
10
|
-
"ksi[kip/in²]",
|
|
11
|
-
"1256094ptqovg",
|
|
12
|
-
"atm",
|
|
13
|
-
"toString",
|
|
14
|
-
"render",
|
|
15
|
-
"SELECT",
|
|
16
|
-
"g/mm³",
|
|
17
|
-
"handleUnitChange",
|
|
18
|
-
"mouseover",
|
|
19
|
-
"bind",
|
|
20
|
-
"shadowRoot",
|
|
21
|
-
"240698EDrKED",
|
|
22
|
-
"floor",
|
|
23
|
-
"focus",
|
|
24
|
-
"attributeChangedCallback",
|
|
25
|
-
"\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>",
|
|
26
|
-
"in\x20W.C.",
|
|
27
|
-
".unit-container",
|
|
28
|
-
"selected",
|
|
29
|
-
"psf",
|
|
30
|
-
"ksi",
|
|
31
|
-
"none",
|
|
32
|
-
"units",
|
|
33
|
-
"removeEventListener",
|
|
34
|
-
"addEventListener",
|
|
35
|
-
"style",
|
|
36
|
-
"pow",
|
|
37
|
-
"mm\x20W.C.",
|
|
38
|
-
"644076ynGYJB",
|
|
39
|
-
"unitCategory",
|
|
40
|
-
"replace",
|
|
41
|
-
"909dUGDgf",
|
|
42
|
-
"includes",
|
|
43
|
-
"uc-qty",
|
|
44
|
-
"disconnectedCallback",
|
|
45
|
-
"select",
|
|
46
|
-
"e3dLogoUrl",
|
|
47
|
-
"unitConversion",
|
|
48
|
-
"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",
|
|
49
|
-
"amd",
|
|
50
|
-
"display",
|
|
51
|
-
"7122294mKFOmu",
|
|
52
|
-
"querySelectorAll",
|
|
53
|
-
"closest",
|
|
54
|
-
"toFixed",
|
|
55
|
-
"toPrecision",
|
|
56
|
-
"kg/L",
|
|
57
|
-
"1vTxRWr",
|
|
58
|
-
"psi",
|
|
59
|
-
"<option\x20value=\x22",
|
|
60
|
-
"value",
|
|
61
|
-
"\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",
|
|
62
|
-
"\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.donwen.com/\x22\x20target=\x22_blank\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<img\x20src=\x22",
|
|
63
|
-
"querySelector",
|
|
64
|
-
"kg/m³",
|
|
65
|
-
"Length",
|
|
66
|
-
"change",
|
|
67
|
-
"handleArrowClick",
|
|
68
|
-
"lbm",
|
|
69
|
-
"20saEnZO",
|
|
70
|
-
"lbm/ft³",
|
|
71
|
-
"formatValue",
|
|
72
|
-
"getUnitCategory",
|
|
73
|
-
"kPa",
|
|
74
|
-
"in\x20HG",
|
|
75
|
-
"mouseout",
|
|
76
|
-
"open",
|
|
77
|
-
"map",
|
|
78
|
-
"attachShadow",
|
|
79
|
-
"910245tOjNAl",
|
|
80
|
-
"lbm/in³",
|
|
81
|
-
"mm\x20HG",
|
|
82
|
-
"g/cm³",
|
|
83
|
-
"target",
|
|
84
|
-
"7001379ierJXm",
|
|
85
|
-
"56zEoxjk",
|
|
86
|
-
"tooltipTimeout",
|
|
87
|
-
"decimalPlaces",
|
|
88
|
-
"</option>",
|
|
89
|
-
"mbar",
|
|
90
|
-
];
|
|
91
|
-
_0x42a0 = function () {
|
|
92
|
-
return _0x132851;
|
|
93
|
-
};
|
|
94
|
-
return _0x42a0();
|
|
95
|
-
}
|
|
96
|
-
function _0x3140(_0x4adaaa, _0x311d57) {
|
|
97
|
-
const _0x42a0f7 = _0x42a0();
|
|
98
|
-
return (
|
|
99
|
-
(_0x3140 = function (_0x314026, _0x2e0b21) {
|
|
100
|
-
_0x314026 = _0x314026 - 0x12c;
|
|
101
|
-
let _0x46f5f8 = _0x42a0f7[_0x314026];
|
|
102
|
-
return _0x46f5f8;
|
|
103
|
-
}),
|
|
104
|
-
_0x3140(_0x4adaaa, _0x311d57)
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
(function (_0x3558a9, _0x23e7f9) {
|
|
108
|
-
const _0x5b5928 = _0x3140,
|
|
109
|
-
_0x286df7 = _0x3558a9();
|
|
110
|
-
while (!![]) {
|
|
111
|
-
try {
|
|
112
|
-
const _0x48cf4a =
|
|
113
|
-
(parseInt(_0x5b5928(0x16e)) / 0x1) *
|
|
114
|
-
(-parseInt(_0x5b5928(0x14a)) / 0x2) +
|
|
115
|
-
-parseInt(_0x5b5928(0x15b)) / 0x3 +
|
|
116
|
-
(parseInt(_0x5b5928(0x17a)) / 0x4) *
|
|
117
|
-
(-parseInt(_0x5b5928(0x12d)) / 0x5) +
|
|
118
|
-
parseInt(_0x5b5928(0x168)) / 0x6 +
|
|
119
|
-
(-parseInt(_0x5b5928(0x140)) / 0x7) *
|
|
120
|
-
(parseInt(_0x5b5928(0x133)) / 0x8) +
|
|
121
|
-
(-parseInt(_0x5b5928(0x15e)) / 0x9) *
|
|
122
|
-
(-parseInt(_0x5b5928(0x13d)) / 0xa) +
|
|
123
|
-
parseInt(_0x5b5928(0x132)) / 0xb;
|
|
124
|
-
if (_0x48cf4a === _0x23e7f9) break;
|
|
125
|
-
else _0x286df7["push"](_0x286df7["shift"]());
|
|
126
|
-
} catch (_0x503e6f) {
|
|
127
|
-
_0x286df7["push"](_0x286df7["shift"]());
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
})(_0x42a0, 0xb148f),
|
|
131
|
-
(function (_0x35baa4) {
|
|
132
|
-
const _0x4a3fd5 = _0x3140;
|
|
133
|
-
typeof define == "function" && define[_0x4a3fd5(0x166)]
|
|
134
|
-
? define(_0x35baa4)
|
|
135
|
-
: _0x35baa4();
|
|
136
|
-
})(function () {
|
|
137
|
-
"use strict";
|
|
138
|
-
const _0x1ccab9 = _0x3140;
|
|
139
|
-
const _0x4f7b31 = 0.45359237,
|
|
140
|
-
_0xf30773 = 25.4 / 0x3e8,
|
|
141
|
-
_0x46073f = 0xc * _0xf30773,
|
|
142
|
-
_0x579999 = 0x18bcd,
|
|
143
|
-
_0x380ffe = 133.322387415;
|
|
144
|
-
class _0x2cb387 extends HTMLElement {
|
|
145
|
-
constructor() {
|
|
146
|
-
const _0x2e4cee = _0x3140;
|
|
147
|
-
super(),
|
|
148
|
-
this[_0x2e4cee(0x12c)]({ mode: _0x2e4cee(0x181) }),
|
|
149
|
-
(this["value"] = 0x0),
|
|
150
|
-
(this["unit"] = "mm"),
|
|
151
|
-
(this[_0x2e4cee(0x15c)] = _0x2e4cee(0x176)),
|
|
152
|
-
(this["tooltipTimeout"] = null),
|
|
153
|
-
(this["decimalPlaces"] = 0x3),
|
|
154
|
-
(this["e3dLogoUrl"] = _0x2e4cee(0x165)),
|
|
155
|
-
(this[_0x2e4cee(0x155)] = {
|
|
156
|
-
Length: ["m", "km", "cm", "mm", "in", "ft"],
|
|
157
|
-
Mass: ["g", "kg", _0x2e4cee(0x179)],
|
|
158
|
-
Pressure: [
|
|
159
|
-
"Pa",
|
|
160
|
-
_0x2e4cee(0x17e),
|
|
161
|
-
"MPa",
|
|
162
|
-
_0x2e4cee(0x139),
|
|
163
|
-
"bar",
|
|
164
|
-
_0x2e4cee(0x137),
|
|
165
|
-
_0x2e4cee(0x141),
|
|
166
|
-
_0x2e4cee(0x12f),
|
|
167
|
-
"cm\x20HG",
|
|
168
|
-
_0x2e4cee(0x17f),
|
|
169
|
-
_0x2e4cee(0x15a),
|
|
170
|
-
_0x2e4cee(0x13a),
|
|
171
|
-
_0x2e4cee(0x14f),
|
|
172
|
-
_0x2e4cee(0x152),
|
|
173
|
-
_0x2e4cee(0x16f),
|
|
174
|
-
_0x2e4cee(0x153),
|
|
175
|
-
_0x2e4cee(0x13f),
|
|
176
|
-
],
|
|
177
|
-
Density: [
|
|
178
|
-
_0x2e4cee(0x175),
|
|
179
|
-
_0x2e4cee(0x16d),
|
|
180
|
-
_0x2e4cee(0x130),
|
|
181
|
-
_0x2e4cee(0x145),
|
|
182
|
-
_0x2e4cee(0x17b),
|
|
183
|
-
_0x2e4cee(0x12e),
|
|
184
|
-
],
|
|
185
|
-
}),
|
|
186
|
-
(this[_0x2e4cee(0x164)] = {
|
|
187
|
-
Length: {
|
|
188
|
-
m: 0x1,
|
|
189
|
-
km: 0x3e8,
|
|
190
|
-
cm: 0.01,
|
|
191
|
-
mm: 0.001,
|
|
192
|
-
in: _0xf30773,
|
|
193
|
-
ft: _0x46073f,
|
|
194
|
-
},
|
|
195
|
-
Mass: { kg: 0x1, g: 0.001, lbm: _0x4f7b31 },
|
|
196
|
-
Pressure: {
|
|
197
|
-
Pa: 0x1,
|
|
198
|
-
kPa: 0x3e8,
|
|
199
|
-
MPa: 0xf4240,
|
|
200
|
-
GPa: 0x3b9aca00,
|
|
201
|
-
bar: 0x64 * 0x3e8,
|
|
202
|
-
mbar: 0x64,
|
|
203
|
-
atm: _0x579999,
|
|
204
|
-
"mm\x20HG": _0x380ffe,
|
|
205
|
-
"cm\x20HG": _0x380ffe * 0xa,
|
|
206
|
-
"in\x20HG": _0x380ffe * 25.4,
|
|
207
|
-
"mm\x20W.C.": (0x1 / 0x3e8) * 0x3e8 * 9.80665,
|
|
208
|
-
"m\x20W.C.": 0x1 * 0x3e8 * 9.80665,
|
|
209
|
-
"in\x20W.C.": _0xf30773 * 0x3e8 * 9.80665,
|
|
210
|
-
psf:
|
|
211
|
-
(_0x4f7b31 * 9.80665) / Math[_0x2e4cee(0x159)](_0x46073f, 0x2),
|
|
212
|
-
psi:
|
|
213
|
-
(_0x4f7b31 * 9.80665) / Math[_0x2e4cee(0x159)](_0xf30773, 0x2),
|
|
214
|
-
ksi:
|
|
215
|
-
((_0x4f7b31 * 9.80665) / Math["pow"](_0xf30773, 0x2)) * 0x3e8,
|
|
216
|
-
"ksi[kip/in²]":
|
|
217
|
-
((_0x4f7b31 * 9.80665) /
|
|
218
|
-
Math[_0x2e4cee(0x159)](_0xf30773, 0x2)) *
|
|
219
|
-
0x3e8,
|
|
220
|
-
},
|
|
221
|
-
Density: {
|
|
222
|
-
"kg/m³": 0x1,
|
|
223
|
-
"kg/L": 0x3e8,
|
|
224
|
-
"g/cm³": 0x1 / 0x3e8 / Math[_0x2e4cee(0x159)](0.01, 0x3),
|
|
225
|
-
"g/mm³": 0x1 / 0x3e8 / Math[_0x2e4cee(0x159)](0.001, 0x3),
|
|
226
|
-
"lbm/ft³": _0x4f7b31 / Math[_0x2e4cee(0x159)](_0x46073f, 0x3),
|
|
227
|
-
"lbm/in³": _0x4f7b31 / Math["pow"](_0xf30773, 0x3),
|
|
228
|
-
},
|
|
229
|
-
}),
|
|
230
|
-
this[_0x2e4cee(0x143)]();
|
|
231
|
-
}
|
|
232
|
-
static get ["observedAttributes"]() {
|
|
233
|
-
const _0x201eb8 = _0x3140;
|
|
234
|
-
return [_0x201eb8(0x171), _0x201eb8(0x13c), _0x201eb8(0x13e)];
|
|
235
|
-
}
|
|
236
|
-
[_0x1ccab9(0x14d)](_0x3af086, _0x26d93a, _0x5189cb) {
|
|
237
|
-
const _0xd7244f = _0x1ccab9;
|
|
238
|
-
_0x3af086 === _0xd7244f(0x171)
|
|
239
|
-
? (this[_0xd7244f(0x171)] = parseFloat(_0x5189cb))
|
|
240
|
-
: _0x3af086 === "unit"
|
|
241
|
-
? ((this[_0xd7244f(0x13c)] = _0x5189cb),
|
|
242
|
-
(this[_0xd7244f(0x15c)] = this[_0xd7244f(0x17d)](_0x5189cb)))
|
|
243
|
-
: _0x3af086 === "decimal-places" &&
|
|
244
|
-
(this[_0xd7244f(0x135)] = parseInt(_0x5189cb) || 0x3),
|
|
245
|
-
this[_0xd7244f(0x143)]();
|
|
246
|
-
}
|
|
247
|
-
[_0x1ccab9(0x17d)](_0x2c14ce) {
|
|
248
|
-
const _0x5bf016 = _0x1ccab9;
|
|
249
|
-
for (const _0x33307d in this[_0x5bf016(0x155)])
|
|
250
|
-
if (this[_0x5bf016(0x155)][_0x33307d][_0x5bf016(0x15f)](_0x2c14ce))
|
|
251
|
-
return _0x33307d;
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
|
-
["connectedCallback"]() {
|
|
255
|
-
const _0xd1d3ca = _0x1ccab9;
|
|
256
|
-
this[_0xd1d3ca(0x149)][_0xd1d3ca(0x157)](
|
|
257
|
-
_0xd1d3ca(0x177),
|
|
258
|
-
this[_0xd1d3ca(0x146)][_0xd1d3ca(0x148)](this)
|
|
259
|
-
),
|
|
260
|
-
this[_0xd1d3ca(0x143)]();
|
|
261
|
-
}
|
|
262
|
-
[_0x1ccab9(0x161)]() {
|
|
263
|
-
const _0x530172 = _0x1ccab9;
|
|
264
|
-
this["shadowRoot"][_0x530172(0x156)](
|
|
265
|
-
_0x530172(0x177),
|
|
266
|
-
this["handleUnitChange"][_0x530172(0x148)](this)
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
[_0x1ccab9(0x178)](_0x178b79) {
|
|
270
|
-
const _0x2950b5 = _0x1ccab9;
|
|
271
|
-
if (_0x178b79[_0x2950b5(0x131)][_0x2950b5(0x16a)](_0x2950b5(0x150))) {
|
|
272
|
-
const _0x41774b = this["shadowRoot"][_0x2950b5(0x174)](
|
|
273
|
-
_0x2950b5(0x162)
|
|
274
|
-
);
|
|
275
|
-
_0x41774b && (_0x41774b[_0x2950b5(0x14c)](), _0x41774b["click"]());
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
[_0x1ccab9(0x146)](_0x5a3e6a) {
|
|
279
|
-
const _0x23b04e = _0x1ccab9;
|
|
280
|
-
if (_0x5a3e6a["target"]["tagName"] === _0x23b04e(0x144)) {
|
|
281
|
-
const _0x11be95 = _0x5a3e6a[_0x23b04e(0x131)][_0x23b04e(0x171)],
|
|
282
|
-
_0x663a9 =
|
|
283
|
-
this[_0x23b04e(0x164)][this[_0x23b04e(0x15c)]][
|
|
284
|
-
this[_0x23b04e(0x13c)]
|
|
285
|
-
] / this[_0x23b04e(0x164)][this["unitCategory"]][_0x11be95];
|
|
286
|
-
(this["value"] = this[_0x23b04e(0x171)] * _0x663a9),
|
|
287
|
-
(this[_0x23b04e(0x13c)] = _0x11be95),
|
|
288
|
-
this[_0x23b04e(0x143)]();
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
[_0x1ccab9(0x17c)](_0x51f3d2) {
|
|
292
|
-
const _0x1f30c0 = _0x1ccab9;
|
|
293
|
-
return Number["isInteger"](_0x51f3d2)
|
|
294
|
-
? _0x51f3d2[_0x1f30c0(0x142)]()
|
|
295
|
-
: Math[_0x1f30c0(0x14b)](_0x51f3d2) !== 0x0
|
|
296
|
-
? _0x51f3d2[_0x1f30c0(0x16b)](this[_0x1f30c0(0x135)])
|
|
297
|
-
["replace"](/0+$/, "")
|
|
298
|
-
[_0x1f30c0(0x15d)](/\.$/, "")
|
|
299
|
-
: _0x51f3d2[_0x1f30c0(0x16c)](0x3);
|
|
300
|
-
}
|
|
301
|
-
[_0x1ccab9(0x143)]() {
|
|
302
|
-
const _0x40949f = _0x1ccab9;
|
|
303
|
-
this[_0x40949f(0x149)]["innerHTML"] =
|
|
304
|
-
_0x40949f(0x14e) +
|
|
305
|
-
this[_0x40949f(0x17c)](this[_0x40949f(0x171)]) +
|
|
306
|
-
_0x40949f(0x13b) +
|
|
307
|
-
this["units"][this[_0x40949f(0x15c)]]
|
|
308
|
-
[_0x40949f(0x182)](
|
|
309
|
-
(_0x24ef3b) =>
|
|
310
|
-
_0x40949f(0x170) +
|
|
311
|
-
_0x24ef3b +
|
|
312
|
-
"\x22\x20" +
|
|
313
|
-
(_0x24ef3b === this[_0x40949f(0x13c)] ? _0x40949f(0x151) : "") +
|
|
314
|
-
">\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" +
|
|
315
|
-
_0x24ef3b +
|
|
316
|
-
_0x40949f(0x136)
|
|
317
|
-
)
|
|
318
|
-
["join"]("") +
|
|
319
|
-
_0x40949f(0x173) +
|
|
320
|
-
this[_0x40949f(0x163)] +
|
|
321
|
-
_0x40949f(0x172);
|
|
322
|
-
const _0x4f4daa = this[_0x40949f(0x149)]["querySelector"](
|
|
323
|
-
_0x40949f(0x150)
|
|
324
|
-
),
|
|
325
|
-
_0x5175d5 = this[_0x40949f(0x149)][_0x40949f(0x169)](".tooltip")[0x0];
|
|
326
|
-
_0x4f4daa[_0x40949f(0x157)](_0x40949f(0x147), () => {
|
|
327
|
-
const _0x95d8da = _0x40949f;
|
|
328
|
-
this[_0x95d8da(0x134)] = setTimeout(() => {
|
|
329
|
-
const _0xa6822d = _0x95d8da;
|
|
330
|
-
_0x5175d5[_0xa6822d(0x158)][_0xa6822d(0x167)] = _0xa6822d(0x138);
|
|
331
|
-
}, 0x3e8);
|
|
332
|
-
}),
|
|
333
|
-
_0x4f4daa["addEventListener"](_0x40949f(0x180), () => {
|
|
334
|
-
const _0x583d0f = _0x40949f;
|
|
335
|
-
setTimeout(() => {
|
|
336
|
-
const _0x12a0e1 = _0x3140;
|
|
337
|
-
_0x5175d5[_0x12a0e1(0x158)][_0x12a0e1(0x167)] = "none";
|
|
338
|
-
}, 0x3e8),
|
|
339
|
-
clearTimeout(this[_0x583d0f(0x134)]);
|
|
340
|
-
}),
|
|
341
|
-
_0x5175d5[_0x40949f(0x157)](_0x40949f(0x180), () => {
|
|
342
|
-
setTimeout(() => {
|
|
343
|
-
const _0x442bf8 = _0x3140;
|
|
344
|
-
_0x5175d5[_0x442bf8(0x158)]["display"] = _0x442bf8(0x154);
|
|
345
|
-
}, 0x3e8);
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
customElements["define"]("physical-quantity", _0x2cb387);
|
|
350
|
-
class _0x2dfe31 extends _0x2cb387 {}
|
|
351
|
-
customElements["define"](_0x1ccab9(0x160), _0x2dfe31);
|
|
352
|
-
});
|
|
1
|
+
function _0x2f97(){const _0x504d43=['g/mm³','focus','in\x20HG','\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','selected','formatValue','</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','psf','lbm/in³','display','kPa','MPa','.unit-container','style','isInteger','map','function','bind','toPrecision','exports','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','decimal-places','block','kg/L','126jmeyhb','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\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>','133fBFcPE','kg/m³','attributeChangedCallback','join','render','esu/s','ksi','toFixed','Length','closest','tooltipTimeout','target','define','m\x20W.C.','23204zulCMR','minute','unitConversion','uc-qty','removeEventListener','mouseout','unit','handleUnitChange','lbm','140053nBMkkZ','floor','toString','addEventListener','50802TDhjkm','object','10794112qiExsm','e3dLogoUrl','12ZITUhQ','pow','change','Ampere[amp]','decimalPlaces','replace','mouseover','1050970dWjBzI','</option>','amd','units','4080005bYMzSP','1135152IfbEOQ','select','observedAttributes','unitCategory','s[second]','atm','bar','getUnitCategory','attachShadow','week','innerHTML','includes','psi','g/cm³','PhysicalQuantity','value','cm\x20HG','shadowRoot','connectedCallback'];_0x2f97=function(){return _0x504d43;};return _0x2f97();}function _0x39ba(_0x470944,_0x14dee2){const _0x2f97be=_0x2f97();return _0x39ba=function(_0x39baef,_0x1e377d){_0x39baef=_0x39baef-0x1e2;let _0x22f67c=_0x2f97be[_0x39baef];return _0x22f67c;},_0x39ba(_0x470944,_0x14dee2);}(function(_0x4b6a67,_0x271ceb){const _0x4e8d2f=_0x39ba,_0x448f46=_0x4b6a67();while(!![]){try{const _0x33e414=-parseInt(_0x4e8d2f(0x1e3))/0x1+-parseInt(_0x4e8d2f(0x233))/0x2*(-parseInt(_0x4e8d2f(0x1eb))/0x3)+parseInt(_0x4e8d2f(0x1f7))/0x4+parseInt(_0x4e8d2f(0x1f6))/0x5+-parseInt(_0x4e8d2f(0x1e7))/0x6*(parseInt(_0x4e8d2f(0x225))/0x7)+parseInt(_0x4e8d2f(0x1e9))/0x8+parseInt(_0x4e8d2f(0x222))/0x9*(-parseInt(_0x4e8d2f(0x1f2))/0xa);if(_0x33e414===_0x271ceb)break;else _0x448f46['push'](_0x448f46['shift']());}catch(_0x205fb5){_0x448f46['push'](_0x448f46['shift']());}}}(_0x2f97,0xb08e9),function(_0x61a185,_0x4ecb5e){const _0x386f16=_0x39ba;typeof exports==_0x386f16(0x1e8)&&typeof module<'u'?module[_0x386f16(0x21d)]=_0x4ecb5e():typeof define==_0x386f16(0x21a)&&define[_0x386f16(0x1f4)]?define(_0x4ecb5e):(_0x61a185=typeof globalThis<'u'?globalThis:_0x61a185||self,_0x61a185[_0x386f16(0x205)]=_0x4ecb5e());}(this,function(){'use strict';const _0x153a09=_0x39ba;const _0x50ca24=0.45359237,_0x4c3494=25.4/0x3e8,_0x2c3907=0xc*_0x4c3494,_0x25ec30=0x18bcd,_0x5d0dac=133.322387415;class _0x265891 extends HTMLElement{constructor(){const _0x5a5051=_0x39ba;super(),this[_0x5a5051(0x1ff)]({'mode':'open'}),this[_0x5a5051(0x206)]=0x0,this['unit']='mm',this[_0x5a5051(0x1fa)]=_0x5a5051(0x22d),this[_0x5a5051(0x22f)]=null,this[_0x5a5051(0x1ef)]=0x3,this[_0x5a5051(0x1ea)]=_0x5a5051(0x21e),this['units']={'Length':['m','km','cm','mm','in','ft'],'Mass':['g','kg',_0x5a5051(0x1e2)],'Pressure':['Pa',_0x5a5051(0x214),_0x5a5051(0x215),'GPa',_0x5a5051(0x1fd),'mbar',_0x5a5051(0x1fc),'mm\x20HG',_0x5a5051(0x207),_0x5a5051(0x20c),'mm\x20W.C.',_0x5a5051(0x232),'in\x20W.C.',_0x5a5051(0x211),_0x5a5051(0x203),_0x5a5051(0x22b),'ksi[kip/in²]'],'Density':[_0x5a5051(0x226),_0x5a5051(0x221),_0x5a5051(0x204),_0x5a5051(0x20a),'lbm/ft³',_0x5a5051(0x212)],'Time':[_0x5a5051(0x1fb),'s',_0x5a5051(0x234),'h','h[hour]','day',_0x5a5051(0x200)],'ElectricalCurrent':['A',_0x5a5051(0x1ee),'mA','µA','kA','MA',_0x5a5051(0x22a)]},this[_0x5a5051(0x235)]={'Length':{'m':0x1,'km':0x3e8,'cm':0.01,'mm':0.001,'in':_0x4c3494,'ft':_0x2c3907},'Mass':{'kg':0x1,'g':0.001,'lbm':_0x50ca24},'Pressure':{'Pa':0x1,'kPa':0x3e8,'MPa':0xf4240,'GPa':0x3b9aca00,'bar':0x64*0x3e8,'mbar':0x64,'atm':_0x25ec30,'mm\x20HG':_0x5d0dac,'cm\x20HG':_0x5d0dac*0xa,'in\x20HG':_0x5d0dac*25.4,'mm\x20W.C.':0x1/0x3e8*0x3e8*9.80665,'m\x20W.C.':0x1*0x3e8*9.80665,'in\x20W.C.':_0x4c3494*0x3e8*9.80665,'psf':_0x50ca24*9.80665/Math[_0x5a5051(0x1ec)](_0x2c3907,0x2),'psi':_0x50ca24*9.80665/Math['pow'](_0x4c3494,0x2),'ksi':_0x50ca24*9.80665/Math[_0x5a5051(0x1ec)](_0x4c3494,0x2)*0x3e8,'ksi[kip/in²]':_0x50ca24*9.80665/Math[_0x5a5051(0x1ec)](_0x4c3494,0x2)*0x3e8},'Density':{'kg/m³':0x1,'kg/L':0x3e8,'g/cm³':0x1/0x3e8/Math[_0x5a5051(0x1ec)](0.01,0x3),'g/mm³':0x1/0x3e8/Math['pow'](0.001,0x3),'lbm/ft³':_0x50ca24/Math[_0x5a5051(0x1ec)](_0x2c3907,0x3),'lbm/in³':_0x50ca24/Math[_0x5a5051(0x1ec)](_0x4c3494,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[_0x5a5051(0x229)]();}static get[_0x153a09(0x1f9)](){const _0x28209e=_0x153a09;return[_0x28209e(0x206),'unit',_0x28209e(0x21f)];}[_0x153a09(0x227)](_0x4d3c9c,_0x4ca1cb,_0x3c83a7){const _0x3da4b5=_0x153a09;_0x4d3c9c===_0x3da4b5(0x206)?this[_0x3da4b5(0x206)]=parseFloat(_0x3c83a7):_0x4d3c9c===_0x3da4b5(0x239)?(this[_0x3da4b5(0x239)]=_0x3c83a7,this[_0x3da4b5(0x1fa)]=this[_0x3da4b5(0x1fe)](_0x3c83a7)):_0x4d3c9c==='decimal-places'&&(this[_0x3da4b5(0x1ef)]=parseInt(_0x3c83a7)||0x3),this[_0x3da4b5(0x229)]();}[_0x153a09(0x1fe)](_0x23271b){const _0x188331=_0x153a09;for(const _0x2e326d in this[_0x188331(0x1f5)])if(this[_0x188331(0x1f5)][_0x2e326d][_0x188331(0x202)](_0x23271b))return _0x2e326d;return null;}[_0x153a09(0x209)](){const _0x52b68b=_0x153a09;this[_0x52b68b(0x208)][_0x52b68b(0x1e6)](_0x52b68b(0x1ed),this[_0x52b68b(0x23a)][_0x52b68b(0x21b)](this)),this[_0x52b68b(0x229)]();}['disconnectedCallback'](){const _0x10e55f=_0x153a09;this[_0x10e55f(0x208)][_0x10e55f(0x237)](_0x10e55f(0x1ed),this['handleUnitChange'][_0x10e55f(0x21b)](this));}[_0x153a09(0x223)](_0x1bd387){const _0x303c82=_0x153a09;if(_0x1bd387['target'][_0x303c82(0x22e)]('.unit-container')){const _0x4d0178=this[_0x303c82(0x208)]['querySelector'](_0x303c82(0x1f8));_0x4d0178&&(_0x4d0178[_0x303c82(0x20b)](),_0x4d0178['click']());}}[_0x153a09(0x23a)](_0x2429c8){const _0x47edde=_0x153a09;if(_0x2429c8[_0x47edde(0x230)]['tagName']==='SELECT'){const _0x4226ff=_0x2429c8[_0x47edde(0x230)][_0x47edde(0x206)],_0x55554b=this[_0x47edde(0x235)][this[_0x47edde(0x1fa)]][this[_0x47edde(0x239)]]/this[_0x47edde(0x235)][this[_0x47edde(0x1fa)]][_0x4226ff];this['value']=this[_0x47edde(0x206)]*_0x55554b,this[_0x47edde(0x239)]=_0x4226ff,this['render']();}}[_0x153a09(0x20f)](_0x44f266){const _0x291355=_0x153a09;return Number[_0x291355(0x218)](_0x44f266)?_0x44f266[_0x291355(0x1e5)]():Math[_0x291355(0x1e4)](_0x44f266)!==0x0?_0x44f266[_0x291355(0x22c)](this['decimalPlaces'])['replace'](/0+$/,'')[_0x291355(0x1f0)](/\.$/,''):_0x44f266[_0x291355(0x21c)](0x3);}['render'](){const _0xa612ba=_0x153a09;this[_0xa612ba(0x208)][_0xa612ba(0x201)]=_0xa612ba(0x224)+this[_0xa612ba(0x20f)](this[_0xa612ba(0x206)])+_0xa612ba(0x210)+this[_0xa612ba(0x1f5)][this[_0xa612ba(0x1fa)]][_0xa612ba(0x219)](_0x1edad3=>'<option\x20value=\x22'+_0x1edad3+'\x22\x20'+(_0x1edad3===this[_0xa612ba(0x239)]?_0xa612ba(0x20e):'')+'>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1edad3+_0xa612ba(0x1f3))[_0xa612ba(0x228)]('')+'\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'+this[_0xa612ba(0x1ea)]+_0xa612ba(0x20d);const _0x1efaa0=this['shadowRoot']['querySelector'](_0xa612ba(0x216)),_0x329502=this[_0xa612ba(0x208)]['querySelectorAll']('.tooltip')[0x0];_0x1efaa0[_0xa612ba(0x1e6)](_0xa612ba(0x1f1),()=>{const _0x3095a7=_0xa612ba;this[_0x3095a7(0x22f)]=setTimeout(()=>{const _0x38fd36=_0x3095a7;_0x329502[_0x38fd36(0x217)][_0x38fd36(0x213)]=_0x38fd36(0x220);},0x3e8);}),_0x1efaa0[_0xa612ba(0x1e6)](_0xa612ba(0x238),()=>{const _0x896d24=_0xa612ba;setTimeout(()=>{const _0x396d10=_0x39ba;_0x329502[_0x396d10(0x217)]['display']='none';},0x7d0),clearTimeout(this[_0x896d24(0x22f)]);}),_0x329502[_0xa612ba(0x1e6)](_0xa612ba(0x238),()=>{setTimeout(()=>{const _0x4ea2d9=_0x39ba;_0x329502[_0x4ea2d9(0x217)]['display']='none';},0x7d0);});}}customElements[_0x153a09(0x231)]('physical-quantity',_0x265891);class _0x4f025e extends _0x265891{}return customElements['define'](_0x153a09(0x236),_0x4f025e),_0x265891;}));
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "physical-quantity",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.28",
|
|
4
4
|
"description": "A web component to represent a physical quantity with unit conversion.",
|
|
5
|
-
"main": "
|
|
6
|
-
"module": "
|
|
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
|
],
|