xiaoe_mp_npm 1.0.21 → 1.0.22-store2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc.js +32 -6
- package/miniprogram_dist/GoodsItem/index.json +6 -6
- package/miniprogram_dist/GoodsItem/index.wxs +18 -18
- package/miniprogram_dist/LiveGoodsList/Header/index.js +54 -54
- package/miniprogram_dist/LiveGoodsList/Header/index.json +6 -6
- package/miniprogram_dist/LiveGoodsList/Header/index.less +45 -45
- package/miniprogram_dist/LiveGoodsList/Header/index.scss +105 -105
- package/miniprogram_dist/LiveGoodsList/Header/index.wxml +32 -32
- package/miniprogram_dist/LiveGoodsList/README.md +9 -9
- package/miniprogram_dist/LiveGoodsList/index.json +8 -8
- package/miniprogram_dist/LiveGoodsList/index.less +53 -53
- package/miniprogram_dist/LiveGoodsList/index.scss +92 -92
- package/miniprogram_dist/Task/TaskBubble/index.js +2 -1
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +23 -21
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +1 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +264 -169
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +26 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxss +96 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +8 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +1 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +4 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +1 -0
- package/miniprogram_dist/Task/TaskPopup/index.js +76 -70
- package/miniprogram_dist/Task/TaskPopup/index.json +2 -2
- package/miniprogram_dist/Task/TaskPopup/index.wxml +2 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxss +521 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxss +298 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +316 -0
- package/miniprogram_dist/Task/TaskQuizPopup/index.js +225 -0
- package/miniprogram_dist/Task/TaskQuizPopup/index.json +8 -0
- package/miniprogram_dist/Task/TaskQuizPopup/index.scss +159 -0
- package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +97 -0
- package/miniprogram_dist/Task/TaskQuizPopup/index.wxss +478 -0
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -0
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +6 -0
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +108 -0
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -0
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxss +286 -0
- package/miniprogram_dist/common/utils/tool.js +54 -48
- package/package.json +1 -1
- package/src/AliveInvite/LiveRoomVertical/index.wxss +252 -252
- package/src/CollectionAddress/index.wxss +5 -5
- package/src/ConfirmOrder/components/AddressEdit/index.wxss +120 -120
- package/src/ConfirmOrder/components/AddressManage/index.wxss +98 -98
- package/src/ConfirmOrder/components/AddressSelect/index.wxss +67 -67
- package/src/ConfirmOrder/components/ChoosePicker/index.wxss +18 -18
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.wxss +45 -45
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.wxss +100 -100
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.wxss +55 -55
- package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.wxss +13 -13
- package/src/ConfirmOrder/components/Header/index.wxss +26 -26
- package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.wxss +85 -85
- package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.wxss +155 -155
- package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.wxss +51 -51
- package/src/ConfirmOrder/components/ModeSelect/index.wxss +44 -44
- package/src/ConfirmOrder/components/PickupSelect/index.wxss +22 -22
- package/src/ConfirmOrder/components/SelectSite/index.wxss +82 -82
- package/src/ConfirmOrder/components/Shipper/index.wxss +76 -76
- package/src/ConfirmOrder/components/ShipperEdit/index.wxss +78 -78
- package/src/ConfirmOrder/components/WechatAddress/index.wxss +22 -22
- package/src/ConfirmOrder/index.wxss +5 -5
- package/src/CouponList/couponMsg/index.wxss +3 -3
- package/src/CustomPopup/index.wxss +22 -22
- package/src/GoodsItem/index.json +6 -6
- package/src/GoodsItem/index.wxs +18 -18
- package/src/LiveGoodsList/Header/index.js +54 -54
- package/src/LiveGoodsList/Header/index.json +6 -6
- package/src/LiveGoodsList/Header/index.less +45 -45
- package/src/LiveGoodsList/Header/index.scss +105 -105
- package/src/LiveGoodsList/Header/index.wxml +32 -32
- package/src/LiveGoodsList/README.md +9 -9
- package/src/LiveGoodsList/index.json +8 -8
- package/src/LiveGoodsList/index.less +53 -53
- package/src/LiveGoodsList/index.scss +92 -92
- package/src/LiveGoodsList/index.wxss +218 -218
- package/src/PayComplete/Components/CouponItem/index.wxss +122 -122
- package/src/PayComplete/Components/Header/index.wxss +27 -27
- package/src/PayComplete/Components/LeadGroup/index.wxss +33 -33
- package/src/PayComplete/Components/PayGifts/index.wxss +157 -157
- package/src/PayComplete/Components/PayState/earnIntegral/index.wxss +23 -23
- package/src/PayComplete/Components/PayState/index.wxss +20 -20
- package/src/PayComplete/index.wxss +27 -27
- package/src/PayModule/wechatLoading/index.wxss +57 -57
- package/src/Recommend/index.wxss +110 -110
- package/src/Sku/Header/index.wxss +27 -27
- package/src/Sku/goods-info/index.wxss +52 -52
- package/src/Sku/index/index.wxss +52 -52
- package/src/Sku/row-item/index.wxss +50 -50
- package/src/Sku/step/index.wxss +11 -11
- package/src/Task/TaskBubble/index.js +2 -1
- package/src/Task/TaskBubble/index.wxss +289 -289
- package/src/Task/TaskIcon/index.wxss +130 -130
- package/src/Task/TaskPopup/component/RewardList/index.js +23 -21
- package/src/Task/TaskPopup/component/RewardList/index.wxml +1 -0
- package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
- package/src/Task/TaskPopup/component/TaskItem/index.js +264 -169
- package/src/Task/TaskPopup/component/TaskItem/index.scss +26 -0
- package/src/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
- package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -394
- package/src/Task/TaskPopup/component/TaskList/index.js +8 -0
- package/src/Task/TaskPopup/component/TaskList/index.wxml +1 -0
- package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
- package/src/Task/TaskPopup/component/TaskType/index.js +4 -0
- package/src/Task/TaskPopup/component/TaskType/index.wxml +1 -0
- package/src/Task/TaskPopup/component/TaskType/index.wxss +110 -110
- package/src/Task/TaskPopup/index.js +76 -70
- package/src/Task/TaskPopup/index.json +2 -2
- package/src/Task/TaskPopup/index.wxml +2 -0
- package/src/Task/TaskPopup/index.wxss +406 -406
- package/src/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
- package/src/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
- package/src/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
- package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
- package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
- package/src/Task/TaskQuizPopup/components/quizContent/index.wxss +1 -0
- package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
- package/src/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
- package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
- package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
- package/src/Task/TaskQuizPopup/components/quizRichText/index.wxss +1 -0
- package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
- package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
- package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
- package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
- package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
- package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
- package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
- package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
- package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
- package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +283 -0
- package/src/Task/TaskQuizPopup/index.js +225 -0
- package/src/Task/TaskQuizPopup/index.json +8 -0
- package/src/Task/TaskQuizPopup/index.scss +159 -0
- package/src/Task/TaskQuizPopup/index.wxml +97 -0
- package/src/Task/TaskQuizPopup/index.wxss +1 -0
- package/src/Task/taskQuizRemindPopup/index.js +74 -0
- package/src/Task/taskQuizRemindPopup/index.json +6 -0
- package/src/Task/taskQuizRemindPopup/index.scss +108 -0
- package/src/Task/taskQuizRemindPopup/index.wxml +27 -0
- package/src/Task/taskQuizRemindPopup/index.wxss +1 -0
- package/src/Task/taskReceivePopup/customPrizes/index.wxss +220 -220
- package/src/Task/taskReceivePopup/index.wxss +1 -1
- package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
- package/src/common/css/theme.wxss +16 -16
- package/src/common/utils/tool.js +54 -48
- package/src/miniprogram_npm/miniprogram-computed/index.js +1 -0
package/src/common/utils/tool.js
CHANGED
|
@@ -1,66 +1,72 @@
|
|
|
1
1
|
/*函数节流*/
|
|
2
2
|
function throttle(fn, interval) {
|
|
3
|
-
var enterTime = 0
|
|
4
|
-
var gapTime = interval || 300
|
|
3
|
+
var enterTime = 0 //触发的时间
|
|
4
|
+
var gapTime = interval || 300 //间隔时间,如果interval不传,则默认300ms
|
|
5
5
|
return function () {
|
|
6
|
-
var context = this
|
|
7
|
-
var backTime = new Date()
|
|
6
|
+
var context = this
|
|
7
|
+
var backTime = new Date() //第一次函数return即触发的时间
|
|
8
8
|
if (backTime - enterTime > gapTime) {
|
|
9
|
-
fn.call(context, arguments)
|
|
10
|
-
enterTime = backTime
|
|
9
|
+
fn.call(context, arguments)
|
|
10
|
+
enterTime = backTime //赋值给第一次触发的时间,这样就保存了第二次触发的时间
|
|
11
11
|
}
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/*函数防抖*/
|
|
16
16
|
function debounce(func, wait, immediate) {
|
|
17
|
-
let timer
|
|
17
|
+
let timer
|
|
18
18
|
|
|
19
19
|
return function () {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
//this指向debounce
|
|
21
|
+
let context = this
|
|
22
|
+
//即参数,func,wait
|
|
23
|
+
let args = arguments
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
//如果timer不为null, 清除定时器
|
|
26
|
+
if (timer) clearTimeout(timer)
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
28
|
+
//如果是立即执行
|
|
29
|
+
if (immediate) {
|
|
30
|
+
//定义callNow = !timer
|
|
31
|
+
var callNow = !timer
|
|
32
|
+
//定义wait时间后把timer变为null
|
|
33
|
+
//即在wait时间之后事件才会有效
|
|
34
|
+
timer = setTimeout(() => {
|
|
35
|
+
timer = null
|
|
36
|
+
}, wait)
|
|
37
|
+
//如果callNow为true,即原本timer为null
|
|
38
|
+
//那么执行func函数
|
|
39
|
+
if (callNow) func.apply(context, args)
|
|
40
|
+
} else {
|
|
41
|
+
//如果是不立即执行
|
|
42
|
+
//那就是每次重新定时
|
|
43
|
+
timer = setTimeout(function () {
|
|
44
|
+
func.apply(context, args)
|
|
45
|
+
}, wait)
|
|
46
|
+
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
//
|
|
61
|
-
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 高并发请求打散
|
|
52
|
+
* @param delayHandler 目标并发量获取器
|
|
53
|
+
* @param options 配置项 { defaultDelay: 1000, useScatter: false }
|
|
54
|
+
* @param cb 回调函数
|
|
55
|
+
* @returns {number} 定时器
|
|
56
|
+
*/
|
|
57
|
+
function scatterRequest(delayHandler, options, cb) {
|
|
58
|
+
let timer
|
|
59
|
+
const { defaultDelay = 1000, useScatter = false } = options
|
|
60
|
+
let delay = useScatter ? delayHandler() : defaultDelay // 默认并发量为1000
|
|
61
|
+
console.log(useScatter ? `[scatterRequest] High concurrency delay request: ${delay}` : '[scatterRequest] Disabled')
|
|
62
|
+
timer = setTimeout(() => {
|
|
63
|
+
cb()
|
|
64
|
+
}, delay)
|
|
65
|
+
return timer
|
|
66
|
+
}
|
|
62
67
|
|
|
63
68
|
module.exports = {
|
|
64
69
|
throttle,
|
|
65
|
-
debounce
|
|
66
|
-
|
|
70
|
+
debounce,
|
|
71
|
+
scatterRequest,
|
|
72
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var z=A(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0}),C.parseMultiDataPaths=re,C.getDataOnPath=void 0;var R=/^\s/,m=function(e,t){throw new Error('Parsing data path "'+e+'" failed at char "'+e[t]+'" (index '+t+")")},L=function(e,t){for(var r=t.index;t.index<t.length;){var i=e[t.index];if(/^[0-9]/.test(i)){t.index++;continue}break}return r===t.index&&m(e,t.index),parseInt(e.slice(r,t.index),10)},V=function(e,t){var r=t.index,i=e[r];if(/^[_a-zA-Z$]/.test(i))for(t.index++;t.index<t.length;){var p=e[t.index];if(/^[_a-zA-Z0-9$]/.test(p)){t.index++;continue}break}else m(e,t.index);return e.slice(r,t.index)},B=function(e,t){for(var r=[V(e,t)],i={deepCmp:!1};t.index<t.length;){var p=e[t.index];if(p==="[")t.index++,r.push(L(e,t)),e[t.index]!=="]"&&m(e,t.index),t.index++;else if(p==="."){if(t.index++,e[t.index]==="*"){if(t.index++,e[t.index]==="*"){t.index++,i.deepCmp=!0;break}m(e,t.index)}r.push(V(e,t))}else break}return{path:r,options:i}},ee=function(e,t){for(;R.test(e[t.index]);)t.index++;for(var r=[B(e,t)],i=!1;t.index<t.length;){var p=e[t.index];R.test(p)?t.index++:p===","?(i=!0,t.index++):i?(i=!1,r.push(B(e,t))):m(e,t.index)}return r},te=function(e,t){t.index<t.length&&m(e,t.index)};function re(e){var t={length:e.length,index:0},r=ee(e,t);return te(e,t),r}var ne=function(e,t){var r=e;return t.forEach(function(i){r=typeof r!="object"||r===null?void 0:r[i]}),r};C.getDataOnPath=ne});var U=A((Pe,H)=>{H.exports=function(){let t=null,r;function i(n){return n?typeof n=="object"||typeof n=="function":!1}function p(n){if(n!==null&&!i(n))throw new TypeError("Object prototype may only be an Object or null: "+n)}let a=Object,d=Boolean(a.create)||!({__proto__:null}instanceof a),c=a.create||(d?function(o){return p(o),{__proto__:o}}:function(o){if(p(o),o===null)throw new SyntaxError("Native Object.create is required to create objects with null prototype");var v=function(){};return v.prototype=o,new v}),l=function(){return null},_=a.getPrototypeOf||([].__proto__===Array.prototype?function(o){let v=o.__proto__;return i(v)?v:null}:l);return r=function(n,o){if((this&&this instanceof r?this.constructor:void 0)===void 0)throw new TypeError("Constructor Proxy requires 'new'");if(!i(n)||!i(o))throw new TypeError("Cannot create proxy with a non-object as target or handler");let y=function(){};t=function(){n=null,y=function(u){throw new TypeError(`Cannot perform '${u}' on a proxy that has been revoked`)}},setTimeout(function(){t=null},0);let h=o;o={get:null,set:null,apply:null,construct:null};for(let u in h){if(!(u in o))throw new TypeError(`Proxy polyfill does not support trap '${u}'`);o[u]=h[u]}typeof h=="function"&&(o.apply=h.apply.bind(h));let f=_(n),s,x=!1,O=!1;typeof n=="function"?(s=function(){let b=this&&this.constructor===s,P=Array.prototype.slice.call(arguments);if(y(b?"construct":"apply"),b&&o.construct)return o.construct.call(this,n,P);if(!b&&o.apply)return o.apply(n,this,P);if(b){P.unshift(n);let D=n.bind.apply(n,P);return new D}return n.apply(this,P)},x=!0):n instanceof Array?(s=[],O=!0):s=d||f!==null?c(f):{};let j=o.get?function(u){return y("get"),o.get(this,u,s)}:function(u){return y("get"),this[u]},I=o.set?function(u,b){y("set");let P=o.set(this,u,b,s)}:function(u,b){y("set"),this[u]=b},N=a.getOwnPropertyNames(n),q={};N.forEach(function(u){if((x||O)&&u in s)return;let b=a.getOwnPropertyDescriptor(n,u),P={enumerable:Boolean(b.enumerable),get:j.bind(n,u),set:I.bind(n,u)};a.defineProperty(s,u,P),q[u]=!0});let F=!0;if(x||O){let u=a.setPrototypeOf||([].__proto__===Array.prototype?function(P,D){return p(D),P.__proto__=D,P}:l);f&&u(s,f)||(F=!1)}if(o.get||!F)for(let u in n)q[u]||a.defineProperty(s,u,{get:j.bind(n,u)});return a.seal(n),a.seal(s),s},r.revocable=function(n,o){return{proxy:new r(n,o),revoke:t}},r}});var S=A(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0}),M.create=ue,M.unwrap=ce;var oe=ie(U());function ie(e){return e&&e.__esModule?e:{default:e}}var ae=oe.default(),G=function(e,t,r){if(typeof e!="object"||e===null)return e;var i,p={get:function(a,d){if(d==="__rawObject__")return e;var c=r.concat(d),l=e[d];return t.push({path:c,value:l}),G(l,t,c)}};try{i=new Proxy(e,p)}catch(a){i=new ae(e,p)}return i};function ue(e,t){return G(e,t,[])}function ce(e){return typeof e!="object"||e===null||typeof e.__rawObject__!="object"?e:e.__rawObject__}});var J=A(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.behavior=void 0;var Y,se=K(require("rfdc")),fe=K(require("fast-deep-equal")),w=Q(z()),T=Q(S());function Z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K(e){return e&&e.__esModule?e:{default:e}}function Q(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};i.get||i.set?Object.defineProperty(t,r,i):t[r]=e[r]}}return t.default=e,t}var X=se.default({proto:!0}),pe=0,de=Behavior({lifetimes:{attached:function(){this.setData({_computedWatchInit:"attached"})},created:function(){this.setData({_computedWatchInit:"created"})}},definitionFilter:function(e){var t=e.computed,r=e.watch,i=[],p=pe++;i.push({fields:"_computedWatchInit",observer:function(){var a=this.data._computedWatchInit;if(a==="created"){var d={computedUpdaters:[],computedRelatedPathValues:{},watchCurVal:{},_triggerFromComputedAttached:{}};this._computedWatchInfo||(this._computedWatchInfo={}),this._computedWatchInfo[p]=d,r&&Object.keys(r).forEach(function(l){var _=w.parseMultiDataPaths(l).map(function(n){var o=n.path,v=n.options,y=w.getDataOnPath(this.data,o);return v.deepCmp?X(y):y}.bind(this));d.watchCurVal[l]=_}.bind(this))}else if(a==="attached"){var c=this._computedWatchInfo[p];t&&Object.keys(t).forEach(function(l){var _=t[l],n=[],o=_(T.create(this.data,n)),v=n.map(function(h){var f=h.path;return{path:f,value:w.getDataOnPath(this.data,f)}}.bind(this));this.setData(Z({},l,T.unwrap(o))),c._triggerFromComputedAttached[l]=!0,c.computedRelatedPathValues[l]=v;var y=function(){for(var h=c.computedRelatedPathValues[l],f=!1,s=0;s<h.length;s++){var x=h[s],O=x.path;if(x.value!==w.getDataOnPath(this.data,O)){f=!0;break}}if(!f)return!1;var j=[],I=_(T.create(this.data,j));return this.setData(Z({},l,T.unwrap(I))),c.computedRelatedPathValues[l]=j,!0}.bind(this);c.computedUpdaters.push(y)}.bind(this))}}}),t&&i.push({fields:"**",observer:function(){if(this._computedWatchInfo){var a,d=this._computedWatchInfo[p];if(d)do a=d.computedUpdaters.some(function(c){return c.call(this)}.bind(this));while(a)}}}),r&&Object.keys(r).forEach(function(a){var d=w.parseMultiDataPaths(a);i.push({fields:a,observer:function(){if(this._computedWatchInfo){var c=this._computedWatchInfo[p];if(c){if(Object.keys(c._triggerFromComputedAttached).length){var l={};for(var _ in d.forEach(function(f){return l[f.path[0]]=!0}),c._triggerFromComputedAttached)if(c._triggerFromComputedAttached.hasOwnProperty(_)&&l[_]&&c._triggerFromComputedAttached[_])return void(c._triggerFromComputedAttached[_]=!1)}var n=c.watchCurVal[a],o=d.map(function(f){var s=f.path,x=f.options;return{val:w.getDataOnPath(this.data,s),options:x}}.bind(this)),v=o.map(function(f){var s=f.val;return f.options.deepCmp?X(s):s});c.watchCurVal[a]=v;for(var y=!1,h=0;h<v.length;h++)if(d[h].options.deepCmp?!fe.default(n[h],v[h]):n[h]!==v[h]){y=!0;break}y&&r[a].apply(this,o.map(function(f){return f.val}))}}}})}),typeof e.observers!="object"&&(e.observers={}),Array.isArray(e.observers)?(Y=e.observers).push.apply(Y,i):i.forEach(function(a){var d=e.observers[a.fields];d?e.observers[a.fields]=function(){a.observer.call(this),d.call(this)}:e.observers[a.fields]=a.observer})}});E.behavior=de});"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"behavior",{enumerable:!0,get:function(){return W.behavior}}),exports.ComponentWithComputed=le,exports.BehaviorWithComputed=he,exports.DataTracerMode=exports.setCurrentDataTracerMode=exports.getCurrentDataTracerMode=void 0;var g,k,W=J();function le(e){return Array.isArray(e.behaviors)||(e.behaviors=[]),e.behaviors.unshift(W.behavior),Component(e)}function he(e){return Array.isArray(e.behaviors)||(e.behaviors=[]),e.behaviors.unshift(W.behavior),Behavior(e)}exports.DataTracerMode=k,(g=k||(exports.DataTracerMode=k={}))[g.Auto=0]="Auto",g[g.Proxy=1]="Proxy",g[g.DefineProperty=2]="DefineProperty";var $=k.Auto,ve=function(){return $};exports.getCurrentDataTracerMode=ve;var ye=function(e){$=e};exports.setCurrentDataTracerMode=ye;
|