Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

properties.js 56KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833
  1. 'use strict';
  2. // autogenerated - 4/29/2020
  3. /*
  4. *
  5. * https://www.w3.org/Style/CSS/all-properties.en.html
  6. */
  7. var external_dependency_parsers_0 = require("./parsers.js");
  8. var external_dependency_constants_1 = require("./constants.js");
  9. var azimuth_export_definition;
  10. azimuth_export_definition = {
  11. set: function (v) {
  12. var valueType = external_dependency_parsers_0.valueType(v);
  13. if (valueType === external_dependency_parsers_0.TYPES.ANGLE) {
  14. return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v));
  15. }
  16. if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) {
  17. var keywords = v.toLowerCase().trim().split(/\s+/);
  18. var hasBehind = false;
  19. if (keywords.length > 2) {
  20. return;
  21. }
  22. var behindIndex = keywords.indexOf('behind');
  23. hasBehind = behindIndex !== -1;
  24. if (keywords.length === 2) {
  25. if (!hasBehind) {
  26. return;
  27. }
  28. keywords.splice(behindIndex, 1);
  29. }
  30. if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {
  31. if (hasBehind) {
  32. return;
  33. }
  34. return this._setProperty('azimuth', keywords[0]);
  35. }
  36. if (keywords[0] === 'behind') {
  37. return this._setProperty('azimuth', '180deg');
  38. }
  39. switch (keywords[0]) {
  40. case 'left-side':
  41. return this._setProperty('azimuth', '270deg');
  42. case 'far-left':
  43. return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');
  44. case 'left':
  45. return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');
  46. case 'center-left':
  47. return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');
  48. case 'center':
  49. return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');
  50. case 'center-right':
  51. return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');
  52. case 'right':
  53. return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');
  54. case 'far-right':
  55. return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');
  56. case 'right-side':
  57. return this._setProperty('azimuth', '90deg');
  58. default:
  59. return;
  60. }
  61. }
  62. },
  63. get: function () {
  64. return this.getPropertyValue('azimuth');
  65. },
  66. enumerable: true,
  67. configurable: true
  68. };
  69. var backgroundColor_export_isValid, backgroundColor_export_definition;
  70. var backgroundColor_local_var_parse = function parse(v) {
  71. var parsed = external_dependency_parsers_0.parseColor(v);
  72. if (parsed !== undefined) {
  73. return parsed;
  74. }
  75. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) {
  76. return v;
  77. }
  78. return undefined;
  79. };
  80. backgroundColor_export_isValid = function isValid(v) {
  81. return backgroundColor_local_var_parse(v) !== undefined;
  82. };
  83. backgroundColor_export_definition = {
  84. set: function (v) {
  85. var parsed = backgroundColor_local_var_parse(v);
  86. if (parsed === undefined) {
  87. return;
  88. }
  89. this._setProperty('background-color', parsed);
  90. },
  91. get: function () {
  92. return this.getPropertyValue('background-color');
  93. },
  94. enumerable: true,
  95. configurable: true
  96. };
  97. var backgroundImage_export_isValid, backgroundImage_export_definition;
  98. var backgroundImage_local_var_parse = function parse(v) {
  99. var parsed = external_dependency_parsers_0.parseUrl(v);
  100. if (parsed !== undefined) {
  101. return parsed;
  102. }
  103. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) {
  104. return v;
  105. }
  106. return undefined;
  107. };
  108. backgroundImage_export_isValid = function isValid(v) {
  109. return backgroundImage_local_var_parse(v) !== undefined;
  110. };
  111. backgroundImage_export_definition = {
  112. set: function (v) {
  113. this._setProperty('background-image', backgroundImage_local_var_parse(v));
  114. },
  115. get: function () {
  116. return this.getPropertyValue('background-image');
  117. },
  118. enumerable: true,
  119. configurable: true
  120. };
  121. var backgroundRepeat_export_isValid, backgroundRepeat_export_definition;
  122. var backgroundRepeat_local_var_parse = function parse(v) {
  123. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {
  124. return v;
  125. }
  126. return undefined;
  127. };
  128. backgroundRepeat_export_isValid = function isValid(v) {
  129. return backgroundRepeat_local_var_parse(v) !== undefined;
  130. };
  131. backgroundRepeat_export_definition = {
  132. set: function (v) {
  133. this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v));
  134. },
  135. get: function () {
  136. return this.getPropertyValue('background-repeat');
  137. },
  138. enumerable: true,
  139. configurable: true
  140. };
  141. var backgroundAttachment_export_isValid, backgroundAttachment_export_definition;
  142. var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {
  143. return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');
  144. };
  145. backgroundAttachment_export_definition = {
  146. set: function (v) {
  147. if (!backgroundAttachment_local_var_isValid(v)) {
  148. return;
  149. }
  150. this._setProperty('background-attachment', v);
  151. },
  152. get: function () {
  153. return this.getPropertyValue('background-attachment');
  154. },
  155. enumerable: true,
  156. configurable: true
  157. };
  158. var backgroundPosition_export_isValid, backgroundPosition_export_definition;
  159. var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right'];
  160. var backgroundPosition_local_var_parse = function parse(v) {
  161. if (v === '' || v === null) {
  162. return undefined;
  163. }
  164. var parts = v.split(/\s+/);
  165. if (parts.length > 2 || parts.length < 1) {
  166. return undefined;
  167. }
  168. var types = [];
  169. parts.forEach(function (part, index) {
  170. types[index] = external_dependency_parsers_0.valueType(part);
  171. });
  172. if (parts.length === 1) {
  173. if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) {
  174. return v;
  175. }
  176. if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) {
  177. if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') {
  178. return v;
  179. }
  180. }
  181. return undefined;
  182. }
  183. if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) {
  184. return v;
  185. }
  186. if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) {
  187. return undefined;
  188. }
  189. if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) {
  190. return v;
  191. }
  192. return undefined;
  193. };
  194. backgroundPosition_export_isValid = function isValid(v) {
  195. return backgroundPosition_local_var_parse(v) !== undefined;
  196. };
  197. backgroundPosition_export_definition = {
  198. set: function (v) {
  199. this._setProperty('background-position', backgroundPosition_local_var_parse(v));
  200. },
  201. get: function () {
  202. return this.getPropertyValue('background-position');
  203. },
  204. enumerable: true,
  205. configurable: true
  206. };
  207. var background_export_definition;
  208. var background_local_var_shorthand_for = {
  209. 'background-color': {
  210. isValid: backgroundColor_export_isValid,
  211. definition: backgroundColor_export_definition
  212. },
  213. 'background-image': {
  214. isValid: backgroundImage_export_isValid,
  215. definition: backgroundImage_export_definition
  216. },
  217. 'background-repeat': {
  218. isValid: backgroundRepeat_export_isValid,
  219. definition: backgroundRepeat_export_definition
  220. },
  221. 'background-attachment': {
  222. isValid: backgroundAttachment_export_isValid,
  223. definition: backgroundAttachment_export_definition
  224. },
  225. 'background-position': {
  226. isValid: backgroundPosition_export_isValid,
  227. definition: backgroundPosition_export_definition
  228. }
  229. };
  230. background_export_definition = {
  231. set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for),
  232. get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for),
  233. enumerable: true,
  234. configurable: true
  235. };
  236. var borderWidth_export_isValid, borderWidth_export_definition;
  237. // the valid border-widths:
  238. var borderWidth_local_var_widths = ['thin', 'medium', 'thick'];
  239. borderWidth_export_isValid = function parse(v) {
  240. var length = external_dependency_parsers_0.parseLength(v);
  241. if (length !== undefined) {
  242. return true;
  243. }
  244. if (typeof v !== 'string') {
  245. return false;
  246. }
  247. if (v === '') {
  248. return true;
  249. }
  250. v = v.toLowerCase();
  251. if (borderWidth_local_var_widths.indexOf(v) === -1) {
  252. return false;
  253. }
  254. return true;
  255. };
  256. var borderWidth_local_var_isValid = borderWidth_export_isValid;
  257. var borderWidth_local_var_parser = function (v) {
  258. var length = external_dependency_parsers_0.parseLength(v);
  259. if (length !== undefined) {
  260. return length;
  261. }
  262. if (borderWidth_local_var_isValid(v)) {
  263. return v.toLowerCase();
  264. }
  265. return undefined;
  266. };
  267. borderWidth_export_definition = {
  268. set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser),
  269. get: function () {
  270. return this.getPropertyValue('border-width');
  271. },
  272. enumerable: true,
  273. configurable: true
  274. };
  275. var borderStyle_export_isValid, borderStyle_export_definition;
  276. // the valid border-styles:
  277. var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'];
  278. borderStyle_export_isValid = function parse(v) {
  279. return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1);
  280. };
  281. var borderStyle_local_var_isValid = borderStyle_export_isValid;
  282. var borderStyle_local_var_parser = function (v) {
  283. if (borderStyle_local_var_isValid(v)) {
  284. return v.toLowerCase();
  285. }
  286. return undefined;
  287. };
  288. borderStyle_export_definition = {
  289. set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser),
  290. get: function () {
  291. return this.getPropertyValue('border-style');
  292. },
  293. enumerable: true,
  294. configurable: true
  295. };
  296. var borderColor_export_isValid, borderColor_export_definition;
  297. borderColor_export_isValid = function parse(v) {
  298. if (typeof v !== 'string') {
  299. return false;
  300. }
  301. return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR;
  302. };
  303. var borderColor_local_var_isValid = borderColor_export_isValid;
  304. var borderColor_local_var_parser = function (v) {
  305. if (borderColor_local_var_isValid(v)) {
  306. return v.toLowerCase();
  307. }
  308. return undefined;
  309. };
  310. borderColor_export_definition = {
  311. set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser),
  312. get: function () {
  313. return this.getPropertyValue('border-color');
  314. },
  315. enumerable: true,
  316. configurable: true
  317. };
  318. var border_export_definition;
  319. var border_local_var_shorthand_for = {
  320. 'border-width': {
  321. isValid: borderWidth_export_isValid,
  322. definition: borderWidth_export_definition
  323. },
  324. 'border-style': {
  325. isValid: borderStyle_export_isValid,
  326. definition: borderStyle_export_definition
  327. },
  328. 'border-color': {
  329. isValid: borderColor_export_isValid,
  330. definition: borderColor_export_definition
  331. }
  332. };
  333. var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for);
  334. var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for);
  335. border_export_definition = {
  336. set: function (v) {
  337. if (v.toString().toLowerCase() === 'none') {
  338. v = '';
  339. }
  340. border_local_var_myShorthandSetter.call(this, v);
  341. this.removeProperty('border-top');
  342. this.removeProperty('border-left');
  343. this.removeProperty('border-right');
  344. this.removeProperty('border-bottom');
  345. this._values['border-top'] = this._values.border;
  346. this._values['border-left'] = this._values.border;
  347. this._values['border-right'] = this._values.border;
  348. this._values['border-bottom'] = this._values.border;
  349. },
  350. get: border_local_var_myShorthandGetter,
  351. enumerable: true,
  352. configurable: true
  353. };
  354. var borderBottomWidth_export_isValid, borderBottomWidth_export_definition;
  355. var borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid;
  356. borderBottomWidth_export_definition = {
  357. set: function (v) {
  358. if (borderBottomWidth_local_var_isValid(v)) {
  359. this._setProperty('border-bottom-width', v);
  360. }
  361. },
  362. get: function () {
  363. return this.getPropertyValue('border-bottom-width');
  364. },
  365. enumerable: true,
  366. configurable: true
  367. };
  368. var borderBottomStyle_export_isValid, borderBottomStyle_export_definition;
  369. borderBottomStyle_export_isValid = borderStyle_export_isValid;
  370. borderBottomStyle_export_definition = {
  371. set: function (v) {
  372. if (borderStyle_export_isValid(v)) {
  373. if (v.toLowerCase() === 'none') {
  374. v = '';
  375. this.removeProperty('border-bottom-width');
  376. }
  377. this._setProperty('border-bottom-style', v);
  378. }
  379. },
  380. get: function () {
  381. return this.getPropertyValue('border-bottom-style');
  382. },
  383. enumerable: true,
  384. configurable: true
  385. };
  386. var borderBottomColor_export_isValid, borderBottomColor_export_definition;
  387. var borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid;
  388. borderBottomColor_export_definition = {
  389. set: function (v) {
  390. if (borderBottomColor_local_var_isValid(v)) {
  391. this._setProperty('border-bottom-color', v);
  392. }
  393. },
  394. get: function () {
  395. return this.getPropertyValue('border-bottom-color');
  396. },
  397. enumerable: true,
  398. configurable: true
  399. };
  400. var borderBottom_export_definition;
  401. var borderBottom_local_var_shorthand_for = {
  402. 'border-bottom-width': {
  403. isValid: borderBottomWidth_export_isValid,
  404. definition: borderBottomWidth_export_definition
  405. },
  406. 'border-bottom-style': {
  407. isValid: borderBottomStyle_export_isValid,
  408. definition: borderBottomStyle_export_definition
  409. },
  410. 'border-bottom-color': {
  411. isValid: borderBottomColor_export_isValid,
  412. definition: borderBottomColor_export_definition
  413. }
  414. };
  415. borderBottom_export_definition = {
  416. set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for),
  417. get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for),
  418. enumerable: true,
  419. configurable: true
  420. };
  421. var borderCollapse_export_definition;
  422. var borderCollapse_local_var_parse = function parse(v) {
  423. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {
  424. return v;
  425. }
  426. return undefined;
  427. };
  428. borderCollapse_export_definition = {
  429. set: function (v) {
  430. this._setProperty('border-collapse', borderCollapse_local_var_parse(v));
  431. },
  432. get: function () {
  433. return this.getPropertyValue('border-collapse');
  434. },
  435. enumerable: true,
  436. configurable: true
  437. };
  438. var borderLeftWidth_export_isValid, borderLeftWidth_export_definition;
  439. var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid;
  440. borderLeftWidth_export_definition = {
  441. set: function (v) {
  442. if (borderLeftWidth_local_var_isValid(v)) {
  443. this._setProperty('border-left-width', v);
  444. }
  445. },
  446. get: function () {
  447. return this.getPropertyValue('border-left-width');
  448. },
  449. enumerable: true,
  450. configurable: true
  451. };
  452. var borderLeftStyle_export_isValid, borderLeftStyle_export_definition;
  453. borderLeftStyle_export_isValid = borderStyle_export_isValid;
  454. borderLeftStyle_export_definition = {
  455. set: function (v) {
  456. if (borderStyle_export_isValid(v)) {
  457. if (v.toLowerCase() === 'none') {
  458. v = '';
  459. this.removeProperty('border-left-width');
  460. }
  461. this._setProperty('border-left-style', v);
  462. }
  463. },
  464. get: function () {
  465. return this.getPropertyValue('border-left-style');
  466. },
  467. enumerable: true,
  468. configurable: true
  469. };
  470. var borderLeftColor_export_isValid, borderLeftColor_export_definition;
  471. var borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid;
  472. borderLeftColor_export_definition = {
  473. set: function (v) {
  474. if (borderLeftColor_local_var_isValid(v)) {
  475. this._setProperty('border-left-color', v);
  476. }
  477. },
  478. get: function () {
  479. return this.getPropertyValue('border-left-color');
  480. },
  481. enumerable: true,
  482. configurable: true
  483. };
  484. var borderLeft_export_definition;
  485. var borderLeft_local_var_shorthand_for = {
  486. 'border-left-width': {
  487. isValid: borderLeftWidth_export_isValid,
  488. definition: borderLeftWidth_export_definition
  489. },
  490. 'border-left-style': {
  491. isValid: borderLeftStyle_export_isValid,
  492. definition: borderLeftStyle_export_definition
  493. },
  494. 'border-left-color': {
  495. isValid: borderLeftColor_export_isValid,
  496. definition: borderLeftColor_export_definition
  497. }
  498. };
  499. borderLeft_export_definition = {
  500. set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for),
  501. get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for),
  502. enumerable: true,
  503. configurable: true
  504. };
  505. var borderRightWidth_export_isValid, borderRightWidth_export_definition;
  506. var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid;
  507. borderRightWidth_export_definition = {
  508. set: function (v) {
  509. if (borderRightWidth_local_var_isValid(v)) {
  510. this._setProperty('border-right-width', v);
  511. }
  512. },
  513. get: function () {
  514. return this.getPropertyValue('border-right-width');
  515. },
  516. enumerable: true,
  517. configurable: true
  518. };
  519. var borderRightStyle_export_isValid, borderRightStyle_export_definition;
  520. borderRightStyle_export_isValid = borderStyle_export_isValid;
  521. borderRightStyle_export_definition = {
  522. set: function (v) {
  523. if (borderStyle_export_isValid(v)) {
  524. if (v.toLowerCase() === 'none') {
  525. v = '';
  526. this.removeProperty('border-right-width');
  527. }
  528. this._setProperty('border-right-style', v);
  529. }
  530. },
  531. get: function () {
  532. return this.getPropertyValue('border-right-style');
  533. },
  534. enumerable: true,
  535. configurable: true
  536. };
  537. var borderRightColor_export_isValid, borderRightColor_export_definition;
  538. var borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid;
  539. borderRightColor_export_definition = {
  540. set: function (v) {
  541. if (borderRightColor_local_var_isValid(v)) {
  542. this._setProperty('border-right-color', v);
  543. }
  544. },
  545. get: function () {
  546. return this.getPropertyValue('border-right-color');
  547. },
  548. enumerable: true,
  549. configurable: true
  550. };
  551. var borderRight_export_definition;
  552. var borderRight_local_var_shorthand_for = {
  553. 'border-right-width': {
  554. isValid: borderRightWidth_export_isValid,
  555. definition: borderRightWidth_export_definition
  556. },
  557. 'border-right-style': {
  558. isValid: borderRightStyle_export_isValid,
  559. definition: borderRightStyle_export_definition
  560. },
  561. 'border-right-color': {
  562. isValid: borderRightColor_export_isValid,
  563. definition: borderRightColor_export_definition
  564. }
  565. };
  566. borderRight_export_definition = {
  567. set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for),
  568. get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for),
  569. enumerable: true,
  570. configurable: true
  571. };
  572. var borderSpacing_export_definition;
  573. // <length> <length>? | inherit
  574. // if one, it applies to both horizontal and verical spacing
  575. // if two, the first applies to the horizontal and the second applies to vertical spacing
  576. var borderSpacing_local_var_parse = function parse(v) {
  577. if (v === '' || v === null) {
  578. return undefined;
  579. }
  580. if (v === 0) {
  581. return '0px';
  582. }
  583. if (v.toLowerCase() === 'inherit') {
  584. return v;
  585. }
  586. var parts = v.split(/\s+/);
  587. if (parts.length !== 1 && parts.length !== 2) {
  588. return undefined;
  589. }
  590. parts.forEach(function (part) {
  591. if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) {
  592. return undefined;
  593. }
  594. });
  595. return v;
  596. };
  597. borderSpacing_export_definition = {
  598. set: function (v) {
  599. this._setProperty('border-spacing', borderSpacing_local_var_parse(v));
  600. },
  601. get: function () {
  602. return this.getPropertyValue('border-spacing');
  603. },
  604. enumerable: true,
  605. configurable: true
  606. };
  607. var borderTopWidth_export_isValid, borderTopWidth_export_definition;
  608. borderTopWidth_export_isValid = borderWidth_export_isValid;
  609. borderTopWidth_export_definition = {
  610. set: function (v) {
  611. if (borderWidth_export_isValid(v)) {
  612. this._setProperty('border-top-width', v);
  613. }
  614. },
  615. get: function () {
  616. return this.getPropertyValue('border-top-width');
  617. },
  618. enumerable: true,
  619. configurable: true
  620. };
  621. var borderTopStyle_export_isValid, borderTopStyle_export_definition;
  622. borderTopStyle_export_isValid = borderStyle_export_isValid;
  623. borderTopStyle_export_definition = {
  624. set: function (v) {
  625. if (borderStyle_export_isValid(v)) {
  626. if (v.toLowerCase() === 'none') {
  627. v = '';
  628. this.removeProperty('border-top-width');
  629. }
  630. this._setProperty('border-top-style', v);
  631. }
  632. },
  633. get: function () {
  634. return this.getPropertyValue('border-top-style');
  635. },
  636. enumerable: true,
  637. configurable: true
  638. };
  639. var borderTopColor_export_isValid, borderTopColor_export_definition;
  640. var borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid;
  641. borderTopColor_export_definition = {
  642. set: function (v) {
  643. if (borderTopColor_local_var_isValid(v)) {
  644. this._setProperty('border-top-color', v);
  645. }
  646. },
  647. get: function () {
  648. return this.getPropertyValue('border-top-color');
  649. },
  650. enumerable: true,
  651. configurable: true
  652. };
  653. var borderTop_export_definition;
  654. var borderTop_local_var_shorthand_for = {
  655. 'border-top-width': {
  656. isValid: borderTopWidth_export_isValid,
  657. definition: borderTopWidth_export_definition
  658. },
  659. 'border-top-style': {
  660. isValid: borderTopStyle_export_isValid,
  661. definition: borderTopStyle_export_definition
  662. },
  663. 'border-top-color': {
  664. isValid: borderTopColor_export_isValid,
  665. definition: borderTopColor_export_definition
  666. }
  667. };
  668. borderTop_export_definition = {
  669. set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for),
  670. get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for),
  671. enumerable: true,
  672. configurable: true
  673. };
  674. var bottom_export_definition;
  675. bottom_export_definition = {
  676. set: function (v) {
  677. this._setProperty('bottom', external_dependency_parsers_0.parseMeasurement(v));
  678. },
  679. get: function () {
  680. return this.getPropertyValue('bottom');
  681. },
  682. enumerable: true,
  683. configurable: true
  684. };
  685. var clear_export_definition;
  686. var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit'];
  687. clear_export_definition = {
  688. set: function (v) {
  689. this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords));
  690. },
  691. get: function () {
  692. return this.getPropertyValue('clear');
  693. },
  694. enumerable: true,
  695. configurable: true
  696. };
  697. var clip_export_definition;
  698. var clip_local_var_shape_regex = /^rect\((.*)\)$/i;
  699. var clip_local_var_parse = function (val) {
  700. if (val === '' || val === null) {
  701. return val;
  702. }
  703. if (typeof val !== 'string') {
  704. return undefined;
  705. }
  706. val = val.toLowerCase();
  707. if (val === 'auto' || val === 'inherit') {
  708. return val;
  709. }
  710. var matches = val.match(clip_local_var_shape_regex);
  711. if (!matches) {
  712. return undefined;
  713. }
  714. var parts = matches[1].split(/\s*,\s*/);
  715. if (parts.length !== 4) {
  716. return undefined;
  717. }
  718. var valid = parts.every(function (part, index) {
  719. var measurement = external_dependency_parsers_0.parseMeasurement(part);
  720. parts[index] = measurement;
  721. return measurement !== undefined;
  722. });
  723. if (!valid) {
  724. return undefined;
  725. }
  726. parts = parts.join(', ');
  727. return val.replace(matches[1], parts);
  728. };
  729. clip_export_definition = {
  730. set: function (v) {
  731. this._setProperty('clip', clip_local_var_parse(v));
  732. },
  733. get: function () {
  734. return this.getPropertyValue('clip');
  735. },
  736. enumerable: true,
  737. configurable: true
  738. };
  739. var color_export_definition;
  740. color_export_definition = {
  741. set: function (v) {
  742. this._setProperty('color', external_dependency_parsers_0.parseColor(v));
  743. },
  744. get: function () {
  745. return this.getPropertyValue('color');
  746. },
  747. enumerable: true,
  748. configurable: true
  749. };
  750. var cssFloat_export_definition;
  751. cssFloat_export_definition = {
  752. set: function (v) {
  753. this._setProperty('float', v);
  754. },
  755. get: function () {
  756. return this.getPropertyValue('float');
  757. },
  758. enumerable: true,
  759. configurable: true
  760. };
  761. var flexGrow_export_isValid, flexGrow_export_definition;
  762. flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) {
  763. return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first;
  764. };
  765. flexGrow_export_definition = {
  766. set: function (v) {
  767. this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v));
  768. },
  769. get: function () {
  770. return this.getPropertyValue('flex-grow');
  771. },
  772. enumerable: true,
  773. configurable: true
  774. };
  775. var flexShrink_export_isValid, flexShrink_export_definition;
  776. flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) {
  777. return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second;
  778. };
  779. flexShrink_export_definition = {
  780. set: function (v) {
  781. this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v));
  782. },
  783. get: function () {
  784. return this.getPropertyValue('flex-shrink');
  785. },
  786. enumerable: true,
  787. configurable: true
  788. };
  789. var flexBasis_export_isValid, flexBasis_export_definition;
  790. function flexBasis_local_fn_parse(v) {
  791. if (String(v).toLowerCase() === 'auto') {
  792. return 'auto';
  793. }
  794. if (String(v).toLowerCase() === 'inherit') {
  795. return 'inherit';
  796. }
  797. return external_dependency_parsers_0.parseMeasurement(v);
  798. }
  799. flexBasis_export_isValid = function isValid(v) {
  800. return flexBasis_local_fn_parse(v) !== undefined;
  801. };
  802. flexBasis_export_definition = {
  803. set: function (v) {
  804. this._setProperty('flex-basis', flexBasis_local_fn_parse(v));
  805. },
  806. get: function () {
  807. return this.getPropertyValue('flex-basis');
  808. },
  809. enumerable: true,
  810. configurable: true
  811. };
  812. var flex_export_isValid, flex_export_definition;
  813. var flex_local_var_shorthand_for = {
  814. 'flex-grow': {
  815. isValid: flexGrow_export_isValid,
  816. definition: flexGrow_export_definition
  817. },
  818. 'flex-shrink': {
  819. isValid: flexShrink_export_isValid,
  820. definition: flexShrink_export_definition
  821. },
  822. 'flex-basis': {
  823. isValid: flexBasis_export_isValid,
  824. definition: flexBasis_export_definition
  825. }
  826. };
  827. var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for);
  828. flex_export_isValid = function isValid(v) {
  829. return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined;
  830. };
  831. flex_export_definition = {
  832. set: function (v) {
  833. var normalizedValue = String(v).trim().toLowerCase();
  834. if (normalizedValue === 'none') {
  835. flex_local_var_myShorthandSetter.call(this, '0 0 auto');
  836. return;
  837. }
  838. if (normalizedValue === 'initial') {
  839. flex_local_var_myShorthandSetter.call(this, '0 1 auto');
  840. return;
  841. }
  842. if (normalizedValue === 'auto') {
  843. this.removeProperty('flex-grow');
  844. this.removeProperty('flex-shrink');
  845. this.setProperty('flex-basis', normalizedValue);
  846. return;
  847. }
  848. flex_local_var_myShorthandSetter.call(this, v);
  849. },
  850. get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for),
  851. enumerable: true,
  852. configurable: true
  853. };
  854. var float_export_definition;
  855. float_export_definition = {
  856. set: function (v) {
  857. this._setProperty('float', v);
  858. },
  859. get: function () {
  860. return this.getPropertyValue('float');
  861. },
  862. enumerable: true,
  863. configurable: true
  864. };
  865. var floodColor_export_definition;
  866. floodColor_export_definition = {
  867. set: function (v) {
  868. this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v));
  869. },
  870. get: function () {
  871. return this.getPropertyValue('flood-color');
  872. },
  873. enumerable: true,
  874. configurable: true
  875. };
  876. var fontFamily_export_isValid, fontFamily_export_definition;
  877. var fontFamily_local_var_partsRegEx = /\s*,\s*/;
  878. fontFamily_export_isValid = function isValid(v) {
  879. if (v === '' || v === null) {
  880. return true;
  881. }
  882. var parts = v.split(fontFamily_local_var_partsRegEx);
  883. var len = parts.length;
  884. var i;
  885. var type;
  886. for (i = 0; i < len; i++) {
  887. type = external_dependency_parsers_0.valueType(parts[i]);
  888. if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) {
  889. return true;
  890. }
  891. }
  892. return false;
  893. };
  894. fontFamily_export_definition = {
  895. set: function (v) {
  896. this._setProperty('font-family', v);
  897. },
  898. get: function () {
  899. return this.getPropertyValue('font-family');
  900. },
  901. enumerable: true,
  902. configurable: true
  903. };
  904. var fontSize_export_isValid, fontSize_export_definition;
  905. var fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  906. var fontSize_local_var_relativeSizes = ['larger', 'smaller'];
  907. fontSize_export_isValid = function (v) {
  908. var type = external_dependency_parsers_0.valueType(v.toLowerCase());
  909. return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1;
  910. };
  911. function fontSize_local_fn_parse(v) {
  912. const valueAsString = String(v).toLowerCase();
  913. const optionalArguments = fontSize_local_var_absoluteSizes.concat(fontSize_local_var_relativeSizes);
  914. const isOptionalArgument = optionalArguments.some(stringValue => stringValue.toLowerCase() === valueAsString);
  915. return isOptionalArgument ? valueAsString : external_dependency_parsers_0.parseMeasurement(v);
  916. }
  917. fontSize_export_definition = {
  918. set: function (v) {
  919. this._setProperty('font-size', fontSize_local_fn_parse(v));
  920. },
  921. get: function () {
  922. return this.getPropertyValue('font-size');
  923. },
  924. enumerable: true,
  925. configurable: true
  926. };
  927. var fontStyle_export_isValid, fontStyle_export_definition;
  928. var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit'];
  929. fontStyle_export_isValid = function (v) {
  930. return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1;
  931. };
  932. fontStyle_export_definition = {
  933. set: function (v) {
  934. this._setProperty('font-style', v);
  935. },
  936. get: function () {
  937. return this.getPropertyValue('font-style');
  938. },
  939. enumerable: true,
  940. configurable: true
  941. };
  942. var fontVariant_export_isValid, fontVariant_export_definition;
  943. var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit'];
  944. fontVariant_export_isValid = function isValid(v) {
  945. return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1;
  946. };
  947. fontVariant_export_definition = {
  948. set: function (v) {
  949. this._setProperty('font-variant', v);
  950. },
  951. get: function () {
  952. return this.getPropertyValue('font-variant');
  953. },
  954. enumerable: true,
  955. configurable: true
  956. };
  957. var fontWeight_export_isValid, fontWeight_export_definition;
  958. var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];
  959. fontWeight_export_isValid = function isValid(v) {
  960. return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1;
  961. };
  962. fontWeight_export_definition = {
  963. set: function (v) {
  964. this._setProperty('font-weight', v);
  965. },
  966. get: function () {
  967. return this.getPropertyValue('font-weight');
  968. },
  969. enumerable: true,
  970. configurable: true
  971. };
  972. var lineHeight_export_isValid, lineHeight_export_definition;
  973. lineHeight_export_isValid = function isValid(v) {
  974. var type = external_dependency_parsers_0.valueType(v);
  975. return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT;
  976. };
  977. lineHeight_export_definition = {
  978. set: function (v) {
  979. this._setProperty('line-height', v);
  980. },
  981. get: function () {
  982. return this.getPropertyValue('line-height');
  983. },
  984. enumerable: true,
  985. configurable: true
  986. };
  987. var font_export_definition;
  988. var font_local_var_shorthand_for = {
  989. 'font-family': {
  990. isValid: fontFamily_export_isValid,
  991. definition: fontFamily_export_definition
  992. },
  993. 'font-size': {
  994. isValid: fontSize_export_isValid,
  995. definition: fontSize_export_definition
  996. },
  997. 'font-style': {
  998. isValid: fontStyle_export_isValid,
  999. definition: fontStyle_export_definition
  1000. },
  1001. 'font-variant': {
  1002. isValid: fontVariant_export_isValid,
  1003. definition: fontVariant_export_definition
  1004. },
  1005. 'font-weight': {
  1006. isValid: fontWeight_export_isValid,
  1007. definition: fontWeight_export_definition
  1008. },
  1009. 'line-height': {
  1010. isValid: lineHeight_export_isValid,
  1011. definition: lineHeight_export_definition
  1012. }
  1013. };
  1014. var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit'];
  1015. var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for);
  1016. font_export_definition = {
  1017. set: function (v) {
  1018. var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for);
  1019. if (short !== undefined) {
  1020. return font_local_var_setter.call(this, v);
  1021. }
  1022. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) {
  1023. this._setProperty('font', v);
  1024. }
  1025. },
  1026. get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for),
  1027. enumerable: true,
  1028. configurable: true
  1029. };
  1030. var height_export_definition;
  1031. function height_local_fn_parse(v) {
  1032. if (String(v).toLowerCase() === 'auto') {
  1033. return 'auto';
  1034. }
  1035. if (String(v).toLowerCase() === 'inherit') {
  1036. return 'inherit';
  1037. }
  1038. return external_dependency_parsers_0.parseMeasurement(v);
  1039. }
  1040. height_export_definition = {
  1041. set: function (v) {
  1042. this._setProperty('height', height_local_fn_parse(v));
  1043. },
  1044. get: function () {
  1045. return this.getPropertyValue('height');
  1046. },
  1047. enumerable: true,
  1048. configurable: true
  1049. };
  1050. var left_export_definition;
  1051. left_export_definition = {
  1052. set: function (v) {
  1053. this._setProperty('left', external_dependency_parsers_0.parseMeasurement(v));
  1054. },
  1055. get: function () {
  1056. return this.getPropertyValue('left');
  1057. },
  1058. enumerable: true,
  1059. configurable: true
  1060. };
  1061. var lightingColor_export_definition;
  1062. lightingColor_export_definition = {
  1063. set: function (v) {
  1064. this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v));
  1065. },
  1066. get: function () {
  1067. return this.getPropertyValue('lighting-color');
  1068. },
  1069. enumerable: true,
  1070. configurable: true
  1071. };
  1072. var margin_export_definition, margin_export_isValid, margin_export_parser;
  1073. var margin_local_var_TYPES = external_dependency_parsers_0.TYPES;
  1074. var margin_local_var_isValid = function (v) {
  1075. if (v.toLowerCase() === 'auto') {
  1076. return true;
  1077. }
  1078. var type = external_dependency_parsers_0.valueType(v);
  1079. return type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);
  1080. };
  1081. var margin_local_var_parser = function (v) {
  1082. var V = v.toLowerCase();
  1083. if (V === 'auto') {
  1084. return V;
  1085. }
  1086. return external_dependency_parsers_0.parseMeasurement(v);
  1087. };
  1088. var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser);
  1089. var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () {
  1090. return true;
  1091. }, function (v) {
  1092. return v;
  1093. });
  1094. margin_export_definition = {
  1095. set: function (v) {
  1096. if (typeof v === 'number') {
  1097. v = String(v);
  1098. }
  1099. if (typeof v !== 'string') {
  1100. return;
  1101. }
  1102. var V = v.toLowerCase();
  1103. switch (V) {
  1104. case 'inherit':
  1105. case 'initial':
  1106. case 'unset':
  1107. case '':
  1108. margin_local_var_myGlobal.call(this, V);
  1109. break;
  1110. default:
  1111. margin_local_var_mySetter.call(this, v);
  1112. break;
  1113. }
  1114. },
  1115. get: function () {
  1116. return this.getPropertyValue('margin');
  1117. },
  1118. enumerable: true,
  1119. configurable: true
  1120. };
  1121. margin_export_isValid = margin_local_var_isValid;
  1122. margin_export_parser = margin_local_var_parser;
  1123. var marginBottom_export_definition;
  1124. marginBottom_export_definition = {
  1125. set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', {
  1126. definition: margin_export_definition,
  1127. isValid: margin_export_isValid,
  1128. parser: margin_export_parser
  1129. }.isValid, {
  1130. definition: margin_export_definition,
  1131. isValid: margin_export_isValid,
  1132. parser: margin_export_parser
  1133. }.parser),
  1134. get: function () {
  1135. return this.getPropertyValue('margin-bottom');
  1136. },
  1137. enumerable: true,
  1138. configurable: true
  1139. };
  1140. var marginLeft_export_definition;
  1141. marginLeft_export_definition = {
  1142. set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', {
  1143. definition: margin_export_definition,
  1144. isValid: margin_export_isValid,
  1145. parser: margin_export_parser
  1146. }.isValid, {
  1147. definition: margin_export_definition,
  1148. isValid: margin_export_isValid,
  1149. parser: margin_export_parser
  1150. }.parser),
  1151. get: function () {
  1152. return this.getPropertyValue('margin-left');
  1153. },
  1154. enumerable: true,
  1155. configurable: true
  1156. };
  1157. var marginRight_export_definition;
  1158. marginRight_export_definition = {
  1159. set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', {
  1160. definition: margin_export_definition,
  1161. isValid: margin_export_isValid,
  1162. parser: margin_export_parser
  1163. }.isValid, {
  1164. definition: margin_export_definition,
  1165. isValid: margin_export_isValid,
  1166. parser: margin_export_parser
  1167. }.parser),
  1168. get: function () {
  1169. return this.getPropertyValue('margin-right');
  1170. },
  1171. enumerable: true,
  1172. configurable: true
  1173. };
  1174. var marginTop_export_definition;
  1175. marginTop_export_definition = {
  1176. set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', {
  1177. definition: margin_export_definition,
  1178. isValid: margin_export_isValid,
  1179. parser: margin_export_parser
  1180. }.isValid, {
  1181. definition: margin_export_definition,
  1182. isValid: margin_export_isValid,
  1183. parser: margin_export_parser
  1184. }.parser),
  1185. get: function () {
  1186. return this.getPropertyValue('margin-top');
  1187. },
  1188. enumerable: true,
  1189. configurable: true
  1190. };
  1191. var opacity_export_definition;
  1192. opacity_export_definition = {
  1193. set: function (v) {
  1194. this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v));
  1195. },
  1196. get: function () {
  1197. return this.getPropertyValue('opacity');
  1198. },
  1199. enumerable: true,
  1200. configurable: true
  1201. };
  1202. var outlineColor_export_definition;
  1203. outlineColor_export_definition = {
  1204. set: function (v) {
  1205. this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v));
  1206. },
  1207. get: function () {
  1208. return this.getPropertyValue('outline-color');
  1209. },
  1210. enumerable: true,
  1211. configurable: true
  1212. };
  1213. var padding_export_definition, padding_export_isValid, padding_export_parser;
  1214. var padding_local_var_TYPES = external_dependency_parsers_0.TYPES;
  1215. var padding_local_var_isValid = function (v) {
  1216. var type = external_dependency_parsers_0.valueType(v);
  1217. return type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0);
  1218. };
  1219. var padding_local_var_parser = function (v) {
  1220. return external_dependency_parsers_0.parseMeasurement(v);
  1221. };
  1222. var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser);
  1223. var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () {
  1224. return true;
  1225. }, function (v) {
  1226. return v;
  1227. });
  1228. padding_export_definition = {
  1229. set: function (v) {
  1230. if (typeof v === 'number') {
  1231. v = String(v);
  1232. }
  1233. if (typeof v !== 'string') {
  1234. return;
  1235. }
  1236. var V = v.toLowerCase();
  1237. switch (V) {
  1238. case 'inherit':
  1239. case 'initial':
  1240. case 'unset':
  1241. case '':
  1242. padding_local_var_myGlobal.call(this, V);
  1243. break;
  1244. default:
  1245. padding_local_var_mySetter.call(this, v);
  1246. break;
  1247. }
  1248. },
  1249. get: function () {
  1250. return this.getPropertyValue('padding');
  1251. },
  1252. enumerable: true,
  1253. configurable: true
  1254. };
  1255. padding_export_isValid = padding_local_var_isValid;
  1256. padding_export_parser = padding_local_var_parser;
  1257. var paddingBottom_export_definition;
  1258. paddingBottom_export_definition = {
  1259. set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', {
  1260. definition: padding_export_definition,
  1261. isValid: padding_export_isValid,
  1262. parser: padding_export_parser
  1263. }.isValid, {
  1264. definition: padding_export_definition,
  1265. isValid: padding_export_isValid,
  1266. parser: padding_export_parser
  1267. }.parser),
  1268. get: function () {
  1269. return this.getPropertyValue('padding-bottom');
  1270. },
  1271. enumerable: true,
  1272. configurable: true
  1273. };
  1274. var paddingLeft_export_definition;
  1275. paddingLeft_export_definition = {
  1276. set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', {
  1277. definition: padding_export_definition,
  1278. isValid: padding_export_isValid,
  1279. parser: padding_export_parser
  1280. }.isValid, {
  1281. definition: padding_export_definition,
  1282. isValid: padding_export_isValid,
  1283. parser: padding_export_parser
  1284. }.parser),
  1285. get: function () {
  1286. return this.getPropertyValue('padding-left');
  1287. },
  1288. enumerable: true,
  1289. configurable: true
  1290. };
  1291. var paddingRight_export_definition;
  1292. paddingRight_export_definition = {
  1293. set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', {
  1294. definition: padding_export_definition,
  1295. isValid: padding_export_isValid,
  1296. parser: padding_export_parser
  1297. }.isValid, {
  1298. definition: padding_export_definition,
  1299. isValid: padding_export_isValid,
  1300. parser: padding_export_parser
  1301. }.parser),
  1302. get: function () {
  1303. return this.getPropertyValue('padding-right');
  1304. },
  1305. enumerable: true,
  1306. configurable: true
  1307. };
  1308. var paddingTop_export_definition;
  1309. paddingTop_export_definition = {
  1310. set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', {
  1311. definition: padding_export_definition,
  1312. isValid: padding_export_isValid,
  1313. parser: padding_export_parser
  1314. }.isValid, {
  1315. definition: padding_export_definition,
  1316. isValid: padding_export_isValid,
  1317. parser: padding_export_parser
  1318. }.parser),
  1319. get: function () {
  1320. return this.getPropertyValue('padding-top');
  1321. },
  1322. enumerable: true,
  1323. configurable: true
  1324. };
  1325. var right_export_definition;
  1326. right_export_definition = {
  1327. set: function (v) {
  1328. this._setProperty('right', external_dependency_parsers_0.parseMeasurement(v));
  1329. },
  1330. get: function () {
  1331. return this.getPropertyValue('right');
  1332. },
  1333. enumerable: true,
  1334. configurable: true
  1335. };
  1336. var stopColor_export_definition;
  1337. stopColor_export_definition = {
  1338. set: function (v) {
  1339. this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v));
  1340. },
  1341. get: function () {
  1342. return this.getPropertyValue('stop-color');
  1343. },
  1344. enumerable: true,
  1345. configurable: true
  1346. };
  1347. var textLineThroughColor_export_definition;
  1348. textLineThroughColor_export_definition = {
  1349. set: function (v) {
  1350. this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v));
  1351. },
  1352. get: function () {
  1353. return this.getPropertyValue('text-line-through-color');
  1354. },
  1355. enumerable: true,
  1356. configurable: true
  1357. };
  1358. var textOverlineColor_export_definition;
  1359. textOverlineColor_export_definition = {
  1360. set: function (v) {
  1361. this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v));
  1362. },
  1363. get: function () {
  1364. return this.getPropertyValue('text-overline-color');
  1365. },
  1366. enumerable: true,
  1367. configurable: true
  1368. };
  1369. var textUnderlineColor_export_definition;
  1370. textUnderlineColor_export_definition = {
  1371. set: function (v) {
  1372. this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v));
  1373. },
  1374. get: function () {
  1375. return this.getPropertyValue('text-underline-color');
  1376. },
  1377. enumerable: true,
  1378. configurable: true
  1379. };
  1380. var top_export_definition;
  1381. top_export_definition = {
  1382. set: function (v) {
  1383. this._setProperty('top', external_dependency_parsers_0.parseMeasurement(v));
  1384. },
  1385. get: function () {
  1386. return this.getPropertyValue('top');
  1387. },
  1388. enumerable: true,
  1389. configurable: true
  1390. };
  1391. var webkitBorderAfterColor_export_definition;
  1392. webkitBorderAfterColor_export_definition = {
  1393. set: function (v) {
  1394. this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v));
  1395. },
  1396. get: function () {
  1397. return this.getPropertyValue('-webkit-border-after-color');
  1398. },
  1399. enumerable: true,
  1400. configurable: true
  1401. };
  1402. var webkitBorderBeforeColor_export_definition;
  1403. webkitBorderBeforeColor_export_definition = {
  1404. set: function (v) {
  1405. this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v));
  1406. },
  1407. get: function () {
  1408. return this.getPropertyValue('-webkit-border-before-color');
  1409. },
  1410. enumerable: true,
  1411. configurable: true
  1412. };
  1413. var webkitBorderEndColor_export_definition;
  1414. webkitBorderEndColor_export_definition = {
  1415. set: function (v) {
  1416. this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v));
  1417. },
  1418. get: function () {
  1419. return this.getPropertyValue('-webkit-border-end-color');
  1420. },
  1421. enumerable: true,
  1422. configurable: true
  1423. };
  1424. var webkitBorderStartColor_export_definition;
  1425. webkitBorderStartColor_export_definition = {
  1426. set: function (v) {
  1427. this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v));
  1428. },
  1429. get: function () {
  1430. return this.getPropertyValue('-webkit-border-start-color');
  1431. },
  1432. enumerable: true,
  1433. configurable: true
  1434. };
  1435. var webkitColumnRuleColor_export_definition;
  1436. webkitColumnRuleColor_export_definition = {
  1437. set: function (v) {
  1438. this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v));
  1439. },
  1440. get: function () {
  1441. return this.getPropertyValue('-webkit-column-rule-color');
  1442. },
  1443. enumerable: true,
  1444. configurable: true
  1445. };
  1446. var webkitMatchNearestMailBlockquoteColor_export_definition;
  1447. webkitMatchNearestMailBlockquoteColor_export_definition = {
  1448. set: function (v) {
  1449. this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v));
  1450. },
  1451. get: function () {
  1452. return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color');
  1453. },
  1454. enumerable: true,
  1455. configurable: true
  1456. };
  1457. var webkitTapHighlightColor_export_definition;
  1458. webkitTapHighlightColor_export_definition = {
  1459. set: function (v) {
  1460. this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v));
  1461. },
  1462. get: function () {
  1463. return this.getPropertyValue('-webkit-tap-highlight-color');
  1464. },
  1465. enumerable: true,
  1466. configurable: true
  1467. };
  1468. var webkitTextEmphasisColor_export_definition;
  1469. webkitTextEmphasisColor_export_definition = {
  1470. set: function (v) {
  1471. this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v));
  1472. },
  1473. get: function () {
  1474. return this.getPropertyValue('-webkit-text-emphasis-color');
  1475. },
  1476. enumerable: true,
  1477. configurable: true
  1478. };
  1479. var webkitTextFillColor_export_definition;
  1480. webkitTextFillColor_export_definition = {
  1481. set: function (v) {
  1482. this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v));
  1483. },
  1484. get: function () {
  1485. return this.getPropertyValue('-webkit-text-fill-color');
  1486. },
  1487. enumerable: true,
  1488. configurable: true
  1489. };
  1490. var webkitTextStrokeColor_export_definition;
  1491. webkitTextStrokeColor_export_definition = {
  1492. set: function (v) {
  1493. this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v));
  1494. },
  1495. get: function () {
  1496. return this.getPropertyValue('-webkit-text-stroke-color');
  1497. },
  1498. enumerable: true,
  1499. configurable: true
  1500. };
  1501. var width_export_definition;
  1502. function width_local_fn_parse(v) {
  1503. if (String(v).toLowerCase() === 'auto') {
  1504. return 'auto';
  1505. }
  1506. if (String(v).toLowerCase() === 'inherit') {
  1507. return 'inherit';
  1508. }
  1509. return external_dependency_parsers_0.parseMeasurement(v);
  1510. }
  1511. width_export_definition = {
  1512. set: function (v) {
  1513. this._setProperty('width', width_local_fn_parse(v));
  1514. },
  1515. get: function () {
  1516. return this.getPropertyValue('width');
  1517. },
  1518. enumerable: true,
  1519. configurable: true
  1520. };
  1521. module.exports = function (prototype) {
  1522. Object.defineProperties(prototype, {
  1523. azimuth: azimuth_export_definition,
  1524. backgroundColor: backgroundColor_export_definition,
  1525. "background-color": backgroundColor_export_definition,
  1526. backgroundImage: backgroundImage_export_definition,
  1527. "background-image": backgroundImage_export_definition,
  1528. backgroundRepeat: backgroundRepeat_export_definition,
  1529. "background-repeat": backgroundRepeat_export_definition,
  1530. backgroundAttachment: backgroundAttachment_export_definition,
  1531. "background-attachment": backgroundAttachment_export_definition,
  1532. backgroundPosition: backgroundPosition_export_definition,
  1533. "background-position": backgroundPosition_export_definition,
  1534. background: background_export_definition,
  1535. borderWidth: borderWidth_export_definition,
  1536. "border-width": borderWidth_export_definition,
  1537. borderStyle: borderStyle_export_definition,
  1538. "border-style": borderStyle_export_definition,
  1539. borderColor: borderColor_export_definition,
  1540. "border-color": borderColor_export_definition,
  1541. border: border_export_definition,
  1542. borderBottomWidth: borderBottomWidth_export_definition,
  1543. "border-bottom-width": borderBottomWidth_export_definition,
  1544. borderBottomStyle: borderBottomStyle_export_definition,
  1545. "border-bottom-style": borderBottomStyle_export_definition,
  1546. borderBottomColor: borderBottomColor_export_definition,
  1547. "border-bottom-color": borderBottomColor_export_definition,
  1548. borderBottom: borderBottom_export_definition,
  1549. "border-bottom": borderBottom_export_definition,
  1550. borderCollapse: borderCollapse_export_definition,
  1551. "border-collapse": borderCollapse_export_definition,
  1552. borderLeftWidth: borderLeftWidth_export_definition,
  1553. "border-left-width": borderLeftWidth_export_definition,
  1554. borderLeftStyle: borderLeftStyle_export_definition,
  1555. "border-left-style": borderLeftStyle_export_definition,
  1556. borderLeftColor: borderLeftColor_export_definition,
  1557. "border-left-color": borderLeftColor_export_definition,
  1558. borderLeft: borderLeft_export_definition,
  1559. "border-left": borderLeft_export_definition,
  1560. borderRightWidth: borderRightWidth_export_definition,
  1561. "border-right-width": borderRightWidth_export_definition,
  1562. borderRightStyle: borderRightStyle_export_definition,
  1563. "border-right-style": borderRightStyle_export_definition,
  1564. borderRightColor: borderRightColor_export_definition,
  1565. "border-right-color": borderRightColor_export_definition,
  1566. borderRight: borderRight_export_definition,
  1567. "border-right": borderRight_export_definition,
  1568. borderSpacing: borderSpacing_export_definition,
  1569. "border-spacing": borderSpacing_export_definition,
  1570. borderTopWidth: borderTopWidth_export_definition,
  1571. "border-top-width": borderTopWidth_export_definition,
  1572. borderTopStyle: borderTopStyle_export_definition,
  1573. "border-top-style": borderTopStyle_export_definition,
  1574. borderTopColor: borderTopColor_export_definition,
  1575. "border-top-color": borderTopColor_export_definition,
  1576. borderTop: borderTop_export_definition,
  1577. "border-top": borderTop_export_definition,
  1578. bottom: bottom_export_definition,
  1579. clear: clear_export_definition,
  1580. clip: clip_export_definition,
  1581. color: color_export_definition,
  1582. cssFloat: cssFloat_export_definition,
  1583. "css-float": cssFloat_export_definition,
  1584. flexGrow: flexGrow_export_definition,
  1585. "flex-grow": flexGrow_export_definition,
  1586. flexShrink: flexShrink_export_definition,
  1587. "flex-shrink": flexShrink_export_definition,
  1588. flexBasis: flexBasis_export_definition,
  1589. "flex-basis": flexBasis_export_definition,
  1590. flex: flex_export_definition,
  1591. float: float_export_definition,
  1592. floodColor: floodColor_export_definition,
  1593. "flood-color": floodColor_export_definition,
  1594. fontFamily: fontFamily_export_definition,
  1595. "font-family": fontFamily_export_definition,
  1596. fontSize: fontSize_export_definition,
  1597. "font-size": fontSize_export_definition,
  1598. fontStyle: fontStyle_export_definition,
  1599. "font-style": fontStyle_export_definition,
  1600. fontVariant: fontVariant_export_definition,
  1601. "font-variant": fontVariant_export_definition,
  1602. fontWeight: fontWeight_export_definition,
  1603. "font-weight": fontWeight_export_definition,
  1604. lineHeight: lineHeight_export_definition,
  1605. "line-height": lineHeight_export_definition,
  1606. font: font_export_definition,
  1607. height: height_export_definition,
  1608. left: left_export_definition,
  1609. lightingColor: lightingColor_export_definition,
  1610. "lighting-color": lightingColor_export_definition,
  1611. margin: margin_export_definition,
  1612. marginBottom: marginBottom_export_definition,
  1613. "margin-bottom": marginBottom_export_definition,
  1614. marginLeft: marginLeft_export_definition,
  1615. "margin-left": marginLeft_export_definition,
  1616. marginRight: marginRight_export_definition,
  1617. "margin-right": marginRight_export_definition,
  1618. marginTop: marginTop_export_definition,
  1619. "margin-top": marginTop_export_definition,
  1620. opacity: opacity_export_definition,
  1621. outlineColor: outlineColor_export_definition,
  1622. "outline-color": outlineColor_export_definition,
  1623. padding: padding_export_definition,
  1624. paddingBottom: paddingBottom_export_definition,
  1625. "padding-bottom": paddingBottom_export_definition,
  1626. paddingLeft: paddingLeft_export_definition,
  1627. "padding-left": paddingLeft_export_definition,
  1628. paddingRight: paddingRight_export_definition,
  1629. "padding-right": paddingRight_export_definition,
  1630. paddingTop: paddingTop_export_definition,
  1631. "padding-top": paddingTop_export_definition,
  1632. right: right_export_definition,
  1633. stopColor: stopColor_export_definition,
  1634. "stop-color": stopColor_export_definition,
  1635. textLineThroughColor: textLineThroughColor_export_definition,
  1636. "text-line-through-color": textLineThroughColor_export_definition,
  1637. textOverlineColor: textOverlineColor_export_definition,
  1638. "text-overline-color": textOverlineColor_export_definition,
  1639. textUnderlineColor: textUnderlineColor_export_definition,
  1640. "text-underline-color": textUnderlineColor_export_definition,
  1641. top: top_export_definition,
  1642. webkitBorderAfterColor: webkitBorderAfterColor_export_definition,
  1643. "webkit-border-after-color": webkitBorderAfterColor_export_definition,
  1644. webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition,
  1645. "webkit-border-before-color": webkitBorderBeforeColor_export_definition,
  1646. webkitBorderEndColor: webkitBorderEndColor_export_definition,
  1647. "webkit-border-end-color": webkitBorderEndColor_export_definition,
  1648. webkitBorderStartColor: webkitBorderStartColor_export_definition,
  1649. "webkit-border-start-color": webkitBorderStartColor_export_definition,
  1650. webkitColumnRuleColor: webkitColumnRuleColor_export_definition,
  1651. "webkit-column-rule-color": webkitColumnRuleColor_export_definition,
  1652. webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition,
  1653. "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition,
  1654. webkitTapHighlightColor: webkitTapHighlightColor_export_definition,
  1655. "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition,
  1656. webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition,
  1657. "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition,
  1658. webkitTextFillColor: webkitTextFillColor_export_definition,
  1659. "webkit-text-fill-color": webkitTextFillColor_export_definition,
  1660. webkitTextStrokeColor: webkitTextStrokeColor_export_definition,
  1661. "webkit-text-stroke-color": webkitTextStrokeColor_export_definition,
  1662. width: width_export_definition
  1663. });
  1664. };