@component-hook/picker 0.2.1-alpha.0 → 0.2.1

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.
@@ -1,3 +1,4 @@
1
+ import "./index.css";
1
2
  import me, { useState as Xe, useMemo as We, useRef as _t, useEffect as Ke } from "react";
2
3
  import Ge from "react-dom";
3
4
  function fn(r) {
@@ -1,4 +1,5 @@
1
- import { ref as L, computed as b, watch as ht, nextTick as se, defineComponent as ae, openBlock as W, createElementBlock as z, createVNode as Pt, Transition as Et, withCtx as Ct, withDirectives as Dt, createElementVNode as S, unref as D, vShow as Bt, normalizeClass as ct, normalizeStyle as ut, toDisplayString as j, Fragment as xt, renderList as At } from "vue";
1
+ import "./index.css";
2
+ import { ref as L, computed as b, watch as ht, nextTick as ne, defineComponent as se, openBlock as W, createElementBlock as z, createVNode as Pt, Transition as Et, withCtx as Ct, withDirectives as Dt, createElementVNode as S, unref as D, vShow as Bt, normalizeClass as ct, normalizeStyle as ut, toDisplayString as j, Fragment as xt, renderList as At } from "vue";
2
3
  /*!
3
4
  * better-scroll / core
4
5
  * (c) 2016-2023 ustbhuangyi
@@ -41,14 +42,14 @@ var N = function() {
41
42
  return t;
42
43
  }, N.apply(this, arguments);
43
44
  };
44
- function Rt() {
45
+ function Kt() {
45
46
  for (var o = 0, t = 0, e = arguments.length; t < e; t++) o += arguments[t].length;
46
47
  for (var r = Array(o), i = 0, t = 0; t < e; t++)
47
48
  for (var n = arguments[t], s = 0, l = n.length; s < l; s++, i++)
48
49
  r[i] = n[s];
49
50
  return r;
50
51
  }
51
- var le = [
52
+ var ae = [
52
53
  {
53
54
  sourceKey: "scroller.scrollBehaviorX.currentPos",
54
55
  key: "x"
@@ -137,7 +138,7 @@ var le = [
137
138
  function Q(o) {
138
139
  console.error("[BScroll warn]: " + o);
139
140
  }
140
- var w = typeof window < "u", F = w && navigator.userAgent.toLowerCase(), he = !!(F && /wechatdevtools/.test(F)), ce = F && F.indexOf("android") > 0, ue = function() {
141
+ var w = typeof window < "u", F = w && navigator.userAgent.toLowerCase(), le = !!(F && /wechatdevtools/.test(F)), he = F && F.indexOf("android") > 0, ce = function() {
141
142
  if (typeof F == "string") {
142
143
  var o = /os (\d\d?_\d(_\d)?)/, t = o.exec(F);
143
144
  if (!t)
@@ -148,16 +149,16 @@ var w = typeof window < "u", F = w && navigator.userAgent.toLowerCase(), he = !!
148
149
  return e[0] === 13 && e[1] >= 4;
149
150
  }
150
151
  return !1;
151
- }(), Vt = !1;
152
+ }(), Rt = !1;
152
153
  if (w) {
153
- var pe = "test-passive";
154
+ var ue = "test-passive";
154
155
  try {
155
156
  var Yt = {};
156
157
  Object.defineProperty(Yt, "passive", {
157
158
  get: function() {
158
- Vt = !0;
159
+ Rt = !0;
159
160
  }
160
- }), window.addEventListener(pe, function() {
161
+ }), window.addEventListener(ue, function() {
161
162
  }, Yt);
162
163
  } catch {
163
164
  }
@@ -210,22 +211,22 @@ var St = w && document.createElement("div").style, I = function() {
210
211
  function E(o) {
211
212
  return I === !1 ? o : I === "standard" ? o === "transitionEnd" ? "transitionend" : o : I + o.charAt(0).toUpperCase() + o.substr(1);
212
213
  }
213
- function $t(o) {
214
+ function Vt(o) {
214
215
  return typeof o == "string" ? document.querySelector(o) : o;
215
216
  }
216
- function fe(o, t, e, r) {
217
- var i = Vt ? {
217
+ function pe(o, t, e, r) {
218
+ var i = Rt ? {
218
219
  passive: !1,
219
220
  capture: !!r
220
221
  } : !!r;
221
222
  o.addEventListener(t, e, i);
222
223
  }
223
- function ve(o, t, e, r) {
224
+ function fe(o, t, e, r) {
224
225
  o.removeEventListener(t, e, {
225
226
  capture: !!r
226
227
  });
227
228
  }
228
- function jt(o) {
229
+ function $t(o) {
229
230
  o.cancelable && o.preventDefault();
230
231
  }
231
232
  function Xt(o) {
@@ -237,9 +238,9 @@ function Xt(o) {
237
238
  };
238
239
  }
239
240
  I && I !== "standard" && "" + I.toLowerCase();
240
- var de = E("transform"), Ut = E("transition"), me = w && E("perspective") in St, Ot = w && ("ontouchstart" in window || he), ye = w && Ut in St, M = {
241
- transform: de,
242
- transition: Ut,
241
+ var ve = E("transform"), jt = E("transition"), de = w && E("perspective") in St, Ot = w && ("ontouchstart" in window || le), me = w && jt in St, M = {
242
+ transform: ve,
243
+ transition: jt,
243
244
  transitionTimingFunction: E("transitionTimingFunction"),
244
245
  transitionDuration: E("transitionDuration"),
245
246
  transitionDelay: E("transitionDelay"),
@@ -278,12 +279,12 @@ function K(o, t) {
278
279
  return !0;
279
280
  return !1;
280
281
  }
281
- var ge = K;
282
- function ke(o, t) {
282
+ var ye = K;
283
+ function ge(o, t) {
283
284
  var e = document.createEvent("Event");
284
285
  e.initEvent(t, !0, !0), e.pageX = o.pageX, e.pageY = o.pageY, o.target.dispatchEvent(e);
285
286
  }
286
- function qt(o, t) {
287
+ function Ut(o, t) {
287
288
  t === void 0 && (t = "click");
288
289
  var e;
289
290
  o.type === "mouseup" ? e = o : (o.type === "touchend" || o.type === "touchcancel") && (e = o.changedTouches[0]);
@@ -311,8 +312,8 @@ function qt(o, t) {
311
312
  }
312
313
  i.forwardedTouchEvent = !0, i._constructed = !0, o.target.dispatchEvent(i);
313
314
  }
314
- function Te(o) {
315
- qt(o, "dblclick");
315
+ function ke(o) {
316
+ Ut(o, "dblclick");
316
317
  }
317
318
  var Y = {
318
319
  // easeOutQuint
@@ -336,25 +337,25 @@ var Y = {
336
337
  return 1 - --o * o * o * o;
337
338
  }
338
339
  }
339
- }, Se = 1e3 / 60, B = w && window;
340
- function Gt() {
340
+ }, Te = 1e3 / 60, B = w && window;
341
+ function qt() {
341
342
  }
342
- var Zt = function() {
343
+ var Gt = function() {
343
344
  return w ? B.requestAnimationFrame || B.webkitRequestAnimationFrame || B.mozRequestAnimationFrame || B.oRequestAnimationFrame || // if all else fails, use setTimeout
344
345
  function(o) {
345
- return window.setTimeout(o, o.interval || Se);
346
- } : Gt;
346
+ return window.setTimeout(o, o.interval || Te);
347
+ } : qt;
347
348
  }(), O = function() {
348
349
  return w ? B.cancelAnimationFrame || B.webkitCancelAnimationFrame || B.mozCancelAnimationFrame || B.oCancelAnimationFrame || function(o) {
349
350
  window.clearTimeout(o);
350
- } : Gt;
351
+ } : qt;
351
352
  }(), Lt = function(o) {
352
353
  }, ft = {
353
354
  enumerable: !0,
354
355
  configurable: !0,
355
356
  get: Lt,
356
357
  set: Lt
357
- }, be = function(o, t) {
358
+ }, Se = function(o, t) {
358
359
  for (var e = t.split("."), r = 0; r < e.length - 1; r++)
359
360
  if (o = o[e[r]], typeof o != "object" || !o)
360
361
  return;
@@ -362,16 +363,16 @@ var Zt = function() {
362
363
  return typeof o[i] == "function" ? function() {
363
364
  return o[i].apply(o, arguments);
364
365
  } : o[i];
365
- }, we = function(o, t, e) {
366
+ }, be = function(o, t, e) {
366
367
  for (var r = t.split("."), i, n = 0; n < r.length - 1; n++)
367
368
  i = r[n], o[i] || (o[i] = {}), o = o[i];
368
369
  o[r.pop()] = e;
369
370
  };
370
- function Pe(o, t, e) {
371
+ function we(o, t, e) {
371
372
  ft.get = function() {
372
- return be(this, t);
373
+ return Se(this, t);
373
374
  }, ft.set = function(i) {
374
- we(this, t, i);
375
+ be(this, t, i);
375
376
  }, Object.defineProperty(o, e, ft);
376
377
  }
377
378
  var x = (
@@ -413,7 +414,7 @@ var x = (
413
414
  this.hasType(t);
414
415
  var i = this.events[t];
415
416
  if (i)
416
- for (var n = i.length, s = Rt(i), l, h = 0; h < n; h++) {
417
+ for (var n = i.length, s = Kt(i), l, h = 0; h < n; h++) {
417
418
  var a = s[h], c = a[0], u = a[1];
418
419
  if (c && (l = c.apply(u, e), l === !0))
419
420
  return l;
@@ -441,9 +442,9 @@ var x = (
441
442
  return o.prototype.destroy = function() {
442
443
  this.removeDOMEvents(), this.events = [];
443
444
  }, o.prototype.addDOMEvents = function() {
444
- this.handleDOMEvents(fe);
445
+ this.handleDOMEvents(pe);
445
446
  }, o.prototype.removeDOMEvents = function() {
446
- this.handleDOMEvents(ve);
447
+ this.handleDOMEvents(fe);
447
448
  }, o.prototype.handleDOMEvents = function(t) {
448
449
  var e = this, r = this.wrapper;
449
450
  this.events.forEach(function(i) {
@@ -456,14 +457,14 @@ var x = (
456
457
  });
457
458
  }, o;
458
459
  }()
459
- ), Ee = (
460
+ ), Pe = (
460
461
  /** @class */
461
462
  /* @__PURE__ */ function() {
462
463
  function o() {
463
464
  }
464
465
  return o;
465
466
  }()
466
- ), Ce = (
467
+ ), Ee = (
467
468
  /** @class */
468
469
  function(o) {
469
470
  rt(t, o);
@@ -492,7 +493,7 @@ var x = (
492
493
  }
493
494
  return this;
494
495
  }, t.prototype.process = function() {
495
- return this.translateZ = this.HWCompositing && me ? " translateZ(1px)" : "", this.useTransition = this.useTransition && ye, this.preventDefault = !this.eventPassthrough && this.preventDefault, this.scrollX = this.eventPassthrough === "horizontal" ? !1 : this.scrollX, this.scrollY = this.eventPassthrough === "vertical" ? !1 : this.scrollY, this.freeScroll = this.freeScroll && !this.eventPassthrough, this.scrollX = this.freeScroll ? !0 : this.scrollX, this.scrollY = this.freeScroll ? !0 : this.scrollY, this.directionLockThreshold = this.eventPassthrough ? 0 : this.directionLockThreshold, this;
496
+ return this.translateZ = this.HWCompositing && de ? " translateZ(1px)" : "", this.useTransition = this.useTransition && me, this.preventDefault = !this.eventPassthrough && this.preventDefault, this.scrollX = this.eventPassthrough === "horizontal" ? !1 : this.scrollX, this.scrollY = this.eventPassthrough === "vertical" ? !1 : this.scrollY, this.freeScroll = this.freeScroll && !this.eventPassthrough, this.scrollX = this.freeScroll ? !0 : this.scrollX, this.scrollY = this.freeScroll ? !0 : this.scrollY, this.directionLockThreshold = this.eventPassthrough ? 0 : this.directionLockThreshold, this;
496
497
  }, t.prototype.resolveBounce = function(e) {
497
498
  var r = {
498
499
  top: !0,
@@ -507,8 +508,8 @@ var x = (
507
508
  }, n;
508
509
  return typeof e == "object" ? n = gt(r, e) : n = e ? r : i, n;
509
510
  }, t;
510
- }(Ee)
511
- ), De = (
511
+ }(Pe)
512
+ ), Ce = (
512
513
  /** @class */
513
514
  function() {
514
515
  function o(t, e) {
@@ -566,7 +567,7 @@ var x = (
566
567
  }, o.prototype.start = function(t) {
567
568
  var e = pt[t.type];
568
569
  if (!(this.initiated && this.initiated !== e)) {
569
- if (this.setInitiated(e), ge(t.target, this.options.tagException)) {
570
+ if (this.setInitiated(e), ye(t.target, this.options.tagException)) {
570
571
  this.setInitiated();
571
572
  return;
572
573
  }
@@ -604,7 +605,7 @@ var x = (
604
605
  ), vt = {
605
606
  x: ["translateX", "px"],
606
607
  y: ["translateY", "px"]
607
- }, Be = (
608
+ }, De = (
608
609
  /** @class */
609
610
  function() {
610
611
  function o(t) {
@@ -633,7 +634,7 @@ var x = (
633
634
  this.hooks.destroy();
634
635
  }, o;
635
636
  }()
636
- ), Jt = (
637
+ ), Zt = (
637
638
  /** @class */
638
639
  function() {
639
640
  function o(t, e, r) {
@@ -663,13 +664,13 @@ var x = (
663
664
  this.hooks.destroy(), O(this.timer);
664
665
  }, o;
665
666
  }()
666
- ), xe = function(o, t, e, r) {
667
+ ), Be = function(o, t, e, r) {
667
668
  var i = function(a, c) {
668
669
  var u = a - c, v = u > 0 ? -1 : u < 0 ? 1 : 0;
669
670
  return v;
670
671
  }, n = i(t.x, o.x), s = i(t.y, o.y), l = e.x - r.x, h = e.y - r.y;
671
672
  return n * l <= 0 && s * h <= 0;
672
- }, Ae = (
673
+ }, xe = (
673
674
  /** @class */
674
675
  function(o) {
675
676
  rt(t, o);
@@ -679,7 +680,7 @@ var x = (
679
680
  return t.prototype.startProbe = function(e, r) {
680
681
  var i = this, n = e, s = function() {
681
682
  var l = i.translater.getComputedPosition();
682
- xe(e, r, l, n) && i.hooks.trigger(i.hooks.eventTypes.move, l), i.pending || (i.callStopWhenPending ? i.callStopWhenPending = !1 : i.hooks.trigger(i.hooks.eventTypes.end, l)), n = l, i.pending && (i.timer = Zt(s));
683
+ Be(e, r, l, n) && i.hooks.trigger(i.hooks.eventTypes.move, l), i.pending || (i.callStopWhenPending ? i.callStopWhenPending = !1 : i.hooks.trigger(i.hooks.eventTypes.end, l)), n = l, i.pending && (i.timer = Gt(s));
683
684
  };
684
685
  this.callStopWhenPending && this.setCallStop(!1), O(this.timer), s();
685
686
  }, t.prototype.transitionTime = function(e) {
@@ -704,8 +705,8 @@ var x = (
704
705
  var e = this.doStop();
705
706
  e && this.hooks.trigger(this.hooks.eventTypes.callStop);
706
707
  }, t;
707
- }(Jt)
708
- ), Ye = (
708
+ }(Zt)
709
+ ), Ae = (
709
710
  /** @class */
710
711
  function(o) {
711
712
  rt(t, o);
@@ -730,7 +731,7 @@ var x = (
730
731
  Object.keys(r).forEach(function(f) {
731
732
  var y = e[f], m = r[f];
732
733
  g[f] = (m - y) * v + y;
733
- }), s.translate(g), a && s.hooks.trigger(s.hooks.eventTypes.move, g), s.pending && (s.timer = Zt(c)), s.pending || (s.callStopWhenPending ? s.callStopWhenPending = !1 : s.hooks.trigger(s.hooks.eventTypes.end, r));
734
+ }), s.translate(g), a && s.hooks.trigger(s.hooks.eventTypes.move, g), s.pending && (s.timer = Gt(c)), s.pending || (s.callStopWhenPending ? s.callStopWhenPending = !1 : s.hooks.trigger(s.hooks.eventTypes.end, r));
734
735
  };
735
736
  this.setPending(!0), this.callStopWhenPending && this.setCallStop(!1), O(this.timer), c();
736
737
  }, t.prototype.doStop = function() {
@@ -745,9 +746,9 @@ var x = (
745
746
  var e = this.doStop();
746
747
  e && this.hooks.trigger(this.hooks.eventTypes.callStop);
747
748
  }, t;
748
- }(Jt)
749
+ }(Zt)
749
750
  );
750
- function Me(o, t, e) {
751
+ function Ye(o, t, e) {
751
752
  var r = e.useTransition, i = {};
752
753
  return Object.defineProperty(i, "probeType", {
753
754
  enumerable: !0,
@@ -755,7 +756,7 @@ function Me(o, t, e) {
755
756
  get: function() {
756
757
  return e.probeType;
757
758
  }
758
- }), r ? new Ae(o, t, i) : new Ye(o, t, i);
759
+ }), r ? new xe(o, t, i) : new Ae(o, t, i);
759
760
  }
760
761
  var It = (
761
762
  /** @class */
@@ -859,8 +860,8 @@ var It = (
859
860
  ), U, q, G, Z, Ht = (U = {}, U.yes = function(o) {
860
861
  return !0;
861
862
  }, U.no = function(o) {
862
- return jt(o), !1;
863
- }, U), Xe = (q = {}, q.horizontal = (G = {}, G.yes = "horizontal", G.no = "vertical", G), q.vertical = (Z = {}, Z.yes = "vertical", Z.no = "horizontal", Z), q), Oe = (
863
+ return $t(o), !1;
864
+ }, U), Me = (q = {}, q.horizontal = (G = {}, G.yes = "horizontal", G.no = "vertical", G), q.vertical = (Z = {}, Z.yes = "vertical", Z.no = "horizontal", Z), q), Xe = (
864
865
  /** @class */
865
866
  function() {
866
867
  function o(t, e, r) {
@@ -878,7 +879,7 @@ var It = (
878
879
  }, o.prototype.computeDirectionLock = function(t, e) {
879
880
  this.directionLocked === "" && !this.freeScroll && (t > e + this.directionLockThreshold ? this.directionLocked = "horizontal" : e >= t + this.directionLockThreshold ? this.directionLocked = "vertical" : this.directionLocked = "none");
880
881
  }, o.prototype.handleEventPassthrough = function(t) {
881
- var e = Xe[this.directionLocked];
882
+ var e = Me[this.directionLocked];
882
883
  if (e) {
883
884
  if (this.eventPassthrough === e.yes)
884
885
  return Ht.yes(t);
@@ -888,9 +889,9 @@ var It = (
888
889
  return !1;
889
890
  }, o;
890
891
  }()
891
- ), _e = function(o, t, e) {
892
+ ), Oe = function(o, t, e) {
892
893
  return e === 2 ? [t, -o] : e === 3 ? [-o, -t] : e === 4 ? [-t, o] : [o, t];
893
- }, Le = (
894
+ }, _e = (
894
895
  /** @class */
895
896
  function() {
896
897
  function o(t, e, r, i, n) {
@@ -905,7 +906,7 @@ var It = (
905
906
  "contentNotMoved",
906
907
  "detectMovingDirection",
907
908
  "coordinateTransformation"
908
- ]), this.scrollBehaviorX = t, this.scrollBehaviorY = e, this.actionsHandler = r, this.animater = i, this.options = n, this.directionLockAction = new Oe(n.directionLockThreshold, n.freeScroll, n.eventPassthrough), this.enabled = !0, this.bindActionsHandler();
909
+ ]), this.scrollBehaviorX = t, this.scrollBehaviorY = e, this.actionsHandler = r, this.animater = i, this.options = n, this.directionLockAction = new Xe(n.directionLockThreshold, n.freeScroll, n.eventPassthrough), this.enabled = !0, this.bindActionsHandler();
909
910
  }
910
911
  return o.prototype.bindActionsHandler = function() {
911
912
  var t = this;
@@ -915,7 +916,7 @@ var It = (
915
916
  var r = e.deltaX, i = e.deltaY, n = e.e;
916
917
  if (!t.enabled)
917
918
  return !0;
918
- var s = _e(r, i, t.options.quadrant), l = s[0], h = s[1], a = {
919
+ var s = Oe(r, i, t.options.quadrant), l = s[0], h = s[1], a = {
919
920
  deltaX: l,
920
921
  deltaY: h
921
922
  };
@@ -963,7 +964,7 @@ var It = (
963
964
  var e = t.x, r = t.y, i = this.scrollBehaviorX, n = i.minScrollPos, s = i.maxScrollPos, l = this.scrollBehaviorY, h = l.minScrollPos, a = l.maxScrollPos;
964
965
  return e = e > 0 ? Math.ceil(e) : Math.floor(e), r = r > 0 ? Math.ceil(r) : Math.floor(r), e = Mt(e, s, n), r = Mt(r, a, h), { x: e, y: r };
965
966
  }, o.prototype.handleClick = function(t) {
966
- K(t.target, this.options.preventDefaultException) || (jt(t), t.stopPropagation());
967
+ K(t.target, this.options.preventDefaultException) || ($t(t), t.stopPropagation());
967
968
  }, o.prototype.getCurrentPos = function() {
968
969
  return {
969
970
  x: this.scrollBehaviorX.getCurrentPos(),
@@ -976,7 +977,7 @@ var It = (
976
977
  }, o;
977
978
  }()
978
979
  );
979
- function Ie(o) {
980
+ function Le(o) {
980
981
  var t = [
981
982
  "click",
982
983
  "bindToWrapper",
@@ -1013,11 +1014,11 @@ function Tt(o, t, e) {
1013
1014
  typeof r == "string" ? i = n = r : (i = r.source, n = r.target), o.on(i, function() {
1014
1015
  for (var s = [], l = 0; l < arguments.length; l++)
1015
1016
  s[l] = arguments[l];
1016
- return t.trigger.apply(t, Rt([n], s));
1017
+ return t.trigger.apply(t, Kt([n], s));
1017
1018
  });
1018
1019
  });
1019
1020
  }
1020
- function He(o, t) {
1021
+ function Ie(o, t) {
1021
1022
  for (var e = Object.keys(o), r = 0, i = e; r < i.length; r++) {
1022
1023
  var n = i[r];
1023
1024
  if (o[n] !== t[n])
@@ -1025,7 +1026,7 @@ function He(o, t) {
1025
1026
  }
1026
1027
  return !0;
1027
1028
  }
1028
- var Wt = 1, Fe = (
1029
+ var Wt = 1, He = (
1029
1030
  /** @class */
1030
1031
  function() {
1031
1032
  function o(t, e, r) {
@@ -1055,7 +1056,7 @@ var Wt = 1, Fe = (
1055
1056
  })), this.scrollBehaviorY = new It(t, e, Ft(r, "scrollY", [l, h], {
1056
1057
  size: "height",
1057
1058
  position: "top"
1058
- })), this.translater = new Be(this.content), this.animater = Me(this.content, this.translater, this.options), this.actionsHandler = new De(this.options.bindToTarget ? this.content : t, Ie(this.options)), this.actions = new Le(this.scrollBehaviorX, this.scrollBehaviorY, this.actionsHandler, this.animater, this.options);
1059
+ })), this.translater = new De(this.content), this.animater = Ye(this.content, this.translater, this.options), this.actionsHandler = new Ce(this.options.bindToTarget ? this.content : t, Le(this.options)), this.actions = new _e(this.scrollBehaviorX, this.scrollBehaviorY, this.actionsHandler, this.animater, this.options);
1059
1060
  var a = this.resize.bind(this);
1060
1061
  this.resizeRegister = new tt(window, [
1061
1062
  {
@@ -1173,14 +1174,14 @@ var Wt = 1, Fe = (
1173
1174
  var r = this.options.dblclick, i = !1;
1174
1175
  if (r && this.lastClickTime) {
1175
1176
  var n = r.delay, s = n === void 0 ? 300 : n;
1176
- X() - this.lastClickTime < s && (i = !0, Te(t));
1177
+ X() - this.lastClickTime < s && (i = !0, ke(t));
1177
1178
  }
1178
- return this.options.tap && ke(t, this.options.tap), this.options.click && !K(t.target, this.options.preventDefaultException) && qt(t), this.lastClickTime = i ? null : X(), !0;
1179
+ return this.options.tap && ge(t, this.options.tap), this.options.click && !K(t.target, this.options.preventDefaultException) && Ut(t), this.lastClickTime = i ? null : X(), !0;
1179
1180
  }
1180
1181
  return !1;
1181
1182
  }, o.prototype.resize = function() {
1182
1183
  var t = this;
1183
- this.actions.enabled && (ce && (this.wrapper.scrollTop = 0), clearTimeout(this.resizeTimeout), this.resizeTimeout = window.setTimeout(function() {
1184
+ this.actions.enabled && (he && (this.wrapper.scrollTop = 0), clearTimeout(this.resizeTimeout), this.resizeTimeout = window.setTimeout(function() {
1184
1185
  t.hooks.trigger(t.hooks.eventTypes.resize);
1185
1186
  }, this.options.resizePolling));
1186
1187
  }, o.prototype.transitionEnd = function(t) {
@@ -1213,12 +1214,12 @@ var Wt = 1, Fe = (
1213
1214
  x: t,
1214
1215
  y: e
1215
1216
  }, n.end);
1216
- if (this.hooks.trigger(this.hooks.eventTypes.scrollTo, a), !He(h, a)) {
1217
+ if (this.hooks.trigger(this.hooks.eventTypes.scrollTo, a), !Ie(h, a)) {
1217
1218
  var c = Math.abs(a.x - h.x), u = Math.abs(a.y - h.y);
1218
1219
  c < Wt && u < Wt && (r = 0, this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)), this.animater.move(h, a, r, s);
1219
1220
  }
1220
1221
  }, o.prototype.scrollToElement = function(t, e, r, i, n) {
1221
- var s = $t(t), l = Xt(s), h = function(c, u, v) {
1222
+ var s = Vt(t), l = Xt(s), h = function(c, u, v) {
1222
1223
  return typeof c == "number" ? c : c ? Math.round(u / 2 - v / 2) : 0;
1223
1224
  };
1224
1225
  r = h(r, s.offsetWidth, this.wrapper.offsetWidth), i = h(i, s.offsetHeight, this.wrapper.offsetHeight);
@@ -1229,7 +1230,7 @@ var Wt = 1, Fe = (
1229
1230
  }, o.prototype.resetPosition = function(t, e) {
1230
1231
  t === void 0 && (t = 0), e === void 0 && (e = Y.bounce);
1231
1232
  var r = this.scrollBehaviorX.checkInBoundary(), i = r.position, n = r.inBoundary, s = this.scrollBehaviorY.checkInBoundary(), l = s.position, h = s.inBoundary;
1232
- return n && h ? !1 : (ue && this.reflow(), this.scrollTo(i, l, t, e), !0);
1233
+ return n && h ? !1 : (ce && this.reflow(), this.scrollTo(i, l, t, e), !0);
1233
1234
  }, o.prototype.reflow = function() {
1234
1235
  this._reflow = this.content.offsetHeight;
1235
1236
  }, o.prototype.updatePositions = function(t) {
@@ -1275,8 +1276,8 @@ var Wt = 1, Fe = (
1275
1276
  "touchEnd",
1276
1277
  "flick",
1277
1278
  "destroy"
1278
- ]) || this, n = $t(e);
1279
- return n ? (i.plugins = {}, i.options = new Ce().merge(r).process(), i.setContent(n).valid && (i.hooks = new x([
1279
+ ]) || this, n = Vt(e);
1280
+ return n ? (i.plugins = {}, i.options = new Ee().merge(r).process(), i.setContent(n).valid && (i.hooks = new x([
1280
1281
  "refresh",
1281
1282
  "enable",
1282
1283
  "disable",
@@ -1302,9 +1303,9 @@ var Wt = 1, Fe = (
1302
1303
  };
1303
1304
  }, t.prototype.init = function(e) {
1304
1305
  var r = this;
1305
- this.wrapper = e, e.isBScrollContainer = !0, this.scroller = new Fe(e, this.content, this.options), this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize, function() {
1306
+ this.wrapper = e, e.isBScrollContainer = !0, this.scroller = new He(e, this.content, this.options), this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize, function() {
1306
1307
  r.refresh();
1307
- }), this.eventBubbling(), this.handleAutoBlur(), this.enable(), this.proxy(le), this.applyPlugins(), this.refreshWithoutReset(this.content);
1308
+ }), this.eventBubbling(), this.handleAutoBlur(), this.enable(), this.proxy(ae), this.applyPlugins(), this.refreshWithoutReset(this.content);
1308
1309
  var i = this.options, n = i.startX, s = i.startY, l = {
1309
1310
  x: n,
1310
1311
  y: s
@@ -1340,7 +1341,7 @@ var Wt = 1, Fe = (
1340
1341
  var r = this;
1341
1342
  e.forEach(function(i) {
1342
1343
  var n = i.key, s = i.sourceKey;
1343
- Pe(r, s, n);
1344
+ we(r, s, n);
1344
1345
  });
1345
1346
  }, t.prototype.refresh = function() {
1346
1347
  var e = this.setContent(this.wrapper), r = e.contentChanged, i = e.valid;
@@ -1366,7 +1367,7 @@ function R(o, t) {
1366
1367
  R.use = it.use;
1367
1368
  R.plugins = it.plugins;
1368
1369
  R.pluginsMap = it.pluginsMap;
1369
- var We = R;
1370
+ var Fe = R;
1370
1371
  /*!
1371
1372
  * better-scroll / wheel
1372
1373
  * (c) 2016-2023 ustbhuangyi
@@ -1386,25 +1387,25 @@ et && et.indexOf("android") > 0;
1386
1387
  }
1387
1388
  return !1;
1388
1389
  })();
1389
- var ze = !1;
1390
+ var We = !1;
1390
1391
  if (V) {
1391
- var Ne = "test-passive";
1392
+ var ze = "test-passive";
1392
1393
  try {
1393
1394
  var zt = {};
1394
1395
  Object.defineProperty(zt, "passive", {
1395
1396
  get: function() {
1396
- ze = !0;
1397
+ We = !0;
1397
1398
  }
1398
- }), window.addEventListener(Ne, function() {
1399
+ }), window.addEventListener(ze, function() {
1399
1400
  }, zt);
1400
1401
  } catch {
1401
1402
  }
1402
1403
  }
1403
- var Ke = function(o, t) {
1404
+ var Ne = function(o, t) {
1404
1405
  for (var e in t)
1405
1406
  o[e] = t[e];
1406
1407
  return o;
1407
- }, Qt = V && document.createElement("div").style, H = function() {
1408
+ }, Jt = V && document.createElement("div").style, H = function() {
1408
1409
  if (!V)
1409
1410
  return !1;
1410
1411
  for (var o = [
@@ -1430,7 +1431,7 @@ var Ke = function(o, t) {
1430
1431
  }
1431
1432
  ], t = 0, e = o; t < e.length; t++) {
1432
1433
  var r = e[t];
1433
- if (Qt[r.value] !== void 0)
1434
+ if (Jt[r.value] !== void 0)
1434
1435
  return r.key;
1435
1436
  }
1436
1437
  return !1;
@@ -1439,11 +1440,11 @@ function C(o) {
1439
1440
  return H === !1 ? o : H === "standard" ? o === "transitionEnd" ? "transitionend" : o : H + o.charAt(0).toUpperCase() + o.substr(1);
1440
1441
  }
1441
1442
  H && H !== "standard" && "" + H.toLowerCase();
1442
- var Re = C("transform"), Ve = C("transition");
1443
- V && C("perspective") in Qt;
1443
+ var Ke = C("transform"), Re = C("transition");
1444
+ V && C("perspective") in Jt;
1444
1445
  var dt = {
1445
- transform: Re,
1446
- transition: Ve,
1446
+ transform: Ke,
1447
+ transition: Re,
1447
1448
  transitionTimingFunction: C("transitionTimingFunction"),
1448
1449
  transitionDuration: C("transitionDuration"),
1449
1450
  transitionDelay: C("transitionDelay"),
@@ -1455,10 +1456,10 @@ function J(o, t) {
1455
1456
  var e = new RegExp("(^|\\s)" + t + "(\\s|$)");
1456
1457
  return e.test(o.className);
1457
1458
  }
1458
- function $e(o) {
1459
+ function Ve(o) {
1459
1460
  return Array.prototype.slice.call(o, 0);
1460
1461
  }
1461
- var je = {
1462
+ var $e = {
1462
1463
  // easeOutQuint
1463
1464
  swipe: {
1464
1465
  style: "cubic-bezier(0.23, 1, 0.32, 1)",
@@ -1480,7 +1481,7 @@ var je = {
1480
1481
  return 1 - --o * o * o * o;
1481
1482
  }
1482
1483
  }
1483
- }, Ue = "plugins.wheel", qe = [
1484
+ }, je = "plugins.wheel", Ue = [
1484
1485
  {
1485
1486
  key: "wheelTo",
1486
1487
  name: "wheelTo"
@@ -1493,14 +1494,14 @@ var je = {
1493
1494
  key: "restorePosition",
1494
1495
  name: "restorePosition"
1495
1496
  }
1496
- ], Ge = qe.map(function(o) {
1497
+ ], qe = Ue.map(function(o) {
1497
1498
  return {
1498
1499
  key: o.key,
1499
- sourceKey: Ue + "." + o.name
1500
+ sourceKey: je + "." + o.name
1500
1501
  };
1501
- }), Nt = "wheelIndexChanged", Ze = {
1502
+ }), Nt = "wheelIndexChanged", Ge = {
1502
1503
  rate: 4
1503
- }, Je = (
1504
+ }, Ze = (
1504
1505
  /** @class */
1505
1506
  function() {
1506
1507
  function o(t) {
@@ -1509,7 +1510,7 @@ var je = {
1509
1510
  return o.prototype.init = function() {
1510
1511
  this.handleBScroll(), this.handleOptions(), this.handleHooks(), this.refreshBoundary(), this.setSelectedIndex(this.options.selectedIndex);
1511
1512
  }, o.prototype.handleBScroll = function() {
1512
- this.scroll.proxy(Ge), this.scroll.registerType([Nt]);
1513
+ this.scroll.proxy(qe), this.scroll.registerType([Nt]);
1513
1514
  }, o.prototype.handleOptions = function() {
1514
1515
  var t = this.scroll.options.wheel === !0 ? {} : this.scroll.options.wheel, e = {
1515
1516
  wheelWrapperClass: "wheel-scroll",
@@ -1519,7 +1520,7 @@ var je = {
1519
1520
  selectedIndex: 0,
1520
1521
  wheelDisabledItemClass: "wheel-disabled-item"
1521
1522
  };
1522
- this.options = Ke(e, t);
1523
+ this.options = Ne(e, t);
1523
1524
  }, o.prototype.handleHooks = function() {
1524
1525
  var t = this, e = this.scroll, r = this.scroll.scroller, i = r.actionsHandler, n = r.scrollBehaviorX, s = r.scrollBehaviorY, l = r.animater, h = r.content;
1525
1526
  e.on(e.eventTypes.scrollEnd, function(a) {
@@ -1532,8 +1533,8 @@ var je = {
1532
1533
  }), this.scroll.hooks.on(this.scroll.hooks.eventTypes.beforeInitialScrollTo, function(a) {
1533
1534
  a.x = 0, a.y = -(t.selectedIndex * t.itemHeight);
1534
1535
  }), r.hooks.on(r.hooks.eventTypes.checkClick, function() {
1535
- var a = $e(t.items).indexOf(t.target);
1536
- return a === -1 || t.wheelTo(a, t.options.adjustTime, je.swipe), !0;
1536
+ var a = Ve(t.items).indexOf(t.target);
1537
+ return a === -1 || t.wheelTo(a, t.options.adjustTime, $e.swipe), !0;
1537
1538
  }), r.hooks.on(r.hooks.eventTypes.scrollTo, function(a) {
1538
1539
  a.y = t.findNearestValidWheel(a.y).y;
1539
1540
  }), r.hooks.on(r.hooks.eventTypes.minDistanceScroll, function() {
@@ -1551,7 +1552,7 @@ var je = {
1551
1552
  }), s.hooks.on(s.hooks.eventTypes.computeBoundary, function(a) {
1552
1553
  t.items = t.scroll.scroller.content.children, t.checkWheelAllDisabled(), t.itemHeight = t.items.length > 0 ? s.contentSize / t.items.length : 0, a.maxScrollPos = -t.itemHeight * (t.items.length - 1), a.minScrollPos = 0;
1553
1554
  }), s.hooks.on(s.hooks.eventTypes.momentum, function(a) {
1554
- a.rate = Ze.rate, a.destination = t.findNearestValidWheel(a.destination).y;
1555
+ a.rate = Ge.rate, a.destination = t.findNearestValidWheel(a.destination).y;
1555
1556
  }), s.hooks.on(s.hooks.eventTypes.end, function(a) {
1556
1557
  var c = t.findNearestValidWheel(s.currentPos);
1557
1558
  a.destination = c.y, a.duration = t.options.adjustTime;
@@ -1617,12 +1618,12 @@ var je = {
1617
1618
  }, o.pluginName = "wheel", o;
1618
1619
  }()
1619
1620
  );
1620
- We.use(Je);
1621
- const ot = Array.isArray, Qe = (o) => typeof o == "object" && o !== null;
1621
+ Fe.use(Ze);
1622
+ const ot = Array.isArray, Je = (o) => typeof o == "object" && o !== null;
1622
1623
  function bt(o) {
1623
1624
  return ot(o) && o.length === 3;
1624
1625
  }
1625
- function to(o) {
1626
+ function Qe(o) {
1626
1627
  return o % 4 === 0 && (o % 100 !== 0 || o % 400 === 0);
1627
1628
  }
1628
1629
  function _(o, t) {
@@ -1637,7 +1638,7 @@ function mt(o, t) {
1637
1638
  e.push(`${r}`.padStart(2, "0"));
1638
1639
  return e;
1639
1640
  }
1640
- function eo() {
1641
+ function to() {
1641
1642
  const o = mt(0, 23), t = mt(0, 59), e = mt(0, 59), r = L([]);
1642
1643
  i();
1643
1644
  function i() {
@@ -1653,10 +1654,10 @@ function eo() {
1653
1654
  getTimeAnchors: n
1654
1655
  };
1655
1656
  }
1656
- function oo() {
1657
+ function eo() {
1657
1658
  const e = /* @__PURE__ */ new Date(), r = e.getFullYear(), i = e.getMonth() + 1, n = e.getDate(), s = L(r), l = L(i), h = _(1900, 2100), a = _(1, 12), c = b(() => {
1658
1659
  const f = [4, 6, 9, 11], y = [1, 3, 5, 7, 8, 10, 12];
1659
- return f.includes(l.value) ? _(1, 30) : y.includes(l.value) ? _(1, 31) : to(s.value) ? _(1, 29) : _(1, 28);
1660
+ return f.includes(l.value) ? _(1, 30) : y.includes(l.value) ? _(1, 31) : Qe(s.value) ? _(1, 29) : _(1, 28);
1660
1661
  }), u = b(() => [h, a, c.value]);
1661
1662
  function v(f) {
1662
1663
  return (bt(f) ? f : [r, i, n]).map((m, A) => {
@@ -1676,10 +1677,10 @@ function oo() {
1676
1677
  getDateAnchors: v
1677
1678
  };
1678
1679
  }
1679
- function ro(o, t) {
1680
- const e = L([]), r = L(), i = L([]), n = b(() => o.type === "date"), s = b(() => o.type === "time"), { selectYear: l, selectMonth: h, dateList: a, updateDateSelect: c, getDateAnchors: u } = oo(), { timeList: v, updateDefaultTime: g, getTimeAnchors: f } = eo(), y = b(() => n.value ? u(o.anchor) : s.value ? f(o.anchor) : ot(o.anchor) ? o.anchor : [o.anchor]);
1680
+ function oo(o, t) {
1681
+ const e = L([]), r = L(), i = L([]), n = b(() => o.type === "date"), s = b(() => o.type === "time"), { selectYear: l, selectMonth: h, dateList: a, updateDateSelect: c, getDateAnchors: u } = eo(), { timeList: v, updateDefaultTime: g, getTimeAnchors: f } = to(), y = b(() => n.value ? u(o.anchor) : s.value ? f(o.anchor) : ot(o.anchor) ? o.anchor : [o.anchor]);
1681
1682
  async function m(p = !1) {
1682
- p ? A() : P(), await se(), e.value.forEach((k, d) => nt(d)), p || te(), ee();
1683
+ p ? A() : P(), await ne(), e.value.forEach((k, d) => nt(d)), p || Qt(), te();
1683
1684
  }
1684
1685
  function A() {
1685
1686
  const p = {
@@ -1715,33 +1716,33 @@ function ro(o, t) {
1715
1716
  const k = i.value[p].getSelectedIndex(), d = a.value[p][k];
1716
1717
  p === 0 && (l.value = d), p === 1 && (h.value = d), m(!0);
1717
1718
  }
1718
- function te() {
1719
+ function Qt() {
1719
1720
  i.value.forEach((p, k) => {
1720
1721
  var T;
1721
1722
  const d = (T = y.value) == null ? void 0 : T[k];
1722
1723
  p.wheelTo(d ?? 0);
1723
1724
  });
1724
1725
  }
1725
- function ee() {
1726
+ function te() {
1726
1727
  const p = e.value.length;
1727
1728
  if (i.value.length <= p) return;
1728
1729
  i.value.splice(p).forEach((d) => d.destroy());
1729
1730
  }
1730
- function oe() {
1731
+ function ee() {
1731
1732
  t("cancel"), st();
1732
1733
  }
1733
- function re() {
1734
- i.value.some((T) => T.isInTransition) && ie();
1735
- const { item: k, anchor: d } = ne();
1734
+ function oe() {
1735
+ i.value.some((T) => T.isInTransition) && re();
1736
+ const { item: k, anchor: d } = ie();
1736
1737
  t("confirm", k), t("update:anchor", d), st();
1737
1738
  }
1738
1739
  function st() {
1739
1740
  t("update:isShowPicker", !1);
1740
1741
  }
1741
- function ie() {
1742
+ function re() {
1742
1743
  i.value.forEach((p) => p.stop());
1743
1744
  }
1744
- function ne() {
1745
+ function ie() {
1745
1746
  const { item: p, anchor: k } = i.value.reduce(
1746
1747
  (d, T, at) => {
1747
1748
  const wt = T.getSelectedIndex(), lt = e.value[at][wt];
@@ -1766,12 +1767,12 @@ function ro(o, t) {
1766
1767
  ), {
1767
1768
  pickerData: e,
1768
1769
  wheelWrapper: r,
1769
- cancel: oe,
1770
- confirm: re,
1770
+ cancel: ee,
1771
+ confirm: oe,
1771
1772
  closePicker: st
1772
1773
  };
1773
1774
  }
1774
- const io = {
1775
+ const ro = {
1775
1776
  cancelClass: "",
1776
1777
  confirmClass: "",
1777
1778
  titleClass: "",
@@ -1781,7 +1782,7 @@ const io = {
1781
1782
  cancelText: "Cancel",
1782
1783
  confirmText: "Confirm",
1783
1784
  titleText: ""
1784
- }, no = { class: "picker" }, so = { class: "picker_title" }, ao = { class: "picker_panel" }, lo = /* @__PURE__ */ S("div", { class: "picker_mask_top" }, null, -1), ho = /* @__PURE__ */ S("div", { class: "picker_mask_bottom" }, null, -1), co = { class: "picker_wheel_scroll" }, Kt = /* @__PURE__ */ ae({
1785
+ }, io = { class: "picker" }, no = { class: "picker_title" }, so = { class: "picker_panel" }, ao = /* @__PURE__ */ S("div", { class: "picker_mask_top" }, null, -1), lo = /* @__PURE__ */ S("div", { class: "picker_mask_bottom" }, null, -1), ho = { class: "picker_wheel_scroll" }, uo = /* @__PURE__ */ se({
1785
1786
  __name: "Picker",
1786
1787
  props: {
1787
1788
  data: { default: () => [] },
@@ -1794,7 +1795,7 @@ const io = {
1794
1795
  },
1795
1796
  emits: ["update:isShowPicker", "update:anchor", "cancel", "confirm"],
1796
1797
  setup(o, { emit: t }) {
1797
- const e = o, r = t, i = b(() => ({ ...io, ...e.options })), n = b(() => i.value.cancelColor), s = b(() => i.value.confirmColor), l = b(() => i.value.titleColor), h = b(() => ot(e.showKey) ? e.showKey : [e.showKey]), { pickerData: a, wheelWrapper: c, cancel: u, confirm: v, closePicker: g } = ro(e, r);
1798
+ const e = o, r = t, i = b(() => ({ ...ro, ...e.options })), n = b(() => i.value.cancelColor), s = b(() => i.value.confirmColor), l = b(() => i.value.titleColor), h = b(() => ot(e.showKey) ? e.showKey : [e.showKey]), { pickerData: a, wheelWrapper: c, cancel: u, confirm: v, closePicker: g } = oo(e, r);
1798
1799
  return (f, y) => (W(), z("div", null, [
1799
1800
  Pt(Et, { name: "fade" }, {
1800
1801
  default: Ct(() => [
@@ -1810,8 +1811,8 @@ const io = {
1810
1811
  }),
1811
1812
  Pt(Et, { name: "slide" }, {
1812
1813
  default: Ct(() => [
1813
- Dt(S("div", no, [
1814
- S("div", so, [
1814
+ Dt(S("div", io, [
1815
+ S("div", no, [
1815
1816
  S("button", {
1816
1817
  class: ct(["picker_cancel", i.value.cancelClass]),
1817
1818
  style: ut({ color: n.value }),
@@ -1829,9 +1830,9 @@ const io = {
1829
1830
  style: ut({ color: l.value })
1830
1831
  }, j(i.value.titleText), 7)
1831
1832
  ]),
1832
- S("div", ao, [
1833
+ S("div", so, [
1834
+ ao,
1833
1835
  lo,
1834
- ho,
1835
1836
  S("div", {
1836
1837
  ref_key: "wheelWrapper",
1837
1838
  ref: c,
@@ -1841,13 +1842,13 @@ const io = {
1841
1842
  key: A,
1842
1843
  class: "picker_wheel"
1843
1844
  }, [
1844
- S("ul", co, [
1845
+ S("ul", ho, [
1845
1846
  (W(!0), z(xt, null, At(m, (P, nt) => {
1846
1847
  var $;
1847
1848
  return W(), z("li", {
1848
1849
  key: nt,
1849
1850
  class: "picker_wheel_item"
1850
- }, j(($ = h.value) != null && $[A] && D(Qe)(P) ? P[h.value[A]] : P), 1);
1851
+ }, j(($ = h.value) != null && $[A] && D(Je)(P) ? P[h.value[A]] : P), 1);
1851
1852
  }), 128))
1852
1853
  ])
1853
1854
  ]))), 128))
@@ -1862,9 +1863,6 @@ const io = {
1862
1863
  ]));
1863
1864
  }
1864
1865
  });
1865
- Kt.install = function(o) {
1866
- o.component("Picker", Kt);
1867
- };
1868
1866
  export {
1869
- Kt as default
1867
+ uo as default
1870
1868
  };
@@ -16,8 +16,8 @@
16
16
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
17
17
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18
18
  PERFORMANCE OF THIS SOFTWARE.
19
- ***************************************************************************** */var tt=function(o,t){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},tt(o,t)};function W(o,t){tt(o,t);function e(){this.constructor=o}o.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var z=function(){return z=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)};function mt(){for(var o=0,t=0,e=arguments.length;t<e;t++)o+=arguments[t].length;for(var r=Array(o),i=0,t=0;t<e;t++)for(var n=arguments[t],s=0,l=n.length;s<l;s++,i++)r[i]=n[s];return r}var Ht=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function K(o){console.error("[BScroll warn]: "+o)}var S=typeof window<"u",X=S&&navigator.userAgent.toLowerCase(),Nt=!!(X&&/wechatdevtools/.test(X)),Ft=X&&X.indexOf("android")>0,Wt=function(){if(typeof X=="string"){var o=/os (\d\d?_\d(_\d)?)/,t=o.exec(X);if(!t)return!1;var e=t[1].split("_").map(function(r){return parseInt(r,10)});return e[0]===13&&e[1]>=4}return!1}(),yt=!1;if(S){var Kt="test-passive";try{var gt={};Object.defineProperty(gt,"passive",{get:function(){yt=!0}}),window.addEventListener(Kt,function(){},gt)}catch{}}function D(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var et=function(o,t){for(var e in t)o[e]=t[e];return o};function ot(o){return o==null}function kt(o,t,e){return o<t?t:o>e?e:o}var rt=S&&document.createElement("div").style,O=function(){if(!S)return!1;for(var o=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,e=o;t<e.length;t++){var r=e[t];if(rt[r.value]!==void 0)return r.key}return!1}();function w(o){return O===!1?o:O==="standard"?o==="transitionEnd"?"transitionend":o:O+o.charAt(0).toUpperCase()+o.substr(1)}function Tt(o){return typeof o=="string"?document.querySelector(o):o}function Rt(o,t,e,r){var i=yt?{passive:!1,capture:!!r}:!!r;o.addEventListener(t,e,i)}function Vt(o,t,e,r){o.removeEventListener(t,e,{capture:!!r})}function bt(o){o.cancelable&&o.preventDefault()}function St(o){for(var t=0,e=0;o;)t-=o.offsetLeft,e-=o.offsetTop,o=o.offsetParent;return{left:t,top:e}}O&&O!=="standard"&&""+O.toLowerCase();var $t=w("transform"),wt=w("transition"),jt=S&&w("perspective")in rt,Pt=S&&("ontouchstart"in window||Nt),Ut=S&&wt in rt,B={transform:$t,transition:wt,transitionTimingFunction:w("transitionTimingFunction"),transitionDuration:w("transitionDuration"),transitionDelay:w("transitionDelay"),transformOrigin:w("transformOrigin"),transitionEnd:w("transitionEnd"),transitionProperty:w("transitionProperty")},it={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function Et(o){if(o instanceof window.SVGElement){var t=o.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}else return{top:o.offsetTop,left:o.offsetLeft,width:o.offsetWidth,height:o.offsetHeight}}function H(o,t){for(var e in t)if(t[e].test(o[e]))return!0;return!1}var qt=H;function Gt(o,t){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.pageX=o.pageX,e.pageY=o.pageY,o.target.dispatchEvent(e)}function xt(o,t){t===void 0&&(t="click");var e;o.type==="mouseup"?e=o:(o.type==="touchend"||o.type==="touchcancel")&&(e=o.changedTouches[0]);var r={};e&&(r.screenX=e.screenX||0,r.screenY=e.screenY||0,r.clientX=e.clientX||0,r.clientY=e.clientY||0);var i,n=!0,s=!0,l=o.ctrlKey,h=o.shiftKey,a=o.altKey,u=o.metaKey,p={ctrlKey:l,shiftKey:h,altKey:a,metaKey:u};if(typeof MouseEvent<"u")try{i=new MouseEvent(t,et(z({bubbles:n,cancelable:s},p),r))}catch{v()}else v();function v(){i=document.createEvent("Event"),i.initEvent(t,n,s),et(i,r)}i.forwardedTouchEvent=!0,i._constructed=!0,o.target.dispatchEvent(i)}function Zt(o){xt(o,"dblclick")}var _={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(o){return 1+--o*o*o*o*o}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(o){return o*(2-o)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(o){return 1- --o*o*o*o}}},Jt=1e3/60,x=S&&window;function Ct(){}var Dt=function(){return S?x.requestAnimationFrame||x.webkitRequestAnimationFrame||x.mozRequestAnimationFrame||x.oRequestAnimationFrame||function(o){return window.setTimeout(o,o.interval||Jt)}:Ct}(),A=function(){return S?x.cancelAnimationFrame||x.webkitCancelAnimationFrame||x.mozCancelAnimationFrame||x.oCancelAnimationFrame||function(o){window.clearTimeout(o)}:Ct}(),Bt=function(o){},nt={enumerable:!0,configurable:!0,get:Bt,set:Bt},Qt=function(o,t){for(var e=t.split("."),r=0;r<e.length-1;r++)if(o=o[e[r]],typeof o!="object"||!o)return;var i=e.pop();return typeof o[i]=="function"?function(){return o[i].apply(o,arguments)}:o[i]},te=function(o,t,e){for(var r=t.split("."),i,n=0;n<r.length-1;n++)i=r[n],o[i]||(o[i]={}),o=o[i];o[r.pop()]=e};function ee(o,t,e){nt.get=function(){return Qt(this,t)},nt.set=function(i){te(this,t,i)},Object.defineProperty(o,e,nt)}var C=function(){function o(t){this.events={},this.eventTypes={},this.registerType(t)}return o.prototype.on=function(t,e,r){return r===void 0&&(r=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([e,r]),this},o.prototype.once=function(t,e,r){var i=this;r===void 0&&(r=this),this.hasType(t);var n=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];i.off(t,n);var h=e.apply(r,s);if(h===!0)return h};return n.fn=e,this.on(t,n),this},o.prototype.off=function(t,e){if(!t&&!e)return this.events={},this;if(t){if(this.hasType(t),!e)return this.events[t]=[],this;var r=this.events[t];if(!r)return this;for(var i=r.length;i--;)(r[i][0]===e||r[i][0]&&r[i][0].fn===e)&&r.splice(i,1);return this}},o.prototype.trigger=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.hasType(t);var i=this.events[t];if(i)for(var n=i.length,s=mt(i),l,h=0;h<n;h++){var a=s[h],u=a[0],p=a[1];if(u&&(l=u.apply(p,e),l===!0))return l}},o.prototype.registerType=function(t){var e=this;t.forEach(function(r){e.eventTypes[r]=r})},o.prototype.destroy=function(){this.events={},this.eventTypes={}},o.prototype.hasType=function(t){var e=this.eventTypes,r=e[t]===t;r||K('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+(""+Object.keys(e).map(function(i){return JSON.stringify(i)}))+"]")},o}(),R=function(){function o(t,e){this.wrapper=t,this.events=e,this.addDOMEvents()}return o.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},o.prototype.addDOMEvents=function(){this.handleDOMEvents(Rt)},o.prototype.removeDOMEvents=function(){this.handleDOMEvents(Vt)},o.prototype.handleDOMEvents=function(t){var e=this,r=this.wrapper;this.events.forEach(function(i){t(r,i.name,e,!!i.capture)})},o.prototype.handleEvent=function(t){var e=t.type;this.events.some(function(r){return r.name===e?(r.handler(t),!0):!1})},o}(),oe=function(){function o(){}return o}(),re=function(o){W(t,o);function t(){var e=o.call(this)||this;return e.startX=0,e.startY=0,e.scrollX=!1,e.scrollY=!0,e.freeScroll=!1,e.directionLockThreshold=0,e.eventPassthrough="",e.click=!1,e.dblclick=!1,e.tap="",e.bounce={top:!0,bottom:!0,left:!0,right:!0},e.bounceTime=800,e.momentum=!0,e.momentumLimitTime=300,e.momentumLimitDistance=15,e.swipeTime=2500,e.swipeBounceTime=500,e.deceleration=.0015,e.flickLimitTime=200,e.flickLimitDistance=100,e.resizePolling=60,e.probeType=0,e.stopPropagation=!1,e.preventDefault=!0,e.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},e.tagException={tagName:/^TEXTAREA$/},e.HWCompositing=!0,e.useTransition=!0,e.bindToWrapper=!1,e.bindToTarget=!1,e.disableMouse=Pt,e.disableTouch=!Pt,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=1,e}return t.prototype.merge=function(e){if(!e)return this;for(var r in e){if(r==="bounce"){this.bounce=this.resolveBounce(e[r]);continue}this[r]=e[r]}return this},t.prototype.process=function(){return this.translateZ=this.HWCompositing&&jt?" translateZ(1px)":"",this.useTransition=this.useTransition&&Ut,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX=this.eventPassthrough==="horizontal"?!1:this.scrollX,this.scrollY=this.eventPassthrough==="vertical"?!1:this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=this.freeScroll?!0:this.scrollX,this.scrollY=this.freeScroll?!0:this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},t.prototype.resolveBounce=function(e){var r={top:!0,right:!0,bottom:!0,left:!0},i={top:!1,right:!1,bottom:!1,left:!1},n;return typeof e=="object"?n=et(r,e):n=e?r:i,n},t}(oe),ie=function(){function o(t,e){this.wrapper=t,this.options=e,this.hooks=new C(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return o.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,r=t.disableMouse,i=t.disableTouch,n=t.click,s=this.wrapper,l=e?s:window,h=[],a=[],u=!i,p=!r;n&&h.push({name:"click",handler:this.click.bind(this),capture:!0}),u&&(h.push({name:"touchstart",handler:this.start.bind(this)}),a.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),p&&(h.push({name:"mousedown",handler:this.start.bind(this)}),a.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new R(s,h),this.targetEventRegister=new R(l,a)},o.prototype.beforeHandler=function(t,e){var r=this.options,i=r.preventDefault,n=r.stopPropagation,s=r.preventDefaultException,l={start:function(){return i&&!H(t.target,s)},end:function(){return i&&!H(t.target,s)},move:function(){return i}};l[e]()&&t.preventDefault(),n&&t.stopPropagation()},o.prototype.setInitiated=function(t){t===void 0&&(t=0),this.initiated=t},o.prototype.start=function(t){var e=it[t.type];if(!(this.initiated&&this.initiated!==e)){if(this.setInitiated(e),qt(t.target,this.options.tagException)){this.setInitiated();return}if(!(e===2&&t.button!==0)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var r=t.touches?t.touches[0]:t;this.pointX=r.pageX,this.pointY=r.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}}},o.prototype.move=function(t){if(it[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,r=e.pageX-this.pointX,i=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:r,deltaY:i,e:t})){var n=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,s=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,l=this.pointX-n,h=this.pointY-s,a=this.options.autoEndDistance;(l>document.documentElement.clientWidth-a||h>document.documentElement.clientHeight-a||l<a||h<a)&&this.end(t)}}},o.prototype.end=function(t){it[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},o.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},o.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},o.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},o.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},o}(),st={x:["translateX","px"],y:["translateY","px"]},ne=function(){function o(t){this.setContent(t),this.hooks=new C(["beforeTranslate","translate"])}return o.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),e=t[B.transform].split(")")[0].split(", "),r=+(e[12]||e[4])||0,i=+(e[13]||e[5])||0;return{x:r,y:i}},o.prototype.translate=function(t){var e=[];Object.keys(t).forEach(function(r){if(st[r]){var i=st[r][0];if(i){var n=st[r][1],s=t[r];e.push(i+"("+s+n+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[B.transform]=e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},o.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},o.prototype.destroy=function(){this.hooks.destroy()},o}(),_t=function(){function o(t,e,r){this.translater=e,this.options=r,this.timer=0,this.hooks=new C(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return o.prototype.translate=function(t){this.translater.translate(t)},o.prototype.setPending=function(t){this.pending=t},o.prototype.setForceStopped=function(t){this.forceStopped=t},o.prototype.setCallStop=function(t){this.callStopWhenPending=t},o.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},o.prototype.clearTimer=function(){this.timer&&(A(this.timer),this.timer=0)},o.prototype.destroy=function(){this.hooks.destroy(),A(this.timer)},o}(),se=function(o,t,e,r){var i=function(a,u){var p=a-u,v=p>0?-1:p<0?1:0;return v},n=i(t.x,o.x),s=i(t.y,o.y),l=e.x-r.x,h=e.y-r.y;return n*l<=0&&s*h<=0},ae=function(o){W(t,o);function t(){return o!==null&&o.apply(this,arguments)||this}return t.prototype.startProbe=function(e,r){var i=this,n=e,s=function(){var l=i.translater.getComputedPosition();se(e,r,l,n)&&i.hooks.trigger(i.hooks.eventTypes.move,l),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,l)),n=l,i.pending&&(i.timer=Dt(s))};this.callStopWhenPending&&this.setCallStop(!1),A(this.timer),s()},t.prototype.transitionTime=function(e){e===void 0&&(e=0),this.style[B.transitionDuration]=e+"ms",this.hooks.trigger(this.hooks.eventTypes.time,e)},t.prototype.transitionTimingFunction=function(e){this.style[B.transitionTimingFunction]=e,this.hooks.trigger(this.hooks.eventTypes.timeFunction,e)},t.prototype.transitionProperty=function(){this.style[B.transitionProperty]=B.transform},t.prototype.move=function(e,r,i,n){this.setPending(i>0),this.transitionTimingFunction(n),this.transitionProperty(),this.transitionTime(i),this.translate(r);var s=this.options.probeType===3;i&&s&&this.startProbe(e,r),i||(this._reflow=this.content.offsetHeight,s&&this.hooks.trigger(this.hooks.eventTypes.move,r),this.hooks.trigger(this.hooks.eventTypes.end,r))},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),A(this.timer);var r=this.translater.getComputedPosition(),i=r.x,n=r.y;this.transitionTime(),this.translate({x:i,y:n}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:i,y:n})}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(_t),le=function(o){W(t,o);function t(){return o!==null&&o.apply(this,arguments)||this}return t.prototype.move=function(e,r,i,n){if(!i){this.translate(r),this.options.probeType===3&&this.hooks.trigger(this.hooks.eventTypes.move,r),this.hooks.trigger(this.hooks.eventTypes.end,r);return}this.animate(e,r,i,n)},t.prototype.animate=function(e,r,i,n){var s=this,l=D(),h=l+i,a=this.options.probeType===3,u=function(){var p=D();if(p>=h){s.translate(r),a&&s.hooks.trigger(s.hooks.eventTypes.move,r),s.hooks.trigger(s.hooks.eventTypes.end,r);return}p=(p-l)/i;var v=n(p),k={};Object.keys(r).forEach(function(d){var g=e[d],y=r[d];k[d]=(y-g)*v+g}),s.translate(k),a&&s.hooks.trigger(s.hooks.eventTypes.move,k),s.pending&&(s.timer=Dt(u)),s.pending||(s.callStopWhenPending?s.callStopWhenPending=!1:s.hooks.trigger(s.hooks.eventTypes.end,r))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),A(this.timer),u()},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),A(this.timer);var r=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,r)}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(_t);function ce(o,t,e){var r=e.useTransition,i={};return Object.defineProperty(i,"probeType",{enumerable:!0,configurable:!1,get:function(){return e.probeType}}),r?new ae(o,t,i):new le(o,t,i)}var At=function(){function o(t,e,r){this.wrapper=t,this.options=r,this.hooks=new C(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return o.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},o.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},o.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},o.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},o.prototype.performDampingAlgorithm=function(t,e){var r=this.currentPos+t;return(r>this.minScrollPos||r<this.maxScrollPos)&&(r>this.minScrollPos&&this.options.bounces[0]||r<this.maxScrollPos&&this.options.bounces[1]?r=this.currentPos+t*e:r=r>this.minScrollPos?this.minScrollPos:this.maxScrollPos),r},o.prototype.end=function(t){var e={duration:0},r=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&r>this.options.momentumLimitDistance){var i=this.direction===-1&&this.options.bounces[0]||this.direction===1&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,i,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},o.prototype.momentum=function(t,e,r,i,n,s,l){l===void 0&&(l=this.options);var h=t-e,a=Math.abs(h)/r,u=l.deceleration,p=l.swipeBounceTime,v=l.swipeTime,k=Math.min(v,a*2/u),d={destination:t+a*a/u*(h<0?-1:1),duration:k,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,d,h),d.destination<i?(d.destination=s?Math.max(i-s/4,i-s/d.rate*a):i,d.duration=p):d.destination>n&&(d.destination=s?Math.min(n+s/4,n+s/d.rate*a):n,d.duration=p),d.destination=Math.round(d.destination),d},o.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},o.prototype.refresh=function(t){var e=this.options.rect,r=e.size,i=e.position,n=window.getComputedStyle(this.wrapper,null).position==="static",s=Et(this.wrapper);this.wrapperSize=this.wrapper[r==="width"?"clientWidth":"clientHeight"],this.setContent(t);var l=Et(this.content);this.contentSize=l[r],this.relativeOffset=l[i],n&&(this.relativeOffset-=s[i]),this.computeBoundary(),this.setDirection(0)},o.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},o.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},o.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,this.options.specifiedIndexAsContent===0&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},o.prototype.updatePosition=function(t){this.currentPos=t},o.prototype.getCurrentPos=function(){return this.currentPos},o.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos),e=t===this.getCurrentPos();return{position:t,inBoundary:e}},o.prototype.adjustPosition=function(t){return!this.hasScroll&&!this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t=this.minScrollPos:t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos),t},o.prototype.updateStartPos=function(){this.startPos=this.currentPos},o.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},o.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},o.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},o.prototype.destroy=function(){this.hooks.destroy()},o}(),V,$,j,U,Yt=(V={},V.yes=function(o){return!0},V.no=function(o){return bt(o),!1},V),he=($={},$.horizontal=(j={},j.yes="horizontal",j.no="vertical",j),$.vertical=(U={},U.yes="vertical",U.no="horizontal",U),$),ue=function(){function o(t,e,r){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=r,this.reset()}return o.prototype.reset=function(){this.directionLocked=""},o.prototype.checkMovingDirection=function(t,e,r){return this.computeDirectionLock(t,e),this.handleEventPassthrough(r)},o.prototype.adjustDelta=function(t,e){return this.directionLocked==="horizontal"?e=0:this.directionLocked==="vertical"&&(t=0),{deltaX:t,deltaY:e}},o.prototype.computeDirectionLock=function(t,e){this.directionLocked===""&&!this.freeScroll&&(t>e+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},o.prototype.handleEventPassthrough=function(t){var e=he[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return Yt.yes(t);if(this.eventPassthrough===e.no)return Yt.no(t)}return!1},o}(),pe=function(o,t,e){return e===2?[t,-o]:e===3?[-o,-t]:e===4?[-t,o]:[o,t]},fe=function(){function o(t,e,r,i,n){this.hooks=new C(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=r,this.animater=i,this.options=n,this.directionLockAction=new ue(n.directionLockThreshold,n.freeScroll,n.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return o.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(e){return t.enabled?t.handleStart(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(e){var r=e.deltaX,i=e.deltaY,n=e.e;if(!t.enabled)return!0;var s=pe(r,i,t.options.quadrant),l=s[0],h=s[1],a={deltaX:l,deltaY:h};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,a),t.handleMove(a.deltaX,a.deltaY,n)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(e){return t.enabled?t.handleEnd(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(e){t.enabled&&!e._constructed&&t.handleClick(e)})},o.prototype.handleStart=function(t){var e=D();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},o.prototype.handleMove=function(t,e,r){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,r)){var i=this.scrollBehaviorX.getAbsDist(t),n=this.scrollBehaviorY.getAbsDist(e),s=D();if(this.checkMomentum(i,n,s))return!0;if(this.directionLockAction.checkMovingDirection(i,n,r))return this.actionsHandler.setInitiated(),!0;var l=this.directionLockAction.adjustDelta(t,e),h=this.scrollBehaviorX.getCurrentPos(),a=this.scrollBehaviorX.move(l.deltaX),u=this.scrollBehaviorY.getCurrentPos(),p=this.scrollBehaviorY.move(l.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var v=a!==h||p!==u;!this.contentMoved&&!v&&this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&v&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&v&&(this.animater.translate({x:a,y:p}),this.dispatchScroll(s))}}},o.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},o.prototype.checkMomentum=function(t,e,r){return r-this.endTime>this.options.momentumLimitTime&&e<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},o.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var e=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,e))return!0;e=this.ensureIntegerPos(e),this.animater.translate(e),this.endTime=D();var r=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,e,r)}},o.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var e=t.x,r=t.y,i=this.scrollBehaviorX,n=i.minScrollPos,s=i.maxScrollPos,l=this.scrollBehaviorY,h=l.minScrollPos,a=l.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),r=r>0?Math.ceil(r):Math.floor(r),e=kt(e,s,n),r=kt(r,a,h),{x:e,y:r}},o.prototype.handleClick=function(t){H(t.target,this.options.preventDefaultException)||(bt(t),t.stopPropagation())},o.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},o.prototype.refresh=function(){this.endTime=0},o.prototype.destroy=function(){this.hooks.destroy()},o}();function de(o){var t=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce(function(e,r){return e[r]=o[r],e},{});return t}function Mt(o,t,e,r){var i=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce(function(n,s){return n[s]=o[s],n},{});return i.scrollable=!!o[t],i.bounces=e,i.rect=r,i}function at(o,t,e){e.forEach(function(r){var i,n;typeof r=="string"?i=n=r:(i=r.source,n=r.target),o.on(i,function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return t.trigger.apply(t,mt([n],s))})})}function ve(o,t){for(var e=Object.keys(o),r=0,i=e;r<i.length;r++){var n=i[r];if(o[n]!==t[n])return!1}return!0}var Xt=1,me=function(){function o(t,e,r){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new C(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=r;var i=this.options.bounce,n=i.left,s=i.right,l=i.top,h=i.bottom;this.scrollBehaviorX=new At(t,e,Mt(r,"scrollX",[n,s],{size:"width",position:"left"})),this.scrollBehaviorY=new At(t,e,Mt(r,"scrollY",[l,h],{size:"height",position:"top"})),this.translater=new ne(this.content),this.animater=ce(this.content,this.translater,this.options),this.actionsHandler=new ie(this.options.bindToTarget?this.content:t,de(this.options)),this.actions=new fe(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var a=this.resize.bind(this);this.resizeRegister=new R(window,[{name:"orientationchange",handler:a},{name:"resize",handler:a}]),this.registerTransitionEnd(),this.init()}return o.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,function(){t.togglePointerEvents(!0)})},o.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new R(this.content,[{name:B.transitionEnd,handler:this.transitionEnd.bind(this)}])},o.prototype.bindTranslater=function(){var t=this,e=this.translater.hooks;e.on(e.eventTypes.beforeTranslate,function(r){t.options.translateZ&&r.push(t.options.translateZ)}),e.on(e.eventTypes.translate,function(r){var i=t.getCurrentPos();if(t.updatePositions(r),t.actions.ensuringInteger===!0){t.actions.ensuringInteger=!1;return}(r.x!==i.x||r.y!==i.y)&&t.togglePointerEvents(!1)})},o.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,function(e){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,e))}),at(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},o.prototype.bindActions=function(){var t=this,e=this.actions;at(e.hooks,this.hooks,[{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:e.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:e.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:e.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:e.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),e.hooks.on(e.hooks.eventTypes.end,function(r,i){if(t.hooks.trigger(t.hooks.eventTypes.touchEnd,i),t.hooks.trigger(t.hooks.eventTypes.end,i)||!e.fingerMoved&&(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),t.checkClick(r)))return!0;if(t.resetPosition(t.options.bounceTime,_.bounce))return t.animater.setForceStopped(!1),!0}),e.hooks.on(e.hooks.eventTypes.scrollEnd,function(r,i){var n=Math.abs(r.x-t.scrollBehaviorX.startPos),s=Math.abs(r.y-t.scrollBehaviorY.startPos);if(t.checkFlick(i,n,s)){t.animater.setForceStopped(!1),t.hooks.trigger(t.hooks.eventTypes.flick);return}if(t.momentum(r,i)){t.animater.setForceStopped(!1);return}e.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,r),t.animater.forceStopped&&t.animater.setForceStopped(!1)})},o.prototype.checkFlick=function(t,e,r){var i=1;if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&e<this.options.flickLimitDistance&&r<this.options.flickLimitDistance&&(r>i||e>i))return!0},o.prototype.momentum=function(t,e){var r={time:0,easing:_.swiper,newX:t.x,newY:t.y},i=this.scrollBehaviorX.end(e),n=this.scrollBehaviorY.end(e);if(r.newX=ot(i.destination)?r.newX:i.destination,r.newY=ot(n.destination)?r.newY:n.destination,r.time=Math.max(i.duration,n.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,r,this),r.newX!==t.x||r.newY!==t.y)return(r.newX>this.scrollBehaviorX.minScrollPos||r.newX<this.scrollBehaviorX.maxScrollPos||r.newY>this.scrollBehaviorY.minScrollPos||r.newY<this.scrollBehaviorY.maxScrollPos)&&(r.easing=_.swipeBounce),this.scrollTo(r.newX,r.newY,r.time,r.easing),!0},o.prototype.checkClick=function(t){var e={preventClick:this.animater.forceStopped};if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!e.preventClick){var r=this.options.dblclick,i=!1;if(r&&this.lastClickTime){var n=r.delay,s=n===void 0?300:n;D()-this.lastClickTime<s&&(i=!0,Zt(t))}return this.options.tap&&Gt(t,this.options.tap),this.options.click&&!H(t.target,this.options.preventDefaultException)&&xt(t),this.lastClickTime=i?null:D(),!0}return!1},o.prototype.resize=function(){var t=this;this.actions.enabled&&(Ft&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(function(){t.hooks.trigger(t.hooks.eventTypes.resize)},this.options.resizePolling))},o.prototype.transitionEnd=function(t){if(!(t.target!==this.content||!this.animater.pending)){var e=this.animater;e.transitionTime(),this.resetPosition(this.options.bounceTime,_.bounce)||(this.animater.setPending(!1),this.options.probeType!==3&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos()))}},o.prototype.togglePointerEvents=function(t){t===void 0&&(t=!0);for(var e=this.content.children.length?this.content.children:[this.content],r=t?"auto":"none",i=0;i<e.length;i++){var n=e[i];n.isBScrollContainer||(n.style.pointerEvents=r)}},o.prototype.refresh=function(t){var e=this.setContent(t);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(t),this.scrollBehaviorY.refresh(t),e&&(this.translater.setContent(t),this.animater.setContent(t),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(t)),this.actions.refresh(),this.wrapperOffset=St(this.wrapper)},o.prototype.setContent=function(t){var e=t!==this.content;return e&&(this.content=t),e},o.prototype.scrollBy=function(t,e,r,i){r===void 0&&(r=0);var n=this.getCurrentPos(),s=n.x,l=n.y;i=i||_.bounce,t+=s,e+=l,this.scrollTo(t,e,r,i)},o.prototype.scrollTo=function(t,e,r,i,n){r===void 0&&(r=0),i===void 0&&(i=_.bounce),n===void 0&&(n={start:{},end:{}});var s=this.options.useTransition?i.style:i.fn,l=this.getCurrentPos(),h=z({x:l.x,y:l.y},n.start),a=z({x:t,y:e},n.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,a),!ve(h,a)){var u=Math.abs(a.x-h.x),p=Math.abs(a.y-h.y);u<Xt&&p<Xt&&(r=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(h,a,r,s)}},o.prototype.scrollToElement=function(t,e,r,i,n){var s=Tt(t),l=St(s),h=function(u,p,v){return typeof u=="number"?u:u?Math.round(p/2-v/2):0};r=h(r,s.offsetWidth,this.wrapper.offsetWidth),i=h(i,s.offsetHeight,this.wrapper.offsetHeight);var a=function(u,p,v,k){return u-=p,u=k.adjustPosition(u-v),u};l.left=a(l.left,this.wrapperOffset.left,r,this.scrollBehaviorX),l.top=a(l.top,this.wrapperOffset.top,i,this.scrollBehaviorY),!this.hooks.trigger(this.hooks.eventTypes.scrollToElement,s,l)&&this.scrollTo(l.left,l.top,e,n)},o.prototype.resetPosition=function(t,e){t===void 0&&(t=0),e===void 0&&(e=_.bounce);var r=this.scrollBehaviorX.checkInBoundary(),i=r.position,n=r.inBoundary,s=this.scrollBehaviorY.checkInBoundary(),l=s.position,h=s.inBoundary;return n&&h?!1:(Wt&&this.reflow(),this.scrollTo(i,l,t,e),!0)},o.prototype.reflow=function(){this._reflow=this.content.offsetHeight},o.prototype.updatePositions=function(t){this.scrollBehaviorX.updatePosition(t.x),this.scrollBehaviorY.updatePosition(t.y)},o.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},o.prototype.enable=function(){this.actions.enabled=!0},o.prototype.disable=function(){A(this.animater.timer),this.actions.enabled=!1},o.prototype.destroy=function(){var t=this,e=["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"];e.forEach(function(r){return t[r].destroy()})},o}(),q=function(o){W(t,o);function t(e,r){var i=o.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,n=Tt(e);return n?(i.plugins={},i.options=new re().merge(r).process(),i.setContent(n).valid&&(i.hooks=new C(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),i.init(n)),i):(K("Can not resolve the wrapper DOM."),i)}return t.use=function(e){var r=e.pluginName,i=t.plugins.some(function(n){return e===n.ctor});return i?t:ot(r)?(K("Plugin Class must specify plugin's name in static property by 'pluginName' field."),t):(t.pluginsMap[r]=!0,t.plugins.push({name:r,applyOrder:e.applyOrder,ctor:e}),t)},t.prototype.setContent=function(e){var r=!1,i=!0,n=e.children[this.options.specifiedIndexAsContent];return n?(r=this.content!==n,r&&(this.content=n)):(K("The wrapper need at least one child element to be content element to scroll."),i=!1),{valid:i,contentChanged:r}},t.prototype.init=function(e){var r=this;this.wrapper=e,e.isBScrollContainer=!0,this.scroller=new me(e,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,function(){r.refresh()}),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(Ht),this.applyPlugins(),this.refreshWithoutReset(this.content);var i=this.options,n=i.startX,s=i.startY,l={x:n,y:s};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,l)||this.scroller.scrollTo(l.x,l.y)},t.prototype.applyPlugins=function(){var e=this,r=this.options;t.plugins.sort(function(i,n){var s,l=(s={},s.pre=-1,s.post=1,s),h=i.applyOrder?l[i.applyOrder]:0,a=n.applyOrder?l[n.applyOrder]:0;return h-a}).forEach(function(i){var n=i.ctor;r[i.name]&&typeof n=="function"&&(e.plugins[i.name]=new n(e))})},t.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,function(){var e=document.activeElement;e&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")&&e.blur()})},t.prototype.eventBubbling=function(){at(this.scroller.hooks,this,[this.eventTypes.beforeScrollStart,this.eventTypes.scrollStart,this.eventTypes.scroll,this.eventTypes.scrollEnd,this.eventTypes.scrollCancel,this.eventTypes.touchEnd,this.eventTypes.flick])},t.prototype.refreshWithoutReset=function(e){this.scroller.refresh(e),this.hooks.trigger(this.hooks.eventTypes.refresh,e),this.trigger(this.eventTypes.refresh,e)},t.prototype.proxy=function(e){var r=this;e.forEach(function(i){var n=i.key,s=i.sourceKey;ee(r,s,n)})},t.prototype.refresh=function(){var e=this.setContent(this.wrapper),r=e.contentChanged,i=e.valid;if(i){var n=this.content;this.refreshWithoutReset(n),r&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,n),this.trigger(this.eventTypes.contentChanged,n)),this.scroller.resetPosition()}},t.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},t.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},t.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},t.prototype.eventRegister=function(e){this.registerType(e)},t.plugins=[],t.pluginsMap={},t}(C);function N(o,t){var e=new q(o,t);return e}N.use=q.use,N.plugins=q.plugins,N.pluginsMap=q.pluginsMap;var ye=N;/*!
19
+ ***************************************************************************** */var tt=function(o,t){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},tt(o,t)};function W(o,t){tt(o,t);function e(){this.constructor=o}o.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var z=function(){return z=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)};function vt(){for(var o=0,t=0,e=arguments.length;t<e;t++)o+=arguments[t].length;for(var r=Array(o),i=0,t=0;t<e;t++)for(var n=arguments[t],s=0,l=n.length;s<l;s++,i++)r[i]=n[s];return r}var zt=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function K(o){console.error("[BScroll warn]: "+o)}var S=typeof window<"u",X=S&&navigator.userAgent.toLowerCase(),Ht=!!(X&&/wechatdevtools/.test(X)),Nt=X&&X.indexOf("android")>0,Ft=function(){if(typeof X=="string"){var o=/os (\d\d?_\d(_\d)?)/,t=o.exec(X);if(!t)return!1;var e=t[1].split("_").map(function(r){return parseInt(r,10)});return e[0]===13&&e[1]>=4}return!1}(),mt=!1;if(S){var Wt="test-passive";try{var yt={};Object.defineProperty(yt,"passive",{get:function(){mt=!0}}),window.addEventListener(Wt,function(){},yt)}catch{}}function D(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var et=function(o,t){for(var e in t)o[e]=t[e];return o};function ot(o){return o==null}function gt(o,t,e){return o<t?t:o>e?e:o}var rt=S&&document.createElement("div").style,O=function(){if(!S)return!1;for(var o=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,e=o;t<e.length;t++){var r=e[t];if(rt[r.value]!==void 0)return r.key}return!1}();function w(o){return O===!1?o:O==="standard"?o==="transitionEnd"?"transitionend":o:O+o.charAt(0).toUpperCase()+o.substr(1)}function kt(o){return typeof o=="string"?document.querySelector(o):o}function Kt(o,t,e,r){var i=mt?{passive:!1,capture:!!r}:!!r;o.addEventListener(t,e,i)}function Rt(o,t,e,r){o.removeEventListener(t,e,{capture:!!r})}function Tt(o){o.cancelable&&o.preventDefault()}function bt(o){for(var t=0,e=0;o;)t-=o.offsetLeft,e-=o.offsetTop,o=o.offsetParent;return{left:t,top:e}}O&&O!=="standard"&&""+O.toLowerCase();var Vt=w("transform"),St=w("transition"),$t=S&&w("perspective")in rt,wt=S&&("ontouchstart"in window||Ht),jt=S&&St in rt,B={transform:Vt,transition:St,transitionTimingFunction:w("transitionTimingFunction"),transitionDuration:w("transitionDuration"),transitionDelay:w("transitionDelay"),transformOrigin:w("transformOrigin"),transitionEnd:w("transitionEnd"),transitionProperty:w("transitionProperty")},it={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function Pt(o){if(o instanceof window.SVGElement){var t=o.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}else return{top:o.offsetTop,left:o.offsetLeft,width:o.offsetWidth,height:o.offsetHeight}}function H(o,t){for(var e in t)if(t[e].test(o[e]))return!0;return!1}var Ut=H;function qt(o,t){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.pageX=o.pageX,e.pageY=o.pageY,o.target.dispatchEvent(e)}function Et(o,t){t===void 0&&(t="click");var e;o.type==="mouseup"?e=o:(o.type==="touchend"||o.type==="touchcancel")&&(e=o.changedTouches[0]);var r={};e&&(r.screenX=e.screenX||0,r.screenY=e.screenY||0,r.clientX=e.clientX||0,r.clientY=e.clientY||0);var i,n=!0,s=!0,l=o.ctrlKey,h=o.shiftKey,a=o.altKey,u=o.metaKey,p={ctrlKey:l,shiftKey:h,altKey:a,metaKey:u};if(typeof MouseEvent<"u")try{i=new MouseEvent(t,et(z({bubbles:n,cancelable:s},p),r))}catch{v()}else v();function v(){i=document.createEvent("Event"),i.initEvent(t,n,s),et(i,r)}i.forwardedTouchEvent=!0,i._constructed=!0,o.target.dispatchEvent(i)}function Gt(o){Et(o,"dblclick")}var _={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(o){return 1+--o*o*o*o*o}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(o){return o*(2-o)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(o){return 1- --o*o*o*o}}},Zt=1e3/60,x=S&&window;function xt(){}var Ct=function(){return S?x.requestAnimationFrame||x.webkitRequestAnimationFrame||x.mozRequestAnimationFrame||x.oRequestAnimationFrame||function(o){return window.setTimeout(o,o.interval||Zt)}:xt}(),A=function(){return S?x.cancelAnimationFrame||x.webkitCancelAnimationFrame||x.mozCancelAnimationFrame||x.oCancelAnimationFrame||function(o){window.clearTimeout(o)}:xt}(),Dt=function(o){},nt={enumerable:!0,configurable:!0,get:Dt,set:Dt},Jt=function(o,t){for(var e=t.split("."),r=0;r<e.length-1;r++)if(o=o[e[r]],typeof o!="object"||!o)return;var i=e.pop();return typeof o[i]=="function"?function(){return o[i].apply(o,arguments)}:o[i]},Qt=function(o,t,e){for(var r=t.split("."),i,n=0;n<r.length-1;n++)i=r[n],o[i]||(o[i]={}),o=o[i];o[r.pop()]=e};function te(o,t,e){nt.get=function(){return Jt(this,t)},nt.set=function(i){Qt(this,t,i)},Object.defineProperty(o,e,nt)}var C=function(){function o(t){this.events={},this.eventTypes={},this.registerType(t)}return o.prototype.on=function(t,e,r){return r===void 0&&(r=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([e,r]),this},o.prototype.once=function(t,e,r){var i=this;r===void 0&&(r=this),this.hasType(t);var n=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];i.off(t,n);var h=e.apply(r,s);if(h===!0)return h};return n.fn=e,this.on(t,n),this},o.prototype.off=function(t,e){if(!t&&!e)return this.events={},this;if(t){if(this.hasType(t),!e)return this.events[t]=[],this;var r=this.events[t];if(!r)return this;for(var i=r.length;i--;)(r[i][0]===e||r[i][0]&&r[i][0].fn===e)&&r.splice(i,1);return this}},o.prototype.trigger=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.hasType(t);var i=this.events[t];if(i)for(var n=i.length,s=vt(i),l,h=0;h<n;h++){var a=s[h],u=a[0],p=a[1];if(u&&(l=u.apply(p,e),l===!0))return l}},o.prototype.registerType=function(t){var e=this;t.forEach(function(r){e.eventTypes[r]=r})},o.prototype.destroy=function(){this.events={},this.eventTypes={}},o.prototype.hasType=function(t){var e=this.eventTypes,r=e[t]===t;r||K('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+(""+Object.keys(e).map(function(i){return JSON.stringify(i)}))+"]")},o}(),R=function(){function o(t,e){this.wrapper=t,this.events=e,this.addDOMEvents()}return o.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},o.prototype.addDOMEvents=function(){this.handleDOMEvents(Kt)},o.prototype.removeDOMEvents=function(){this.handleDOMEvents(Rt)},o.prototype.handleDOMEvents=function(t){var e=this,r=this.wrapper;this.events.forEach(function(i){t(r,i.name,e,!!i.capture)})},o.prototype.handleEvent=function(t){var e=t.type;this.events.some(function(r){return r.name===e?(r.handler(t),!0):!1})},o}(),ee=function(){function o(){}return o}(),oe=function(o){W(t,o);function t(){var e=o.call(this)||this;return e.startX=0,e.startY=0,e.scrollX=!1,e.scrollY=!0,e.freeScroll=!1,e.directionLockThreshold=0,e.eventPassthrough="",e.click=!1,e.dblclick=!1,e.tap="",e.bounce={top:!0,bottom:!0,left:!0,right:!0},e.bounceTime=800,e.momentum=!0,e.momentumLimitTime=300,e.momentumLimitDistance=15,e.swipeTime=2500,e.swipeBounceTime=500,e.deceleration=.0015,e.flickLimitTime=200,e.flickLimitDistance=100,e.resizePolling=60,e.probeType=0,e.stopPropagation=!1,e.preventDefault=!0,e.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},e.tagException={tagName:/^TEXTAREA$/},e.HWCompositing=!0,e.useTransition=!0,e.bindToWrapper=!1,e.bindToTarget=!1,e.disableMouse=wt,e.disableTouch=!wt,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=1,e}return t.prototype.merge=function(e){if(!e)return this;for(var r in e){if(r==="bounce"){this.bounce=this.resolveBounce(e[r]);continue}this[r]=e[r]}return this},t.prototype.process=function(){return this.translateZ=this.HWCompositing&&$t?" translateZ(1px)":"",this.useTransition=this.useTransition&&jt,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX=this.eventPassthrough==="horizontal"?!1:this.scrollX,this.scrollY=this.eventPassthrough==="vertical"?!1:this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=this.freeScroll?!0:this.scrollX,this.scrollY=this.freeScroll?!0:this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},t.prototype.resolveBounce=function(e){var r={top:!0,right:!0,bottom:!0,left:!0},i={top:!1,right:!1,bottom:!1,left:!1},n;return typeof e=="object"?n=et(r,e):n=e?r:i,n},t}(ee),re=function(){function o(t,e){this.wrapper=t,this.options=e,this.hooks=new C(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return o.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,r=t.disableMouse,i=t.disableTouch,n=t.click,s=this.wrapper,l=e?s:window,h=[],a=[],u=!i,p=!r;n&&h.push({name:"click",handler:this.click.bind(this),capture:!0}),u&&(h.push({name:"touchstart",handler:this.start.bind(this)}),a.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),p&&(h.push({name:"mousedown",handler:this.start.bind(this)}),a.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new R(s,h),this.targetEventRegister=new R(l,a)},o.prototype.beforeHandler=function(t,e){var r=this.options,i=r.preventDefault,n=r.stopPropagation,s=r.preventDefaultException,l={start:function(){return i&&!H(t.target,s)},end:function(){return i&&!H(t.target,s)},move:function(){return i}};l[e]()&&t.preventDefault(),n&&t.stopPropagation()},o.prototype.setInitiated=function(t){t===void 0&&(t=0),this.initiated=t},o.prototype.start=function(t){var e=it[t.type];if(!(this.initiated&&this.initiated!==e)){if(this.setInitiated(e),Ut(t.target,this.options.tagException)){this.setInitiated();return}if(!(e===2&&t.button!==0)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var r=t.touches?t.touches[0]:t;this.pointX=r.pageX,this.pointY=r.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}}},o.prototype.move=function(t){if(it[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,r=e.pageX-this.pointX,i=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:r,deltaY:i,e:t})){var n=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,s=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,l=this.pointX-n,h=this.pointY-s,a=this.options.autoEndDistance;(l>document.documentElement.clientWidth-a||h>document.documentElement.clientHeight-a||l<a||h<a)&&this.end(t)}}},o.prototype.end=function(t){it[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},o.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},o.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},o.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},o.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},o}(),st={x:["translateX","px"],y:["translateY","px"]},ie=function(){function o(t){this.setContent(t),this.hooks=new C(["beforeTranslate","translate"])}return o.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),e=t[B.transform].split(")")[0].split(", "),r=+(e[12]||e[4])||0,i=+(e[13]||e[5])||0;return{x:r,y:i}},o.prototype.translate=function(t){var e=[];Object.keys(t).forEach(function(r){if(st[r]){var i=st[r][0];if(i){var n=st[r][1],s=t[r];e.push(i+"("+s+n+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[B.transform]=e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},o.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},o.prototype.destroy=function(){this.hooks.destroy()},o}(),Bt=function(){function o(t,e,r){this.translater=e,this.options=r,this.timer=0,this.hooks=new C(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return o.prototype.translate=function(t){this.translater.translate(t)},o.prototype.setPending=function(t){this.pending=t},o.prototype.setForceStopped=function(t){this.forceStopped=t},o.prototype.setCallStop=function(t){this.callStopWhenPending=t},o.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},o.prototype.clearTimer=function(){this.timer&&(A(this.timer),this.timer=0)},o.prototype.destroy=function(){this.hooks.destroy(),A(this.timer)},o}(),ne=function(o,t,e,r){var i=function(a,u){var p=a-u,v=p>0?-1:p<0?1:0;return v},n=i(t.x,o.x),s=i(t.y,o.y),l=e.x-r.x,h=e.y-r.y;return n*l<=0&&s*h<=0},se=function(o){W(t,o);function t(){return o!==null&&o.apply(this,arguments)||this}return t.prototype.startProbe=function(e,r){var i=this,n=e,s=function(){var l=i.translater.getComputedPosition();ne(e,r,l,n)&&i.hooks.trigger(i.hooks.eventTypes.move,l),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,l)),n=l,i.pending&&(i.timer=Ct(s))};this.callStopWhenPending&&this.setCallStop(!1),A(this.timer),s()},t.prototype.transitionTime=function(e){e===void 0&&(e=0),this.style[B.transitionDuration]=e+"ms",this.hooks.trigger(this.hooks.eventTypes.time,e)},t.prototype.transitionTimingFunction=function(e){this.style[B.transitionTimingFunction]=e,this.hooks.trigger(this.hooks.eventTypes.timeFunction,e)},t.prototype.transitionProperty=function(){this.style[B.transitionProperty]=B.transform},t.prototype.move=function(e,r,i,n){this.setPending(i>0),this.transitionTimingFunction(n),this.transitionProperty(),this.transitionTime(i),this.translate(r);var s=this.options.probeType===3;i&&s&&this.startProbe(e,r),i||(this._reflow=this.content.offsetHeight,s&&this.hooks.trigger(this.hooks.eventTypes.move,r),this.hooks.trigger(this.hooks.eventTypes.end,r))},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),A(this.timer);var r=this.translater.getComputedPosition(),i=r.x,n=r.y;this.transitionTime(),this.translate({x:i,y:n}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:i,y:n})}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(Bt),ae=function(o){W(t,o);function t(){return o!==null&&o.apply(this,arguments)||this}return t.prototype.move=function(e,r,i,n){if(!i){this.translate(r),this.options.probeType===3&&this.hooks.trigger(this.hooks.eventTypes.move,r),this.hooks.trigger(this.hooks.eventTypes.end,r);return}this.animate(e,r,i,n)},t.prototype.animate=function(e,r,i,n){var s=this,l=D(),h=l+i,a=this.options.probeType===3,u=function(){var p=D();if(p>=h){s.translate(r),a&&s.hooks.trigger(s.hooks.eventTypes.move,r),s.hooks.trigger(s.hooks.eventTypes.end,r);return}p=(p-l)/i;var v=n(p),k={};Object.keys(r).forEach(function(d){var g=e[d],y=r[d];k[d]=(y-g)*v+g}),s.translate(k),a&&s.hooks.trigger(s.hooks.eventTypes.move,k),s.pending&&(s.timer=Ct(u)),s.pending||(s.callStopWhenPending?s.callStopWhenPending=!1:s.hooks.trigger(s.hooks.eventTypes.end,r))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),A(this.timer),u()},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),A(this.timer);var r=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,r)}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(Bt);function le(o,t,e){var r=e.useTransition,i={};return Object.defineProperty(i,"probeType",{enumerable:!0,configurable:!1,get:function(){return e.probeType}}),r?new se(o,t,i):new ae(o,t,i)}var _t=function(){function o(t,e,r){this.wrapper=t,this.options=r,this.hooks=new C(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return o.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},o.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},o.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},o.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},o.prototype.performDampingAlgorithm=function(t,e){var r=this.currentPos+t;return(r>this.minScrollPos||r<this.maxScrollPos)&&(r>this.minScrollPos&&this.options.bounces[0]||r<this.maxScrollPos&&this.options.bounces[1]?r=this.currentPos+t*e:r=r>this.minScrollPos?this.minScrollPos:this.maxScrollPos),r},o.prototype.end=function(t){var e={duration:0},r=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&r>this.options.momentumLimitDistance){var i=this.direction===-1&&this.options.bounces[0]||this.direction===1&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,i,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},o.prototype.momentum=function(t,e,r,i,n,s,l){l===void 0&&(l=this.options);var h=t-e,a=Math.abs(h)/r,u=l.deceleration,p=l.swipeBounceTime,v=l.swipeTime,k=Math.min(v,a*2/u),d={destination:t+a*a/u*(h<0?-1:1),duration:k,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,d,h),d.destination<i?(d.destination=s?Math.max(i-s/4,i-s/d.rate*a):i,d.duration=p):d.destination>n&&(d.destination=s?Math.min(n+s/4,n+s/d.rate*a):n,d.duration=p),d.destination=Math.round(d.destination),d},o.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},o.prototype.refresh=function(t){var e=this.options.rect,r=e.size,i=e.position,n=window.getComputedStyle(this.wrapper,null).position==="static",s=Pt(this.wrapper);this.wrapperSize=this.wrapper[r==="width"?"clientWidth":"clientHeight"],this.setContent(t);var l=Pt(this.content);this.contentSize=l[r],this.relativeOffset=l[i],n&&(this.relativeOffset-=s[i]),this.computeBoundary(),this.setDirection(0)},o.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},o.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},o.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,this.options.specifiedIndexAsContent===0&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},o.prototype.updatePosition=function(t){this.currentPos=t},o.prototype.getCurrentPos=function(){return this.currentPos},o.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos),e=t===this.getCurrentPos();return{position:t,inBoundary:e}},o.prototype.adjustPosition=function(t){return!this.hasScroll&&!this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t=this.minScrollPos:t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos),t},o.prototype.updateStartPos=function(){this.startPos=this.currentPos},o.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},o.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},o.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},o.prototype.destroy=function(){this.hooks.destroy()},o}(),V,$,j,U,At=(V={},V.yes=function(o){return!0},V.no=function(o){return Tt(o),!1},V),ce=($={},$.horizontal=(j={},j.yes="horizontal",j.no="vertical",j),$.vertical=(U={},U.yes="vertical",U.no="horizontal",U),$),he=function(){function o(t,e,r){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=r,this.reset()}return o.prototype.reset=function(){this.directionLocked=""},o.prototype.checkMovingDirection=function(t,e,r){return this.computeDirectionLock(t,e),this.handleEventPassthrough(r)},o.prototype.adjustDelta=function(t,e){return this.directionLocked==="horizontal"?e=0:this.directionLocked==="vertical"&&(t=0),{deltaX:t,deltaY:e}},o.prototype.computeDirectionLock=function(t,e){this.directionLocked===""&&!this.freeScroll&&(t>e+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},o.prototype.handleEventPassthrough=function(t){var e=ce[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return At.yes(t);if(this.eventPassthrough===e.no)return At.no(t)}return!1},o}(),ue=function(o,t,e){return e===2?[t,-o]:e===3?[-o,-t]:e===4?[-t,o]:[o,t]},pe=function(){function o(t,e,r,i,n){this.hooks=new C(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=r,this.animater=i,this.options=n,this.directionLockAction=new he(n.directionLockThreshold,n.freeScroll,n.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return o.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(e){return t.enabled?t.handleStart(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(e){var r=e.deltaX,i=e.deltaY,n=e.e;if(!t.enabled)return!0;var s=ue(r,i,t.options.quadrant),l=s[0],h=s[1],a={deltaX:l,deltaY:h};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,a),t.handleMove(a.deltaX,a.deltaY,n)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(e){return t.enabled?t.handleEnd(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(e){t.enabled&&!e._constructed&&t.handleClick(e)})},o.prototype.handleStart=function(t){var e=D();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},o.prototype.handleMove=function(t,e,r){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,r)){var i=this.scrollBehaviorX.getAbsDist(t),n=this.scrollBehaviorY.getAbsDist(e),s=D();if(this.checkMomentum(i,n,s))return!0;if(this.directionLockAction.checkMovingDirection(i,n,r))return this.actionsHandler.setInitiated(),!0;var l=this.directionLockAction.adjustDelta(t,e),h=this.scrollBehaviorX.getCurrentPos(),a=this.scrollBehaviorX.move(l.deltaX),u=this.scrollBehaviorY.getCurrentPos(),p=this.scrollBehaviorY.move(l.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var v=a!==h||p!==u;!this.contentMoved&&!v&&this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&v&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&v&&(this.animater.translate({x:a,y:p}),this.dispatchScroll(s))}}},o.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},o.prototype.checkMomentum=function(t,e,r){return r-this.endTime>this.options.momentumLimitTime&&e<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},o.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var e=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,e))return!0;e=this.ensureIntegerPos(e),this.animater.translate(e),this.endTime=D();var r=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,e,r)}},o.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var e=t.x,r=t.y,i=this.scrollBehaviorX,n=i.minScrollPos,s=i.maxScrollPos,l=this.scrollBehaviorY,h=l.minScrollPos,a=l.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),r=r>0?Math.ceil(r):Math.floor(r),e=gt(e,s,n),r=gt(r,a,h),{x:e,y:r}},o.prototype.handleClick=function(t){H(t.target,this.options.preventDefaultException)||(Tt(t),t.stopPropagation())},o.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},o.prototype.refresh=function(){this.endTime=0},o.prototype.destroy=function(){this.hooks.destroy()},o}();function fe(o){var t=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce(function(e,r){return e[r]=o[r],e},{});return t}function Yt(o,t,e,r){var i=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce(function(n,s){return n[s]=o[s],n},{});return i.scrollable=!!o[t],i.bounces=e,i.rect=r,i}function at(o,t,e){e.forEach(function(r){var i,n;typeof r=="string"?i=n=r:(i=r.source,n=r.target),o.on(i,function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return t.trigger.apply(t,vt([n],s))})})}function de(o,t){for(var e=Object.keys(o),r=0,i=e;r<i.length;r++){var n=i[r];if(o[n]!==t[n])return!1}return!0}var Mt=1,ve=function(){function o(t,e,r){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new C(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=r;var i=this.options.bounce,n=i.left,s=i.right,l=i.top,h=i.bottom;this.scrollBehaviorX=new _t(t,e,Yt(r,"scrollX",[n,s],{size:"width",position:"left"})),this.scrollBehaviorY=new _t(t,e,Yt(r,"scrollY",[l,h],{size:"height",position:"top"})),this.translater=new ie(this.content),this.animater=le(this.content,this.translater,this.options),this.actionsHandler=new re(this.options.bindToTarget?this.content:t,fe(this.options)),this.actions=new pe(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var a=this.resize.bind(this);this.resizeRegister=new R(window,[{name:"orientationchange",handler:a},{name:"resize",handler:a}]),this.registerTransitionEnd(),this.init()}return o.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,function(){t.togglePointerEvents(!0)})},o.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new R(this.content,[{name:B.transitionEnd,handler:this.transitionEnd.bind(this)}])},o.prototype.bindTranslater=function(){var t=this,e=this.translater.hooks;e.on(e.eventTypes.beforeTranslate,function(r){t.options.translateZ&&r.push(t.options.translateZ)}),e.on(e.eventTypes.translate,function(r){var i=t.getCurrentPos();if(t.updatePositions(r),t.actions.ensuringInteger===!0){t.actions.ensuringInteger=!1;return}(r.x!==i.x||r.y!==i.y)&&t.togglePointerEvents(!1)})},o.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,function(e){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,e))}),at(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},o.prototype.bindActions=function(){var t=this,e=this.actions;at(e.hooks,this.hooks,[{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:e.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:e.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:e.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:e.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),e.hooks.on(e.hooks.eventTypes.end,function(r,i){if(t.hooks.trigger(t.hooks.eventTypes.touchEnd,i),t.hooks.trigger(t.hooks.eventTypes.end,i)||!e.fingerMoved&&(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),t.checkClick(r)))return!0;if(t.resetPosition(t.options.bounceTime,_.bounce))return t.animater.setForceStopped(!1),!0}),e.hooks.on(e.hooks.eventTypes.scrollEnd,function(r,i){var n=Math.abs(r.x-t.scrollBehaviorX.startPos),s=Math.abs(r.y-t.scrollBehaviorY.startPos);if(t.checkFlick(i,n,s)){t.animater.setForceStopped(!1),t.hooks.trigger(t.hooks.eventTypes.flick);return}if(t.momentum(r,i)){t.animater.setForceStopped(!1);return}e.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,r),t.animater.forceStopped&&t.animater.setForceStopped(!1)})},o.prototype.checkFlick=function(t,e,r){var i=1;if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&e<this.options.flickLimitDistance&&r<this.options.flickLimitDistance&&(r>i||e>i))return!0},o.prototype.momentum=function(t,e){var r={time:0,easing:_.swiper,newX:t.x,newY:t.y},i=this.scrollBehaviorX.end(e),n=this.scrollBehaviorY.end(e);if(r.newX=ot(i.destination)?r.newX:i.destination,r.newY=ot(n.destination)?r.newY:n.destination,r.time=Math.max(i.duration,n.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,r,this),r.newX!==t.x||r.newY!==t.y)return(r.newX>this.scrollBehaviorX.minScrollPos||r.newX<this.scrollBehaviorX.maxScrollPos||r.newY>this.scrollBehaviorY.minScrollPos||r.newY<this.scrollBehaviorY.maxScrollPos)&&(r.easing=_.swipeBounce),this.scrollTo(r.newX,r.newY,r.time,r.easing),!0},o.prototype.checkClick=function(t){var e={preventClick:this.animater.forceStopped};if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!e.preventClick){var r=this.options.dblclick,i=!1;if(r&&this.lastClickTime){var n=r.delay,s=n===void 0?300:n;D()-this.lastClickTime<s&&(i=!0,Gt(t))}return this.options.tap&&qt(t,this.options.tap),this.options.click&&!H(t.target,this.options.preventDefaultException)&&Et(t),this.lastClickTime=i?null:D(),!0}return!1},o.prototype.resize=function(){var t=this;this.actions.enabled&&(Nt&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(function(){t.hooks.trigger(t.hooks.eventTypes.resize)},this.options.resizePolling))},o.prototype.transitionEnd=function(t){if(!(t.target!==this.content||!this.animater.pending)){var e=this.animater;e.transitionTime(),this.resetPosition(this.options.bounceTime,_.bounce)||(this.animater.setPending(!1),this.options.probeType!==3&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos()))}},o.prototype.togglePointerEvents=function(t){t===void 0&&(t=!0);for(var e=this.content.children.length?this.content.children:[this.content],r=t?"auto":"none",i=0;i<e.length;i++){var n=e[i];n.isBScrollContainer||(n.style.pointerEvents=r)}},o.prototype.refresh=function(t){var e=this.setContent(t);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(t),this.scrollBehaviorY.refresh(t),e&&(this.translater.setContent(t),this.animater.setContent(t),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(t)),this.actions.refresh(),this.wrapperOffset=bt(this.wrapper)},o.prototype.setContent=function(t){var e=t!==this.content;return e&&(this.content=t),e},o.prototype.scrollBy=function(t,e,r,i){r===void 0&&(r=0);var n=this.getCurrentPos(),s=n.x,l=n.y;i=i||_.bounce,t+=s,e+=l,this.scrollTo(t,e,r,i)},o.prototype.scrollTo=function(t,e,r,i,n){r===void 0&&(r=0),i===void 0&&(i=_.bounce),n===void 0&&(n={start:{},end:{}});var s=this.options.useTransition?i.style:i.fn,l=this.getCurrentPos(),h=z({x:l.x,y:l.y},n.start),a=z({x:t,y:e},n.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,a),!de(h,a)){var u=Math.abs(a.x-h.x),p=Math.abs(a.y-h.y);u<Mt&&p<Mt&&(r=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(h,a,r,s)}},o.prototype.scrollToElement=function(t,e,r,i,n){var s=kt(t),l=bt(s),h=function(u,p,v){return typeof u=="number"?u:u?Math.round(p/2-v/2):0};r=h(r,s.offsetWidth,this.wrapper.offsetWidth),i=h(i,s.offsetHeight,this.wrapper.offsetHeight);var a=function(u,p,v,k){return u-=p,u=k.adjustPosition(u-v),u};l.left=a(l.left,this.wrapperOffset.left,r,this.scrollBehaviorX),l.top=a(l.top,this.wrapperOffset.top,i,this.scrollBehaviorY),!this.hooks.trigger(this.hooks.eventTypes.scrollToElement,s,l)&&this.scrollTo(l.left,l.top,e,n)},o.prototype.resetPosition=function(t,e){t===void 0&&(t=0),e===void 0&&(e=_.bounce);var r=this.scrollBehaviorX.checkInBoundary(),i=r.position,n=r.inBoundary,s=this.scrollBehaviorY.checkInBoundary(),l=s.position,h=s.inBoundary;return n&&h?!1:(Ft&&this.reflow(),this.scrollTo(i,l,t,e),!0)},o.prototype.reflow=function(){this._reflow=this.content.offsetHeight},o.prototype.updatePositions=function(t){this.scrollBehaviorX.updatePosition(t.x),this.scrollBehaviorY.updatePosition(t.y)},o.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},o.prototype.enable=function(){this.actions.enabled=!0},o.prototype.disable=function(){A(this.animater.timer),this.actions.enabled=!1},o.prototype.destroy=function(){var t=this,e=["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"];e.forEach(function(r){return t[r].destroy()})},o}(),q=function(o){W(t,o);function t(e,r){var i=o.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,n=kt(e);return n?(i.plugins={},i.options=new oe().merge(r).process(),i.setContent(n).valid&&(i.hooks=new C(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),i.init(n)),i):(K("Can not resolve the wrapper DOM."),i)}return t.use=function(e){var r=e.pluginName,i=t.plugins.some(function(n){return e===n.ctor});return i?t:ot(r)?(K("Plugin Class must specify plugin's name in static property by 'pluginName' field."),t):(t.pluginsMap[r]=!0,t.plugins.push({name:r,applyOrder:e.applyOrder,ctor:e}),t)},t.prototype.setContent=function(e){var r=!1,i=!0,n=e.children[this.options.specifiedIndexAsContent];return n?(r=this.content!==n,r&&(this.content=n)):(K("The wrapper need at least one child element to be content element to scroll."),i=!1),{valid:i,contentChanged:r}},t.prototype.init=function(e){var r=this;this.wrapper=e,e.isBScrollContainer=!0,this.scroller=new ve(e,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,function(){r.refresh()}),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(zt),this.applyPlugins(),this.refreshWithoutReset(this.content);var i=this.options,n=i.startX,s=i.startY,l={x:n,y:s};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,l)||this.scroller.scrollTo(l.x,l.y)},t.prototype.applyPlugins=function(){var e=this,r=this.options;t.plugins.sort(function(i,n){var s,l=(s={},s.pre=-1,s.post=1,s),h=i.applyOrder?l[i.applyOrder]:0,a=n.applyOrder?l[n.applyOrder]:0;return h-a}).forEach(function(i){var n=i.ctor;r[i.name]&&typeof n=="function"&&(e.plugins[i.name]=new n(e))})},t.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,function(){var e=document.activeElement;e&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")&&e.blur()})},t.prototype.eventBubbling=function(){at(this.scroller.hooks,this,[this.eventTypes.beforeScrollStart,this.eventTypes.scrollStart,this.eventTypes.scroll,this.eventTypes.scrollEnd,this.eventTypes.scrollCancel,this.eventTypes.touchEnd,this.eventTypes.flick])},t.prototype.refreshWithoutReset=function(e){this.scroller.refresh(e),this.hooks.trigger(this.hooks.eventTypes.refresh,e),this.trigger(this.eventTypes.refresh,e)},t.prototype.proxy=function(e){var r=this;e.forEach(function(i){var n=i.key,s=i.sourceKey;te(r,s,n)})},t.prototype.refresh=function(){var e=this.setContent(this.wrapper),r=e.contentChanged,i=e.valid;if(i){var n=this.content;this.refreshWithoutReset(n),r&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,n),this.trigger(this.eventTypes.contentChanged,n)),this.scroller.resetPosition()}},t.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},t.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},t.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},t.prototype.eventRegister=function(e){this.registerType(e)},t.plugins=[],t.pluginsMap={},t}(C);function N(o,t){var e=new q(o,t);return e}N.use=q.use,N.plugins=q.plugins,N.pluginsMap=q.pluginsMap;var me=N;/*!
20
20
  * better-scroll / wheel
21
21
  * (c) 2016-2023 ustbhuangyi
22
22
  * Released under the MIT License.
23
- */var F=typeof window<"u",G=F&&navigator.userAgent.toLowerCase();G&&G.indexOf("android")>0,function(){if(typeof G=="string"){var o=/os (\d\d?_\d(_\d)?)/,t=o.exec(G);if(!t)return!1;var e=t[1].split("_").map(function(r){return parseInt(r,10)});return e[0]===13&&e[1]>=4}return!1}();var ge=!1;if(F){var ke="test-passive";try{var Ot={};Object.defineProperty(Ot,"passive",{get:function(){ge=!0}}),window.addEventListener(ke,function(){},Ot)}catch{}}var Te=function(o,t){for(var e in t)o[e]=t[e];return o},Lt=F&&document.createElement("div").style,L=function(){if(!F)return!1;for(var o=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,e=o;t<e.length;t++){var r=e[t];if(Lt[r.value]!==void 0)return r.key}return!1}();function P(o){return L===!1?o:L==="standard"?o==="transitionEnd"?"transitionend":o:L+o.charAt(0).toUpperCase()+o.substr(1)}L&&L!=="standard"&&""+L.toLowerCase();var be=P("transform"),Se=P("transition");F&&P("perspective")in Lt;var lt={transform:be,transition:Se,transitionTimingFunction:P("transitionTimingFunction"),transitionDuration:P("transitionDuration"),transitionDelay:P("transitionDelay"),transformOrigin:P("transformOrigin"),transitionEnd:P("transitionEnd"),transitionProperty:P("transitionProperty")};function Z(o,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(o.className)}function we(o){return Array.prototype.slice.call(o,0)}var Pe={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(o){return 1+--o*o*o*o*o}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(o){return o*(2-o)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(o){return 1- --o*o*o*o}}},Ee="plugins.wheel",xe=[{key:"wheelTo",name:"wheelTo"},{key:"getSelectedIndex",name:"getSelectedIndex"},{key:"restorePosition",name:"restorePosition"}],Ce=xe.map(function(o){return{key:o.key,sourceKey:Ee+"."+o.name}}),It="wheelIndexChanged",De={rate:4},Be=function(){function o(t){this.scroll=t,this.init()}return o.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.refreshBoundary(),this.setSelectedIndex(this.options.selectedIndex)},o.prototype.handleBScroll=function(){this.scroll.proxy(Ce),this.scroll.registerType([It])},o.prototype.handleOptions=function(){var t=this.scroll.options.wheel===!0?{}:this.scroll.options.wheel,e={wheelWrapperClass:"wheel-scroll",wheelItemClass:"wheel-item",rotate:25,adjustTime:400,selectedIndex:0,wheelDisabledItemClass:"wheel-disabled-item"};this.options=Te(e,t)},o.prototype.handleHooks=function(){var t=this,e=this.scroll,r=this.scroll.scroller,i=r.actionsHandler,n=r.scrollBehaviorX,s=r.scrollBehaviorY,l=r.animater,h=r.content;e.on(e.eventTypes.scrollEnd,function(a){var u=t.findNearestValidWheel(a.y).index;if(r.animater.forceStopped&&!t.isAdjustingPosition)return t.target=t.items[u],!0;t.setSelectedIndex(u),t.isAdjustingPosition&&(t.isAdjustingPosition=!1)}),this.scroll.hooks.on(this.scroll.hooks.eventTypes.refresh,function(a){a!==h&&(h=a,t.setSelectedIndex(t.options.selectedIndex,!0)),t.rotateX(t.scroll.y),t.wheelTo(t.selectedIndex,0)}),this.scroll.hooks.on(this.scroll.hooks.eventTypes.beforeInitialScrollTo,function(a){a.x=0,a.y=-(t.selectedIndex*t.itemHeight)}),r.hooks.on(r.hooks.eventTypes.checkClick,function(){var a=we(t.items).indexOf(t.target);return a===-1||t.wheelTo(a,t.options.adjustTime,Pe.swipe),!0}),r.hooks.on(r.hooks.eventTypes.scrollTo,function(a){a.y=t.findNearestValidWheel(a.y).y}),r.hooks.on(r.hooks.eventTypes.minDistanceScroll,function(){var a=r.animater;a.forceStopped===!0&&(a.forceStopped=!1)}),r.hooks.on(r.hooks.eventTypes.scrollToElement,function(a,u){if(Z(a,t.options.wheelItemClass))u.top=t.findNearestValidWheel(u.top).y;else return!0}),i.hooks.on(i.hooks.eventTypes.beforeStart,function(a){t.target=a.target}),n.hooks.on(n.hooks.eventTypes.computeBoundary,function(a){a.maxScrollPos=0,a.minScrollPos=0}),s.hooks.on(s.hooks.eventTypes.computeBoundary,function(a){t.items=t.scroll.scroller.content.children,t.checkWheelAllDisabled(),t.itemHeight=t.items.length>0?s.contentSize/t.items.length:0,a.maxScrollPos=-t.itemHeight*(t.items.length-1),a.minScrollPos=0}),s.hooks.on(s.hooks.eventTypes.momentum,function(a){a.rate=De.rate,a.destination=t.findNearestValidWheel(a.destination).y}),s.hooks.on(s.hooks.eventTypes.end,function(a){var u=t.findNearestValidWheel(s.currentPos);a.destination=u.y,a.duration=t.options.adjustTime}),l.hooks.on(l.hooks.eventTypes.time,function(a){t.transitionDuration(a)}),l.hooks.on(l.hooks.eventTypes.timeFunction,function(a){t.timeFunction(a)}),l.hooks.on(l.hooks.eventTypes.callStop,function(){var a=t.findNearestValidWheel(t.scroll.y).index;t.isAdjustingPosition=!0,t.wheelTo(a,0)}),l.translater.hooks.on(l.translater.hooks.eventTypes.translate,function(a){t.rotateX(a.y)})},o.prototype.refreshBoundary=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,r=t.scrollBehaviorY,i=t.content;e.refresh(i),r.refresh(i)},o.prototype.setSelectedIndex=function(t,e){e===void 0&&(e=!1);var r=this.selectedIndex;this.selectedIndex=t,r!==t&&!e&&this.scroll.trigger(It,t)},o.prototype.getSelectedIndex=function(){return this.selectedIndex},o.prototype.wheelTo=function(t,e,r){t===void 0&&(t=0),e===void 0&&(e=0);var i=-t*this.itemHeight;this.scroll.scrollTo(0,i,e,r)},o.prototype.restorePosition=function(){var t=this.scroll.pending;if(t){var e=this.getSelectedIndex();this.scroll.scroller.animater.clearTimer(),this.wheelTo(e,0)}},o.prototype.transitionDuration=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[lt.transitionDuration]=t+"ms"},o.prototype.timeFunction=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[lt.transitionTimingFunction]=t},o.prototype.rotateX=function(t){for(var e=this.options.rotate,r=e===void 0?25:e,i=0;i<this.items.length;i++){var n=r*(t/this.itemHeight+i),s=n.toFixed(3);this.items[i].style[lt.transform]="rotateX("+s+"deg)"}},o.prototype.findNearestValidWheel=function(t){t=t>0?0:t<this.scroll.maxScrollY?this.scroll.maxScrollY:t;for(var e=Math.abs(Math.round(-t/this.itemHeight)),r=e,i=this.items,n=this.options.wheelDisabledItemClass;e>=0&&Z(i[e],n);)e--;if(e<0)for(e=r;e<=i.length-1&&Z(i[e],n);)e++;return e===i.length&&(e=r),{index:this.wheelItemsAllDisabled?-1:e,y:-e*this.itemHeight}},o.prototype.checkWheelAllDisabled=function(){var t=this.options.wheelDisabledItemClass,e=this.items;this.wheelItemsAllDisabled=!0;for(var r=0;r<e.length;r++)if(!Z(e[r],t)){this.wheelItemsAllDisabled=!1;break}},o.pluginName="wheel",o}();ye.use(Be);const J=Array.isArray,_e=o=>typeof o=="object"&&o!==null;function ct(o){return J(o)&&o.length===3}function Ae(o){return o%4===0&&(o%100!==0||o%400===0)}function I(o,t){const e=[];for(let r=o;r<=t;r++)e.push(r);return e}function ht(o,t){const e=[];for(let r=o;r<=t;r++)e.push(`${r}`.padStart(2,"0"));return e}function Ye(){const o=ht(0,23),t=ht(0,59),e=ht(0,59),r=c.ref([]);i();function i(){const s=new Date,l=s.getHours(),h=s.getMinutes(),a=s.getSeconds();r.value=[l,h,a]}function n(s){return(ct(s)?s:r.value).map(h=>+h)}return{timeList:[o,t,e],updateDefaultTime:i,getTimeAnchors:n}}function Me(){const e=new Date,r=e.getFullYear(),i=e.getMonth()+1,n=e.getDate(),s=c.ref(r),l=c.ref(i),h=I(1900,2100),a=I(1,12),u=c.computed(()=>{const d=[4,6,9,11],g=[1,3,5,7,8,10,12];return d.includes(l.value)?I(1,30):g.includes(l.value)?I(1,31):Ae(s.value)?I(1,29):I(1,28)}),p=c.computed(()=>[h,a,u.value]);function v(d){return(ct(d)?d:[r,i,n]).map((y,Y)=>{const E=p.value[Y].indexOf(y);return E!==-1?E:0})}function k(d){const[g,y]=d;s.value=p.value[0][g],l.value=p.value[1][y]}return{selectYear:s,selectMonth:l,dateList:p,updateDateSelect:k,getDateAnchors:v}}function Xe(o,t){const e=c.ref([]),r=c.ref(),i=c.ref([]),n=c.computed(()=>o.type==="date"),s=c.computed(()=>o.type==="time"),{selectYear:l,selectMonth:h,dateList:a,updateDateSelect:u,getDateAnchors:p}=Me(),{timeList:v,updateDefaultTime:k,getTimeAnchors:d}=Ye(),g=c.computed(()=>n.value?p(o.anchor):s.value?d(o.anchor):J(o.anchor)?o.anchor:[o.anchor]);async function y(f=!1){f?Y():E(),await c.nextTick(),e.value.forEach((T,m)=>pt(m)),f||We(),Ke()}function Y(){const f={date:a==null?void 0:a.value,time:v},T=o.type,b=J(o.data[0])?[...o.data]:[o.data];e.value=f[T]??b}function E(){!n.value&&!s.value||(n.value&&u(g.value),s.value&&!ct(o.anchor)&&k())}function pt(f){var b;const T=(b=r.value)==null?void 0:b.children[f];if(!T)return;let m=i.value[f];if(m)m.refresh();else{const dt=N(T,{wheel:{selectedIndex:0,rotate:25},swipeTime:o.swipeTime??500});m=i.value[f]=dt,m.on("scrollEnd",()=>Q(f))}return m}function Q(f){if(!n.value||f===2)return;const T=i.value[f].getSelectedIndex(),m=a.value[f][T];f===0&&(l.value=m),f===1&&(h.value=m),y(!0)}function We(){i.value.forEach((f,T)=>{var b;const m=(b=g.value)==null?void 0:b[T];f.wheelTo(m??0)})}function Ke(){const f=e.value.length;if(i.value.length<=f)return;i.value.splice(f).forEach(m=>m.destroy())}function Re(){t("cancel"),ft()}function Ve(){i.value.some(b=>b.isInTransition)&&$e();const{item:T,anchor:m}=je();t("confirm",T),t("update:anchor",m),ft()}function ft(){t("update:isShowPicker",!1)}function $e(){i.value.forEach(f=>f.stop())}function je(){const{item:f,anchor:T}=i.value.reduce((m,b,dt)=>{const zt=b.getSelectedIndex(),vt=e.value[dt][zt];return m.item.push(s.value?+vt:vt),m.anchor.push(n.value?vt:zt),m},{item:[],anchor:[]});return f.length>1?{item:f,anchor:T}:{item:f[0],anchor:T[0]}}return c.watch(()=>o.data,()=>y(!0),{immediate:!0}),c.watch(()=>o.isShowPicker,f=>f&&y()),c.watch(()=>o.type,()=>{E(),y(!0)}),{pickerData:e,wheelWrapper:r,cancel:Re,confirm:Ve,closePicker:ft}}const Oe={cancelClass:"",confirmClass:"",titleClass:"",cancelColor:"#999",confirmColor:"#42b983",titleColor:"",cancelText:"Cancel",confirmText:"Confirm",titleText:""},Le={class:"picker"},Ie={class:"picker_title"},ze={class:"picker_panel"},He=c.createElementVNode("div",{class:"picker_mask_top"},null,-1),Ne=c.createElementVNode("div",{class:"picker_mask_bottom"},null,-1),Fe={class:"picker_wheel_scroll"},ut=c.defineComponent({__name:"Picker",props:{data:{default:()=>[]},isShowPicker:{type:Boolean},options:{default:()=>({})},anchor:{},showKey:{default:""},swipeTime:{default:500},type:{default:""}},emits:["update:isShowPicker","update:anchor","cancel","confirm"],setup(o,{emit:t}){const e=o,r=t,i=c.computed(()=>({...Oe,...e.options})),n=c.computed(()=>i.value.cancelColor),s=c.computed(()=>i.value.confirmColor),l=c.computed(()=>i.value.titleColor),h=c.computed(()=>J(e.showKey)?e.showKey:[e.showKey]),{pickerData:a,wheelWrapper:u,cancel:p,confirm:v,closePicker:k}=Xe(e,r);return(d,g)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.Transition,{name:"fade"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{class:"mask",onClick:g[0]||(g[0]=(...y)=>c.unref(k)&&c.unref(k)(...y))},null,512),[[c.vShow,d.isShowPicker]])]),_:1}),c.createVNode(c.Transition,{name:"slide"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",Le,[c.createElementVNode("div",Ie,[c.createElementVNode("button",{class:c.normalizeClass(["picker_cancel",i.value.cancelClass]),style:c.normalizeStyle({color:n.value}),onClick:g[1]||(g[1]=(...y)=>c.unref(p)&&c.unref(p)(...y))},c.toDisplayString(i.value.cancelText),7),c.createElementVNode("button",{class:c.normalizeClass(["picker_confirm",i.value.confirmClass]),style:c.normalizeStyle({color:s.value}),onClick:g[2]||(g[2]=(...y)=>c.unref(v)&&c.unref(v)(...y))},c.toDisplayString(i.value.confirmText),7),c.createElementVNode("h4",{class:c.normalizeClass([i.value.titleClass]),style:c.normalizeStyle({color:l.value})},c.toDisplayString(i.value.titleText),7)]),c.createElementVNode("div",ze,[He,Ne,c.createElementVNode("div",{ref_key:"wheelWrapper",ref:u,class:"picker_wheel_wrapper"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(a),(y,Y)=>(c.openBlock(),c.createElementBlock("div",{key:Y,class:"picker_wheel"},[c.createElementVNode("ul",Fe,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(y,(E,pt)=>{var Q;return c.openBlock(),c.createElementBlock("li",{key:pt,class:"picker_wheel_item"},c.toDisplayString((Q=h.value)!=null&&Q[Y]&&c.unref(_e)(E)?E[h.value[Y]]:E),1)}),128))])]))),128))],512)])],512),[[c.vShow,d.isShowPicker]])]),_:1})]))}});return ut.install=function(o){o.component("Picker",ut)},ut});
23
+ */var F=typeof window<"u",G=F&&navigator.userAgent.toLowerCase();G&&G.indexOf("android")>0,function(){if(typeof G=="string"){var o=/os (\d\d?_\d(_\d)?)/,t=o.exec(G);if(!t)return!1;var e=t[1].split("_").map(function(r){return parseInt(r,10)});return e[0]===13&&e[1]>=4}return!1}();var ye=!1;if(F){var ge="test-passive";try{var Xt={};Object.defineProperty(Xt,"passive",{get:function(){ye=!0}}),window.addEventListener(ge,function(){},Xt)}catch{}}var ke=function(o,t){for(var e in t)o[e]=t[e];return o},Ot=F&&document.createElement("div").style,L=function(){if(!F)return!1;for(var o=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,e=o;t<e.length;t++){var r=e[t];if(Ot[r.value]!==void 0)return r.key}return!1}();function P(o){return L===!1?o:L==="standard"?o==="transitionEnd"?"transitionend":o:L+o.charAt(0).toUpperCase()+o.substr(1)}L&&L!=="standard"&&""+L.toLowerCase();var Te=P("transform"),be=P("transition");F&&P("perspective")in Ot;var lt={transform:Te,transition:be,transitionTimingFunction:P("transitionTimingFunction"),transitionDuration:P("transitionDuration"),transitionDelay:P("transitionDelay"),transformOrigin:P("transformOrigin"),transitionEnd:P("transitionEnd"),transitionProperty:P("transitionProperty")};function Z(o,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(o.className)}function Se(o){return Array.prototype.slice.call(o,0)}var we={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(o){return 1+--o*o*o*o*o}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(o){return o*(2-o)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(o){return 1- --o*o*o*o}}},Pe="plugins.wheel",Ee=[{key:"wheelTo",name:"wheelTo"},{key:"getSelectedIndex",name:"getSelectedIndex"},{key:"restorePosition",name:"restorePosition"}],xe=Ee.map(function(o){return{key:o.key,sourceKey:Pe+"."+o.name}}),Lt="wheelIndexChanged",Ce={rate:4},De=function(){function o(t){this.scroll=t,this.init()}return o.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.refreshBoundary(),this.setSelectedIndex(this.options.selectedIndex)},o.prototype.handleBScroll=function(){this.scroll.proxy(xe),this.scroll.registerType([Lt])},o.prototype.handleOptions=function(){var t=this.scroll.options.wheel===!0?{}:this.scroll.options.wheel,e={wheelWrapperClass:"wheel-scroll",wheelItemClass:"wheel-item",rotate:25,adjustTime:400,selectedIndex:0,wheelDisabledItemClass:"wheel-disabled-item"};this.options=ke(e,t)},o.prototype.handleHooks=function(){var t=this,e=this.scroll,r=this.scroll.scroller,i=r.actionsHandler,n=r.scrollBehaviorX,s=r.scrollBehaviorY,l=r.animater,h=r.content;e.on(e.eventTypes.scrollEnd,function(a){var u=t.findNearestValidWheel(a.y).index;if(r.animater.forceStopped&&!t.isAdjustingPosition)return t.target=t.items[u],!0;t.setSelectedIndex(u),t.isAdjustingPosition&&(t.isAdjustingPosition=!1)}),this.scroll.hooks.on(this.scroll.hooks.eventTypes.refresh,function(a){a!==h&&(h=a,t.setSelectedIndex(t.options.selectedIndex,!0)),t.rotateX(t.scroll.y),t.wheelTo(t.selectedIndex,0)}),this.scroll.hooks.on(this.scroll.hooks.eventTypes.beforeInitialScrollTo,function(a){a.x=0,a.y=-(t.selectedIndex*t.itemHeight)}),r.hooks.on(r.hooks.eventTypes.checkClick,function(){var a=Se(t.items).indexOf(t.target);return a===-1||t.wheelTo(a,t.options.adjustTime,we.swipe),!0}),r.hooks.on(r.hooks.eventTypes.scrollTo,function(a){a.y=t.findNearestValidWheel(a.y).y}),r.hooks.on(r.hooks.eventTypes.minDistanceScroll,function(){var a=r.animater;a.forceStopped===!0&&(a.forceStopped=!1)}),r.hooks.on(r.hooks.eventTypes.scrollToElement,function(a,u){if(Z(a,t.options.wheelItemClass))u.top=t.findNearestValidWheel(u.top).y;else return!0}),i.hooks.on(i.hooks.eventTypes.beforeStart,function(a){t.target=a.target}),n.hooks.on(n.hooks.eventTypes.computeBoundary,function(a){a.maxScrollPos=0,a.minScrollPos=0}),s.hooks.on(s.hooks.eventTypes.computeBoundary,function(a){t.items=t.scroll.scroller.content.children,t.checkWheelAllDisabled(),t.itemHeight=t.items.length>0?s.contentSize/t.items.length:0,a.maxScrollPos=-t.itemHeight*(t.items.length-1),a.minScrollPos=0}),s.hooks.on(s.hooks.eventTypes.momentum,function(a){a.rate=Ce.rate,a.destination=t.findNearestValidWheel(a.destination).y}),s.hooks.on(s.hooks.eventTypes.end,function(a){var u=t.findNearestValidWheel(s.currentPos);a.destination=u.y,a.duration=t.options.adjustTime}),l.hooks.on(l.hooks.eventTypes.time,function(a){t.transitionDuration(a)}),l.hooks.on(l.hooks.eventTypes.timeFunction,function(a){t.timeFunction(a)}),l.hooks.on(l.hooks.eventTypes.callStop,function(){var a=t.findNearestValidWheel(t.scroll.y).index;t.isAdjustingPosition=!0,t.wheelTo(a,0)}),l.translater.hooks.on(l.translater.hooks.eventTypes.translate,function(a){t.rotateX(a.y)})},o.prototype.refreshBoundary=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,r=t.scrollBehaviorY,i=t.content;e.refresh(i),r.refresh(i)},o.prototype.setSelectedIndex=function(t,e){e===void 0&&(e=!1);var r=this.selectedIndex;this.selectedIndex=t,r!==t&&!e&&this.scroll.trigger(Lt,t)},o.prototype.getSelectedIndex=function(){return this.selectedIndex},o.prototype.wheelTo=function(t,e,r){t===void 0&&(t=0),e===void 0&&(e=0);var i=-t*this.itemHeight;this.scroll.scrollTo(0,i,e,r)},o.prototype.restorePosition=function(){var t=this.scroll.pending;if(t){var e=this.getSelectedIndex();this.scroll.scroller.animater.clearTimer(),this.wheelTo(e,0)}},o.prototype.transitionDuration=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[lt.transitionDuration]=t+"ms"},o.prototype.timeFunction=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[lt.transitionTimingFunction]=t},o.prototype.rotateX=function(t){for(var e=this.options.rotate,r=e===void 0?25:e,i=0;i<this.items.length;i++){var n=r*(t/this.itemHeight+i),s=n.toFixed(3);this.items[i].style[lt.transform]="rotateX("+s+"deg)"}},o.prototype.findNearestValidWheel=function(t){t=t>0?0:t<this.scroll.maxScrollY?this.scroll.maxScrollY:t;for(var e=Math.abs(Math.round(-t/this.itemHeight)),r=e,i=this.items,n=this.options.wheelDisabledItemClass;e>=0&&Z(i[e],n);)e--;if(e<0)for(e=r;e<=i.length-1&&Z(i[e],n);)e++;return e===i.length&&(e=r),{index:this.wheelItemsAllDisabled?-1:e,y:-e*this.itemHeight}},o.prototype.checkWheelAllDisabled=function(){var t=this.options.wheelDisabledItemClass,e=this.items;this.wheelItemsAllDisabled=!0;for(var r=0;r<e.length;r++)if(!Z(e[r],t)){this.wheelItemsAllDisabled=!1;break}},o.pluginName="wheel",o}();me.use(De);const J=Array.isArray,Be=o=>typeof o=="object"&&o!==null;function ct(o){return J(o)&&o.length===3}function _e(o){return o%4===0&&(o%100!==0||o%400===0)}function I(o,t){const e=[];for(let r=o;r<=t;r++)e.push(r);return e}function ht(o,t){const e=[];for(let r=o;r<=t;r++)e.push(`${r}`.padStart(2,"0"));return e}function Ae(){const o=ht(0,23),t=ht(0,59),e=ht(0,59),r=c.ref([]);i();function i(){const s=new Date,l=s.getHours(),h=s.getMinutes(),a=s.getSeconds();r.value=[l,h,a]}function n(s){return(ct(s)?s:r.value).map(h=>+h)}return{timeList:[o,t,e],updateDefaultTime:i,getTimeAnchors:n}}function Ye(){const e=new Date,r=e.getFullYear(),i=e.getMonth()+1,n=e.getDate(),s=c.ref(r),l=c.ref(i),h=I(1900,2100),a=I(1,12),u=c.computed(()=>{const d=[4,6,9,11],g=[1,3,5,7,8,10,12];return d.includes(l.value)?I(1,30):g.includes(l.value)?I(1,31):_e(s.value)?I(1,29):I(1,28)}),p=c.computed(()=>[h,a,u.value]);function v(d){return(ct(d)?d:[r,i,n]).map((y,Y)=>{const E=p.value[Y].indexOf(y);return E!==-1?E:0})}function k(d){const[g,y]=d;s.value=p.value[0][g],l.value=p.value[1][y]}return{selectYear:s,selectMonth:l,dateList:p,updateDateSelect:k,getDateAnchors:v}}function Me(o,t){const e=c.ref([]),r=c.ref(),i=c.ref([]),n=c.computed(()=>o.type==="date"),s=c.computed(()=>o.type==="time"),{selectYear:l,selectMonth:h,dateList:a,updateDateSelect:u,getDateAnchors:p}=Ye(),{timeList:v,updateDefaultTime:k,getTimeAnchors:d}=Ae(),g=c.computed(()=>n.value?p(o.anchor):s.value?d(o.anchor):J(o.anchor)?o.anchor:[o.anchor]);async function y(f=!1){f?Y():E(),await c.nextTick(),e.value.forEach((T,m)=>ut(m)),f||Fe(),We()}function Y(){const f={date:a==null?void 0:a.value,time:v},T=o.type,b=J(o.data[0])?[...o.data]:[o.data];e.value=f[T]??b}function E(){!n.value&&!s.value||(n.value&&u(g.value),s.value&&!ct(o.anchor)&&k())}function ut(f){var b;const T=(b=r.value)==null?void 0:b.children[f];if(!T)return;let m=i.value[f];if(m)m.refresh();else{const ft=N(T,{wheel:{selectedIndex:0,rotate:25},swipeTime:o.swipeTime??500});m=i.value[f]=ft,m.on("scrollEnd",()=>Q(f))}return m}function Q(f){if(!n.value||f===2)return;const T=i.value[f].getSelectedIndex(),m=a.value[f][T];f===0&&(l.value=m),f===1&&(h.value=m),y(!0)}function Fe(){i.value.forEach((f,T)=>{var b;const m=(b=g.value)==null?void 0:b[T];f.wheelTo(m??0)})}function We(){const f=e.value.length;if(i.value.length<=f)return;i.value.splice(f).forEach(m=>m.destroy())}function Ke(){t("cancel"),pt()}function Re(){i.value.some(b=>b.isInTransition)&&Ve();const{item:T,anchor:m}=$e();t("confirm",T),t("update:anchor",m),pt()}function pt(){t("update:isShowPicker",!1)}function Ve(){i.value.forEach(f=>f.stop())}function $e(){const{item:f,anchor:T}=i.value.reduce((m,b,ft)=>{const It=b.getSelectedIndex(),dt=e.value[ft][It];return m.item.push(s.value?+dt:dt),m.anchor.push(n.value?dt:It),m},{item:[],anchor:[]});return f.length>1?{item:f,anchor:T}:{item:f[0],anchor:T[0]}}return c.watch(()=>o.data,()=>y(!0),{immediate:!0}),c.watch(()=>o.isShowPicker,f=>f&&y()),c.watch(()=>o.type,()=>{E(),y(!0)}),{pickerData:e,wheelWrapper:r,cancel:Ke,confirm:Re,closePicker:pt}}const Xe={cancelClass:"",confirmClass:"",titleClass:"",cancelColor:"#999",confirmColor:"#42b983",titleColor:"",cancelText:"Cancel",confirmText:"Confirm",titleText:""},Oe={class:"picker"},Le={class:"picker_title"},Ie={class:"picker_panel"},ze=c.createElementVNode("div",{class:"picker_mask_top"},null,-1),He=c.createElementVNode("div",{class:"picker_mask_bottom"},null,-1),Ne={class:"picker_wheel_scroll"};return c.defineComponent({__name:"Picker",props:{data:{default:()=>[]},isShowPicker:{type:Boolean},options:{default:()=>({})},anchor:{},showKey:{default:""},swipeTime:{default:500},type:{default:""}},emits:["update:isShowPicker","update:anchor","cancel","confirm"],setup(o,{emit:t}){const e=o,r=t,i=c.computed(()=>({...Xe,...e.options})),n=c.computed(()=>i.value.cancelColor),s=c.computed(()=>i.value.confirmColor),l=c.computed(()=>i.value.titleColor),h=c.computed(()=>J(e.showKey)?e.showKey:[e.showKey]),{pickerData:a,wheelWrapper:u,cancel:p,confirm:v,closePicker:k}=Me(e,r);return(d,g)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.Transition,{name:"fade"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{class:"mask",onClick:g[0]||(g[0]=(...y)=>c.unref(k)&&c.unref(k)(...y))},null,512),[[c.vShow,d.isShowPicker]])]),_:1}),c.createVNode(c.Transition,{name:"slide"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",Oe,[c.createElementVNode("div",Le,[c.createElementVNode("button",{class:c.normalizeClass(["picker_cancel",i.value.cancelClass]),style:c.normalizeStyle({color:n.value}),onClick:g[1]||(g[1]=(...y)=>c.unref(p)&&c.unref(p)(...y))},c.toDisplayString(i.value.cancelText),7),c.createElementVNode("button",{class:c.normalizeClass(["picker_confirm",i.value.confirmClass]),style:c.normalizeStyle({color:s.value}),onClick:g[2]||(g[2]=(...y)=>c.unref(v)&&c.unref(v)(...y))},c.toDisplayString(i.value.confirmText),7),c.createElementVNode("h4",{class:c.normalizeClass([i.value.titleClass]),style:c.normalizeStyle({color:l.value})},c.toDisplayString(i.value.titleText),7)]),c.createElementVNode("div",Ie,[ze,He,c.createElementVNode("div",{ref_key:"wheelWrapper",ref:u,class:"picker_wheel_wrapper"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(a),(y,Y)=>(c.openBlock(),c.createElementBlock("div",{key:Y,class:"picker_wheel"},[c.createElementVNode("ul",Ne,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(y,(E,ut)=>{var Q;return c.openBlock(),c.createElementBlock("li",{key:ut,class:"picker_wheel_item"},c.toDisplayString((Q=h.value)!=null&&Q[Y]&&c.unref(Be)(E)?E[h.value[Y]]:E),1)}),128))])]))),128))],512)])],512),[[c.vShow,d.isShowPicker]])]),_:1})]))}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-hook/picker",
3
- "version": "0.2.1-alpha.0",
3
+ "version": "0.2.1",
4
4
  "description": "Picker component with vue3 and react",
5
5
  "license": "MIT",
6
6
  "type": "module",