UNPKG

bytefun-wxapp

Version:

ByteFun JavaScript SDK

1 lines 896 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e,t=((e=t||{})[e.LEFT_CENTER=0]="LEFT_CENTER",e[e.LEFT_TOP=1]="LEFT_TOP",e[e.LEFT_BOTTOM=2]="LEFT_BOTTOM",e[e.RIGHT_CENTER=3]="RIGHT_CENTER",e[e.RIGHT_TOP=4]="RIGHT_TOP",e[e.RIGHT_BOTTOM=5]="RIGHT_BOTTOM",e[e.CENTER=6]="CENTER",e[e.TOP_CENTER=7]="TOP_CENTER",e[e.BOTTOM_CENTER=8]="BOTTOM_CENTER",e[e.HORIZONTAL_CENTER=9]="HORIZONTAL_CENTER",e[e.VERTICAL_CENTER=10]="VERTICAL_CENTER",e[e.NONE=100]="NONE",e);class i{static getVarName(e){return""+this.var+e.substring(0,1).toUpperCase()+e.substring(1)}}i.FAIL="fail",i.SUC="suc",i.ALICE_HAO="$alice_",i.FUN_HAO="$fun_",i.VAR_HAO="$var_",i.ALICE_EID_INPUT="$eid_",i.KONG_GE=" ",i.NONE="",i.ASSETS_FILE=".js",i.noCache=0,i.verUpdateCache=1,i.WENHAO="?",i.DENG="=",i.HE="&",i.key="key",i.val="val",i.var="var",i.varKey="varKey",i.DATA_TYPE_OBJECT=1,i.DATA_TYPE_ARRAY=2,i.UNUSE_COLOR="",i.UNUSE_INT=-923582351,i.TRANSPARENT_COLOR="#00000000",i.DEF_COLOR="#000000",i.DEF_NUMBER=0,i.SHARE_SCENE_HY=0,i.SHARE_SCENE_PYQ=1,i.SHARE_SCENE_SC=2;class n{constructor(e){if(this.keys=[],this.values=[],e){const t=Object.keys(e);for(const i of t)this.keys.push(i),this.values.push(e[i])}}put(e,t){const i=this.keys.indexOf(e);-1===i?(this.keys.push(e),this.values.push(t)):this.values[i]=t}get(e){const t=this.keys.indexOf(e);return-1===t?void 0:this.values[t]}getKey(e){return this.keys[e]}getVal(e){return this.values[e]}has(e){return this.keys.includes(e)}remove(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),this.values.splice(t,1))}putAll(e){const t=e.getKeys(),i=e.getValues();for(let e=0;e<t.length;e++)this.put(t[e],i[e])}size(){return this.keys.length}clear(){this.keys=[],this.values=[]}getKeys(){return this.keys}getValues(){return this.values}clone(){const e=new n;for(let t=0;t<this.keys.length;t++)e.put(this.keys[t],this.values[t]);return e}containsKey(e){return this.keys.includes(e)}isEmpty(){return 0==this.keys.length&&0===this.values.length}forEach(e){for(let t=0;t<this.keys.length;t++){const i=e(this.values[t],this.keys[t]);if(!1===i)break;if(!0!==i&&void 0!==i)return i}}toObject(){const e={};for(let t=0;t<this.keys.length;t++)e[this.keys[t]]=this.values[t];return e}toJSONString(){const e={};return this.forEach(((t,i)=>{e[i]=t})),JSON.stringify(e)}*[Symbol.iterator](){for(let e=0;e<this.keys.length;e++)yield[this.keys[e],this.values[e]]}}class a{constructor(e){this.valueList=[],e&&this.valueList.push(e)}append(e){return this.valueList.push(e),this}toString(){return this.valueList.join("")}}class r{static isNumber(e){return"number"==typeof e||/^(-?[1-9]\d*\.\d+|-?0\.\d*[1-9])$/.test(e)}static isEmpty(e){return null==e||"string"==typeof e&&""===e&&void 0!==e}static notEmpty(e){return!this.isEmpty(e)}static notNullOrUndefined(e){return null!=e&&void 0!==e}static isNullOrUndefined(e){return null==e||void 0===e}static camelToMiddleLine(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}static compareVersion(e,t){let i=e.split("."),n=t.split(".");const r=Math.max(i.length,i.length);for(;i.length<r;)i.push("0");for(;i.length<r;)n.push("0");for(let e=0;e<r;e++){const t=parseInt(i[e]),r=parseInt(n[e]);if(t>r)return 1;if(t<r)return-1}return 0}static throttle(e,t){let i=0,n=null;return function(...r){const a=this;function s(){const n=Date.now();n-i>t&&(e.apply(a,r),i=n)}n&&clearTimeout(n),n=setTimeout(s,t),s()}}static debounce(e,t){let i=null;return function(...n){const r=this;i&&clearTimeout(i),i=setTimeout((()=>{e.apply(r,n)}),t)}}static asyncRun(e){"undefined"!=typeof Promise?Promise.resolve().then(e):setTimeout(e)}static objectToHashCode(e){return Object.entries(e).map((([e,t])=>e.split("").reduce(((e,t)=>(e<<5)-e+t.charCodeAt(0)),0)+("object"==typeof t?this.objectToHashCode(t):String(t).split("").reduce(((e,t)=>(e<<5)-e+t.charCodeAt(0)),0)))).reduce(((e,t)=>(e<<5)-e+t),0)}static deepClone(e){const t=new n,i=e=>{if("object"!=typeof e||null===e)return e;const n=t.get(e);if(n)return n;const r=Array.isArray(e)?[]:{};Object.setPrototypeOf(r,Object.getPrototypeOf(e)),t.put(e,r);for(const t in e)e.hasOwnProperty(t)&&(r[t]=i(e[t]));return r},r=i(e);return t.clear(),r}static isJSON(e){try{JSON.parse(e)}catch(e){return!1}return!0}static styleToText(e){const t=[];for(const i in e)r.isEmpty(e[i])||t.push(i+":"+e[i]+";");return t.join("")}static isNeedRemoveStyle(e,t){return!(!(e.startsWith("padding")||e.startsWith("margin")||e.endsWith("Radius"))||"0px"!==t)}static generateViewId(){return String(Date.now()+1e3*Math.random())}}class s{static getInstance(){return!this.commonPageManager&&(this.commonPageManager=new s),this.commonPageManager}hasPage(){return r.notNullOrUndefined(this.commonPageModel)&&this.commonPageModel.hasPage()}hasCachePage(){return r.notNullOrUndefined(this.cacheCommonPageModel)&&this.cacheCommonPageModel.hasPage()&&this.hasCache()}hasCache(){if(this.hasPage()){const e=ta.getServerLib().loadPageCacheData(ta.getContext(),this.commonPageModel.resID);return r.notNullOrUndefined(e)&&r.notEmpty(e)}return!1}isNeedUpdate(){return this.hasPage()&&this.hasCachePage()?this.cacheCommonPageModel.resID===this.commonPageModel.resID&&this.cacheCommonPageModel.ver!==this.commonPageModel.ver:this.hasPage()&&!this.hasCachePage()}}class o{constructor(){}static getInstance(){return!this.loadingPageManager&&(this.loadingPageManager=new o),this.loadingPageManager}hasPage(){return r.notNullOrUndefined(this.loadingPageModelMap)&&this.loadingPageModelMap.size()>0}hasCachePage(){return r.notNullOrUndefined(this.cacheLoadingPageModelMap)&&this.cacheLoadingPageModelMap.size()>0}updatePageModelList(){const e=[];return this.hasPage()&&this.loadingPageModelMap.forEach(((t,i)=>{var n;const r=null==(n=this.cacheLoadingPageModelMap)?void 0:n.get(i);r?r.resID===t.resID&&r.ver!==t.ver&&e.push(t):e.push(t)})),e}}class l{constructor(){this.ver=0,this.pageCfgList=new n,this.cachePageCfgList=new n}}class c{constructor(){}static getInstance(){return!this.INSTANCE&&(this.INSTANCE=new c),this.INSTANCE}setProCfgModel(e){r.notNullOrUndefined(this.proCfgModelMap)&&(this.proCfgModel=this.proCfgModelMap.get(e))}initProCfgModel(e){return null==this.proCfgModelMap&&(this.proCfgModelMap=new n),this.proCfgModel=this.proCfgModelMap.get(e),r.isNullOrUndefined(this.proCfgModel)&&(this.proCfgModel=new l,this.proCfgModel.projectId=e,this.proCfgModelMap.put(e,this.proCfgModel)),this.proCfgModel}}class d{constructor(){this.dataType=0}hashCode(){return r.objectToHashCode(this)}}d.TYPE_LAYOUT=1,d.TYPE_EVENT=2,d.TYPE_PAGE=3,d.TYPE_ANIM_X=4,d.TYPE_FRAME=5,d.TYPE_VAR=7,d.TYPE_SKIN=8;const h=class e extends d{constructor(){super(),this.type=0,this.totalParamCount=0,this.dataType=e.TYPE_VAR}isConst(){return this.type===e.CONST||this.type===e.CONST_JSON_ARRAY||this.type===e.CONST_JSON_OBJ}isParamDone(){var e;if(this.params.length==this.totalParamCount){for(let t=0;t<this.params.length;t++)if(!(null==(e=this.params[t])?void 0:e.isHandDone()))return!1;return!0}return!1}clone(){const t=new e;return this.baseClone(t),t}baseClone(e){if(e.type=this.type,e.isHandDone=!1,e.totalParamCount=this.totalParamCount,e.ret=null,r.notNullOrUndefined(this.params)){e.params=[];for(let t=0;t<this.params.length;t++){const i=this.params[t];r.isNullOrUndefined(i)?e.params.push(null):e.params.push(i.clone())}}return e}};h.CONST=1,h.CONST_JSON_OBJ=100001,h.CONST_JSON_ARRAY=100002,h.CALLBACK=2,h.VIEW=5,h.JS=6,h.CODE=7,h.PX=8,h.PHONE=9,h.DB=10,h.MD5=11,h.PAGE_PARAMS=12,h.GET_VIEW_ATTR=13,h.PARSE_TO_COLOR=14,h.PARSE_TO_INT=15,h.PARSE_TO_FILE=17,h.VAR=18,h.ALICE=19,h.JSON=20,h.GET_JSON_VALUE=21,h.ARRAY=22,h.TEXT=23,h.EVENT_PARAMS=25,h.EXP=26,h.FUNCTION=27,h.PAGE=28,h.COLOR=29,h.MAP=30,h.OBJECT=31,h.BROWSER=32,h.FILE=33,h.MATH=35,h.PX_ABS=36,h.PLATFORM=100,h.SKIN=133;let u=h;const p=class e extends d{constructor(){super(),this.type=0,this.time=0,this.actParserDoneCount=0,this.currentExeActIndex=0,this.dataType=d.TYPE_EVENT}cloneEvent(e,t,i){const n=this.doCloneEvent(e,t,i);return n.eid=e.aliceViewModel.eventManager.countCloneEventID(),n.itemJsonData=t,n.subPageContainerModel=this.subPageContainerModel,e.aliceViewModel.eventManager.addEvent(n),n.cloneSonEvent(e,t,i),n}doCloneEvent(e,t,i){return null}cloneSonEvent(e,t,i){if(r.isNullOrUndefined(this.actList))return;const n=this.actList,a=this.actIds;this.actList=[],this.actIds=[],this.actList.push(...n),this.actIds.push(...a);for(let n=0;n<this.actList.length;n++)this.actList[n]=this.actList[n].cloneEvent(e,t,i),this.actIds[n]=this.actList[n].eid}isAllVarDone(){if(this.type==e.TYPE_UPDATE){const e=this;if(r.notNullOrUndefined(e.updateModelList)){let t=!1;if(!r.notNullOrUndefined(e.nowUpdateModel.updateVarValList))return!0;{const i=e.nowUpdateModel.updateVarValList.getKeys()[e.nowAttrIndex],n=e.nowUpdateModel.updateVarValList.getValues()[e.nowAttrIndex];if(i instanceof J&&(t=!0,r.notNullOrUndefined(i))){const e=i;if(!e.isHandDone()||!e.hasUpdateBaseDataAttr)return!1}if(n instanceof J&&(t=!0,r.notNullOrUndefined(n))){const e=n;if(!e.isHandDone()||!e.hasUpdateBaseDataAttr)return!1}if(!t)return!0}}}else if(this.type==e.TYPE_ANIM){const e=this;if(r.notNullOrUndefined(e.bindAnimModel)){let t=!1;if(r.notNullOrUndefined(e.bindAnimModel.varModelMap))for(const i of e.bindAnimModel.varModelMap.getValues())if(t=!0,!i||!i.isHandDone()||!i.hasUpdateBaseDataAttr)return!1;if(r.notNullOrUndefined(e.bindAnimModel.attrList))for(let i=0;i<e.bindAnimModel.attrList.length;i++){const n=e.bindAnimModel.attrList[i];if(r.notNullOrUndefined(n))for(let e=0;e<n.frameList.length;e++){const i=n.frameList[e];if(r.notNullOrUndefined(i.varModelMap))for(const e of i.varModelMap.getValues())if(t=!0,!e||!e.isHandDone()||!e.hasUpdateBaseDataAttr)return!1}}if(!t)return!0}}else{if(!this.varModelMap||0==this.varModelMap.size())return!0;for(const e of this.varModelMap.getValues())if(!e||!e.isHandDone()||!e.hasUpdateBaseDataAttr)return!1}return!0}resetAllVarState(t){if(this.type==e.TYPE_UPDATE){const e=this;if(r.notNullOrUndefined(e.updateModelList))for(let i=0;i<e.updateModelList.length;i++){const n=e.updateModelList[i];r.notNullOrUndefined(n.updateVarValList)&&n.updateVarValList.forEach(((e,i)=>{i instanceof J&&r.notNullOrUndefined(i)&&i.resetHandDone(!1,t),e instanceof J&&r.notNullOrUndefined(e)&&e.resetHandDone(!1,t)}))}}else if(this.type==e.TYPE_ANIM){const e=this;if(r.notNullOrUndefined(e.bindAnimModel)){if(r.notNullOrUndefined(e.bindAnimModel.varModelMap))for(const i of e.bindAnimModel.varModelMap.getValues())r.notNullOrUndefined(i)&&i.resetHandDone(!1,t);if(r.notNullOrUndefined(e.bindAnimModel.attrList))for(let i=0;i<e.bindAnimModel.attrList.length;i++){const n=e.bindAnimModel.attrList[i];if(r.notNullOrUndefined(n))for(let e=0;e<n.frameList.length;e++){const i=n.frameList[e];if(r.notNullOrUndefined(i.varModelMap))for(const e of i.varModelMap.getValues())r.notNullOrUndefined(e)&&e.resetHandDone(!1,t)}}}}else{if(!this.varModelMap||0==this.varModelMap.size())return;for(const e of this.varModelMap.getValues())r.notNullOrUndefined(e)&&e.resetHandDone(!1,t)}}clone(){return r.deepClone(this)}};p.TYPE_JUMP=1,p.TYPE_NET=2,p.TYPE_UPDATE=4,p.TYPE_SHOWWINDOW=35,p.TYPE_FINISHPAGE=7,p.TYPE_QRSCAN=8,p.TYPE_TIME=9,p.TYPE_TIMEOUT=10,p.TYPE_JSCODE=11,p.TYPE_CLOSEWINDOW=13,p.TYPE_ANIM=14,p.TYPE_SWITCH=15,p.TYPE_WXPAY=16,p.TYPE_ZFBPAY=17,p.TYPE_SHAREWXTEXT=18,p.TYPE_SHAREWXIMAGE=19,p.TYPE_SHAREWXLINK=20,p.TYPE_SHAREWXMUSIC=21,p.TYPE_SHAREWXVIDEO=22,p.TYPE_SHAREWXMINAPP=23,p.TYPE_SHAREZFBTEXT=24,p.TYPE_SHAREZFBIMAGE=25,p.TYPE_SHAREZFBLINK=26,p.TYPE_WXAUTH=27,p.TYPE_ZFBAUTH=28,p.TYPE_AUTHGETUSERINFO=29,p.TYPE_IFELSE=30,p.TYPE_FINISHPULL=31,p.TYPE_FINISHPUSH=32,p.TYPE_PAUSE_ANIM=33,p.TYPE_RESUME_ANIM=40,p.TYPE_STOP_ANIM=34,p.TYPE_SPSAVE=38,p.TYPE_FILE_PICK=39,p.TYPE_ADD_ITEM=41,p.TYPE_DEL_ITEM=42,p.TYPE_UPDATE_DIY_VAR=43,p.TYPE_CHANGE_SKIN=44,p.TYPE_FORM_VALID=45,p.TYPE_ACT_GROUP=46,p.TYPE_REVERSE_ANIM=47,p.TYPE_FOLDER_EXPAND_COLLAPSE=48,p.TYPE_ADD_SELECT=49,p.TYPE_DEL_SELECT=50,p.TYPE_FILTER_LIST=51,p.TYPE_DO_ACTION=52,p.TYPE_MENU_EXPAND_COLLAPSE=53,p.TYPE_CHANGE_PAGINATION=58,p.TYPE_SCROLL_TO_ANCHOR=59,p.TYPE_TREE_EXPAND_ALL=60,p.TYPE_TREE_COLLAPSE_ALL=61,p.TYPE_SHOW_NOTIFICATION=62,p.TYPE_SHOW_SLIDE=62,p.TYPE_CLOSE_SLIDE=63,p.TYPE_OPEN_CLOSE_SLIDE=65,p.TYPE_CHANGE_SUBPAGE=64,p.TYPE_SHOW_VMENU_ALL=66,p.TYPE_SHOW_VMENU_ONLY_ICON=67,p.TYPE_CHANGE_PAGE=68,p.TYPE_START_TO_PULL=70,p.TYPE_STOP_TO_PULL=71,p.TYPE_START_TO_PUSH=72,p.TYPE_STOP_TO_PUSH=73,p.TYPE_WX_QR_CODE_AUTH=74,p.TYPE_OPEN_PROJECT=78,p.TYPE_LOAD_DATA=80,p.TYPE_LIST_REFRESH_DATA=81,p.TYPE_RETRY_NETWORK=82,p.TYPE_FINISH_JUMP=83,p.TYPE_LIST_LOAD_DATA=84,p.TYPE_START_LOCATION=85,p.TYPE_STOP_LOCATION=86,p.TYPE_OPEN_WEB_PAGE=87,p.TYPE_NATIVE_FUNC=1e4;let g=p;const T=class e extends g{constructor(){super(...arguments),this.callBackStation=e.CALL_BACK_STATION_ING}clone(){try{return super.clone()}catch(e){}return null}doCloneEvent(e,t,i){return this.clone()}};T.TIME_ON_CLICK=1,T.TIME_ON_PAGESTART=2,T.TIME_ON_PAGEJUMP=3,T.TIME_ON_PAGEDESTROY=4,T.TIME_ON_PAGESHOWDONE=5,T.TIME_ON_PAGE_RETURN=6,T.TIME_ON_NETSUC=7,T.TIME_ON_NETFAIL=8,T.TIME_ON_TIMEOUTDONE=9,T.TIME_JSCODE=10,T.TIME_ON_TABCHANGE=11,T.TIME_ON_ANIMSTART=14,T.TIME_ON_ANIMPAUSE=15,T.TIME_ON_ANIMRESUME=16,T.TIME_ON_ANIMDONE=17,T.TIME_ON_ANIMCANCEL=80,T.TIME_ON_CASE=18,T.TIME_ON_ORDERSUC=19,T.TIME_ON_ORDERFAIL=20,T.TIME_ON_PAYSUC=21,T.TIME_ON_PAYFAIL=22,T.TIME_ON_PAYCANCEL=23,T.TIME_ON_CALLWXSUC=24,T.TIME_ON_CALLWXFAIL=25,T.TIME_ON_ALIPAYUNKNOWN=26,T.TIME_ON_SHARESUC=27,T.TIME_ON_SHAREFAIL=28,T.TIME_ON_AUTHSUC=29,T.TIME_ON_AUTHCANCEL=30,T.TIME_ON_AUTHFAIL=31,T.TIME_ON_AUTHREJECT=32,T.TIME_ON_ACCOUNTFROZEN=33,T.TIME_ON_AUTHUSERSUC=34,T.TIME_ON_AUTHUSERFAIL=35,T.TIME_ON_IFELSE=36,T.TIME_ON_PAGESCROLL=37,T.TIME_ON_FILE_SELECT_SUCCESS=44,T.TIME_ON_FILE_SELECT_FAIL=45,T.TIME_ON_DIALOG_SHOW_AFTER=46,T.TIME_ON_DIALOG_DISMISS_AFTER=47,T.TIME_ON_DIALOG_SHOW_BEFORE=59,T.TIME_ON_DIALOG_DISMISS_BEFORE=60,T.TIME_DOUBLE_CLICK=61,T.TIME_LONG_PRESS=62,T.TIME_ON_MOVE=63,T.TIME_ON_FAST_MOVE_TOP=64,T.TIME_ON_FAST_MOVE_LEFT=65,T.TIME_ON_FAST_MOVE_BOTTOM=66,T.TIME_ON_FAST_MOVE_RIGHT=67,T.TIME_ON_DOUBLE_ZOOM_IN=68,T.TIME_ON_DOUBLE_ZOOM_OUT=69,T.TIME_ON_DOUBLE_POS_ROTATE=70,T.TIME_ON_DOUBLE_OPP_ROTATE=71,T.TIME_ON_WX_AUTHSUC=72,T.TIME_ON_WX_AUTHCANCEL=73,T.TIME_ON_WX_AUTHFAIL=74,T.TIME_ON_WX_AUTHREJECT=75,T.TIME_ON_VALUE_CHANGE=100,T.TIME_VALUE_VALID_SUCCESS=101,T.TIME_VALUE_VALID_FAIL=102,T.TIME_ON_PRESS_DOWN=103,T.TIME_ON_FOCUS=104,T.TIME_ON_BLUR=105,T.TIME_ON_HOVER_IN=106,T.TIME_ON_PRESS_UP=107,T.TIME_ON_HOVER_OUT=108,T.TIME_ON_LIST_ITEM_SELECT=109,T.TIME_ON_LIST_ITEM_UNSELECT=110,T.TIME_ON_FOLDER_EXPAND_START=111,T.TIME_ON_FOLDER_EXPAND_END=112,T.TIME_ON_FOLDER_COLLAPSE_START=113,T.TIME_ON_FOLDER_COLLAPSE_END=114,T.TIME_ON_STATION_DEFAULT=115,T.TIME_ON_STATION_READONLY=116,T.TIME_ON_STATION_SELECT=117,T.TIME_ON_STATION_DISABLE=118,T.TIME_ON_MENU_EXPAND_START=121,T.TIME_ON_MENU_EXPAND_END=122,T.TIME_ON_MENU_COLLAPSE_START=123,T.TIME_ON_MENU_COLLAPSE_END=124,T.TIME_ON_MENU_SCROLL_ING=133,T.TIME_ON_CHANGE_ONE_PAGE_COUNT=127,T.TIME_ON_SCROLL_ANCHOR=126,T.TIME_ON_SLIDE_OPEN_START=128,T.TIME_ON_SLIDE_OPEN_END=129,T.TIME_ON_SLIDE_CLOSE_START=130,T.TIME_ON_SLIDE_CLOSE_END=131,T.TIME_ON_SLIDE_SCROLL_ING=132,T.TIME_ON_PAGE_CHANGE=134,T.TIME_ON_PAGE_SIZE_CHANGE=135,T.TIME_ON_DIALOG_OK=140,T.TIME_ON_DIALOG_CANCLE=141,T.TIME_ON_DIALOG_OTHER=142,T.TIME_ON_LOAD_DATA_START=143,T.TIME_ON_LOAD_DATA_SUCCESS=144,T.TIME_ON_LOAD_DATA_FAIL=145,T.TIME_ON_QR_SCAN_SUCCESS=136,T.TIME_ON_QR_SCAN_FAIL=137,T.TIME_ON_SCROLL_TOP=146,T.TIME_ON_SCROLL_BOTTOM=147,T.TIME_ON_GLOBAL_INTERCEPT=148,T.TIME_ON_GLOBAL_NOT_INTERCEPT=149,T.TIME_ON_GLOBAL_NET_SUC_INTERCEPT=150,T.TIME_ON_GLOBAL_NET_FAIL_INTERCEPT=151,T.TIME_ON_GLOBAL_ON_CLICK_INTERCEPT=152,T.TIME_ON_LOCATION_SUCCESS=153,T.TIME_ON_LOCATION_FAIL=154,T.TIME_ON_LOGIN_SUCCESS=155,T.TIME_ON_LOGIN_FAIL=156,T.TIME_PULL_ING=38,T.TIME_PULL_START_LOAD=40,T.TIME_PULL_STATE_CHANGE=42,T.TIME_PULL_STATE_TO_REFRESH=49,T.TIME_PULL_STATE_RELEASE=50,T.TIME_PULL_STATE_CANCEL=51,T.TIME_PULL_STATE_START=57,T.TIME_PULL_STATE_DONE=52,T.TIME_PUSH_ING=39,T.TIME_PUSH_START_LOAD=41,T.TIME_PUSH_STATE_CHANGE=43,T.TIME_PUSH_STATE_TO_REFRESH=53,T.TIME_PUSH_STATE_RELEASE=54,T.TIME_PUSH_STATE_CANCEL=55,T.TIME_PUSH_STATE_DONE=56,T.TIME_PUSH_STATE_START=58,T.TIME_NATIVE_CALLBACK=1e4,T.CALL_BACK_STATION_ING=1,T.CALL_BACK_STATION_DONE=2,T.CALL_BACK_STATION="callBackStation";let f=T;class C{static randomUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}}class m{}class w{toColorString(){return""}getColorStepsString(){return this.colors.map((e=>r.notNullOrUndefined(e.per)?e.color+" "+100*e.per+"%":e.color)).join(", ")}clone(){return null}cloneBase(e){e.colors=[];for(let t=0;t<this.colors.length;t++){const i=new m;i.color=this.colors[t].color,i.per=this.colors[t].per,e.colors.push(i)}}}const E=class e extends d{constructor(){super(),this.type=0,this.x=0,this.y=0,this.w=i.UNUSE_INT,this.h=i.UNUSE_INT,this.alpha=1,this.rotate=0,this.scaleX=1,this.scaleY=1,this.translateX=0,this.translateY=0,this.eventList=[],this.isVisible=e.VISIBLE,this.tempIsVisible=1,this.lastIsVisible=e.VISIBLE,this.isFix=0,this.lastIsFix=0,this.fixPlacement=e.FIX_PLACE_TOP,this.fixDisVal=0,this.fixStation=0,this.totalFixScrollY=0,this.wType=0,this.hType=0,this.alignParent=100,this.bgColor=i.UNUSE_COLOR,this.bgImgStyle=1,this.minW=0,this.minH=0,this.maxW=0,this.maxH=0,this.padding=0,this.paddingTop=0,this.paddingBottom=0,this.paddingLeft=0,this.paddingRight=0,this.margin=0,this.marginTop=0,this.marginBottom=0,this.marginLeft=0,this.marginRight=0,this.offsetLeft=0,this.offsetTop=0,this.hConstraint=0,this.wConstraint=0,this.hRatioConstraint=0,this.wRatioConstraint=0,this.borderPosition=e.BORDER_IN,this.border=0,this.borderColor=i.DEF_COLOR,this.borderStyle=e.BORDER_SOLID,this.borderTop=0,this.borderTopColor=i.DEF_COLOR,this.borderTopStyle=e.BORDER_SOLID,this.borderBottom=0,this.borderBottomColor=i.DEF_COLOR,this.borderBottomStyle=e.BORDER_SOLID,this.borderLeft=0,this.borderLeftColor=i.DEF_COLOR,this.borderLeftStyle=e.BORDER_SOLID,this.borderRight=0,this.borderRightColor=i.DEF_COLOR,this.borderRightStyle=e.BORDER_SOLID,this.shadowX=0,this.shadowY=0,this.shadowBlur=0,this.shadowSpread=0,this.shadowColor=i.UNUSE_COLOR,this.bgRound=0,this.bgRoundLeftTop=0,this.bgRoundRightTop=0,this.bgRoundLeftBottom=0,this.bgRoundRightBottom=0,this.tipPlacement=0,this.tipOffsetX=i.UNUSE_INT,this.tipOffsetY=i.UNUSE_INT,this.fixDis=0,this.station=e.STATION_NORMAL,this.lastStation=e.STATION_NORMAL,this.itemViewH=0,this.itemViewW=0,this.retryTimes=0,this.reverseAnimDelay=0,this.address="",this.address=C.randomUUID(),this.dataType=d.TYPE_LAYOUT}setOnClick(e){r.notNullOrUndefined(this.view)?this.view.setOnClickListener(e):this.varContainerItemSonClick=e}setOnHover(e){r.notNullOrUndefined(this.view)?this.view.setOnHoverListener(e):this.varContainerItemSonHover=e}cloneBaseModel(e,t,i){if(e.viewID=this.viewID,e.type=this.type,e.x=this.x,e.y=this.y,e.w=this.w,e.h=this.h,e.alpha=this.alpha,e.rotate=this.rotate,e.scaleX=this.scaleX,e.scaleY=this.scaleY,e.translateX=this.translateX,e.translateY=this.translateY,e.isVisible=this.isVisible,this.bgColor instanceof w?e.bgColor=r.deepClone(this.bgColor):e.bgColor=this.bgColor,e.bgImg=this.bgImg,e.bgImgStyle=this.bgImgStyle,e.tag=this.tag,e.anchor=this.anchor,e.isFix=this.isFix,e.wType=this.wType,e.hType=this.hType,e.alignParent=this.alignParent,e.minW=this.minW,e.minH=this.minH,e.maxW=this.maxW,e.maxH=this.maxH,e.shadowX=this.shadowX,e.shadowY=this.shadowY,e.shadowBlur=this.shadowBlur,e.shadowSpread=this.shadowSpread,e.shadowColor=this.shadowColor,e.padding=this.padding,e.paddingTop=this.paddingTop,e.paddingBottom=this.paddingBottom,e.paddingLeft=this.paddingLeft,e.paddingRight=this.paddingRight,e.margin=this.margin,e.marginTop=this.marginTop,e.marginBottom=this.marginBottom,e.marginLeft=this.marginLeft,e.marginRight=this.marginRight,e.offsetTop=this.offsetTop,e.offsetLeft=this.offsetLeft,e.border=this.border,e.borderColor=this.borderColor,e.borderStyle=this.borderStyle,e.borderTop=this.borderTop,e.borderTopColor=this.borderTopColor,e.borderTopStyle=this.borderTopStyle,e.borderBottom=this.borderBottom,e.borderBottomColor=this.borderBottomColor,e.borderBottomStyle=this.borderBottomStyle,e.borderLeft=this.borderLeft,e.borderLeftColor=this.borderLeftColor,e.borderLeftStyle=this.borderLeftStyle,e.borderRight=this.borderRight,e.borderRightColor=this.borderRightColor,e.borderRightStyle=this.borderRightStyle,e.isContainer=this.isContainer,e.station=this.station,e.bgRound=this.bgRound,e.bgRoundLeftTop=this.bgRoundLeftTop,e.bgRoundRightTop=this.bgRoundRightTop,e.bgRoundLeftBottom=this.bgRoundLeftBottom,e.bgRoundRightBottom=this.bgRoundRightBottom,e.scrollStyleCid=this.scrollStyleCid,this.scrollStyles&&this.scrollStyles.length>0){e.scrollStyles=[];for(let t=0;t<this.scrollStyles.length;t++)e.scrollStyles.push(this.scrollStyles[t].clone())}e.tipCid=this.tipCid,e.tipText=this.tipText,e.tipPlacement=this.tipPlacement,e.tipOffsetX=this.tipOffsetX,e.tipOffsetY=this.tipOffsetY,e.fixDis=this.fixDis,e.subPageContainerModel=this.subPageContainerModel,e.varContainerItemSonClick=this.varContainerItemSonClick,e.varContainerItemSonHover=this.varContainerItemSonHover,e.baseCompLogic=this.baseCompLogic,this.isTemplateComp=!0,this.skinAttrKeyValMap&&(e.skinAttrKeyValMap=this.skinAttrKeyValMap.clone()),r.notNullOrUndefined(this.varModelList)&&(e.varModelList=new n,this.varModelList.forEach(((t,i)=>{e.varModelList.put(i,t.clone())}))),r.notNullOrUndefined(this.varActiveModelList)&&(e.varActiveModelList=new n,this.varActiveModelList.forEach(((t,i)=>{e.varActiveModelList.put(i,t.clone())}))),r.notNullOrUndefined(this.varHoverModelList)&&(e.varHoverModelList=new n,this.varHoverModelList.forEach(((t,i)=>{e.varHoverModelList.put(i,t.clone())}))),r.notNullOrUndefined(this.varFocusModelList)&&(e.varFocusModelList=new n,this.varFocusModelList.forEach(((t,i)=>{e.varFocusModelList.put(i,t.clone())}))),r.notNullOrUndefined(this.varDisabledModelList)&&(e.varDisabledModelList=new n,this.varDisabledModelList.forEach(((t,i)=>{e.varDisabledModelList.put(i,t.clone())}))),r.notNullOrUndefined(this.varSelectModelList)&&(e.varSelectModelList=new n,this.varSelectModelList.forEach(((t,i)=>{e.varSelectModelList.put(i,t.clone())}))),r.notNullOrUndefined(this.activeAttrMap)&&(e.activeAttrMap=new n,e.activeAttrMap.putAll(this.activeAttrMap)),r.notNullOrUndefined(this.hoverAttrMap)&&(e.hoverAttrMap=new n,e.hoverAttrMap.putAll(this.hoverAttrMap)),r.notNullOrUndefined(this.focusAttrMap)&&(e.focusAttrMap=new n,e.focusAttrMap.putAll(this.focusAttrMap)),r.notNullOrUndefined(this.disabledAttrMap)&&(e.disabledAttrMap=new n,e.disabledAttrMap.putAll(this.disabledAttrMap)),r.notNullOrUndefined(this.selectAttrMap)&&(e.selectAttrMap=new n,e.selectAttrMap.putAll(this.selectAttrMap)),e.vConstraintDataList=this.vConstraintDataList,e.hConstraintDataList=this.hConstraintDataList,e.hConstraint=this.hConstraint,e.wConstraint=this.wConstraint,e.hRatioConstraint=this.hRatioConstraint,e.wRatioConstraint=this.wRatioConstraint,e.eventList=this.eventList}cloneEventList(e,t,i){for(let e=0;e<this.eventList.length;e++);this.eventList=[],this.eventList.push()}cloneModel(e,t,i,n){return null}addViewInitTask(e){r.isNullOrUndefined(this.iViewInitTaskList)&&(this.iViewInitTaskList=[]),this.iViewInitTaskList.push(e)}removeViewInitTask(e){if(!r.isNullOrUndefined(this.iViewInitTaskList)&&0!=this.iViewInitTaskList.length)for(let t=this.iViewInitTaskList.length-1;t>=0;t--)if(this.iViewInitTaskList[t]==e){this.iViewInitTaskList.splice(t,1);break}}};E.STATION_NORMAL=1,E.STATION_ONLY_READ=2,E.STATION_DISABLE=3,E.STATION_FOCUS=4,E.STATION_SELECT=5,E.TAG_MODEL=121312,E.TAG_PAGEVER=23423,E.TAG_VIEWID=2342423,E.LAYOUT_FIX_H=0,E.LAYOUT_MATCH_PARENT=1,E.LAYOUT_WRAP_CONTENT=2,E.TYPE_BOX=1,E.TYPE_TEXT=2,E.TYPE_IMAGE=3,E.TYPE_BUTTON=4,E.TYPE_INPUT=5,E.TYPE_CONTAINER=6,E.TYPE_FORM_VALID_CONTAINER=7,E.TYPE_REFRESH_CONTAINER=8,E.TYPE_TABLE=100,E.TYPE_LIST=101,E.TYPE_WHEEL=103,E.TYPE_TOP_TAB=104,E.TYPE_GRID=105,E.TYPE_DIALOG=106,E.TYPE_TOAST=107,E.TYPE_RADIO_GROUP=108,E.TYPE_RADIO=109,E.TYPE_CHECKBOX_GROUP=110,E.TYPE_CHECKBOX=111,E.TYPE_SWITCH=112,E.TYPE_BIG_INPUT=113,E.TYPE_PROGRESS=114,E.TYPE_SELECTOR=115,E.TYPE_ROLLER=116,E.TYPE_SELECT=117,E.TYPE_SCREEN=118,E.TYPE_MENU=119,E.TYPE_H_LIST=120,E.TYPE_SUBPAGE_CONTAINER=121,E.TYPE_BASE_CONTAINER=200,E.TYPE_BASE_SUPER_CONTAINER=201,E.TYPE_WINDOW=202,E.TYPE_DROPDOWN_WINDOW=203,E.TYPE_PAGE_HEADER=204,E.TYPE_PAGE_FOOTER=205,E.TYPE_LINEAR_CONTAINER=206,E.TYPE_BOTTOM_TAB=207,E.TYPE_LEFT_TAB=208,E.TYPE_RIGHT_TAB=209,E.TYPE_STATION_CONTAINER=210,E.TYPE_INDEX_CONTAINER=211,E.TYPE_VIEWPAGE_CONTAINER=212,E.TYPE_CSS_ITEM_CONTAINER=213,E.TYPE_WEBVIEW_CONTAINER=214,E.TYPE_PULL_PUSH=216,E.TYPE_DROP_DOWN_SELECT=217,E.TYPE_RESULT_CONTAINER=219,E.TYPE_FLEX_CONTAINER=220,E.TYPE_CASCADER=222,E.TYPE_TREE=223,E.TYPE_TREE_SELECT=224,E.TYPE_CASCADER_SELECT=225,E.TYPE_COLLAPSE=230,E.TYPE_DROP_DOWN_LIST_MENU=226,E.TYPE_DROP_DOWN_CASCADE_MENU=227,E.TYPE_H_MENU=228,E.TYPE_V_MENU=229,E.TYPE_LR_SLIDE_CONTAINER=231,E.TYPE_TB_SLIDE_CONTAINER=232,E.TYPE_SIDE_ANCHOR=234,E.TYPE_POPOVER=235,E.TYPE_POPOVER_CONFIG=236,E.TYPE_SLIDE_MENU_CONTAINER=300,E.TYPE_SLIDE_MENU_HORIZONTAL=301,E.TYPE_SLIDE_MENU_VERTICAL=302,E.TYPE_DD_LIST_INPUT=303,E.TYPE_DD_TREE_INPUT=304,E.TYPE_DD_CASCADE_INPUT=305,E.TYPE_PAGINATION=233,E.TYPE_TREE_ITEM_CONTAINER=9997,E.BORDER_NONE=0,E.BORDER_SOLID=1,E.BORDER_DOUBLE=2,E.BORDER_DASHED=3,E.BORDER_DOTTED=4,E.BORDER_WAVY=5,E.BORDER_OUT=0,E.BORDER_IN=1,E.VISIBLE_UN=0,E.VISIBLE=1,E.VISIBLE_GONE=2,E.FIX_NO=0,E.FIX_YES=1,E.FIX_SCROLL=2,E.FIX_PLACE_TOP=1,E.FIX_PLACE_BOTTOM=2;let O=E;class _{constructor(){this.tagName="view",this.bindComponent=(e,t="attr")=>null}setTagName(e){this.tagName=e}}const S=new n,M=class e{constructor(){this.attribute={},this.styleText="",this.animStyleText="",this.className="",this.tagName="view",this.isHidden=!1,this.itemKey="attr",this.style={},this.animStyle={},this.classStyle={},this.hasClick=!1,this.hasLongClick=!1,this.hasTouch=!1,this.getUserInfo=!1,this.openType="",this.address=C.randomUUID(),this.isNeedWatchRender=!1,this.viewClassName="",this.isRenderDone=!1,this.onReady=()=>{this.isRenderDone=!0,this.isNeedWatchRender?this.getViewDetail((t=>{try{t.x=t.left,t.y=t.top,e.count++,this.onBoundingClientRect&&this.onBoundingClientRect(t)}catch(e){}})):this.onBoundingClientRect(null)}}setOnBoundingClientRect(e){this.onBoundingClientRect=e}bindComponent(e,t="comp"){this.selfComponent=e,this.itemKey=t,this.border&&this.border.bindComponent(e,t+".border"),this.divider&&this.divider.bindComponent(e,t+".divider")}setTagName(e){this.tagName=e}setAnimStyle(e,t=!0){for(const t in e){const i=r.camelToMiddleLine(t);r.isEmpty(e[t])?delete this.animStyle[i]:this.animStyle[i]=e[t].toString().trim()}this.updateAnimStyle(t)}removeAnimStyle(e=!0){this.animStyle={},this.setAnimStyle({},e)}setAttribute(e,t=!0){var i;let n={};for(const t in e)this.attribute[t]=e[t],n[this.itemKey+".attribute."+t]=e[t];t&&(null==(i=this.selfComponent)||i.setData(n))}removeAttribute(e,t=!0){var i;delete this.attribute[e],t&&(null==(i=this.selfComponent)||i.setData({[this.itemKey+".attribute"]:this.attribute}))}setStyle(e,t=!0){for(const t in e){const i=r.camelToMiddleLine(t);r.isEmpty(e[t])||r.isNeedRemoveStyle(t,e[t])?delete this.style[i]:this.style[i]=e[t]}this.updateStyle(t)}getStyle(e){return this.style[r.camelToMiddleLine(e)]}removeStyle(e,t=!0){delete this.style[e],this.updateStyle(t)}removeStyleList(e,t=!0){var i;for(const t in e)delete this.style[r.camelToMiddleLine(t)];this.styleText=r.styleToText(this.style),t&&(null==(i=this.selfComponent)||i.setData({[this.itemKey+".styleText"]:this.styleText}))}setClassStyle(e,t=!0){Object.assign(this.classStyle,e);for(const e in this.classStyle)r.isEmpty(this.classStyle[e])&&delete this.style[e];this.updateClassName(t)}removeClassStyle(e,t=!0){this.classStyle[e]&&delete this.classStyle[e],this.updateClassName(t)}getClassStyle(e){return this.classStyle[e]}setViewClassName(e){this.viewClassName=e,this.updateClassName()}getViewClassName(){return this.viewClassName}updateStyle(e=!0){var t;this.styleText=r.styleToText(this.style),e&&this.selfComponent&&(null==(t=this.selfComponent)||t.setData({[this.itemKey+".styleText"]:this.styleText}))}updateAnimStyle(e=!0){var t;this.animStyleText=r.styleToText(this.animStyle),e&&this.selfComponent&&(null==(t=this.selfComponent)||t.setData({[this.itemKey+".animStyleText"]:this.animStyleText}))}updateClassName(e=!0){var t;this.className=Object.values(this.classStyle).join(" "),this.viewClassName&&(this.className=this.viewClassName+" "+this.className),e&&this.selfComponent&&(null==(t=this.selfComponent)||t.setData({[this.itemKey+".className"]:this.className}))}updateClassAndStyle(e=!0){var t;this.updateStyle(!1),this.updateClassName(!1),e&&this.selfComponent&&(null==(t=this.selfComponent)||t.setData({[this.itemKey+".styleText"]:this.styleText,[this.itemKey+".className"]:this.className}))}getViewDetail(e){var t;if(!this.id)return;const i=null==(t=this.selfComponent)?void 0:t.createSelectorQuery().in(this.selfComponent);i&&i.select("#"+this.id).fields({size:!0,scrollOffset:!0,rect:!0},(function(t){e&&e(t)})).exec()}getBoundingClientRect(e){if(this.id&&this.selfComponent)if(S.get(this.id)){if(this.onBoundingClientRect){const t=S.get(this.id);e({top:t.top,bottom:t.bottom,left:t.left,right:t.right,width:t.width,height:t.height,x:t.left,y:t.top})}}else this.selfComponent.createSelectorQuery().in(this.selfComponent).select("#"+this.id).boundingClientRect((t=>{S.put(this.id,t),this.onBoundingClientRect&&t&&e({top:t.top,bottom:t.bottom,left:t.left,right:t.right,width:t.width,height:t.height,x:t.left,y:t.top})})).exec()}};M.COMP_KEY="comp",M.count=0;let N=M;class L extends N{constructor(){super(...arguments),this.bindComponent=(e,t)=>{this.selfComponent=e,this.itemKey=t,this.innerView&&this.innerView.bindComponent(e,t+".innerView"),this.border&&this.border.bindComponent(e,t+".border"),this.divider&&this.divider.bindComponent(e,t+".divider")}}}const I=class e{constructor(e){this.tempStyle={},this.wxData=new N,this.wxCompData=new _,this.boundsRect={left:0,right:0,top:0,bottom:0,width:0,height:0,x:0,y:0,scrollHeight:0,scrollWidth:0,scrollLeft:0,scrollTop:0},e&&(this.wxCompData.tagName=e),this.wxCompData.id="view-"+r.generateViewId(),this.wxData.setOnBoundingClientRect((e=>this.onRenderDone(e)));const t=this;this.wxCompData.bindComponent=(e,i)=>(t.wxData.bindComponent(e,i),t.wxData)}get selfComponent(){return this.wxData.selfComponent}get itemKey(){return this.wxData.itemKey}checkRendered(){return!1}getBoundingClientRect(){return this.boundsRect}static generateViewId(){return r.generateViewId()}getId(){return this.wxData.viewID}setId(e){var t;this.wxData.viewID=e,this.wxCompData.viewID=e;var i=Math.floor(1001*Math.random())+1;this.wxData.id="view-"+Math.abs(this.hashCode(e+i)),null==(t=this.selfComponent)||t.setData({[N.COMP_KEY+".id"]:this.wxData.id})}setTagName(e){this.wxCompData.setTagName(e),this.wxData.setTagName(e)}setClassName(e){this.wxData.setViewClassName(e)}getClassName(){return this.wxData.getViewClassName()}setClassStyle(e,t=!0){this.wxData.setClassStyle(e,t)}removeClassStyle(e,t=!0){this.wxData.removeClassStyle(e,t)}getClassStyle(e){return this.wxData.getClassStyle(e)}setPixel(t,i){"string"==typeof i&&this.isStringUnit(i)?this.setStyle({[t]:""+i}):this.setStyle({[t]:i+"px"}),e.UPDATE_KEY.includes(t)&&this.updateBoundsRect()}getPixel(e){const t=this.getStyle(e);return"string"==typeof t?this.convertPixel(t):t}saveStyle(e){for(const t in e){const i=r.camelToMiddleLine(t);r.isEmpty(e[t])?delete this.tempStyle[i]:this.tempStyle[i]=e[t]}}getSaveStyle(){return this.tempStyle}setStyle(e,t=!0){this.wxData.setStyle(e,t)}clearBorder(){var e;this.wxData.border&&(this.wxData.border.tagName=null,this.wxData.border.styleText="",null==(e=this.selfComponent)||e.setData({[this.wxData.border.itemKey+".tagName"]:null,[this.wxData.border.itemKey+".styleText"]:""}))}setBorderClassStyle(e,t=!0){!this.wxData.border&&(this.wxData.border=new N),this.wxData.border.itemKey=this.wxData.itemKey+".border",this.wxData.border.tagName="border",this.wxData.border.setClassStyle(e,t)}setBorderStyle(e,t=!0){var i;!this.wxData.border&&(this.wxData.border=new N),this.wxData.border.itemKey=this.wxData.itemKey+".border",this.wxData.border.tagName="border",this.wxData.border.setStyle(e,t),t&&(null==(i=this.wxData.selfComponent)||i.setData({[this.wxData.border.itemKey+".tagName"]:"border"}))}getStyle(e){return this.wxData.getStyle(e)}removeStyle(e){this.wxData.removeStyle(e)}removeStyleList(e,t=!0){this.wxData.removeStyleList(e,t)}setInnerText(e){var t;this.wxData.text=e,null==(t=this.selfComponent)||t.setData({[this.itemKey+".text"]:e})}smoothScrollTo(e,t){}scrollTo(e,t){}showScrollbar(){this.wxData.setAttribute({showScrollbar:!0})}hideScrollbar(){this.wxData.setAttribute({showScrollbar:!1})}getLocationOnScreen(e){const{x:t,y:i}=this.getBoundingClientRect();e.length>1?(e[0]=t,e[1]=i):(e.push(t),e.push(i))}getAsyncLocationOnScreen(e){this.wxData.getViewDetail((t=>{e&&e(t.left,t.top)}))}initStyle(){}get isRenderDone(){return this.wxData.isRenderDone}convertPixel(e){if(e){if("string"==typeof e&&this.isStringUnit(e)&&e.endsWith("px")){const t=e.match(/^-?\d+/);if(t&&t.length>0)return Number(t[0])}if("string"==typeof e&&r.isNumber(e))return Number(e)}}isStringUnit(e){return e.endsWith("px")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("rem")||e.endsWith("em")||e.endsWith("%")||e.endsWith("rpx")||e.includes("calc")||""==e||"auto"==e||"fit-content"==e}onRenderDone(e){e&&(this.boundsRect=e)}hashCode(e){let t=0;for(let i=0;i<(null==e?void 0:e.length);i++)t=(t<<5)-t+e.charCodeAt(i);return t}updateBoundsRect(){this.wxData.getBoundingClientRect((e=>{this.boundsRect=e}))}};I.UPDATE_KEY=["left","right","top","bottom","width","height","marginLeft","marginRight","marginTop","marginBottom","paddingLeft","paddingRight","paddingTop","paddingBottom"];let P=I;const v=class e{static inTag(t){return[e.fixTag,e.refreshTag,e.slideTag].includes(t)}};v.STATION_NORMAL=0,v.STATION_ACTIVE=1,v.STATION_HOVER=2,v.STATION_FOCUS=3,v.STATION_DISABLED=4,v.STATION_SELECT=5,v.TYPE_COMP=1,v.TYPE_EVENT=2,v.TYPE_VAR=3,v.PROP_TYPE_INT=1,v.PROP_TYPE_STRING=2,v.PROP_TYPE_BOOLEAN=3,v.PROP_TYPE_COLOR=4,v.PROP_TYPE_ARRAY=5,v.PROP_TYPE_PX=7,v.PROP_TYPE_FLOAT=8,v.PROP_TYPE_OBJECT=9,v.PROP_TYPE_PARAMS=10,v.PROP_TYPE_IMAGE=11,v.PROP_TYPE_DOUBLE=12,v.type="type",v.x="x",v.y="y",v.w="w",v.h="h",v.alpha="alpha",v.rotate="rotate",v.scaleX="scaleX",v.scaleY="scaleY",v.translateX="translateX",v.translateY="translateY",v.station="station",v.event="event",v.cid="cid",v.intercept="intercept",v.isVisible="isVisible",v.bgColor="bgColor",v.svgColor="svgColor",v.color="color",v.bgColorAlpha="bgColorAlpha",v.borderColorAlpha="borderColorAlpha",v.shadowColorAlpha="shadowColorAlpha",v.bgImg="bgImg",v.bgImgStyle="bgImgStyle",v.events="events",v.scrollType="scrollType",v.scrollBar="scrollBar",v.isFix="isFix",v.fixPlacement="fixPlacement",v.fixDisVal="fixDisVal",v.wType="wType",v.hType="hType",v.alignParent="alignParent",v.minW="minW",v.minH="minH",v.maxW="maxW",v.maxH="maxH",v.tag="tag",v.anchor="anchor",v.page="page",v.updateAllItem="updateAllItem",v.scrollStyleCid="scrollStyleCid",v.scrollStyles="scrollStyles",v.attr="attr",v.startVal="startVal",v.endVal="endVal",v.scrollStartDis="scrollStartDis",v.scrollEndDis="scrollEndDis",v.varStartVal="varStartVal",v.varEndVal="varEndVal",v.varScrollStartDis="varScrollStartDis",v.varScrollEndDis="varScrollEndDis",v.hCons="hCons",v.vCons="vCons",v.placement="placement",v.referCid="referCid",v.referPlacement="referPlacement",v.relativeDis="relativeDis",v.hConstraint="hConstraint",v.wConstraint="wConstraint",v.hRatioConstraint="hRatioConstraint",v.wRatioConstraint="wRatioConstraint",v.keyName="keyName",v.screen="screen",v.itemCssType="itemCssType",v.varDefCheck="varDefCheck",v.col="col",v.row="row",v.orientation="orientation",v.containerType="containerType",v.custom="custom",v.url="url",v.layoutType="layoutType",v.itemVal="itemVal",v.item="item",v.columnCount="columnCount",v.wrapper="wrapper",v.bindCompList="bindCompList",v.var="var",v.pageType="pageType",v.justStaticToVar="justStaticToVar",v.shadowX="shadowX",v.shadowY="shadowY",v.shadowBlur="shadowBlur",v.shadowSpread="shadowSpread",v.shadowColor="shadowColor",v.padding="padding",v.paddingTop="paddingTop",v.paddingBottom="paddingBottom",v.paddingLeft="paddingLeft",v.paddingRight="paddingRight",v.borderPosition="borderPosition",v.border="border",v.borderColor="borderColor",v.borderStyle="borderStyle",v.borderTop="borderTop",v.borderTopColor="borderTopColor",v.borderTopStyle="borderTopStyle",v.borderBottom="borderBottom",v.borderBottomColor="borderBottomColor",v.borderBottomStyle="borderBottomStyle",v.borderLeft="borderLeft",v.borderLeftColor="borderLeftColor",v.borderLeftStyle="borderLeftStyle",v.borderRight="borderRight",v.borderRightColor="borderRightColor",v.borderRightStyle="borderRightStyle",v.getFatherItem="getFatherItem",v.getFatherItemLabel="getFatherItemLabel",v.getFatherItemValue="getFatherItemValue",v.getFatherItemChild="getFatherItemChild",v.getFatherItemAttr="getFatherItemAttr",v.bgRound="bgRound",v.bgRoundLeftTop="bgRoundLeftTop",v.bgRoundLeftBottom="bgRoundLeftBottom",v.bgRoundRightTop="bgRoundRightTop",v.bgRoundRightBottom="bgRoundRightBottom",v.margin="margin",v.marginTop="marginTop",v.marginBottom="marginBottom",v.marginLeft="marginLeft",v.marginRight="marginRight",v.offsetLeft="offsetLeft",v.offsetTop="offsetTop",v.tipCid="tipCid",v.tipText="tipText",v.tipPlacement="tipPlacement",v.tipOffsetX="tipOffsetX",v.tipOffsetY="tipOffsetY",v.fixDis="fixDis",v.varTipCid="varTipCid",v.varTipText="varTipText",v.varTipPlacement="varTipPlacement",v.varTipOffsetX="varTipOffsetX",v.varTipOffsetY="varTipOffsetY",v.varScrollStyleCid="varScrollStyleCid",v.selIndex="selIndex",v.defaultScreen="defaultScreen",v.dataList="dataList",v.getAttrVal="getAttrVal",v.itemIn="itemIn",v.ext="ext",v.extParams="extParams",v.fixTag="#fR3@-FIX",v.refreshTag="#f1571@-REFRESH",v.slideTag="#f341@-SLIDE",v.varX="varX",v.varY="varY",v.varW="varW",v.varH="varH",v.varAlpha="varAlpha",v.varRotate="varRotate",v.varScaleX="varScaleX",v.varScaleY="varScaleY",v.varTranslateX="varTranslateX",v.varTranslateY="varTranslateY",v.varIsVisible="varIsVisible",v.varBgColor="varBgColor",v.varBgImg="varBgImg",v.varBgImgStyle="varBgImgStyle",v.varIsFix="varIsFix",v.varFixPlacement="varFixPlacement",v.varFixDisVal="varFixDisVal",v.varStation="varStation",v.varWType="varWType",v.varHType="varHType",v.varAlignParent="varAlignParent",v.varMinW="varMinW",v.varMinH="varMinH",v.varMaxW="varMaxW",v.varMaxH="varMaxH",v.varTag="varTag",v.varAnchor="varAnchor",v.varRelativeDis="varRelativeDis",v.varHConstraint="varHConstraint",v.varWConstraint="varWConstraint",v.varHRatioConstraint="varHRatioConstraint",v.varWRatioConstraint="varWRatioConstraint",v.varShadowX="varShadowX",v.varShadowY="varShadowY",v.varShadowBlur="varShadowBlur",v.varShadowSpread="varShadowSpread",v.varShadowColor="varShadowColor",v.varPadding="varPadding",v.varPaddingTop="varPaddingTop",v.varPaddingBottom="varPaddingBottom",v.varPaddingLeft="varPaddingLeft",v.varPaddingRight="varPaddingRight",v.varMargin="varMargin",v.varMarginTop="varMarginTop",v.varMarginBottom="varMarginBottom",v.varMarginLeft="varMarginLeft",v.varMarginRight="varMarginRight",v.varBorderPosition="varBorderPosition",v.varBorder="varBorder",v.varBorderColor="varBorderColor",v.varBorderStyle="varBorderStyle",v.varBorderTop="varBorderTop",v.varBorderTopColor="varBorderTopColor",v.varBorderTopStyle="varBorderTopStyle",v.varBorderBottom="varBorderBottom",v.varBorderBottomColor="varBorderBottomColor",v.varBorderBottomStyle="varBorderBottomStyle",v.varBorderLeft="varBorderLeft",v.varBorderLeftColor="varBorderLeftColor",v.varBorderLeftStyle="varBorderLeftStyle",v.varBorderRight="varBorderRight",v.varBorderRightColor="varBorderRightColor",v.varBorderRightStyle="varBorderRightStyle",v.varBgRound="varBgRound",v.varBgRoundTop="varBgRoundTop",v.varBgRoundBottom="varBgRoundBottom",v.varBgRoundLeft="varBgRoundLeft",v.varBgRoundRight="varBgRoundRight",v.varScrollType="varScrollType",v.varScrollBar="varScrollBar",v.varLayoutType="varLayoutType",v.varItemVal="varItemVal",v.varItem="varItem",v.varUrl="varUrl",v.varDataList="varDataList",v.screenData="screenData",v.selectContainer="selectContainer",v.isStatic="isStatic",v.LIST_HEADER_KEY="16#header!uk15",v.LIST_FOOTER_KEY="16#footer!uk15",v.params="params";let A=v;const V=class e{constructor(t,n){this.borderVal=e.UNUSE_PX_VAL,this.borderColorVal=i.UNUSE_COLOR,this.borderStyleVal=e.UNUSE_PX_VAL,this.borderTopVal=e.UNUSE_PX_VAL,this.borderTopColorVal=i.UNUSE_COLOR,this.borderTopStyleVal=e.UNUSE_PX_VAL,this.borderBottomVal=e.UNUSE_PX_VAL,this.borderBottomColorVal=i.UNUSE_COLOR,this.borderBottomStyleVal=e.UNUSE_PX_VAL,this.borderLeftVal=e.UNUSE_PX_VAL,this.borderLeftColorVal=i.UNUSE_COLOR,this.borderLeftStyleVal=e.UNUSE_PX_VAL,this.borderRightVal=e.UNUSE_PX_VAL,this.borderRightColorVal=i.UNUSE_COLOR,this.borderRightStyleVal=e.UNUSE_PX_VAL,this.mView=t,this.aliceView=n}updateAliceViewModel(e){this.mBaseCompModel=e,this.mView=e.view}initView(e){this.mBaseCompModel=e,this.mView=e.view,this.initRound(this.mBaseCompModel,null,A.STATION_NORMAL,null),this.initBorder(this.mBaseCompModel,null,A.STATION_NORMAL,null)}initBorder(t,n,r,a){if(this.mBaseCompModel.view.setBoxzing("border-box"),t.type==O.TYPE_DROP_DOWN_CASCADE_MENU)return;if(r!=A.STATION_NORMAL)switch(a){case A.border:this.borderVal=jt.objectToFloat(n);break;case A.borderColor:this.borderColorVal=jt.parseColor(t.borderColor,n,A.borderColor,t,r);break;case A.borderStyle:this.borderStyleVal=jt.objectToInt(n);break;case A.borderTop:this.borderTopVal=jt.objectToFloat(n);break;case A.borderTopColor:this.borderTopColorVal=jt.parseColor(t.borderTopColor,n,A.borderTopColor,t,r);break;case A.borderTopStyle:this.borderTopStyleVal=jt.objectToInt(n);break;case A.borderBottom:this.borderBottomVal=jt.objectToFloat(n);break;case A.borderBottomColor:this.borderBottomColorVal=jt.parseColor(t.borderBottomColor,n,A.borderBottomColor,t,r);break;case A.borderBottomStyle:this.borderBottomStyleVal=jt.objectToInt(n);break;case A.borderLeft:this.borderLeftVal=jt.objectToFloat(n);break;case A.borderLeftColor:this.borderLeftColorVal=jt.parseColor(t.borderLeftColor,n,A.borderLeftColor,t,r);break;case A.borderLeftStyle:this.borderLeftStyleVal=jt.objectToInt(n);break;case A.borderRight:this.borderRightVal=jt.objectToFloat(n);break;case A.borderRightColor:this.borderRightColorVal=jt.parseColor(t.borderRightColor,n,A.borderRightColor,t,r);break;case A.borderRightStyle:this.borderRightStyleVal=jt.objectToInt(n)}else this.borderVal=e.UNUSE_PX_VAL,this.borderColorVal=i.UNUSE_COLOR,this.borderStyleVal=e.UNUSE_PX_VAL,this.borderTopVal=e.UNUSE_PX_VAL,this.borderTopColorVal=i.UNUSE_COLOR,this.borderTopStyleVal=e.UNUSE_PX_VAL,this.borderBottomVal=e.UNUSE_PX_VAL,this.borderBottomColorVal=i.UNUSE_COLOR,this.borderBottomStyleVal=e.UNUSE_PX_VAL,this.borderLeftVal=e.UNUSE_PX_VAL,this.borderLeftColorVal=i.UNUSE_COLOR,this.borderLeftStyleVal=e.UNUSE_PX_VAL,this.borderRightVal=e.UNUSE_PX_VAL,this.borderRightColorVal=i.UNUSE_COLOR,this.borderRightStyleVal=e.UNUSE_PX_VAL;const s=this.borderVal==e.UNUSE_PX_VAL?this.mBaseCompModel.border:this.borderVal,o=this.borderColorVal==i.UNUSE_COLOR?this.mBaseCompModel.borderColor:this.borderColorVal,l=this.borderStyleVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderStyle:this.borderStyleVal,c=this.borderTopVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderTop:this.borderTopVal,d=this.borderTopColorVal==i.UNUSE_COLOR?this.mBaseCompModel.borderTopColor:this.borderTopColorVal,h=this.borderTopStyleVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderTopStyle:this.borderTopStyleVal,u=this.borderBottomVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderBottom:this.borderBottomVal,p=this.borderBottomColorVal==i.UNUSE_COLOR?this.mBaseCompModel.borderBottomColor:this.borderBottomColorVal,g=this.borderBottomStyleVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderBottomStyle:this.borderBottomStyleVal,T=this.borderLeftVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderLeft:this.borderLeftVal,f=this.borderLeftColorVal==i.UNUSE_COLOR?this.mBaseCompModel.borderLeftColor:this.borderLeftColorVal,C=this.borderLeftStyleVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderLeftStyle:this.borderLeftStyleVal,m=this.borderRightVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderRight:this.borderRightVal,w=this.borderRightColorVal==i.UNUSE_COLOR?this.mBaseCompModel.borderRightColor:this.borderRightColorVal,E=this.borderRightStyleVal==e.UNUSE_PX_VAL?this.mBaseCompModel.borderRightStyle:this.borderRightStyleVal;s>0&&o&&l>0?this.setBorder("",l,s,o):(this.setBorder("Top",h,c,d),this.setBorder("Bottom",g,u,p),this.setBorder("Left",C,T,f),this.setBorder("Right",E,m,w))}setBorder(e,t,i,n){if(t>0&&i>0&&n)switch(t){case O.BORDER_SOLID:this.mBaseCompModel.view["setBorder"+e]("solid",i,n);break;case O.BORDER_DOUBLE:this.mBaseCompModel.view["setBorder"+e]("double",i,n);break;case O.BORDER_DASHED:this.mBaseCompModel.view["setBorder"+e]("dashed",i,n);break;case O.BORDER_DOTTED:this.mBaseCompModel.view["setBorder"+e]("dotted",i,n);break;case O.BORDER_WAVY:this.mBaseCompModel.view["setBorder"+e]("wavy",i,n)}else this.mBaseCompModel.view.clearBorder()}initRound(t,i,n,r){if(t.type==O.TYPE_DROP_DOWN_CASCADE_MENU)return;this.mBgRoundVal=t.bgRound;let a=t.bgRoundLeftTop,s=t.bgRoundLeftBottom,o=t.bgRoundRightTop,l=t.bgRoundRightBottom;if(n!==A.STATION_NORMAL)switch(r){case A.bgRoundLeftTop:a=jt.objectToFloat(i);break;case A.bgRoundLeftBottom:s=jt.objectToFloat(i);break;case A.bgRoundRightTop:o=jt.objectToFloat(i);break;case A.bgRoundRightBottom:l=jt.objectToFloat(i);break;case A.bgRound:this.mBgRoundVal=jt.objectToFloat(i)}const c=this.mBgRoundVal==e.UNUSE_PX_VAL?this.mBaseCompModel.bgRound:this.mBgRoundVal;(c>0||a>0||s>0||o>0||l>0||r)&&(c>0?t.view.setRadius(c):(r&&t.view.setRadius(0),a>0?t.view.setTopLeftRadius(a):r&&t.view.setTopLeftRadius(0),s>0?t.view.setBottomLeftRadius(s):r&&t.view.setBottomLeftRadius(0),o>0?t.view.setTopRightRadius(o):r&&t.view.setTopRightRadius(0),l>0?t.view.setBottomRightRadius(l):r&&t.view.setBottomRightRadius(0)))}onTouchEvent(t){if(r.isNullOrUndefined(this.mBaseCompModel))return!1;if(this.mBaseCompModel.station==O.STATION_DISABLE)return!1;let i=!1;if(t.getAction()==U.ACTION_DOWN)this.hasHandleUp=!1,this.touchDownTime=Date.now(),(r.notNullOrUndefined(this.mBaseCompModel.eventList)&&this.mBaseCompModel.eventList.length>0||r.notNullOrUndefined(this.mBaseCompModel.activeAttrMap)&&this.mBaseCompModel.activeAttrMap.size()>0||r.notNullOrUndefined(this.mBaseCompModel.view)&&this.mBaseCompModel.view.hasOnClickListeners())&&(i=!0),this.mBaseCompModel.baseCompLogic.absBaseLogicImp.updateVarDataListContainerClickIndex(this.mBaseCompModel,this.aliceView),this.mBaseCompModel.baseCompLogic.absBaseLogicImp.setToOneStationUI(this.mBaseCompModel,this.aliceView,this.mBaseCompModel.activeAttrMap,A.STATION_ACTIVE);else if(t.getAction()==U.ACTION_UP){if(this.hasHandleUp=!0,this.mBaseCompModel.baseCompLogic.absBaseLogicImp.updateVarDataListContainerClickIndex(this.mBaseCompModel,this.aliceView),this.mBaseCompModel.baseCompLogic.absBaseLogicImp.resetToNarmalUI(this.mBaseCompModel,this.aliceView,this.mBaseCompModel.activeAttrMap),r.notNullOrUndefined(this.mBaseCompModel)&&this.mBaseCompModel.station!=O.STATION_ONLY_READ&&this.mBaseCompModel.station!=O.STATION_DISABLE){if(this.needHandleReadOnlyClick)return Date.now()-this.touchDownTime<e.SINGLE_CLICK_TIME&&(this.mBaseCompModel.type==O.TYPE_INPUT||(this.mBaseCompModel.type,O.TYPE_BIG_INPUT)),!0;if(this.mBaseCompModel.type==O.TYPE_INPUT||this.mBaseCompModel.type==O.TYPE_BIG_INPUT)return Date.now()-this.touchDownTime<e.SINGLE_CLICK_TIME&&this.mBaseCompModel.view.requestFocus(),!0}}else t.getAction()==U.ACTION_CANCEL&&!this.hasHandleUp&&(this.mBaseCompModel.baseCompLogic.absBaseLogicImp.updateVarDataListContainerClickIndex(this.mBaseCompModel,this.aliceView),this.mBaseCompModel.baseCompLogic.absBaseLogicImp.resetToNarmalUI(this.mBaseCompModel,this.aliceView,this.mBaseCompModel.activeAttrMap),this.touchDownTime=0);return r.notNullOrUndefined(this.mBaseCompModel.gestureHandler)&&this.mBaseCompModel.gestureHandler.onTouchEvent(t,this.aliceView),i}};V.UNUSE_PX_VAL=-939149798,V.SINGLE_CLICK_TIME=700;let y=V;class b{}b.ALIGN_LEFT_CENTER=0,b.ALIGN_LEFT_TOP=1,b.ALIGN_LEFT_BOTTOM=2,b.ALIGN_RIGHT_CENTER=3,b.ALIGN_RIGHT_TOP=4,b.ALIGN_RIGHT_BOTTOM=5,b.ALIGN_CENTER=6,b.ALIGN_TOP_CENTER=7,b.ALIGN_BOTTOM_CENTER=8,b.ALIGN_H_CENTER=9,b.ALIGN_V_CENTER=10,b.ORI_VERTICAL=0,b.ORI_HORIZONTAL=1;class R{static getCanvasShowH(e){let t=this.canvasH;return 1!=e.immerse&&(t-=this.statusBarH),1!=e.navImmerse&&(t-=this.bottomBarH),t}}const D=class e extends P{constructor(t,n){super(n),this.children=[],this.adress="",this.paddingForX=0,this.paddingForY=0,this.type=e.TYPE_VIEW,this.lastLinearMargin=i.UNUSE_INT,this.translateX=0,this.translateY=0,this.canSetLeft=!0,this.canSetTop=!0,this.needFatherPaddingLeft=!0,this.needFatherPaddingTop=!0,this.needFatherPaddingRight=!0,this.needFatherPaddingBottom=!0,this.goneViewWidth=0,this.goneViewHeight=0,this.TAG={},this.onTouchListenerList=[],this.postRunnableList=[],this.viewLeft=0,this.viewTop=0,this.viewRight=0,this.viewBottom=0,this.viewWidth=0,this.viewHeight=0,this.widthDoneCallbackArray=[],this.heightCallbackDoneArray=[],this.wMeasureDone=!0,this.hMeasureDone=!0,this.isMeasureDone=!1,this.transformValue={},this.visibleStation=e.VISIBLE,this.isMouseenter=!1,this.dbClicktimer=null,this.onClick=e=>{var t;if(this.onDbClickListener){if(this.dbClicktimer)return clearTimeout(this.dbClicktimer),this.dbClicktimer=null,this.updateClick(),void(this.hasOnDbClickListeners()&&this.onDbCl