16a23e08bSopenharmony_ci/* 26a23e08bSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 36a23e08bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 46a23e08bSopenharmony_ci * you may not use this file except in compliance with the License. 56a23e08bSopenharmony_ci * You may obtain a copy of the License at 66a23e08bSopenharmony_ci * 76a23e08bSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 86a23e08bSopenharmony_ci * 96a23e08bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 106a23e08bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 116a23e08bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 126a23e08bSopenharmony_ci * See the License for the specific language governing permissions and 136a23e08bSopenharmony_ci * limitations under the License. 146a23e08bSopenharmony_ci */ 156a23e08bSopenharmony_ci 166a23e08bSopenharmony_ciconst SPECIAL_STYLE = { 176a23e08bSopenharmony_ci OPACITY: 'opacity', 186a23e08bSopenharmony_ci BORDEROPACITY: 'borderOpacity', 196a23e08bSopenharmony_ci ANIMATION_DELAY: 'animationDelay', 206a23e08bSopenharmony_ci ANIMATION_DURATION: 'animationDuration', 216a23e08bSopenharmony_ci ANIMATION_ITERATION_COUNT: 'animationIterationCount', 226a23e08bSopenharmony_ci BACKGROUND_IMAGE: 'backgroundImage', 236a23e08bSopenharmony_ci BACKGROUND_IMAGE_ACTIVE: 'backgroundImage:active', 246a23e08bSopenharmony_ci BACKGROUND_IMAGE_CHECKED: 'backgroundImage:checked', 256a23e08bSopenharmony_ci}; 266a23e08bSopenharmony_ciconst DEVICE_LEVEL = { 276a23e08bSopenharmony_ci RICH: 'rich', 286a23e08bSopenharmony_ci LITE: 'lite', 296a23e08bSopenharmony_ci CARD: 'card', 306a23e08bSopenharmony_ci}; 316a23e08bSopenharmony_ciconst DEVICE_TYPE = { 326a23e08bSopenharmony_ci LITEWEARABLE: 'liteWearable', 336a23e08bSopenharmony_ci SMARTVISION: 'smartVision', 346a23e08bSopenharmony_ci}; 356a23e08bSopenharmony_ci 366a23e08bSopenharmony_ciconst PLATFORM = { 376a23e08bSopenharmony_ci VERSION3: 'Version3', 386a23e08bSopenharmony_ci VERSION4: 'Version4', 396a23e08bSopenharmony_ci VERSION5: 'Version5', 406a23e08bSopenharmony_ci VERSION6: 'Version6', 416a23e08bSopenharmony_ci}; 426a23e08bSopenharmony_ci 436a23e08bSopenharmony_ciconst REGEXP_NUMBER_PX = /^[-+]?[0-9]*\.?[0-9]+(px|cm|em|deg|rad)?$/; 446a23e08bSopenharmony_ciconst REGEXP_COLOR = /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/; 456a23e08bSopenharmony_ciconst REGEXP_UNIT = /px|cm|em|deg|rad/; 466a23e08bSopenharmony_ciconst REGEXP_PNG = /(\.png|\.jpg|\.bmp|\.jpeg|\.BMP|\.JPG|\.PNG|\.JPEG)$/; 476a23e08bSopenharmony_ciconst REGXP_QUOTES = /"|'/g; 486a23e08bSopenharmony_ciconst REGXP_LANGUAGE = /\$t/; 496a23e08bSopenharmony_ciconst REGXP_LANGUAGE_KEY = /_vm\.\$t\([^()]+?\)/g; 506a23e08bSopenharmony_ciconst REGXP_FUNC_RETURN = /return(.*)}/g; 516a23e08bSopenharmony_ci 526a23e08bSopenharmony_ciexports.SPECIAL_STYLE = SPECIAL_STYLE; 536a23e08bSopenharmony_ciexports.REGEXP_NUMBER_PX = REGEXP_NUMBER_PX; 546a23e08bSopenharmony_ciexports.REGEXP_COLOR = REGEXP_COLOR; 556a23e08bSopenharmony_ciexports.REGEXP_UNIT = REGEXP_UNIT; 566a23e08bSopenharmony_ciexports.DEVICE_LEVEL = DEVICE_LEVEL; 576a23e08bSopenharmony_ciexports.REGEXP_PNG = REGEXP_PNG; 586a23e08bSopenharmony_ciexports.REGXP_QUOTES = REGXP_QUOTES; 596a23e08bSopenharmony_ciexports.DEVICE_TYPE = DEVICE_TYPE; 606a23e08bSopenharmony_ciexports.REGXP_LANGUAGE = REGXP_LANGUAGE; 616a23e08bSopenharmony_ciexports.REGXP_LANGUAGE_KEY = REGXP_LANGUAGE_KEY; 626a23e08bSopenharmony_ciexports.REGXP_FUNC_RETURN = REGXP_FUNC_RETURN; 636a23e08bSopenharmony_ciexports.PLATFORM = PLATFORM; 64