rn-css 1.11.2 → 1.11.4

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/package.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "name": "rn-css",
3
- "version": "1.11.2",
3
+ "version": "1.11.4",
4
4
  "exports": {
5
- ".": "./dist/index.js",
6
- "./cssToRN": "./dist/cssToRN.bundle.js"
5
+ ".": {
6
+ "import": "./dist/index.js",
7
+ "types": "./dist/index.d.ts"
8
+ },
9
+ "./cssToRN": {
10
+ "import": "./dist/cssToRN/index.js",
11
+ "types": "./dist/cssToRN/index.d.ts"
12
+ }
7
13
  },
8
14
  "scripts": {
9
15
  "test": "jest",
@@ -16,7 +22,7 @@
16
22
  "release": "npm run prepare && release-it",
17
23
  "web": "webpack serve --open --mode development"
18
24
  },
19
- "optionalDependencies": {
25
+ "peerDependencies": {
20
26
  "react": ">=16.13.1",
21
27
  "react-native": ">=0.62.2"
22
28
  },
@@ -1,363 +0,0 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ var __webpack_modules__ = ({
3
-
4
- /***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
5
- /*!*****************************************************************!*\
6
- !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
7
- \*****************************************************************/
8
- /***/ ((module) => {
9
-
10
- function _arrayLikeToArray(arr, len) {
11
- if (len == null || len > arr.length) len = arr.length;
12
-
13
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
14
- arr2[i] = arr[i];
15
- }
16
-
17
- return arr2;
18
- }
19
-
20
- module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
21
-
22
- /***/ }),
23
-
24
- /***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
25
- /*!***************************************************************!*\
26
- !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
27
- \***************************************************************/
28
- /***/ ((module) => {
29
-
30
- function _arrayWithHoles(arr) {
31
- if (Array.isArray(arr)) return arr;
32
- }
33
-
34
- module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
35
-
36
- /***/ }),
37
-
38
- /***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
39
- /*!******************************************************************!*\
40
- !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
41
- \******************************************************************/
42
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
43
-
44
- var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
45
-
46
- function _arrayWithoutHoles(arr) {
47
- if (Array.isArray(arr)) return arrayLikeToArray(arr);
48
- }
49
-
50
- module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
51
-
52
- /***/ }),
53
-
54
- /***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
55
- /*!***************************************************************!*\
56
- !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
57
- \***************************************************************/
58
- /***/ ((module) => {
59
-
60
- function _defineProperty(obj, key, value) {
61
- if (key in obj) {
62
- Object.defineProperty(obj, key, {
63
- value: value,
64
- enumerable: true,
65
- configurable: true,
66
- writable: true
67
- });
68
- } else {
69
- obj[key] = value;
70
- }
71
-
72
- return obj;
73
- }
74
-
75
- module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
76
-
77
- /***/ }),
78
-
79
- /***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
80
- /*!**********************************************************************!*\
81
- !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
82
- \**********************************************************************/
83
- /***/ ((module) => {
84
-
85
- function _interopRequireDefault(obj) {
86
- return obj && obj.__esModule ? obj : {
87
- "default": obj
88
- };
89
- }
90
-
91
- module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
92
-
93
- /***/ }),
94
-
95
- /***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
96
- /*!****************************************************************!*\
97
- !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
98
- \****************************************************************/
99
- /***/ ((module) => {
100
-
101
- function _iterableToArray(iter) {
102
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
103
- }
104
-
105
- module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
106
-
107
- /***/ }),
108
-
109
- /***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
110
- /*!*********************************************************************!*\
111
- !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
112
- \*********************************************************************/
113
- /***/ ((module) => {
114
-
115
- function _iterableToArrayLimit(arr, i) {
116
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
117
-
118
- if (_i == null) return;
119
- var _arr = [];
120
- var _n = true;
121
- var _d = false;
122
-
123
- var _s, _e;
124
-
125
- try {
126
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
127
- _arr.push(_s.value);
128
-
129
- if (i && _arr.length === i) break;
130
- }
131
- } catch (err) {
132
- _d = true;
133
- _e = err;
134
- } finally {
135
- try {
136
- if (!_n && _i["return"] != null) _i["return"]();
137
- } finally {
138
- if (_d) throw _e;
139
- }
140
- }
141
-
142
- return _arr;
143
- }
144
-
145
- module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
146
-
147
- /***/ }),
148
-
149
- /***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
150
- /*!****************************************************************!*\
151
- !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
152
- \****************************************************************/
153
- /***/ ((module) => {
154
-
155
- function _nonIterableRest() {
156
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
157
- }
158
-
159
- module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
160
-
161
- /***/ }),
162
-
163
- /***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
164
- /*!******************************************************************!*\
165
- !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
166
- \******************************************************************/
167
- /***/ ((module) => {
168
-
169
- function _nonIterableSpread() {
170
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
171
- }
172
-
173
- module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
174
-
175
- /***/ }),
176
-
177
- /***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
178
- /*!**************************************************************!*\
179
- !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
180
- \**************************************************************/
181
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
182
-
183
- var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js");
184
-
185
- var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
186
-
187
- var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
188
-
189
- var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
190
-
191
- function _slicedToArray(arr, i) {
192
- return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
193
- }
194
-
195
- module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
196
-
197
- /***/ }),
198
-
199
- /***/ "./node_modules/@babel/runtime/helpers/toArray.js":
200
- /*!********************************************************!*\
201
- !*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
202
- \********************************************************/
203
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
204
-
205
- var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js");
206
-
207
- var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/iterableToArray.js");
208
-
209
- var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
210
-
211
- var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
212
-
213
- function _toArray(arr) {
214
- return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();
215
- }
216
-
217
- module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
218
-
219
- /***/ }),
220
-
221
- /***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
222
- /*!******************************************************************!*\
223
- !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
224
- \******************************************************************/
225
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
226
-
227
- var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js");
228
-
229
- var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/iterableToArray.js");
230
-
231
- var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
232
-
233
- var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js");
234
-
235
- function _toConsumableArray(arr) {
236
- return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
237
- }
238
-
239
- module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
240
-
241
- /***/ }),
242
-
243
- /***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
244
- /*!***************************************************************************!*\
245
- !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
246
- \***************************************************************************/
247
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
248
-
249
- var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
250
-
251
- function _unsupportedIterableToArray(o, minLen) {
252
- if (!o) return;
253
- if (typeof o === "string") return arrayLikeToArray(o, minLen);
254
- var n = Object.prototype.toString.call(o).slice(8, -1);
255
- if (n === "Object" && o.constructor) n = o.constructor.name;
256
- if (n === "Map" || n === "Set") return Array.from(o);
257
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
258
- }
259
-
260
- module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
261
-
262
- /***/ }),
263
-
264
- /***/ "./src/convertStyle.tsx":
265
- /*!******************************!*\
266
- !*** ./src/convertStyle.tsx ***!
267
- \******************************/
268
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
269
-
270
- Object.defineProperty(exports, "__esModule", ({value:true}));exports["default"]=void 0;var _convertUnits=__webpack_require__(/*! ./convertUnits */ "./src/convertUnits.ts");var convertStyle=function convertStyle(rnStyle,units){var convertedStyle={};['width','height'].forEach(function(key){if(!units[key]&&rnStyle[key]){var converted=(0,_convertUnits.convertValue)(key,rnStyle[key],units);if(!Number.isNaN(converted))units[key]=converted;}});Object.keys(rnStyle).forEach(function(key){var value=rnStyle[key]||'0';if(key==='transform'&&rnStyle.transform){convertedStyle.transform=rnStyle.transform.map(function(transformation){var result={};Object.keys(transformation).forEach(function(k){return result[k]=(0,_convertUnits.convertValue)(k,transformation[k],units);});return result;});}else if(key==='shadowOffset'&&rnStyle.shadowOffset){convertedStyle.shadowOffset={width:(0,_convertUnits.convertValue)(key,rnStyle.shadowOffset.width||'0',units),height:(0,_convertUnits.convertValue)(key,rnStyle.shadowOffset.height||'0',units)};}else if(key==='textShadowOffset'&&rnStyle.textShadowOffset){convertedStyle.textShadowOffset={width:(0,_convertUnits.convertValue)(key,rnStyle.textShadowOffset.width||'0',units),height:(0,_convertUnits.convertValue)(key,rnStyle.textShadowOffset.height||'0',units)};}else if(['cursor','fontFamily','boxShadow','textShadow'].includes(key)){convertedStyle[key]=value;}else{convertedStyle[key]=(0,_convertUnits.convertValue)(key,value,units);}});return convertedStyle;};var _default=convertStyle;exports["default"]=_default;
271
-
272
- /***/ }),
273
-
274
- /***/ "./src/convertUnits.ts":
275
- /*!*****************************!*\
276
- !*** ./src/convertUnits.ts ***!
277
- \*****************************/
278
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
279
-
280
- var _interopRequireDefault=__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({value:true}));exports.convertValue=convertValue;exports.parseValue=parseValue;var _slicedToArray2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));var _maths=__webpack_require__(/*! ./cssToRN/maths */ "./src/cssToRN/maths.ts");var _reactNative=__webpack_require__(/*! ./react-native */ "./src/react-native/index.web.ts");function parseValue(value){var unit=value.match(/([+-]?\b\d+(\.\d+)?)([a-z]+\b|%)?/i);return[parseFloat(unit[1]),unit[3]];}function convertValue(key,value,units){if(typeof value!=='string'){console.error("Failed to parse CSS instruction: "+key+"="+value+". We expect a string, but "+value+" was of type "+typeof value+".");return 0;}if(value.startsWith('#'))return value;var finalUnits=Object.assign({},units);if(value.includes('%')){if(_reactNative.Platform.OS==='web'&&(!key.toLowerCase().includes('border')||key.toLowerCase().includes('radius')))return value;if(['marginTop','marginBottom','translateY'].includes(key)||key.startsWith('borderTop')||key.startsWith('borderBottom'))finalUnits['%']=units.height/100;else if(['marginLeft','marginRight','translateX'].includes(key)||key.startsWith('borderLeft')||key.startsWith('borderRight'))finalUnits['%']=units.width/100;else if(key.startsWith('border')&&key.endsWith('Radius'))finalUnits['%']=(units.width+units.height)/200;else if(['width','height','minWidth','minHeight','maxWidth','maxHeight','top','left','bottom','right','flexBasis','rotate3d'].includes(key)){if(value.startsWith('calc')||value.startsWith('max')||value.startsWith('min')){if(['height','minHeight','maxHeight','top','bottom'].includes(key))finalUnits['%']=units.height/100;else finalUnits['%']=units.width/100;}else return value;}else if(['lineHeight'].includes(key))finalUnits['%']=units.em/100;else finalUnits['%']=0.01;}var convertedValue=value.replace(/(\b\d+(\.\d+)?)([a-z]+\b|%)/ig,function(occ){var _parseValue=parseValue(occ),_parseValue2=(0,_slicedToArray2.default)(_parseValue,2),val=_parseValue2[0],unit=_parseValue2[1];if(['deg','rad','turn','s'].includes(unit))return occ;return val*finalUnits[unit||'px']+'';});if(convertedValue.startsWith('calc('))return(0,_maths.calculate)(convertedValue.substring(4));else if(convertedValue.startsWith('max('))return(0,_maths.max)(convertedValue.substring(4,convertedValue.length-1));else if(convertedValue.startsWith('min('))return(0,_maths.min)(convertedValue.substring(4,convertedValue.length-1));else if(key==='fontWeight')return convertedValue;else if(parseFloat(convertedValue)+''===convertedValue)return parseFloat(convertedValue);else return convertedValue;}
281
-
282
- /***/ }),
283
-
284
- /***/ "./src/cssToRN/convert.ts":
285
- /*!********************************!*\
286
- !*** ./src/cssToRN/convert.ts ***!
287
- \********************************/
288
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
289
-
290
- var _interopRequireDefault=__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({value:true}));exports.background=background;exports.border=border;exports.borderLike=borderLike;exports.cornerValue=cornerValue;exports.flex=flex;exports.flexFlow=flexFlow;exports.font=font;exports.placeContent=placeContent;exports.shadow=shadow;exports.sideValue=sideValue;exports.textDecoration=textDecoration;exports.transform=transform;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"));var _slicedToArray2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));var _defineProperty2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));function isNumber(value,acceptAuto){if(acceptAuto&&value==='auto')return true;return value.match(/^[+-]?(\.\d|\d|calc\(|max\(|min\()/mg);}function findNumbers(value,acceptAuto){var result={nonNumbers:[],numbers:[]};var group='';value.split(/\s+/mg).forEach(function(val){if(val.startsWith('"')||val.startsWith("'"))group=val.charAt(0);if(group&&val.endsWith(group))group='';if(group)result.nonNumbers.push(val);else result[isNumber(val,acceptAuto)?'numbers':'nonNumbers'].push(val);});return result;}function border(value){var values=value.split(/\s+/mg);var result={borderWidth:'0',borderColor:'black',borderStyle:'solid'};values.forEach(function(value){if(['solid','dotted','dashed'].includes(value))result.borderStyle=value;else if(isNumber(value))result.borderWidth=value;else if(value==='none')return;else result.borderColor=value;});return Object.assign({},sideValue('border',result.borderWidth,'Width'),sideValue('border',result.borderColor,'Color'),sideValue('border',result.borderStyle,'Style'));}function borderLike(prefixKey,value){var _result;var values=value.split(/\s+/mg);var result=(_result={},(0,_defineProperty2.default)(_result,prefixKey+'Width','0'),(0,_defineProperty2.default)(_result,prefixKey+'Color','black'),(0,_defineProperty2.default)(_result,prefixKey+'Style','solid'),_result);if(value==='none')return result;values.forEach(function(value){if(['solid','dotted','dashed'].includes(value))result[prefixKey+'Style']=value;else if(isNumber(value))result[prefixKey+'Width']=value;else result[prefixKey+'Color']=value;});return result;}function shadow(prefix,value){var _ref;if(value==='none')return shadow(prefix,'0 0 0 black');var _findNumbers=findNumbers(value),nonNumbers=_findNumbers.nonNumbers,numbers=_findNumbers.numbers;return _ref={},(0,_defineProperty2.default)(_ref,prefix+'Offset',{width:numbers[0]||'0',height:numbers[1]||'0'}),(0,_defineProperty2.default)(_ref,prefix+'Radius',numbers[2]||'0'),(0,_defineProperty2.default)(_ref,prefix+'Color',nonNumbers[0]||'black'),_ref;}function flex(value){var _value$split=value.split(/\s/g),_value$split2=(0,_slicedToArray2.default)(_value$split,3),flexGrow=_value$split2[0],_value$split2$=_value$split2[1],flexShrink=_value$split2$===void 0?'0':_value$split2$,_value$split2$2=_value$split2[2],flexBasis=_value$split2$2===void 0?'0':_value$split2$2;if(parseFloat(flexGrow)+''!==flexGrow)return{flexBasis:flexGrow};if(parseFloat(flexShrink)+''!==flexShrink)return{flexGrow:flexGrow,flexBasis:flexShrink};return{flexGrow:flexGrow,flexShrink:flexShrink,flexBasis:flexBasis};}function flexFlow(value){var values=value.split(/\s/g);var result={};values.forEach(function(val){if(['wrap','nowrap','wrap-reverse'].includes(val))result.flexWrap=val;else if(['row','column','row-reverse','column-reverse'].includes(val))result.flexDirection=val;});return result;}function placeContent(value){var _value$split3=value.split(/\s/g),_value$split4=(0,_slicedToArray2.default)(_value$split3,2),alignContent=_value$split4[0],_value$split4$=_value$split4[1],justifyContent=_value$split4$===void 0?alignContent:_value$split4$;return{alignContent:alignContent,justifyContent:justifyContent};}function background(value){var values=value.split(/\s+/mg);var color=values.pop();return{backgroundColor:isColor(color)?color:'transparent'};}function textDecoration(value){var values=value.split(/\s+/mg);var result={textDecorationLine:'none',textDecorationStyle:'solid',textDecorationColor:'black'};values.forEach(function(value){if(['none','solid','double','dotted','dashed'].includes(value))result.textDecorationStyle=value;else if(['none','underline','line-through'].includes(value)){if(result.textDecorationLine!=='none')result.textDecorationLine+=' '+value;else result.textDecorationLine=value;}else result.textDecorationColor=value;});return result;}function read2D(prefix,value){var _ref2=value.split(',').map(function(val){return val.trim();}),_ref3=(0,_slicedToArray2.default)(_ref2,2),x=_ref3[0],_ref3$=_ref3[1],y=_ref3$===void 0?x:_ref3$;return[(0,_defineProperty2.default)({},prefix+'X',x),(0,_defineProperty2.default)({},prefix+'Y',y)];}function read3D(prefix,value){var _value$split$map=value.split(',').map(function(val){return val.trim();}),_value$split$map2=(0,_slicedToArray2.default)(_value$split$map,3),x=_value$split$map2[0],y=_value$split$map2[1],z=_value$split$map2[2];var transform=[];if(x)transform.push((0,_defineProperty2.default)({},prefix+'X',x));if(y)transform.push((0,_defineProperty2.default)({},prefix+'Y',y));if(z)transform.push((0,_defineProperty2.default)({},prefix+'Z',z));return transform;}function transform(value){var transform=(0,_toConsumableArray2.default)(value.matchAll(/(\w+)\((.*?)\)/gm)).reduce(function(acc,val){var operation=val[1];var values=val[2].trim();if(['translate','scale','skew'].includes(operation))return acc.concat(read2D(operation,values));else if(operation==='rotate3d')return acc.concat(read3D('rotate',values));else return acc.concat((0,_defineProperty2.default)({},operation,values));},[]);return{transform:transform};}function font(value){var _findNumbers2=findNumbers(value),nonNumbers=_findNumbers2.nonNumbers,numbers=_findNumbers2.numbers;var result={fontStyle:'normal',fontWeight:'normal'};for(var i=0;i<nonNumbers.length;i++){var val=nonNumbers.shift();if(val==='italic')result.fontStyle=val;else if(val==='bold')result.fontWeight=val;else if(val==='normal')continue;else if(['small-caps','oldstyle-nums','lining-nums','tabular-nums','proportional-nums'].includes(val))result.fontVariant=val;else{nonNumbers.unshift(val);break;}}if(nonNumbers.length>0)result.fontFamily=nonNumbers.join(' ');var size=numbers.pop();if(!size)return result;var _size$split=size.split('/'),_size$split2=(0,_slicedToArray2.default)(_size$split,2),fontSize=_size$split2[0],lineHeight=_size$split2[1];result.fontSize=fontSize;if(lineHeight)result.lineHeight=lineHeight;if(numbers.length)result.fontWeight=numbers[0];return result;}function sideValue(prefixKey,value){var _ref6;var postFix=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'';if(value==='none')return sideValue(prefixKey,'0',postFix);var _findNumbers$numbers=(0,_slicedToArray2.default)(findNumbers(value,prefixKey==='margin').numbers,4),_findNumbers$numbers$=_findNumbers$numbers[0],top=_findNumbers$numbers$===void 0?value:_findNumbers$numbers$,_findNumbers$numbers$2=_findNumbers$numbers[1],right=_findNumbers$numbers$2===void 0?top:_findNumbers$numbers$2,_findNumbers$numbers$3=_findNumbers$numbers[2],bottom=_findNumbers$numbers$3===void 0?top:_findNumbers$numbers$3,_findNumbers$numbers$4=_findNumbers$numbers[3],left=_findNumbers$numbers$4===void 0?right:_findNumbers$numbers$4;return _ref6={},(0,_defineProperty2.default)(_ref6,prefixKey+'Top'+postFix,top),(0,_defineProperty2.default)(_ref6,prefixKey+'Left'+postFix,left),(0,_defineProperty2.default)(_ref6,prefixKey+'Right'+postFix,right),(0,_defineProperty2.default)(_ref6,prefixKey+'Bottom'+postFix,bottom),_ref6;}function cornerValue(prefixKey,value,postFix){var _ref7;var _findNumbers$numbers2=(0,_slicedToArray2.default)(findNumbers(value).numbers,4),topLeft=_findNumbers$numbers2[0],_findNumbers$numbers3=_findNumbers$numbers2[1],topRight=_findNumbers$numbers3===void 0?topLeft:_findNumbers$numbers3,_findNumbers$numbers4=_findNumbers$numbers2[2],bottomRight=_findNumbers$numbers4===void 0?topLeft:_findNumbers$numbers4,_findNumbers$numbers5=_findNumbers$numbers2[3],bottomLeft=_findNumbers$numbers5===void 0?topRight:_findNumbers$numbers5;return _ref7={},(0,_defineProperty2.default)(_ref7,prefixKey+'TopLeft'+postFix,topLeft),(0,_defineProperty2.default)(_ref7,prefixKey+'TopRight'+postFix,topRight),(0,_defineProperty2.default)(_ref7,prefixKey+'BottomLeft'+postFix,bottomLeft),(0,_defineProperty2.default)(_ref7,prefixKey+'BottomRight'+postFix,bottomRight),_ref7;}function isColor(value){if(!value)return false;if(value.startsWith('#')||value.startsWith('rgb')||value.startsWith('hsl'))return true;var CSS_COLOR_NAMES=['aliceblue','antiquewhite','aqua','aquamarine','azure','beige','bisque','black','blanchedalmond','blue','blueviolet','brown','burlywood','cadetblue','chartreuse','chocolate','coral','cornflowerblue','cornsilk','crimson','cyan','darkblue','darkcyan','darkgoldenrod','darkgray','darkgrey','darkgreen','darkkhaki','darkmagenta','darkolivegreen','darkorange','darkorchid','darkred','darksalmon','darkseagreen','darkslateblue','darkslategray','darkslategrey','darkturquoise','darkviolet','deeppink','deepskyblue','dimgray','dimgrey','dodgerblue','firebrick','floralwhite','forestgreen','fuchsia','gainsboro','ghostwhite','gold','goldenrod','gray','grey','green','greenyellow','honeydew','hotpink','indianred','indigo','ivory','khaki','lavender','lavenderblush','lawngreen','lemonchiffon','lightblue','lightcoral','lightcyan','lightgoldenrodyellow','lightgray','lightgrey','lightgreen','lightpink','lightsalmon','lightseagreen','lightskyblue','lightslategray','lightslategrey','lightsteelblue','lightyellow','lime','limegreen','linen','magenta','maroon','mediumaquamarine','mediumblue','mediumorchid','mediumpurple','mediumseagreen','mediumslateblue','mediumspringgreen','mediumturquoise','mediumvioletred','midnightblue','mintcream','mistyrose','moccasin','navajowhite','navy','oldlace','olive','olivedrab','orange','orangered','orchid','palegoldenrod','palegreen','paleturquoise','palevioletred','papayawhip','peachpuff','peru','pink','plum','powderblue','purple','rebeccapurple','red','rosybrown','royalblue','saddlebrown','salmon','sandybrown','seagreen','seashell','sienna','silver','skyblue','slateblue','slategray','slategrey','snow','springgreen','steelblue','tan','teal','thistle','tomato','turquoise','violet','wheat','white','whitesmoke','yellow','yellowgreen'];return CSS_COLOR_NAMES.includes(value);}
291
-
292
- /***/ }),
293
-
294
- /***/ "./src/cssToRN/maths.ts":
295
- /*!******************************!*\
296
- !*** ./src/cssToRN/maths.ts ***!
297
- \******************************/
298
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
299
-
300
- var _interopRequireDefault=__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({value:true}));exports.calculate=calculate;exports.max=max;exports.min=min;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"));function calculate(string){function applyOperator(left,op,right){if(op==='+')return left+right;else if(op==='-')return left-right;else if(op==='*')return left*right;else if(op==='/')return left/right;else return right||left;}function evaluate(root){switch(root.type){case'group':return evaluate(root.right);case'additive':case'multiplicative':return applyOperator(evaluate(root.left),root.operation,evaluate(root.right));case'number':return parseFloat(root.value);}}var rootNode={type:'group'};var currentNode=rootNode;function openGroup(){var newGroup={type:'group',parent:currentNode};currentNode.right=newGroup;currentNode=newGroup;}function closeGroup(){while(currentNode.type!=='group'){currentNode=currentNode.parent;}currentNode=currentNode.parent;}function addNumber(char){var currentNumber=currentNode.right;if(currentNumber===undefined)currentNode.right={type:'number',value:char};else currentNumber.value+=char;}function addOperator(char){var additive='+-'.includes(char);var priority=additive?1:2;if(additive&&!currentNode.right)return addNumber(char);while(currentNode.priority&&currentNode.priority>=priority){currentNode=currentNode.parent;}var operator={type:additive?'additive':'multiplicative',priority:priority,parent:currentNode,operation:char,left:currentNode.right};currentNode.right=operator;currentNode=operator;}string.split('').forEach(function(char){if(char==='(')openGroup();else if(char===')')closeGroup();else if('0123456789.'.includes(char))addNumber(char);else if('+*-/'.includes(char))addOperator(char);});return evaluate(rootNode);}function min(string){var values=string.split(',').map(function(val){return parseFloat(val.trim());});return Math.min.apply(Math,(0,_toConsumableArray2.default)(values));}function max(string){var values=string.split(',').map(function(val){return parseFloat(val.trim());});return Math.max.apply(Math,(0,_toConsumableArray2.default)(values));}
301
-
302
- /***/ }),
303
-
304
- /***/ "./src/cssToRN/mediaQueries.ts":
305
- /*!*************************************!*\
306
- !*** ./src/cssToRN/mediaQueries.ts ***!
307
- \*************************************/
308
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
309
-
310
- var _interopRequireDefault=__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({value:true}));exports.createContext=createContext;exports.createMedia=void 0;var _defineProperty2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));var _slicedToArray2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"));var _convertUnits=__webpack_require__(/*! ../convertUnits */ "./src/convertUnits.ts");var _reactNative=__webpack_require__(/*! ../react-native */ "./src/react-native/index.web.ts");function createContext(units){var vw=(units.vw||1)*100;var vh=(units.vh||1)*100;return{anyHover:'hover',anyPointer:_reactNative.Platform.OS==='web'?'fine':'coarse',aspectRatio:vw/vh,color:16,colorGamut:'srgb',colorIndex:0,deviceAspectRatio:vw/vh,deviceHeight:vh,deviceWidth:vw,dynamicRange:'standard',environmentBlending:'opaque',forcedColor:'none',grid:0,height:vh,hover:'hover',invertedColors:'none',monochrome:0,orientation:vw>vh?'landscape':'portrait',overflowBlock:'scroll',overflowInline:'scroll',pointer:'coarse',prefersColorScheme:'dark',prefersContrast:'no-preference',prefersReducedData:'no-preference',prefersReducedMotion:'no-preference',prefersReducedTransparency:'no-preference',resolution:_reactNative.PixelRatio.getPixelSizeForLayoutSize(vw),scan:'progressive',scripting:'enabled',type:'screen',units:units,update:'fast',width:vw};}function convertAnyValue(key,value,units){if(key==='resolution'){if(value==='infinite')return Infinity;var densityUnitsEquivalence={dpi:'in',dpcm:'cm',dppx:'px',x:'px'};var _parseValue=(0,_convertUnits.parseValue)(value),_parseValue2=(0,_slicedToArray2.default)(_parseValue,2),num=_parseValue2[0],unit=_parseValue2[1];return num+densityUnitsEquivalence[unit];}else if(key==='deviceAspectRatio'||key==='aspectRatio'){var _value$split$map=value.split('/').map(function(v){return parseInt(v,10);}),_value$split$map2=(0,_slicedToArray2.default)(_value$split$map,2),w=_value$split$map2[0],h=_value$split$map2[1];return w/h;}return(0,_convertUnits.convertValue)(key,value,units);}function evaluateConstraint(constraint,context){return Object.keys(constraint).every(function(key){var _ref=key.match(/(.*?)(Min|Max|$)/),_ref2=(0,_slicedToArray2.default)(_ref,3),baseKey=_ref2[1],minMax=_ref2[2];var value=convertAnyValue(baseKey,constraint[key]+'',context.units);if(minMax==='Min'){return context[baseKey]>=value;}else if(key.endsWith('Max')){return context[baseKey]<=value;}else if(['all','sprint','speech','screen'].includes(key)){return context.type===key||key==='all';}else{if(value===undefined)return!!context[baseKey]&&context[baseKey]!=='none';if(baseKey.endsWith('aspectRatio'))return Math.abs(context[baseKey]-value)<(value+context[baseKey])/100;return context[baseKey]===value;}});}function parseConstraintValue(constraintString){var _constraintString$spl=constraintString.split(':').map(function(v){return v.trim();}),_constraintString$spl2=(0,_slicedToArray2.default)(_constraintString$spl,2),key=_constraintString$spl2[0],value=_constraintString$spl2[1];if(key.startsWith('min-'))key=key.substring(4)+'Min';else if(key.startsWith('max-'))key=key.substring(4)+'Max';var constraint=(0,_defineProperty2.default)({},key,value);return function(context){return evaluateConstraint(constraint,context);};}function parse(constraint,previous){var result=constraint.match(/\sand\s|,|\sonly\s|\(|\snot\s/im);if(!result){if(constraint.match(/\w/))return parseConstraintValue(constraint);else return previous||function(){return true;};}var token=result[0];var tail=constraint.substring(result.index+token.length);var current=constraint.substring(0,result.index);if(token==='('){try{var _ref3=tail.match(/\)/),index=_ref3.index;var parenthesis=tail.substring(0,index);var postParenthesis=tail.substring(index+1);return parse(postParenthesis,parse(parenthesis,previous));}catch(err){console.error('No matching parenthesis in the media query',constraint);throw err;}}else if(token.includes('and')){var left=previous||parseConstraintValue(current);var right=parse(tail);return function(context){return left(context)&&right(context);};}else if(token.includes('not')){var evaluate=parse(tail);return function(context){return!evaluate(context);};}else if(token.includes('only')){return parse(tail,previous||parseConstraintValue(current));}else if(token===','){var _left=previous||parseConstraintValue(current);var _right=parse(tail);return function(context){return _left(context)||_right(context);};}else{throw new Error("Error while parsing media query '"+constraint+"'. No token found");}}var createMedia=function createMedia(query){var parsed=query.match(/@media([\s\S]*?){([^{}]*)}/mi);if(!parsed)throw new Error("Parsing error: check the syntax of media query "+query+".");var _parsed=(0,_slicedToArray2.default)(parsed,3),constraints=_parsed[1],css=_parsed[2];var isValid=parse(constraints);return{css:css,isValid:isValid};};exports.createMedia=createMedia;
311
-
312
- /***/ }),
313
-
314
- /***/ "./src/react-native/index.web.ts":
315
- /*!***************************************!*\
316
- !*** ./src/react-native/index.web.ts ***!
317
- \***************************************/
318
- /***/ ((__unused_webpack_module, exports) => {
319
-
320
- Object.defineProperty(exports, "__esModule", ({value:true}));exports.Platform=exports.PixelRatio=exports.Dimensions=void 0;var Platform={OS:'web'};exports.Platform=Platform;var Dimensions={get:function get(dimension){return dimension==='width'?window.innerWidth:window.innerHeight;}};exports.Dimensions=Dimensions;var PixelRatio={getPixelSizeForLayoutSize:function getPixelSizeForLayoutSize(dp){return dp*window.devicePixelRatio;}};exports.PixelRatio=PixelRatio;
321
-
322
- /***/ })
323
-
324
- /******/ });
325
- /************************************************************************/
326
- /******/ // The module cache
327
- /******/ var __webpack_module_cache__ = {};
328
- /******/
329
- /******/ // The require function
330
- /******/ function __webpack_require__(moduleId) {
331
- /******/ // Check if module is in cache
332
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
333
- /******/ if (cachedModule !== undefined) {
334
- /******/ return cachedModule.exports;
335
- /******/ }
336
- /******/ // Create a new module (and put it into the cache)
337
- /******/ var module = __webpack_module_cache__[moduleId] = {
338
- /******/ // no module.id needed
339
- /******/ // no module.loaded needed
340
- /******/ exports: {}
341
- /******/ };
342
- /******/
343
- /******/ // Execute the module function
344
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
345
- /******/
346
- /******/ // Return the exports of the module
347
- /******/ return module.exports;
348
- /******/ }
349
- /******/
350
- /************************************************************************/
351
- var __webpack_exports__ = {};
352
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
353
- (() => {
354
- var exports = __webpack_exports__;
355
- /*!******************************!*\
356
- !*** ./src/cssToRN/index.ts ***!
357
- \******************************/
358
- var _interopRequireDefault=__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(exports, "__esModule", ({value:true}));exports.cssToRNStyle=cssToRNStyle;exports["default"]=void 0;var _defineProperty2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));var _toArray2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toArray */ "./node_modules/@babel/runtime/helpers/toArray.js"));var _reactNative=__webpack_require__(/*! ../react-native */ "./src/react-native/index.web.ts");var _convertStyle=_interopRequireDefault(__webpack_require__(/*! ../convertStyle */ "./src/convertStyle.tsx"));var _convert=__webpack_require__(/*! ./convert */ "./src/cssToRN/convert.ts");var _mediaQueries=__webpack_require__(/*! ./mediaQueries */ "./src/cssToRN/mediaQueries.ts");function kebab2camel(string){return string.replace(/-./g,function(x){return x.toUpperCase()[1];});}function stripSpaces(string){return string.replace(/(calc|max|min|rgb|rgba)\(.*?\)/mg,function(res){return res.replace(/\s/g,'');});}function cssToStyle(css){var result={};var cssWithoutMediaQueries=css.replace(/@media([\s\S]*?){[^{}]*}/gmi,function(res){var _createMedia=(0,_mediaQueries.createMedia)(res),css=_createMedia.css,isValid=_createMedia.isValid;var style=cssChunkToStyle(css);var mediaQuery=function mediaQuery(context){return isValid(context)&&style;};if(!result.media)result.media=[];result.media.push(mediaQuery);return'';});var cssWithoutHover=cssWithoutMediaQueries.replace(/&:hover\s*{([\s\S]*?)}/gmi,function(res){var hoverInstructions=res.substring(0,res.length-1).replace(/&:hover\s*{/mi,'');result.hover=cssChunkToStyle(hoverInstructions);return'';});var cssWithoutActive=cssWithoutHover.replace(/&:active\s*{([\s\S]*?)}/gmi,function(res){var activeInstructions=res.substring(0,res.length-1).replace(/&:active\s*{/mi,'');result.active=cssChunkToStyle(activeInstructions);return'';});var cssWithoutFocus=cssWithoutActive.replace(/&:focus\s*{([\s\S]*?)}/gmi,function(res){var activeInstructions=res.substring(0,res.length-1).replace(/&:focus\s*{/mi,'');result.focus=cssChunkToStyle(activeInstructions);return'';});Object.assign(result,cssChunkToStyle(cssWithoutFocus));return result;}function cssToRNStyle(css){var units=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var _Dimensions$get=_reactNative.Dimensions.get('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;var finalUnits=Object.assign({em:16,'%':0.01,vw:width/100,vh:height/100,vmin:Math.min(width,height)/100,vmax:Math.max(width,height)/100,width:100,height:100,rem:16,px:1,pt:96/72,in:96,pc:16,cm:96/2.54,mm:96/25.4},units);var rnStyle=cssChunkToStyle(css);return(0,_convertStyle.default)(rnStyle,finalUnits);}function cssChunkToStyle(css){var result={};css.split(/\s*;\s*(?!base64)/mg).forEach(function(entry){var _entry$split=entry.split(':'),_entry$split2=(0,_toArray2.default)(_entry$split),rawKey=_entry$split2[0],rest=_entry$split2.slice(1);var rawValue=rest.join(':');if(!rawValue)return;var key=kebab2camel(rawKey.trim());var value=stripSpaces(rawValue.trim());switch(key){case'border':Object.assign(result,(0,_convert.border)(value));break;case'borderTop':case'borderLeft':case'borderRight':case'borderBottom':case'outline':Object.assign(result,(0,_convert.borderLike)(key,value));break;case'borderStyle':case'borderColor':case'borderWidth':Object.assign(result,(0,_convert.sideValue)('border',value,key.split('border').pop()));break;case'background':Object.assign(result,(0,_convert.background)(value));break;case'padding':case'margin':Object.assign(result,(0,_convert.sideValue)(key,value));break;case'borderRadius':Object.assign(result,(0,_convert.cornerValue)('border',value,'Radius'));break;case'font':Object.assign(result,(0,_convert.font)(value));break;case'textDecoration':Object.assign(result,(0,_convert.textDecoration)(value));break;case'placeContent':Object.assign(result,(0,_convert.placeContent)(value));break;case'flex':Object.assign(result,(0,_convert.flex)(value));break;case'flexFlow':Object.assign(result,(0,_convert.flexFlow)(value));break;case'transform':Object.assign(result,(0,_convert.transform)(value));break;case'boxShadow':case'textShadow':if(_reactNative.Platform.OS==='web')Object.assign(result,(0,_defineProperty2.default)({},key,value));else Object.assign(result,(0,_convert.shadow)(key==='boxShadow'?'shadow':key,value));break;default:result[key]=value;}});return result;}var _default=cssToStyle;exports["default"]=_default;
359
- })();
360
-
361
- /******/ })()
362
- ;
363
- //# sourceMappingURL=cssToRN.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dist/cssToRN.bundle.js","mappings":";;;;;;;;;AAAA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA;;AAEA,oCAAoC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACV/F;AACA;AACA;;AAEA,kCAAkC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACJ7F,uBAAuB,mBAAO,CAAC,wFAAuB;;AAEtD;AACA;AACA;;AAEA,qCAAqC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACNhG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,kCAAkC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACf7F;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACNpG;AACA;AACA;;AAEA,mCAAmC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACJ9F;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,4BAA4B,+BAA+B;AAC3D;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA,wCAAwC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC9BnG;AACA;AACA;;AAEA,mCAAmC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACJ9F;AACA;AACA;;AAEA,qCAAqC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACJhG,qBAAqB,mBAAO,CAAC,oFAAqB;;AAElD,2BAA2B,mBAA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,CAAsB,uBAAUV,GAAV,CAAeM,KAAf,CAAtB,EACA,MACF,IAAK,cAAL,CACEF,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,yBAAY,QAAZ,CAAsBJ,KAAtB,CAA6B,QAA7B,CAAtB,EACA,MACF,IAAK,MAAL,CACEF,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,kBAAKJ,KAAL,CAAtB,EACA,MACF,IAAK,gBAAL,CACEF,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,4BAAeJ,KAAf,CAAtB,EACA,MACF,IAAK,cAAL,CACEF,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,0BAAaJ,KAAb,CAAtB,EACA,MACF,IAAK,MAAL,CACEF,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,kBAAKJ,KAAL,CAAtB,EACA,MACF,IAAK,UAAL,CACEF,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,sBAASJ,KAAT,CAAtB,EACA,MACF,IAAK,WAAL,CACEF,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,uBAAUJ,KAAV,CAAtB,EACA,MACF,IAAK,WAAL,CACA,IAAK,YAAL,CAEE,GAAIoB,sBAASC,EAAT,GAAgB,KAApB,CAA2BvB,MAAM,CAAC+N,MAAP,CAAczN,MAAd,iCAAyBV,GAAzB,CAA+BM,KAA/B,GAA3B,IAEKF,CAAAA,MAAM,CAAC+N,MAAP,CAAczN,MAAd,CAAsB,oBAAOV,GAAG,GAAK,WAAR,CAAsB,QAAtB,CAAiCA,GAAxC,CAA6CM,KAA7C,CAAtB,EACL,MAIF,QAASI,MAAM,CAACV,GAAD,CAAN,CAAcM,KAAd,CAtDX,CAwDD,CA9DD,EA+DA,MAAOI,CAAAA,MAAP,CACD,cAEc4M,uC","sources":["webpack://rn-css/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/toArray.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://rn-css/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://rn-css/./src/convertStyle.tsx","webpack://rn-css/./src/convertUnits.ts","webpack://rn-css/./src/cssToRN/convert.ts","webpack://rn-css/./src/cssToRN/maths.ts","webpack://rn-css/./src/cssToRN/mediaQueries.ts","webpack://rn-css/./src/react-native/index.web.ts","webpack://rn-css/webpack/bootstrap","webpack://rn-css/./src/cssToRN/index.ts"],"sourcesContent":["function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}\n\nmodule.exports = _toArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/* eslint-disable react/display-name */\nimport type { /* StyleSheet, */ Animated, TextStyle } from 'react-native'\nimport { convertValue } from './convertUnits'\nimport type { AnyStyle, CompleteStyle, PartialStyle, Units } from './types'\n\n/** Mix the calculated RN style within the object style */\nconst convertStyle = <T extends AnyStyle | Animated.WithAnimatedValue<AnyStyle> = AnyStyle>(rnStyle: PartialStyle, units: Units) => {\n /** This is the result of the convertions from css style into RN style */\n const convertedStyle: CompleteStyle = {};\n // If width and height are specified, we can use those values for the first render\n (['width', 'height'] as const).forEach(key => {\n if (!units[key] && rnStyle[key]) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const converted = convertValue(key, rnStyle[key]!, units)\n if (!Number.isNaN(converted)) units[key] = converted as number\n }\n })\n ;(Object.keys(rnStyle) as (keyof PartialStyle)[]).forEach(key => {\n const value = rnStyle[key] || '0'\n // Handle object values\n if (key === 'transform' && rnStyle.transform) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n convertedStyle.transform = rnStyle.transform!.map(transformation => {\n const result = {} as { [trans: string]: string | number }\n (Object.keys(transformation) as Array<keyof typeof transformation>).forEach(k => (result[k] = convertValue(k, transformation[k]!, units)))\n return result\n }) as unknown as TextStyle['transform']\n }\n else if (key === 'shadowOffset' && rnStyle.shadowOffset) {\n convertedStyle.shadowOffset = {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n width: convertValue(key, rnStyle.shadowOffset!.width || '0', units) as number,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n height: convertValue(key, rnStyle.shadowOffset!.height || '0', units) as number\n }\n }\n else if (key === 'textShadowOffset' && rnStyle.textShadowOffset) {\n convertedStyle.textShadowOffset = {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n width: convertValue(key, rnStyle.textShadowOffset!.width || '0', units) as number,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n height: convertValue(key, rnStyle.textShadowOffset!.height || '0', units) as number\n }\n }\n // Font family should not be transformed (same as cursor for web in case of base64 value, and boxShadow/textShadow for web)\n else if (['cursor', 'fontFamily', 'boxShadow', 'textShadow'].includes(key)) {\n convertedStyle[key as 'fontFamily'] = value\n }\n else {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n convertedStyle[key] = convertValue(key, value, units)\n }\n })\n return convertedStyle as T\n}\n\nexport default convertStyle\n","import type { PartialStyle, Transform, Units } from './types'\nimport { calculate, min, max } from './cssToRN/maths'\nimport { Platform } from './react-native'\n\n/** Take a css value like 12em and return [12, 'em'] */\nexport function parseValue (value: string): [number, string | undefined] {\n // Match a single unit\n const unit = value.match(/([+-]?\\b\\d+(\\.\\d+)?)([a-z]+\\b|%)?/i)\n return [parseFloat(unit![1]), unit![3] as (string | undefined)]\n}\n\n/** Convert a value using the provided unit transform table */\nexport function convertValue (key: keyof PartialStyle | keyof Transform, value: string, units: Units): string | number {\n if (typeof value !== 'string') {\n console.error(`Failed to parse CSS instruction: ${key}=${value}. We expect a string, but ${value} was of type ${typeof value}.`)\n return 0\n }\n // colors should be left untouched\n if (value.startsWith('#')) return value\n\n // Percentage values need to rely on an other unit as reference\n const finalUnits = { ...units }\n if (value.includes('%')) {\n // Percentage is not supported on borders in web\n if (Platform.OS === 'web' && (!key.toLowerCase().includes('border') || key.toLowerCase().includes('radius'))) return value\n if (['marginTop', 'marginBottom', 'translateY'].includes(key) || key.startsWith('borderTop') || key.startsWith('borderBottom')) finalUnits['%'] = units.height! / 100\n else if (['marginLeft', 'marginRight', 'translateX'].includes(key) || key.startsWith('borderLeft') || key.startsWith('borderRight')) finalUnits['%'] = units.width! / 100\n else if (key.startsWith('border') && key.endsWith('Radius')) finalUnits['%'] = (units.width! + units.height!) / 200\n else if (['width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'top', 'left', 'bottom', 'right', 'flexBasis', 'rotate3d'].includes(key)) {\n if (value.startsWith('calc') || value.startsWith('max') || value.startsWith('min')) {\n if (['height', 'minHeight', 'maxHeight', 'top', 'bottom'].includes(key)) finalUnits['%'] = units.height! / 100\n else finalUnits['%'] = units.width! / 100\n }\n // width: 100%, height: 100% are supported\n else return value\n }\n else if (['lineHeight'].includes(key)) finalUnits['%'] = units.em / 100\n else finalUnits['%'] = 0.01\n }\n\n // We replace all units within the value\n const convertedValue = value.replace(/(\\b\\d+(\\.\\d+)?)([a-z]+\\b|%)/ig, occ => {\n const [val, unit] = parseValue(occ)\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (['deg', 'rad', 'turn', 's'].includes(unit!)) return occ // We don't want to convert deg, rad, turn, second units\n return val * (finalUnits[unit as keyof Units || 'px']!) + ''\n })\n\n // We handle extra calculations (calc, min, max, parsing...)\n if (convertedValue.startsWith('calc(')) return calculate(convertedValue.substring(4))// remove calc. We can keep the parenthesis\n else if (convertedValue.startsWith('max(')) return max(convertedValue.substring(4, convertedValue.length - 1))// Remove max()\n else if (convertedValue.startsWith('min(')) return min(convertedValue.substring(4, convertedValue.length - 1))// remove min()\n else if (key === 'fontWeight') return convertedValue // fontWeight must be a string even when it is an integer value.\n else if (parseFloat(convertedValue) + '' === convertedValue) return parseFloat(convertedValue)\n else return convertedValue\n}\n","import type { Style, Transform } from '../types'\n\n/**\n * Check if the value is a number. Numbers start with a digit, a decimal point or calc(, max( ou min(.\n * Optionally accept \"auto\" value (for margins)\n * @param value The value to check\n * @param acceptAuto true if auto is an accepted value\n * @returns true if the value is a number\n */\nfunction isNumber (value: string, acceptAuto?: boolean) {\n if (acceptAuto && value === 'auto') return true\n return value.match(/^[+-]?(\\.\\d|\\d|calc\\(|max\\(|min\\()/mg)\n}\n\n/**\n * Check if the value is a number. Numbers start with a digit, a decimal point or calc(, max( ou min(.\n * Optionally accept \"auto\" value (for margins)\n * @param value The value to check\n * @param acceptAuto true if auto is an accepted value\n * @returns true if the value is a number\n */\n/**\n * Split the value into numbers values and non numbers values\n * @param value The value to check\n * @param acceptAuto true if auto is an accepted value\n * @returns An object containing the number and non number values as arrays.\n */\nfunction findNumbers (value: string, acceptAuto?: boolean) {\n const result = {\n nonNumbers: [] as string[],\n numbers: [] as string[]\n }\n let group = ''\n value.split(/\\s+/mg).forEach(val => {\n // HACK: we prevent some parts of font-family names like \"Rounded Mplus 1c\" to be interpreted as numbers\n if (val.startsWith('\"') || val.startsWith(\"'\")) group = val.charAt(0)\n if (group && val.endsWith(group)) group = ''\n if (group) result.nonNumbers.push(val)\n else result[isNumber(val, acceptAuto) ? 'numbers' : 'nonNumbers'].push(val)\n })\n return result\n}\n\n/** Parse a css value for border */\nexport function border (value: string): { [x:string]: string } {\n const values = value.split(/\\s+/mg)\n const result = {\n borderWidth: '0',\n borderColor: 'black',\n borderStyle: 'solid'\n }\n values.forEach((value: string) => {\n if (['solid', 'dotted', 'dashed'].includes(value)) result.borderStyle = value\n else if (isNumber(value)) result.borderWidth = value\n // eslint-disable-next-line no-useless-return\n else if (value === 'none') return\n else result.borderColor = value\n })\n return {\n ...sideValue('border', result.borderWidth, 'Width'),\n ...sideValue('border', result.borderColor, 'Color'),\n ...sideValue('border', result.borderStyle, 'Style')\n }\n}\n\n/** Parse a css value for border-like elements */\nexport function borderLike (prefixKey: 'outline' | 'borderLeft' | 'borderRight' | 'borderTop' | 'borderBottom', value: string): { [x:string]: string } {\n const values = value.split(/\\s+/mg)\n const result = {\n [prefixKey + 'Width']: '0',\n [prefixKey + 'Color']: 'black',\n [prefixKey + 'Style']: 'solid'\n }\n if (value === 'none') return result\n values.forEach((value: string) => {\n if (['solid', 'dotted', 'dashed'].includes(value)) result[prefixKey + 'Style'] = value\n else if (isNumber(value)) result[prefixKey + 'Width'] = value\n else result[prefixKey + 'Color'] = value\n })\n return result\n}\n\nexport function shadow (prefix: 'textShadow' | 'shadow', value: string): { [x:string]: string | { width: string, height: string } } {\n if (value === 'none') return shadow(prefix, '0 0 0 black')\n const { nonNumbers, numbers } = findNumbers(value)\n return {\n [prefix + 'Offset']: { width: numbers[0] || '0', height: numbers[1] || '0' },\n [prefix + 'Radius']: numbers[2] || '0',\n [prefix + 'Color']: nonNumbers[0] || 'black'\n }\n}\n\nexport function flex (value: string) {\n const [flexGrow, flexShrink = '0', flexBasis = '0'] = value.split(/\\s/g)\n // If the only property is a not a number, its value is flexBasis. See https://developer.mozilla.org/en-US/docs/Web/CSS/flex\n if ((parseFloat(flexGrow) + '') !== flexGrow) return { flexBasis: flexGrow }\n // If the second property is not a number, its value is flexBasis.\n if (((parseFloat(flexShrink) + '') !== flexShrink)) return { flexGrow, flexBasis: flexShrink }\n return {\n flexGrow, flexShrink, flexBasis\n }\n}\n\nexport function flexFlow (value: string) {\n const values = value.split(/\\s/g)\n const result = {} as {[prop: string]: string}\n values.forEach(val => {\n if (['wrap', 'nowrap', 'wrap-reverse'].includes(val)) result.flexWrap = val\n else if (['row', 'column', 'row-reverse', 'column-reverse'].includes(val)) result.flexDirection = val\n })\n return result\n}\n\nexport function placeContent (value: string) {\n const [alignContent, justifyContent = alignContent] = value.split(/\\s/g)\n return { alignContent, justifyContent }\n}\n\nexport function background (value: string) {\n const values = value.split(/\\s+/mg)\n const color = values.pop()\n // The background-color is the only one that we support and it's the last value\n return { backgroundColor: isColor(color) ? color : 'transparent' }\n}\n\nexport function textDecoration (value: string) {\n const values = value.split(/\\s+/mg)\n const result = {\n textDecorationLine: 'none',\n textDecorationStyle: 'solid',\n textDecorationColor: 'black'\n }\n values.forEach(value => {\n if (['none', 'solid', 'double', 'dotted', 'dashed'].includes(value)) result.textDecorationStyle = value\n else if (['none', 'underline', 'line-through'].includes(value)) {\n // To accept 'underline line-throught' as a value, we need to concatenate\n if (result.textDecorationLine !== 'none') result.textDecorationLine += ' ' + value\n else result.textDecorationLine = value\n }\n else result.textDecorationColor = value\n })\n return result\n}\n\nfunction read2D (prefix: 'translate' | 'scale' | 'skew', value: string) {\n const [x, y = x] = value.split(',').map(val => val.trim()) as string[]\n return [\n { [prefix + 'X']: x },\n { [prefix + 'Y']: y }\n ]\n}\n\nfunction read3D (prefix: 'rotate', value: string): Transform[] {\n const [x, y, z] = value.split(',').map(val => val.trim())\n const transform = []\n if (x) transform.push({ [prefix + 'X']: x })\n if (y) transform.push({ [prefix + 'Y']: y })\n if (z) transform.push({ [prefix + 'Z']: z })\n return transform\n}\n\nexport function transform (value: string) {\n // Parse transform operations\n const transform = [...value.matchAll(/(\\w+)\\((.*?)\\)/gm)].reduce((acc, val) => {\n const operation = val[1]\n const values = val[2].trim()\n if (['translate', 'scale', 'skew'].includes(operation)) return acc.concat(read2D(operation as 'translate' | 'scale' | 'skew', values))\n else if (operation === 'rotate3d') return acc.concat(read3D('rotate', values))\n else return acc.concat({ [operation]: values })\n }, [] as Transform[])\n return { transform }\n}\n\nexport function font (value: string) {\n const { nonNumbers, numbers } = findNumbers(value)\n const result: Style = {\n fontStyle: 'normal',\n fontWeight: 'normal' as string\n }\n for (let i = 0; i < nonNumbers.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const val = nonNumbers.shift()!\n if (val === 'italic') result.fontStyle = val\n else if (val === 'bold') result.fontWeight = val\n else if (val === 'normal') continue// can be both fontStyle or fontWeight, but as it is the default we can just ignore.\n else if (['small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums'].includes(val)) result.fontVariant = val\n else {\n nonNumbers.unshift(val)\n break\n }\n }\n // The font family is the last property and can contain spaces\n if (nonNumbers.length > 0) result.fontFamily = nonNumbers.join(' ')\n\n // The font size is always defined and is the last number\n const size = numbers.pop()\n if (!size) return result\n const [fontSize, lineHeight] = size.split('/') // We can define the line height like this : fontSize/lineHeight\n result.fontSize = fontSize\n if (lineHeight) result.lineHeight = lineHeight\n // The font size is always after the font weight\n if (numbers.length) result.fontWeight = numbers[0]\n\n return result\n}\n\n/** Parses a css value for the side of an element (border-width, margin, padding) */\nexport function sideValue <T extends 'padding' | 'margin' | 'border'> (prefixKey: T, value: string, postFix: T extends 'border' ? 'Width' | 'Style' | 'Color' | '' : '' = ''): { [x: string]: string} {\n if (value === 'none') return sideValue(prefixKey, '0', postFix)\n const [top = value, right = top, bottom = top, left = right] = findNumbers(value, prefixKey === 'margin').numbers\n return {\n [prefixKey + 'Top' + postFix]: top,\n [prefixKey + 'Left' + postFix]: left,\n [prefixKey + 'Right' + postFix]: right,\n [prefixKey + 'Bottom' + postFix]: bottom\n }\n}\n\n/** Parses a css value for the corner of an element (border-radius) */\nexport function cornerValue (prefixKey: 'border', value: string, postFix: 'Radius') {\n const [topLeft, topRight = topLeft, bottomRight = topLeft, bottomLeft = topRight] = findNumbers(value).numbers\n return {\n [prefixKey + 'TopLeft' + postFix]: topLeft,\n [prefixKey + 'TopRight' + postFix]: topRight,\n [prefixKey + 'BottomLeft' + postFix]: bottomLeft,\n [prefixKey + 'BottomRight' + postFix]: bottomRight\n }\n}\n\nfunction isColor (value?: string) {\n if (!value) return false\n if (value.startsWith('#') || value.startsWith('rgb') || value.startsWith('hsl')) return true\n const CSS_COLOR_NAMES = [\n 'aliceblue',\n 'antiquewhite',\n 'aqua',\n 'aquamarine',\n 'azure',\n 'beige',\n 'bisque',\n 'black',\n 'blanchedalmond',\n 'blue',\n 'blueviolet',\n 'brown',\n 'burlywood',\n 'cadetblue',\n 'chartreuse',\n 'chocolate',\n 'coral',\n 'cornflowerblue',\n 'cornsilk',\n 'crimson',\n 'cyan',\n 'darkblue',\n 'darkcyan',\n 'darkgoldenrod',\n 'darkgray',\n 'darkgrey',\n 'darkgreen',\n 'darkkhaki',\n 'darkmagenta',\n 'darkolivegreen',\n 'darkorange',\n 'darkorchid',\n 'darkred',\n 'darksalmon',\n 'darkseagreen',\n 'darkslateblue',\n 'darkslategray',\n 'darkslategrey',\n 'darkturquoise',\n 'darkviolet',\n 'deeppink',\n 'deepskyblue',\n 'dimgray',\n 'dimgrey',\n 'dodgerblue',\n 'firebrick',\n 'floralwhite',\n 'forestgreen',\n 'fuchsia',\n 'gainsboro',\n 'ghostwhite',\n 'gold',\n 'goldenrod',\n 'gray',\n 'grey',\n 'green',\n 'greenyellow',\n 'honeydew',\n 'hotpink',\n 'indianred',\n 'indigo',\n 'ivory',\n 'khaki',\n 'lavender',\n 'lavenderblush',\n 'lawngreen',\n 'lemonchiffon',\n 'lightblue',\n 'lightcoral',\n 'lightcyan',\n 'lightgoldenrodyellow',\n 'lightgray',\n 'lightgrey',\n 'lightgreen',\n 'lightpink',\n 'lightsalmon',\n 'lightseagreen',\n 'lightskyblue',\n 'lightslategray',\n 'lightslategrey',\n 'lightsteelblue',\n 'lightyellow',\n 'lime',\n 'limegreen',\n 'linen',\n 'magenta',\n 'maroon',\n 'mediumaquamarine',\n 'mediumblue',\n 'mediumorchid',\n 'mediumpurple',\n 'mediumseagreen',\n 'mediumslateblue',\n 'mediumspringgreen',\n 'mediumturquoise',\n 'mediumvioletred',\n 'midnightblue',\n 'mintcream',\n 'mistyrose',\n 'moccasin',\n 'navajowhite',\n 'navy',\n 'oldlace',\n 'olive',\n 'olivedrab',\n 'orange',\n 'orangered',\n 'orchid',\n 'palegoldenrod',\n 'palegreen',\n 'paleturquoise',\n 'palevioletred',\n 'papayawhip',\n 'peachpuff',\n 'peru',\n 'pink',\n 'plum',\n 'powderblue',\n 'purple',\n 'rebeccapurple',\n 'red',\n 'rosybrown',\n 'royalblue',\n 'saddlebrown',\n 'salmon',\n 'sandybrown',\n 'seagreen',\n 'seashell',\n 'sienna',\n 'silver',\n 'skyblue',\n 'slateblue',\n 'slategray',\n 'slategrey',\n 'snow',\n 'springgreen',\n 'steelblue',\n 'tan',\n 'teal',\n 'thistle',\n 'tomato',\n 'turquoise',\n 'violet',\n 'wheat',\n 'white',\n 'whitesmoke',\n 'yellow',\n 'yellowgreen'\n ]\n return CSS_COLOR_NAMES.includes(value)\n}\n","type Group = {\n type: 'group';\n right?: Element;\n parent?: Node;\n}\n\ntype Operator = {\n type: 'additive' | 'multiplicative';\n parent: Node;\n priority: 1 | 2;\n operation: '*' | '/' | '+' | '-';\n left: Element;\n right?: Element;\n}\n\ntype Value = {\n type: 'number';\n value: string;\n}\n\ntype Node = Group | Operator;\ntype Element = Node | Value;\n\n/** Evaluate the string operation without relying on eval */\nexport function calculate (string: string) {\n function applyOperator (left: number, op: Operator['operation'], right: number): number {\n if (op === '+') return left + right\n else if (op === '-') return left - right\n else if (op === '*') return left * right\n else if (op === '/') return left / right\n else return right || left\n }\n function evaluate (root: Element): number {\n switch (root.type) {\n case 'group': return evaluate(root.right!)\n case 'additive':\n case 'multiplicative':\n return applyOperator(evaluate(root.left), root.operation, evaluate(root.right!))\n case 'number': return parseFloat(root.value)\n }\n }\n const rootNode: Group = { type: 'group' }\n let currentNode: Node = rootNode\n function openGroup () {\n const newGroup: Group = { type: 'group', parent: currentNode }\n currentNode.right = newGroup\n currentNode = newGroup\n }\n function closeGroup () {\n while (currentNode.type !== 'group') currentNode = currentNode.parent!\n currentNode = currentNode.parent!\n }\n function addNumber (char: string) {\n const currentNumber = currentNode.right as (Value | undefined)\n if (currentNumber === undefined) currentNode.right = { type: 'number', value: char }\n else currentNumber.value += char\n }\n function addOperator (char: Operator['operation']) {\n const additive = '+-'.includes(char)\n const priority = additive ? 1 : 2\n // If it is a sign and not an operation, we add it to the comming number\n if (additive && !currentNode.right) return addNumber(char)\n while ((currentNode as Operator).priority && ((currentNode as Operator).priority >= priority)) currentNode = currentNode.parent!\n\n const operator: Operator = {\n type: additive ? 'additive' : 'multiplicative',\n priority,\n parent: currentNode,\n operation: char,\n left: currentNode.right!\n }\n\n currentNode.right = operator\n currentNode = operator\n }\n string.split('').forEach(char => {\n if (char === '(') openGroup()\n else if (char === ')') closeGroup()\n else if ('0123456789.'.includes(char)) addNumber(char)\n else if ('+*-/'.includes(char)) addOperator(char as Operator['operation'])\n })\n return evaluate(rootNode)\n}\n\nexport function min (string: string) {\n const values = string.split(',').map(val => parseFloat(val.trim()))\n return Math.min(...values)\n}\nexport function max (string: string) {\n const values = string.split(',').map(val => parseFloat(val.trim()))\n return Math.max(...values)\n}\n","import type { Units, Context, PartialStyle, Transform } from '../types'\nimport { convertValue, parseValue } from '../convertUnits'\nimport { PixelRatio, Platform } from '../react-native'\n\ntype Constraint = {\n all?: undefined,\n sprint?: undefined,\n speech?: undefined,\n screen?: undefined,\n width?: string\n widthMin?: string\n widthMax?: string\n height?: string\n heightMin?: string\n heightMax?: string\n aspectRatio?: string\n aspectRatioMin?: string\n aspectRatioMax?: string\n orientation?: 'portrait' | 'landscape'\n resolution?: string\n resolutionMin?: string\n resolutionMax?: string\n scan?: 'interlace' | 'progressive'\n grid?: 0 | 1\n update?: 'none' | 'slow' | 'fast'\n overflowBlock?: 'none' | 'scroll' | 'paged'\n overflowInline?: 'none' | 'scroll'\n environmentBlending?: 'opaque' | 'additive' | 'subtractive'\n color?: string\n colorMin?: string\n colorMax?: string\n colorGamut?: 'srgb' | 'p3' | 'rec2020'\n colorIndex?: string\n colorIndexMin?: string\n colorIndexMax?: string\n dynamicRange?: 'standard' | 'high'\n monochrome?: string\n monochromeMin?: string\n monochromeMax?: string\n invertedColors?: 'none' | 'inverted'\n pointer?: 'none' | 'coarse' | 'fine'\n hover?: 'none' | 'hover'\n anyPointer?: 'none' | 'coarse' | 'fine'\n anyHover?: 'none' | 'hover'\n prefersReducedMotion?: 'no-preference' | 'reduce'\n prefersReducedTransparency?: 'no-preference' | 'reduce'\n prefersReducedData?: 'no-preference' | 'reduce'\n prefersContrast?: 'no-preference' | 'high' | 'low' | 'forced'\n prefersColorScheme?: 'light' | 'dark'\n forcedColor?: 'none' | 'active'\n scripting?: 'none' | 'initial-only' | 'enabled'\n deviceWidth?: string\n deviceWidthMin?: string\n deviceWidthMax?: string\n deviceHeight?: string\n deviceHeightMin?: string\n deviceHeightMax?: string\n deviceAspectRatio?: string\n deviceAspectRatioMin?: string\n deviceAspectRatioMax?: string\n}\n\nexport function createContext (units: Units): Context {\n const vw = (units.vw || 1) * 100\n const vh = (units.vh || 1) * 100\n return {\n anyHover: 'hover',\n anyPointer: Platform.OS === 'web' ? 'fine' : 'coarse',\n aspectRatio: vw / vh,\n color: 16,\n colorGamut: 'srgb',\n colorIndex: 0,\n deviceAspectRatio: vw / vh,\n deviceHeight: vh,\n deviceWidth: vw,\n dynamicRange: 'standard',\n environmentBlending: 'opaque',\n forcedColor: 'none',\n grid: 0,\n height: vh,\n hover: 'hover',\n invertedColors: 'none',\n monochrome: 0,\n orientation: vw > vh ? 'landscape' : 'portrait',\n overflowBlock: 'scroll',\n overflowInline: 'scroll',\n pointer: 'coarse',\n prefersColorScheme: 'dark',\n prefersContrast: 'no-preference',\n prefersReducedData: 'no-preference',\n prefersReducedMotion: 'no-preference',\n prefersReducedTransparency: 'no-preference',\n resolution: PixelRatio.getPixelSizeForLayoutSize(vw),\n scan: 'progressive',\n scripting: 'enabled',\n type: 'screen',\n units,\n update: 'fast',\n width: vw\n }\n}\n\nfunction convertAnyValue (key: keyof Context | keyof PartialStyle | keyof Transform, value: string, units: Units) {\n if (key === 'resolution') {\n // Convert density\n if (value === 'infinite') return Infinity\n const densityUnitsEquivalence = {\n dpi: 'in',\n dpcm: 'cm',\n dppx: 'px',\n x: 'px'\n }\n const [num, unit] = parseValue(value)\n return num + densityUnitsEquivalence[unit as keyof typeof densityUnitsEquivalence]\n }\n else if (key === 'deviceAspectRatio' || key === 'aspectRatio') {\n // Convert ratio\n const [w, h] = value.split('/').map(v => parseInt(v, 10))\n return w / h\n }\n\n return convertValue(key as keyof PartialStyle, value, units)\n}\n\n/** Check if a constraint is respected by the provided context */\nfunction evaluateConstraint (constraint: Constraint, context: Context): boolean {\n return (Object.keys(constraint) as (keyof Constraint)[]).every(key => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [, baseKey, minMax] = key.match(/(.*?)(Min|Max|$)/)! as [string, keyof Context, 'Min' | 'Max' | '']\n const value = convertAnyValue(baseKey, constraint[key] + '', context.units)\n if (minMax === 'Min') {\n return context[baseKey] >= value\n }\n else if (key.endsWith('Max')) {\n return context[baseKey] <= value\n }\n else if (['all', 'sprint', 'speech', 'screen'].includes(key)) {\n return context.type === key || key === 'all'\n }\n else {\n // Boolean check: we want the value to be defined and not equal to 'none'\n if (value === undefined) return !!context[baseKey] && context[baseKey] !== 'none'\n // float comparison\n if (baseKey.endsWith('aspectRatio')) return Math.abs((context[baseKey] as number) - (value as number)) < ((value as number) + (context[baseKey] as number)) / 100\n return context[baseKey] === value\n }\n })\n}\n\n/** Parse media query constraint such as min-width: 600px, or screen */\nfunction parseConstraintValue (constraintString: string): Evaluation {\n let [key, value] = constraintString.split(':').map(v => v.trim())\n if (key.startsWith('min-')) key = key.substring(4) + 'Min'\n else if (key.startsWith('max-')) key = key.substring(4) + 'Max'\n const constraint: Constraint = { [key]: value }\n return (context: Context) => evaluateConstraint(constraint, context)\n}\n\nexport type Evaluation = (context: Context) => boolean\n\nfunction parse (constraint: string, previous?: Evaluation): Evaluation {\n const result = constraint.match(/\\sand\\s|,|\\sonly\\s|\\(|\\snot\\s/im)\n\n if (!result) {\n // If we reached the end of the string, we just return the last constraint\n if (constraint.match(/\\w/)) return parseConstraintValue(constraint)\n // If there is just an empty string, we just ignore it by returning a truthy evaluation\n else return previous || (() => true)\n }\n\n const token = result[0] // The next command we found\n const tail = constraint.substring(result.index! + token.length) // The rest of the constraint\n const current = constraint.substring(0, result.index!) // The current constraint\n if (token === '(') {\n try {\n const { index } = tail.match(/\\)/)!\n const parenthesis = tail.substring(0, index!)\n const postParenthesis = tail.substring(index! + 1)\n return parse(postParenthesis, parse(parenthesis, previous))\n }\n catch (err) {\n console.error('No matching parenthesis in the media query', constraint)\n throw err\n }\n }\n else if (token.includes('and')) {\n const left = previous || parseConstraintValue(current)\n const right = parse(tail)\n return (context: Context) => left(context) && right(context)\n }\n else if (token.includes('not')) {\n const evaluate = parse(tail)\n return (context: Context) => !evaluate(context)\n }\n else if (token.includes('only')) {\n return parse(tail, previous || parseConstraintValue(current))\n }\n else if (token === ',') {\n const left = previous || parseConstraintValue(current)\n const right = parse(tail)\n return (context: Context) => left(context) || right(context)\n }\n else {\n throw new Error(`Error while parsing media query '${constraint}'. No token found`)\n }\n}\n\nexport const createMedia = (query: string) => {\n // We use [\\s\\S] instead of dotall flag (s) because it is not supported by react-native-windows\n const parsed = query.match(/@media([\\s\\S]*?){([^{}]*)}/mi)\n if (!parsed) throw new Error(`Parsing error: check the syntax of media query ${query}.`)\n const [, constraints, css] = parsed\n const isValid = parse(constraints)\n return {\n css,\n isValid\n }\n}\n","// We use those fallbacks to make cssToRN not depend on react-native\n\nexport const Platform = {\n OS: 'web'\n}\n\nexport const Dimensions = {\n get: (dimension: 'width' | 'height') => dimension === 'width' ? window.innerWidth : window.innerHeight\n}\n\nexport const PixelRatio = {\n getPixelSizeForLayoutSize: (dp: number) => dp * window.devicePixelRatio\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { Dimensions, Platform } from '../react-native'\nimport convertStyle from '../convertStyle'\nimport { CompleteStyle, Context, PartialStyle, Style, Units } from '../types'\nimport { sideValue, border, borderLike, cornerValue, font, textDecoration, shadow, placeContent, flex, flexFlow, transform, background } from './convert'\nimport { createMedia } from './mediaQueries'\n\nfunction kebab2camel (string: string) {\n return string.replace(/-./g, x => x.toUpperCase()[1])\n}\n\nfunction stripSpaces (string: string) {\n return string.replace(/(calc|max|min|rgb|rgba)\\(.*?\\)/mg, res => res.replace(/\\s/g, ''))\n}\n\nfunction cssToStyle (css: string) {\n const result: Style = {}\n // Find media queries (We use [\\s\\S] instead of . because dotall flag (s) is not supported by react-native-windows)\n const cssWithoutMediaQueries = css.replace(/@media([\\s\\S]*?){[^{}]*}/gmi, res => {\n const { css, isValid } = createMedia(res)\n const style = cssChunkToStyle(css)\n const mediaQuery = (context: Context) => isValid(context) && style\n if (!result.media) result.media = []\n result.media!.push(mediaQuery)\n return ''\n })\n // Find hover (we don't support hover within media queries) (We use [\\s\\S] instead of . because dotall flag (s) is not supported by react-native-windows)\n const cssWithoutHover = cssWithoutMediaQueries.replace(/&:hover\\s*{([\\s\\S]*?)}/gmi, res => {\n const hoverInstructions = res.substring(0, res.length - 1).replace(/&:hover\\s*{/mi, '')// We remove the `&:hover {` and `}`\n result.hover = cssChunkToStyle(hoverInstructions)\n return ''\n })\n // Find active (we don't support active within media queries) (We use [\\s\\S] instead of . because dotall flag (s) is not supported by react-native-windows)\n const cssWithoutActive = cssWithoutHover.replace(/&:active\\s*{([\\s\\S]*?)}/gmi, res => {\n const activeInstructions = res.substring(0, res.length - 1).replace(/&:active\\s*{/mi, '')// We remove the `&:active {` and `}`\n result.active = cssChunkToStyle(activeInstructions)\n return ''\n })\n // Find focus (we don't support focus within media queries) (We use [\\s\\S] instead of . because dotall flag (s) is not supported by react-native-windows)\n const cssWithoutFocus = cssWithoutActive.replace(/&:focus\\s*{([\\s\\S]*?)}/gmi, res => {\n const activeInstructions = res.substring(0, res.length - 1).replace(/&:focus\\s*{/mi, '')// We remove the `&:focus {` and `}`\n result.focus = cssChunkToStyle(activeInstructions)\n return ''\n })\n Object.assign(result, cssChunkToStyle(cssWithoutFocus))\n return result\n}\n\nexport function cssToRNStyle (css: string, units: { em?: number, width?: number, height?: number } = {}) {\n const { width, height } = Dimensions.get('window')\n const finalUnits: Units = {\n em: 16,\n '%': 0.01,\n vw: width / 100,\n vh: height / 100,\n vmin: Math.min(width, height) / 100,\n vmax: Math.max(width, height) / 100,\n width: 100,\n height: 100,\n rem: 16,\n px: 1,\n pt: 96 / 72,\n in: 96,\n pc: 16,\n cm: 96 / 2.54,\n mm: 96 / 25.4,\n ...units\n }\n const rnStyle = cssChunkToStyle(css)\n return convertStyle<CompleteStyle>(rnStyle, finalUnits)\n}\n\nfunction cssChunkToStyle (css: string) {\n const result: PartialStyle = {}\n css.split(/\\s*;\\s*(?!base64)/mg).forEach((entry: string) => {\n const [rawKey, ...rest] = entry.split(':')\n const rawValue = rest.join(':')\n if (!rawValue) return\n const key = kebab2camel(rawKey.trim())\n const value = stripSpaces(rawValue.trim())// We need this to correctly read calc() values\n switch (key) {\n case 'border':\n Object.assign(result, border(value))\n break\n case 'borderTop':\n case 'borderLeft':\n case 'borderRight':\n case 'borderBottom':\n case 'outline':\n Object.assign(result, borderLike(key, value))\n break\n case 'borderStyle':\n case 'borderColor':\n case 'borderWidth':\n Object.assign(result, sideValue('border', value, key.split('border').pop() as '' | 'Width' | 'Style' | 'Color'))\n break\n case 'background':\n Object.assign(result, background(value))\n break\n case 'padding':\n case 'margin':\n Object.assign(result, sideValue(key, value))\n break\n case 'borderRadius':\n Object.assign(result, cornerValue('border', value, 'Radius'))\n break\n case 'font':\n Object.assign(result, font(value))\n break\n case 'textDecoration':\n Object.assign(result, textDecoration(value))\n break\n case 'placeContent':\n Object.assign(result, placeContent(value))\n break\n case 'flex':\n Object.assign(result, flex(value))\n break\n case 'flexFlow':\n Object.assign(result, flexFlow(value))\n break\n case 'transform':\n Object.assign(result, transform(value))\n break\n case 'boxShadow':\n case 'textShadow':\n // To provide support for the 4th element (spread-radius) at least for web\n if (Platform.OS === 'web') Object.assign(result, { [key]: value })\n // We need to replace boxShadow by shadow\n else Object.assign(result, shadow(key === 'boxShadow' ? 'shadow' : key, value))\n break\n // Other keys don't require any special treatment\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n default: result[key] = value\n }\n })\n return result\n}\n\nexport default cssToStyle\n"],"names":["convertStyle","rnStyle","units","convertedStyle","forEach","key","converted","Number","isNaN","Object","keys","value","transform","map","transformation","result","k","shadowOffset","width","height","textShadowOffset","includes","parseValue","unit","match","parseFloat","convertValue","console","error","startsWith","finalUnits","Platform","OS","toLowerCase","endsWith","em","convertedValue","replace","occ","val","substring","length","isNumber","acceptAuto","findNumbers","nonNumbers","numbers","group","split","charAt","push","border","values","borderWidth","borderColor","borderStyle","sideValue","borderLike","prefixKey","shadow","prefix","flex","flexGrow","flexShrink","flexBasis","flexFlow","flexWrap","flexDirection","placeContent","alignContent","justifyContent","background","color","pop","backgroundColor","isColor","textDecoration","textDecorationLine","textDecorationStyle","textDecorationColor","read2D","trim","x","y","read3D","z","matchAll","reduce","acc","operation","concat","font","fontStyle","fontWeight","i","shift","fontVariant","unshift","fontFamily","join","size","fontSize","lineHeight","postFix","top","right","bottom","left","cornerValue","topLeft","topRight","bottomRight","bottomLeft","CSS_COLOR_NAMES","calculate","string","applyOperator","op","evaluate","root","type","rootNode","currentNode","openGroup","newGroup","parent","closeGroup","addNumber","char","currentNumber","undefined","addOperator","additive","priority","operator","min","Math","max","createContext","vw","vh","anyHover","anyPointer","aspectRatio","colorGamut","colorIndex","deviceAspectRatio","deviceHeight","deviceWidth","dynamicRange","environmentBlending","forcedColor","grid","hover","invertedColors","monochrome","orientation","overflowBlock","overflowInline","pointer","prefersColorScheme","prefersContrast","prefersReducedData","prefersReducedMotion","prefersReducedTransparency","resolution","PixelRatio","getPixelSizeForLayoutSize","scan","scripting","update","convertAnyValue","Infinity","densityUnitsEquivalence","dpi","dpcm","dppx","num","v","parseInt","w","h","evaluateConstraint","constraint","context","every","baseKey","minMax","abs","parseConstraintValue","constraintString","parse","previous","token","tail","index","current","parenthesis","postParenthesis","err","Error","createMedia","query","parsed","constraints","css","isValid","Dimensions","get","dimension","window","innerWidth","innerHeight","dp","devicePixelRatio","kebab2camel","toUpperCase","stripSpaces","res","cssToStyle","cssWithoutMediaQueries","style","cssChunkToStyle","mediaQuery","media","cssWithoutHover","hoverInstructions","cssWithoutActive","activeInstructions","active","cssWithoutFocus","focus","assign","cssToRNStyle","vmin","vmax","rem","px","pt","in","pc","cm","mm","entry","rawKey","rest","rawValue"],"sourceRoot":""}