@component-hook/picker 0.2.5 → 1.0.0-alpha.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.
- package/README.md +47 -163
- package/dist/react/index.css +1 -1
- package/dist/react/picker.es.d.ts +78 -40
- package/dist/react/picker.es.js +1601 -2949
- package/dist/react/picker.umd.js +15 -36
- package/dist/vue/index.css +1 -1
- package/dist/vue/picker.es.d.ts +188 -55
- package/dist/vue/picker.es.js +499 -1812
- package/dist/vue/picker.umd.js +2 -23
- package/package.json +7 -7
package/dist/react/picker.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(
|
|
1
|
+
(function(ve,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],w):(ve=typeof globalThis<"u"?globalThis:ve||self,w(ve.picker={},ve.React,ve.ReactDOM))})(this,function(ve,w,Oe){"use strict";var nr=document.createElement("style");nr.textContent=`:root{--chook-picker-background: #fff;--chook-picker-border-radius: .5rem;--chook-picker-padding-bottom: 1.25rem;--chook-picker-z-index: 2147483646;--chook-picker-mask-background: rgba(0, 0, 0, .2);--chook-picker-header-padding: .75rem 0;--chook-picker-header-margin-bottom: 1.25rem;--chook-picker-title-font-size: 1rem;--chook-picker-title-font-weight: 500;--chook-picker-title-color: #323233;--chook-picker-confirm-color: #1989fa;--chook-picker-confirm-font-size: .875rem;--chook-picker-confirm-padding: 0 1rem;--chook-picker-cancel-color: #969799;--chook-picker-cancel-font-size: .875rem;--chook-picker-cancel-padding: 0 1rem;--chook-picker-active-opacity: .6;--chook-picker-columns-margin: 0 1rem;--chook-picker-columns-backdrop: linear-gradient( to bottom, #f2f2f2 0px, #f2f2f2 .0625rem, transparent .0625rem, transparent calc(100% - .0625rem) , #f2f2f2 calc(100% - .0625rem) , #f2f2f2 100% );--chook-picker-mask-backdrop: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4));--chook-picker-column-label-color: #323233;--chook-picker-column-label-padding: 0 .25rem;--chook-picker-column-font-size: 1rem;--chook-picker-column-font-weight: 500}.chook-picker-mask{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--chook-picker-mask-background);z-index:calc(var(--chook-picker-z-index) - 1)}.chook-picker-container{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--chook-picker-z-index);-webkit-user-select:none;user-select:none;padding-bottom:var(--chook-picker-padding-bottom);background:var(--chook-picker-background);border-top-left-radius:var(--chook-picker-border-radius);border-top-right-radius:var(--chook-picker-border-radius)}.chook-picker-header{display:flex;align-items:center;justify-content:space-between;padding:var(--chook-picker-header-padding);margin-bottom:var(--chook-picker-header-margin-bottom)}.chook-picker-title{font-size:var(--chook-picker-title-font-size);font-weight:var(--chook-picker-title-font-weight);color:var(--chook-picker-title-color);margin:0}.chook-picker-columns{width:calc(100% - var(--chook-picker-columns-margin) * 2);height:13.5rem;overflow:hidden;position:relative;display:flex;margin:var(--chook-picker-columns-margin)}.chook-picker-columns-backdrop{background-image:var(--chook-picker-columns-backdrop);background-repeat:no-repeat;background-position:center;background-size:100% 3rem}.chook-picker-mask-backdrop{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;background-image:var(--chook-picker-mask-backdrop);background-repeat:no-repeat;background-position:top,bottom;background-size:100% 5.25rem}.chook-picker-loading{height:100%;width:100%;position:absolute;top:0;left:0}.chook-picker-column{flex:1 1 0%;overflow:hidden;padding:5.375rem 0;cursor:grab}.chook-picker-column ul{margin:0;padding:0;list-style:none}.chook-picker-column-item{height:3rem;display:flex;justify-content:center;align-items:center;cursor:grab}.chook-picker-column-label{color:var(--chook-picker-column-label-color);font-size:var(--chook-picker-column-font-size);font-weight:var(--chook-picker-column-font-weight);padding:var(--chook-picker-column-label-padding);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}button.chook-picker-confirm{color:var(--chook-picker-confirm-color);font-size:var(--chook-picker-confirm-font-size);background-color:transparent;padding:var(--chook-picker-confirm-padding);border:none}button.chook-picker-confirm:active{opacity:var(--chook-picker-active-opacity)}button.chook-picker-confirm:hover{color:var(--chook-picker-confirm-color);background-color:transparent}button.chook-picker-cancel{color:var(--chook-picker-cancel-color);font-size:var(--chook-picker-cancel-font-size);background-color:transparent;padding:var(--chook-picker-cancel-padding);border:none}button.chook-picker-cancel:active{opacity:var(--chook-picker-active-opacity)}button.chook-picker-cancel:hover{color:var(--chook-picker-cancel-color);background-color:transparent}.chook-picker-fade-enter{opacity:0}.chook-picker-fade-enter-active{opacity:1;transition:all .3s ease}.chook-picker-fade-exit-active{opacity:0;transition:all .3s ease}.chook-picker-slide-enter{opacity:.5;transform:translate3d(0,100%,0)}.chook-picker-slide-enter-active{transition:all .3s ease;opacity:1;transform:translateZ(0)}.chook-picker-slide-exit-active{transition:all .3s ease;opacity:.5;transform:translate3d(0,100%,0)}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(nr);function qr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var De={exports:{}},Ce={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.min.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var
|
|
10
|
+
*/var or;function Xr(){if(or)return Ce;or=1;var r=w,o=Symbol.for("react.element"),l=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function s(a,u,f){var v,g={},E=null,O=null;f!==void 0&&(E=""+f),u.key!==void 0&&(E=""+u.key),u.ref!==void 0&&(O=u.ref);for(v in u)t.call(u,v)&&!n.hasOwnProperty(v)&&(g[v]=u[v]);if(a&&a.defaultProps)for(v in u=a.defaultProps,u)g[v]===void 0&&(g[v]=u[v]);return{$$typeof:o,type:a,key:E,ref:O,props:g,_owner:i.current}}return Ce.Fragment=l,Ce.jsx=s,Ce.jsxs=s,Ce}var Re={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.development.js
|
|
13
13
|
*
|
|
@@ -15,57 +15,36 @@
|
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
19
|
-
`+
|
|
20
|
-
`),
|
|
21
|
-
`),
|
|
22
|
-
`+
|
|
18
|
+
*/var ir;function Br(){return ir||(ir=1,process.env.NODE_ENV!=="production"&&function(){var r=w,o=Symbol.for("react.element"),l=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),U=Symbol.iterator,T="@@iterator";function I(e){if(e===null||typeof e!="object")return null;var d=U&&e[U]||e[T];return typeof d=="function"?d:null}var F=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function H(e){{for(var d=arguments.length,y=new Array(d>1?d-1:0),S=1;S<d;S++)y[S-1]=arguments[S];L("error",e,y)}}function L(e,d,y){{var S=F.ReactDebugCurrentFrame,G=S.getStackAddendum();G!==""&&(d+="%s",y=y.concat([G]));var Z=y.map(function(V){return String(V)});Z.unshift("Warning: "+d),Function.prototype.apply.call(console[e],console,Z)}}var C=!1,p=!1,ne=!1,le=!1,ue=!1,ee;ee=Symbol.for("react.module.reference");function W(e){return!!(typeof e=="string"||typeof e=="function"||e===t||e===n||ue||e===i||e===f||e===v||le||e===O||C||p||ne||typeof e=="object"&&e!==null&&(e.$$typeof===E||e.$$typeof===g||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===ee||e.getModuleId!==void 0))}function $(e,d,y){var S=e.displayName;if(S)return S;var G=d.displayName||d.name||"";return G!==""?y+"("+G+")":y}function Q(e){return e.displayName||"Context"}function re(e){if(e==null)return null;if(typeof e.tag=="number"&&H("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case t:return"Fragment";case l:return"Portal";case n:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case a:var d=e;return Q(d)+".Consumer";case s:var y=e;return Q(y._context)+".Provider";case u:return $(e,e.render,"ForwardRef");case g:var S=e.displayName||null;return S!==null?S:re(e.type)||"Memo";case E:{var G=e,Z=G._payload,V=G._init;try{return re(V(Z))}catch{return null}}}return null}var j=Object.assign,J=0,M,te,q,K,c,h,b;function k(){}k.__reactDisabledLog=!0;function x(){{if(J===0){M=console.log,te=console.info,q=console.warn,K=console.error,c=console.group,h=console.groupCollapsed,b=console.groupEnd;var e={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function A(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:M}),info:j({},e,{value:te}),warn:j({},e,{value:q}),error:j({},e,{value:K}),group:j({},e,{value:c}),groupCollapsed:j({},e,{value:h}),groupEnd:j({},e,{value:b})})}J<0&&H("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var R=F.ReactCurrentDispatcher,P;function D(e,d,y){{if(P===void 0)try{throw Error()}catch(G){var S=G.stack.trim().match(/\n( *(at )?)/);P=S&&S[1]||""}return`
|
|
19
|
+
`+P+e}}var z=!1,N;{var se=typeof WeakMap=="function"?WeakMap:Map;N=new se}function m(e,d){if(!e||z)return"";{var y=N.get(e);if(y!==void 0)return y}var S;z=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Z;Z=R.current,R.current=null,x();try{if(d){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(fe){S=fe}Reflect.construct(e,[],V)}else{try{V.call()}catch(fe){S=fe}e.call(V.prototype)}}else{try{throw Error()}catch(fe){S=fe}e()}}catch(fe){if(fe&&S&&typeof fe.stack=="string"){for(var Y=fe.stack.split(`
|
|
20
|
+
`),ce=S.stack.split(`
|
|
21
|
+
`),ie=Y.length-1,ae=ce.length-1;ie>=1&&ae>=0&&Y[ie]!==ce[ae];)ae--;for(;ie>=1&&ae>=0;ie--,ae--)if(Y[ie]!==ce[ae]){if(ie!==1||ae!==1)do if(ie--,ae--,ae<0||Y[ie]!==ce[ae]){var pe=`
|
|
22
|
+
`+Y[ie].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),typeof e=="function"&&N.set(e,pe),pe}while(ie>=1&&ae>=0);break}}}finally{z=!1,R.current=Z,A(),Error.prepareStackTrace=G}var _e=e?e.displayName||e.name:"",Ee=_e?D(_e):"";return typeof e=="function"&&N.set(e,Ee),Ee}function de(e,d,y){return m(e,!1)}function xe(e){var d=e.prototype;return!!(d&&d.isReactComponent)}function ye(e,d,y){if(e==null)return"";if(typeof e=="function")return m(e,xe(e));if(typeof e=="string")return D(e);switch(e){case f:return D("Suspense");case v:return D("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case u:return de(e.render);case g:return ye(e.type,d,y);case E:{var S=e,G=S._payload,Z=S._init;try{return ye(Z(G),d,y)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,Ar={},jr=F.ReactDebugCurrentFrame;function Ie(e){if(e){var d=e._owner,y=ye(e.type,e._source,d?d.type:null);jr.setExtraStackFrame(y)}else jr.setExtraStackFrame(null)}function jt(e,d,y,S,G){{var Z=Function.call.bind(we);for(var V in e)if(Z(e,V)){var Y=void 0;try{if(typeof e[V]!="function"){var ce=Error((S||"React class")+": "+y+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ce.name="Invariant Violation",ce}Y=e[V](d,V,S,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ie){Y=ie}Y&&!(Y instanceof Error)&&(Ie(G),H("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",y,V,typeof Y),Ie(null)),Y instanceof Error&&!(Y.message in Ar)&&(Ar[Y.message]=!0,Ie(G),H("Failed %s type: %s",y,Y.message),Ie(null))}}}var Mt=Array.isArray;function Ze(e){return Mt(e)}function It(e){{var d=typeof Symbol=="function"&&Symbol.toStringTag,y=d&&e[Symbol.toStringTag]||e.constructor.name||"Object";return y}}function Dt(e){try{return Mr(e),!1}catch{return!0}}function Mr(e){return""+e}function Ir(e){if(Dt(e))return H("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",It(e)),Mr(e)}var Dr=F.ReactCurrentOwner,Nt={key:!0,ref:!0,__self:!0,__source:!0},Nr,Yr;function Yt(e){if(we.call(e,"ref")){var d=Object.getOwnPropertyDescriptor(e,"ref").get;if(d&&d.isReactWarning)return!1}return e.ref!==void 0}function $t(e){if(we.call(e,"key")){var d=Object.getOwnPropertyDescriptor(e,"key").get;if(d&&d.isReactWarning)return!1}return e.key!==void 0}function Ft(e,d){typeof e.ref=="string"&&Dr.current}function Lt(e,d){{var y=function(){Nr||(Nr=!0,H("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};y.isReactWarning=!0,Object.defineProperty(e,"key",{get:y,configurable:!0})}}function Vt(e,d){{var y=function(){Yr||(Yr=!0,H("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};y.isReactWarning=!0,Object.defineProperty(e,"ref",{get:y,configurable:!0})}}var Ut=function(e,d,y,S,G,Z,V){var Y={$$typeof:o,type:e,key:d,ref:y,props:V,_owner:Z};return Y._store={},Object.defineProperty(Y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(Y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(Y.props),Object.freeze(Y)),Y};function Wt(e,d,y,S,G){{var Z,V={},Y=null,ce=null;y!==void 0&&(Ir(y),Y=""+y),$t(d)&&(Ir(d.key),Y=""+d.key),Yt(d)&&(ce=d.ref,Ft(d,G));for(Z in d)we.call(d,Z)&&!Nt.hasOwnProperty(Z)&&(V[Z]=d[Z]);if(e&&e.defaultProps){var ie=e.defaultProps;for(Z in ie)V[Z]===void 0&&(V[Z]=ie[Z])}if(Y||ce){var ae=typeof e=="function"?e.displayName||e.name||"Unknown":e;Y&&Lt(V,ae),ce&&Vt(V,ae)}return Ut(e,Y,ce,G,S,Dr.current,V)}}var Qe=F.ReactCurrentOwner,$r=F.ReactDebugCurrentFrame;function Se(e){if(e){var d=e._owner,y=ye(e.type,e._source,d?d.type:null);$r.setExtraStackFrame(y)}else $r.setExtraStackFrame(null)}var er;er=!1;function rr(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Fr(){{if(Qe.current){var e=re(Qe.current.type);if(e)return`
|
|
23
23
|
|
|
24
|
-
Check the render method of \``+
|
|
24
|
+
Check the render method of \``+e+"`."}return""}}function zt(e){return""}var Lr={};function qt(e){{var d=Fr();if(!d){var y=typeof e=="string"?e:e.displayName||e.name;y&&(d=`
|
|
25
25
|
|
|
26
|
-
Check the top-level render call using <`+y+">.")}return
|
|
26
|
+
Check the top-level render call using <`+y+">.")}return d}}function Vr(e,d){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var y=qt(d);if(Lr[y])return;Lr[y]=!0;var S="";e&&e._owner&&e._owner!==Qe.current&&(S=" It was passed a child from "+re(e._owner.type)+"."),Se(e),H('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,S),Se(null)}}function Ur(e,d){{if(typeof e!="object")return;if(Ze(e))for(var y=0;y<e.length;y++){var S=e[y];rr(S)&&Vr(S,d)}else if(rr(e))e._store&&(e._store.validated=!0);else if(e){var G=I(e);if(typeof G=="function"&&G!==e.entries)for(var Z=G.call(e),V;!(V=Z.next()).done;)rr(V.value)&&Vr(V.value,d)}}}function Xt(e){{var d=e.type;if(d==null||typeof d=="string")return;var y;if(typeof d=="function")y=d.propTypes;else if(typeof d=="object"&&(d.$$typeof===u||d.$$typeof===g))y=d.propTypes;else return;if(y){var S=re(d);jt(y,e.props,"prop",S,e)}else if(d.PropTypes!==void 0&&!er){er=!0;var G=re(d);H("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof d.getDefaultProps=="function"&&!d.getDefaultProps.isReactClassApproved&&H("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Bt(e){{for(var d=Object.keys(e.props),y=0;y<d.length;y++){var S=d[y];if(S!=="children"&&S!=="key"){Se(e),H("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),Se(null);break}}e.ref!==null&&(Se(e),H("Invalid attribute `ref` supplied to `React.Fragment`."),Se(null))}}var Wr={};function zr(e,d,y,S,G,Z){{var V=W(e);if(!V){var Y="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(Y+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ce=zt();ce?Y+=ce:Y+=Fr();var ie;e===null?ie="null":Ze(e)?ie="array":e!==void 0&&e.$$typeof===o?(ie="<"+(re(e.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof e,H("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,Y)}var ae=Wt(e,d,y,G,Z);if(ae==null)return ae;if(V){var pe=d.children;if(pe!==void 0)if(S)if(Ze(pe)){for(var _e=0;_e<pe.length;_e++)Ur(pe[_e],e);Object.freeze&&Object.freeze(pe)}else H("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ur(pe,e)}if(we.call(d,"key")){var Ee=re(e),fe=Object.keys(d).filter(function(Qt){return Qt!=="key"}),tr=fe.length>0?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}";if(!Wr[Ee+tr]){var Zt=fe.length>0?"{"+fe.join(": ..., ")+": ...}":"{}";H(`A props object containing a "key" prop is being spread into JSX:
|
|
27
27
|
let props = %s;
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,
|
|
31
|
+
<%s key={someKey} {...props} />`,tr,Ee,Zt,Ee),Wr[Ee+tr]=!0}}return e===t?Bt(ae):Xt(ae),ae}}function Ht(e,d,y){return zr(e,d,y,!0)}function Gt(e,d,y){return zr(e,d,y,!1)}var Jt=Gt,Kt=Ht;Re.Fragment=t,Re.jsx=Jt,Re.jsxs=Kt}()),Re}process.env.NODE_ENV==="production"?De.exports=Xr():De.exports=Br();var oe=De.exports;const Hr=Array.isArray;function Gr(r,o){if(sr(r))return"multiple";const[l]=r;return l[o.children]?"cascade":"single"}function Jr(r){return{children:(r==null?void 0:r.children)||"children",label:(r==null?void 0:r.label)||"label",value:(r==null?void 0:r.value)||"value"}}function Kr(r,o,l){var s;if(sr(r))return[];const t=[];let i=r,n=0;for(;i;){const a=o[n];let u=ar(i,a,l);u===-1&&(u=0),t.push(i),n+=1,i=(s=i[u])==null?void 0:s[l.children]}return t}function Zr(r,o,l,t){const i=[...l];let n=r,s=o+1;for(;n!=null&&n[t.children];){const a=n[t.children][0];i[s]=a.value,n=a,s+=1}return i}function ar(r,o,l){return r.findIndex(t=>t[l.value]===o)}function sr(r){const[o]=r;return Hr(o)}function Qr(r,o){return r>o?"horizontal":o>r?"vertical":""}function be(r,o,l){const t=[];for(let i=r;i<=o;i++){const n=l(`${i}`);t.push({label:n,value:i})}return t}function cr(r,o){return r===o.getFullYear()}function ur(r,o){return r===o.getFullYear()}function et(r,o){return r===o.getMonth()+1}function rt(r,o){return r===o.getMonth()+1}function tt(r,o){return new Date(r,o,0).getDate()}function Ne(r){return r}function nt(r){return/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(r)}function fr(r){if(!nt(r))return null;const[o,l,t]=r.split(":");return{hour:Number(o),minute:Number(l),second:Number(t)}}function Ye(r){return r.padStart(2,"0")}function Ae(){return Ae=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var t in l)({}).hasOwnProperty.call(l,t)&&(r[t]=l[t])}return r},Ae.apply(null,arguments)}function lr(r,o){if(r==null)return{};var l={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(o.includes(t))continue;l[t]=r[t]}return l}function $e(r,o){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l},$e(r,o)}function dr(r,o){r.prototype=Object.create(o.prototype),r.prototype.constructor=r,$e(r,o)}var Fe={exports:{}},je={exports:{}},X={};/** @license React v16.13.1
|
|
32
32
|
* react-is.production.min.js
|
|
33
33
|
*
|
|
34
34
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var
|
|
38
|
+
*/var pr;function ot(){if(pr)return X;pr=1;var r=typeof Symbol=="function"&&Symbol.for,o=r?Symbol.for("react.element"):60103,l=r?Symbol.for("react.portal"):60106,t=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,n=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,a=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,v=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,E=r?Symbol.for("react.suspense_list"):60120,O=r?Symbol.for("react.memo"):60115,U=r?Symbol.for("react.lazy"):60116,T=r?Symbol.for("react.block"):60121,I=r?Symbol.for("react.fundamental"):60117,F=r?Symbol.for("react.responder"):60118,H=r?Symbol.for("react.scope"):60119;function L(p){if(typeof p=="object"&&p!==null){var ne=p.$$typeof;switch(ne){case o:switch(p=p.type,p){case u:case f:case t:case n:case i:case g:return p;default:switch(p=p&&p.$$typeof,p){case a:case v:case U:case O:case s:return p;default:return ne}}case l:return ne}}}function C(p){return L(p)===f}return X.AsyncMode=u,X.ConcurrentMode=f,X.ContextConsumer=a,X.ContextProvider=s,X.Element=o,X.ForwardRef=v,X.Fragment=t,X.Lazy=U,X.Memo=O,X.Portal=l,X.Profiler=n,X.StrictMode=i,X.Suspense=g,X.isAsyncMode=function(p){return C(p)||L(p)===u},X.isConcurrentMode=C,X.isContextConsumer=function(p){return L(p)===a},X.isContextProvider=function(p){return L(p)===s},X.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===o},X.isForwardRef=function(p){return L(p)===v},X.isFragment=function(p){return L(p)===t},X.isLazy=function(p){return L(p)===U},X.isMemo=function(p){return L(p)===O},X.isPortal=function(p){return L(p)===l},X.isProfiler=function(p){return L(p)===n},X.isStrictMode=function(p){return L(p)===i},X.isSuspense=function(p){return L(p)===g},X.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===t||p===f||p===n||p===i||p===g||p===E||typeof p=="object"&&p!==null&&(p.$$typeof===U||p.$$typeof===O||p.$$typeof===s||p.$$typeof===a||p.$$typeof===v||p.$$typeof===I||p.$$typeof===F||p.$$typeof===H||p.$$typeof===T)},X.typeOf=L,X}var B={};/** @license React v16.13.1
|
|
39
39
|
* react-is.development.js
|
|
40
40
|
*
|
|
41
41
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/var
|
|
45
|
+
*/var vr;function it(){return vr||(vr=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,o=r?Symbol.for("react.element"):60103,l=r?Symbol.for("react.portal"):60106,t=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,n=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,a=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,v=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,E=r?Symbol.for("react.suspense_list"):60120,O=r?Symbol.for("react.memo"):60115,U=r?Symbol.for("react.lazy"):60116,T=r?Symbol.for("react.block"):60121,I=r?Symbol.for("react.fundamental"):60117,F=r?Symbol.for("react.responder"):60118,H=r?Symbol.for("react.scope"):60119;function L(m){return typeof m=="string"||typeof m=="function"||m===t||m===f||m===n||m===i||m===g||m===E||typeof m=="object"&&m!==null&&(m.$$typeof===U||m.$$typeof===O||m.$$typeof===s||m.$$typeof===a||m.$$typeof===v||m.$$typeof===I||m.$$typeof===F||m.$$typeof===H||m.$$typeof===T)}function C(m){if(typeof m=="object"&&m!==null){var de=m.$$typeof;switch(de){case o:var xe=m.type;switch(xe){case u:case f:case t:case n:case i:case g:return xe;default:var ye=xe&&xe.$$typeof;switch(ye){case a:case v:case U:case O:case s:return ye;default:return de}}case l:return de}}}var p=u,ne=f,le=a,ue=s,ee=o,W=v,$=t,Q=U,re=O,j=l,J=n,M=i,te=g,q=!1;function K(m){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),c(m)||C(m)===u}function c(m){return C(m)===f}function h(m){return C(m)===a}function b(m){return C(m)===s}function k(m){return typeof m=="object"&&m!==null&&m.$$typeof===o}function x(m){return C(m)===v}function A(m){return C(m)===t}function R(m){return C(m)===U}function P(m){return C(m)===O}function D(m){return C(m)===l}function z(m){return C(m)===n}function N(m){return C(m)===i}function se(m){return C(m)===g}B.AsyncMode=p,B.ConcurrentMode=ne,B.ContextConsumer=le,B.ContextProvider=ue,B.Element=ee,B.ForwardRef=W,B.Fragment=$,B.Lazy=Q,B.Memo=re,B.Portal=j,B.Profiler=J,B.StrictMode=M,B.Suspense=te,B.isAsyncMode=K,B.isConcurrentMode=c,B.isContextConsumer=h,B.isContextProvider=b,B.isElement=k,B.isForwardRef=x,B.isFragment=A,B.isLazy=R,B.isMemo=P,B.isPortal=D,B.isProfiler=z,B.isStrictMode=N,B.isSuspense=se,B.isValidElementType=L,B.typeOf=C}()),B}var hr;function mr(){return hr||(hr=1,process.env.NODE_ENV==="production"?je.exports=ot():je.exports=it()),je.exports}/*
|
|
46
46
|
object-assign
|
|
47
47
|
(c) Sindre Sorhus
|
|
48
48
|
@license MIT
|
|
49
|
-
*/var
|
|
50
|
-
Valid keys: `+JSON.stringify(Object.keys(d),null," "));var m=J(w,A,E,x,S+"."+A,t);if(m)return m}return null}return B(g)}function G(d){switch(typeof d){case"number":case"string":case"undefined":return!0;case"boolean":return!d;case"object":if(Array.isArray(d))return d.every(G);if(d===null||c(d))return!0;var g=p(d);if(g){var T=g.call(d),k;if(g!==d.entries){for(;!(k=T.next()).done;)if(!G(k.value))return!1}else for(;!(k=T.next()).done;){var E=k.value;if(E&&!G(E[1]))return!1}}else return!1;return!0;default:return!1}}function ae(d,g){return d==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function Q(d){var g=typeof d;return Array.isArray(d)?"array":d instanceof RegExp?"object":ae(g,d)?"symbol":g}function ce(d){if(typeof d>"u"||d===null)return""+d;var g=Q(d);if(g==="object"){if(d instanceof Date)return"date";if(d instanceof RegExp)return"regexp"}return g}function ye(d){var g=ce(d);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function de(d){return!d.constructor||!d.constructor.name?b:d.constructor.name}return _.checkPropTypes=o,_.resetWarningCache=o.resetWarningCache,_.PropTypes=_,_},vt}var mt,Gt;function Ur(){if(Gt)return mt;Gt=1;var r=ht();function e(){}function t(){}return t.resetWarningCache=e,mt=function(){function n(a,c,u,l,f,p){if(p!==r){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},mt}if(process.env.NODE_ENV!=="production"){var qr=Wt(),Vr=!0;lt.exports=Hr()(qr.isElement,Vr)}else lt.exports=Ur()();var Kr=lt.exports;const C=Nr(Kr);function Gr(r,e){return r.classList?!!e&&r.classList.contains(e):(" "+(r.className.baseVal||r.className)+" ").indexOf(" "+e+" ")!==-1}function Jr(r,e){r.classList?r.classList.add(e):Gr(r,e)||(typeof r.className=="string"?r.className=r.className+" "+e:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+e))}function Jt(r,e){return r.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Zr(r,e){r.classList?r.classList.remove(e):typeof r.className=="string"?r.className=Jt(r.className,e):r.setAttribute("class",Jt(r.className&&r.className.baseVal||"",e))}const Zt={disabled:!1};var Qr=process.env.NODE_ENV!=="production"?C.oneOfType([C.number,C.shape({enter:C.number,exit:C.number,appear:C.number}).isRequired]):null,en=process.env.NODE_ENV!=="production"?C.oneOfType([C.string,C.shape({enter:C.string,exit:C.string,active:C.string}),C.shape({enter:C.string,enterDone:C.string,enterActive:C.string,exit:C.string,exitDone:C.string,exitActive:C.string})]):null;const Qt=N.createContext(null);var er=function(e){return e.scrollTop},$e="unmounted",Ee="exited",ke="entering",Oe="entered",yt="exiting",fe=function(r){Lt(e,r);function e(n,o){var i;i=r.call(this,n,o)||this;var a=o,c=a&&!a.isMounting?n.enter:n.appear,u;return i.appearStatus=null,n.in?c?(u=Ee,i.appearStatus=ke):u=Oe:n.unmountOnExit||n.mountOnEnter?u=$e:u=Ee,i.state={status:u},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===$e?{status:Ee}:null};var t=e.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==ke&&a!==Oe&&(i=ke):(a===ke||a===Oe)&&(i=yt)}this.updateStatus(!1,i)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var o=this.props.timeout,i,a,c;return i=a=c=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,c=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:c}},t.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===ke){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ge.findDOMNode(this);a&&er(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ee&&this.setState({status:$e})},t.performEnter=function(o){var i=this,a=this.props.enter,c=this.context?this.context.isMounting:o,u=this.props.nodeRef?[c]:[ge.findDOMNode(this),c],l=u[0],f=u[1],p=this.getTimeouts(),b=c?p.appear:p.enter;if(!o&&!a||Zt.disabled){this.safeSetState({status:Oe},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:ke},function(){i.props.onEntering(l,f),i.onTransitionEnd(b,function(){i.safeSetState({status:Oe},function(){i.props.onEntered(l,f)})})})},t.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),c=this.props.nodeRef?void 0:ge.findDOMNode(this);if(!i||Zt.disabled){this.safeSetState({status:Ee},function(){o.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:yt},function(){o.props.onExiting(c),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Ee},function(){o.props.onExited(c)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},t.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(c){a&&(a=!1,i.nextCallback=null,o(c))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},t.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:ge.findDOMNode(this),c=o==null&&!this.props.addEndListener;if(!a||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=u[0],f=u[1];this.props.addEndListener(l,f)}o!=null&&setTimeout(this.nextCallback,o)},t.render=function(){var o=this.state.status;if(o===$e)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var c=Nt(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return N.createElement(Qt.Provider,{value:null},typeof a=="function"?a(o,c):N.cloneElement(N.Children.only(a),c))},e}(N.Component);fe.contextType=Qt,fe.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:C.shape({current:typeof Element>"u"?C.any:function(r,e,t,n,o,i){var a=r[e];return C.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(r,e,t,n,o,i)}}),children:C.oneOfType([C.func.isRequired,C.element.isRequired]).isRequired,in:C.bool,mountOnEnter:C.bool,unmountOnExit:C.bool,appear:C.bool,enter:C.bool,exit:C.bool,timeout:function(e){var t=Qr;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.apply(void 0,[e].concat(o))},addEndListener:C.func,onEnter:C.func,onEntering:C.func,onEntered:C.func,onExit:C.func,onExiting:C.func,onExited:C.func}:{};function Re(){}fe.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Re,onEntering:Re,onEntered:Re,onExit:Re,onExiting:Re,onExited:Re},fe.UNMOUNTED=$e,fe.EXITED=Ee,fe.ENTERING=ke,fe.ENTERED=Oe,fe.EXITING=yt;var tn=function(e,t){return e&&t&&t.split(" ").forEach(function(n){return Jr(e,n)})},gt=function(e,t){return e&&t&&t.split(" ").forEach(function(n){return Zr(e,n)})},Ve=function(r){Lt(e,r);function e(){for(var n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r.call.apply(r,[this].concat(i))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(c,u){var l=n.resolveArguments(c,u),f=l[0],p=l[1];n.removeClasses(f,"exit"),n.addClass(f,p?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(c,u)},n.onEntering=function(c,u){var l=n.resolveArguments(c,u),f=l[0],p=l[1],b=p?"appear":"enter";n.addClass(f,b,"active"),n.props.onEntering&&n.props.onEntering(c,u)},n.onEntered=function(c,u){var l=n.resolveArguments(c,u),f=l[0],p=l[1],b=p?"appear":"enter";n.removeClasses(f,b),n.addClass(f,b,"done"),n.props.onEntered&&n.props.onEntered(c,u)},n.onExit=function(c){var u=n.resolveArguments(c),l=u[0];n.removeClasses(l,"appear"),n.removeClasses(l,"enter"),n.addClass(l,"exit","base"),n.props.onExit&&n.props.onExit(c)},n.onExiting=function(c){var u=n.resolveArguments(c),l=u[0];n.addClass(l,"exit","active"),n.props.onExiting&&n.props.onExiting(c)},n.onExited=function(c){var u=n.resolveArguments(c),l=u[0];n.removeClasses(l,"exit"),n.addClass(l,"exit","done"),n.props.onExited&&n.props.onExited(c)},n.resolveArguments=function(c,u){return n.props.nodeRef?[n.props.nodeRef.current,c]:[c,u]},n.getClassNames=function(c){var u=n.props.classNames,l=typeof u=="string",f=l&&u?u+"-":"",p=l?""+f+c:u[c],b=l?p+"-active":u[c+"Active"],_=l?p+"-done":u[c+"Done"];return{baseClassName:p,activeClassName:b,doneClassName:_}},n}var t=e.prototype;return t.addClass=function(o,i,a){var c=this.getClassNames(i)[a+"ClassName"],u=this.getClassNames("enter"),l=u.doneClassName;i==="appear"&&a==="done"&&l&&(c+=" "+l),a==="active"&&o&&er(o),c&&(this.appliedClasses[i][a]=c,tn(o,c))},t.removeClasses=function(o,i){var a=this.appliedClasses[i],c=a.base,u=a.active,l=a.done;this.appliedClasses[i]={},c&>(o,c),u&>(o,u),l&>(o,l)},t.render=function(){var o=this.props;o.classNames;var i=Nt(o,["classNames"]);return N.createElement(fe,Ue({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(N.Component);Ve.defaultProps={classNames:""},Ve.propTypes=process.env.NODE_ENV!=="production"?Ue({},fe.propTypes,{classNames:en,onEnter:C.func,onEntering:C.func,onEntered:C.func,onExit:C.func,onExiting:C.func,onExited:C.func}):{};/*!
|
|
51
|
-
* better-scroll / core
|
|
52
|
-
* (c) 2016-2023 ustbhuangyi
|
|
53
|
-
* Released under the MIT License.
|
|
54
|
-
*//*! *****************************************************************************
|
|
55
|
-
Copyright (c) Microsoft Corporation.
|
|
56
|
-
|
|
57
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
58
|
-
purpose with or without fee is hereby granted.
|
|
59
|
-
|
|
60
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
61
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
62
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
63
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
64
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
65
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
66
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
67
|
-
***************************************************************************** */var Tt=function(r,e){return Tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])},Tt(r,e)};function Ke(r,e){Tt(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Fe=function(){return Fe=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Fe.apply(this,arguments)};function tr(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),o=0,e=0;e<t;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,o++)n[o]=i[a];return n}var rn=[{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 Ge(r){console.error("[BScroll warn]: "+r)}var he=typeof window<"u",De=he&&navigator.userAgent.toLowerCase(),nn=!!(De&&/wechatdevtools/.test(De)),on=De&&De.indexOf("android")>0,sn=function(){if(typeof De=="string"){var r=/os (\d\d?_\d(_\d)?)/,e=r.exec(De);if(!e)return!1;var t=e[1].split("_").map(function(n){return parseInt(n,10)});return t[0]===13&&t[1]>=4}return!1}(),rr=!1;if(he){var an="test-passive";try{var nr={};Object.defineProperty(nr,"passive",{get:function(){rr=!0}}),window.addEventListener(an,function(){},nr)}catch{}}function Se(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var bt=function(r,e){for(var t in e)r[t]=e[t];return r};function Et(r){return r==null}function or(r,e,t){return r<e?e:r>t?t:r}var kt=he&&document.createElement("div").style,Ae=function(){if(!he)return!1;for(var r=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],e=0,t=r;e<t.length;e++){var n=t[e];if(kt[n.value]!==void 0)return n.key}return!1}();function ve(r){return Ae===!1?r:Ae==="standard"?r==="transitionEnd"?"transitionend":r:Ae+r.charAt(0).toUpperCase()+r.substr(1)}function ir(r){return typeof r=="string"?document.querySelector(r):r}function cn(r,e,t,n){var o=rr?{passive:!1,capture:!!n}:!!n;r.addEventListener(e,t,o)}function ln(r,e,t,n){r.removeEventListener(e,t,{capture:!!n})}function sr(r){r.cancelable&&r.preventDefault()}function ar(r){for(var e=0,t=0;r;)e-=r.offsetLeft,t-=r.offsetTop,r=r.offsetParent;return{left:e,top:t}}Ae&&Ae!=="standard"&&""+Ae.toLowerCase();var un=ve("transform"),cr=ve("transition"),fn=he&&ve("perspective")in kt,lr=he&&("ontouchstart"in window||nn),hn=he&&cr in kt,xe={transform:un,transition:cr,transitionTimingFunction:ve("transitionTimingFunction"),transitionDuration:ve("transitionDuration"),transitionDelay:ve("transitionDelay"),transformOrigin:ve("transformOrigin"),transitionEnd:ve("transitionEnd"),transitionProperty:ve("transitionProperty")},St={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function ur(r){if(r instanceof window.SVGElement){var e=r.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}else return{top:r.offsetTop,left:r.offsetLeft,width:r.offsetWidth,height:r.offsetHeight}}function Xe(r,e){for(var t in e)if(e[t].test(r[t]))return!0;return!1}var pn=Xe;function dn(r,e){var t=document.createEvent("Event");t.initEvent(e,!0,!0),t.pageX=r.pageX,t.pageY=r.pageY,r.target.dispatchEvent(t)}function fr(r,e){e===void 0&&(e="click");var t;r.type==="mouseup"?t=r:(r.type==="touchend"||r.type==="touchcancel")&&(t=r.changedTouches[0]);var n={};t&&(n.screenX=t.screenX||0,n.screenY=t.screenY||0,n.clientX=t.clientX||0,n.clientY=t.clientY||0);var o,i=!0,a=!0,c=r.ctrlKey,u=r.shiftKey,l=r.altKey,f=r.metaKey,p={ctrlKey:c,shiftKey:u,altKey:l,metaKey:f};if(typeof MouseEvent<"u")try{o=new MouseEvent(e,bt(Fe({bubbles:i,cancelable:a},p),n))}catch{b()}else b();function b(){o=document.createEvent("Event"),o.initEvent(e,i,a),bt(o,n)}o.forwardedTouchEvent=!0,o._constructed=!0,r.target.dispatchEvent(o)}function vn(r){fr(r,"dblclick")}var Pe={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(r){return 1+--r*r*r*r*r}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(r){return r*(2-r)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(r){return 1- --r*r*r*r}}},mn=1e3/60,Te=he&&window;function hr(){}var pr=function(){return he?Te.requestAnimationFrame||Te.webkitRequestAnimationFrame||Te.mozRequestAnimationFrame||Te.oRequestAnimationFrame||function(r){return window.setTimeout(r,r.interval||mn)}:hr}(),we=function(){return he?Te.cancelAnimationFrame||Te.webkitCancelAnimationFrame||Te.mozCancelAnimationFrame||Te.oCancelAnimationFrame||function(r){window.clearTimeout(r)}:hr}(),dr=function(r){},xt={enumerable:!0,configurable:!0,get:dr,set:dr},yn=function(r,e){for(var t=e.split("."),n=0;n<t.length-1;n++)if(r=r[t[n]],typeof r!="object"||!r)return;var o=t.pop();return typeof r[o]=="function"?function(){return r[o].apply(r,arguments)}:r[o]},gn=function(r,e,t){for(var n=e.split("."),o,i=0;i<n.length-1;i++)o=n[i],r[o]||(r[o]={}),r=r[o];r[n.pop()]=t};function Tn(r,e,t){xt.get=function(){return yn(this,e)},xt.set=function(o){gn(this,e,o)},Object.defineProperty(r,t,xt)}var be=function(){function r(e){this.events={},this.eventTypes={},this.registerType(e)}return r.prototype.on=function(e,t,n){return n===void 0&&(n=this),this.hasType(e),this.events[e]||(this.events[e]=[]),this.events[e].push([t,n]),this},r.prototype.once=function(e,t,n){var o=this;n===void 0&&(n=this),this.hasType(e);var i=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];o.off(e,i);var u=t.apply(n,a);if(u===!0)return u};return i.fn=t,this.on(e,i),this},r.prototype.off=function(e,t){if(!e&&!t)return this.events={},this;if(e){if(this.hasType(e),!t)return this.events[e]=[],this;var n=this.events[e];if(!n)return this;for(var o=n.length;o--;)(n[o][0]===t||n[o][0]&&n[o][0].fn===t)&&n.splice(o,1);return this}},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.hasType(e);var o=this.events[e];if(o)for(var i=o.length,a=tr(o),c,u=0;u<i;u++){var l=a[u],f=l[0],p=l[1];if(f&&(c=f.apply(p,t),c===!0))return c}},r.prototype.registerType=function(e){var t=this;e.forEach(function(n){t.eventTypes[n]=n})},r.prototype.destroy=function(){this.events={},this.eventTypes={}},r.prototype.hasType=function(e){var t=this.eventTypes,n=t[e]===e;n||Ge('EventEmitter has used unknown event type: "'+e+'", should be oneof ['+(""+Object.keys(t).map(function(o){return JSON.stringify(o)}))+"]")},r}(),Je=function(){function r(e,t){this.wrapper=e,this.events=t,this.addDOMEvents()}return r.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},r.prototype.addDOMEvents=function(){this.handleDOMEvents(cn)},r.prototype.removeDOMEvents=function(){this.handleDOMEvents(ln)},r.prototype.handleDOMEvents=function(e){var t=this,n=this.wrapper;this.events.forEach(function(o){e(n,o.name,t,!!o.capture)})},r.prototype.handleEvent=function(e){var t=e.type;this.events.some(function(n){return n.name===t?(n.handler(e),!0):!1})},r}(),bn=function(){function r(){}return r}(),En=function(r){Ke(e,r);function e(){var t=r.call(this)||this;return t.startX=0,t.startY=0,t.scrollX=!1,t.scrollY=!0,t.freeScroll=!1,t.directionLockThreshold=0,t.eventPassthrough="",t.click=!1,t.dblclick=!1,t.tap="",t.bounce={top:!0,bottom:!0,left:!0,right:!0},t.bounceTime=800,t.momentum=!0,t.momentumLimitTime=300,t.momentumLimitDistance=15,t.swipeTime=2500,t.swipeBounceTime=500,t.deceleration=.0015,t.flickLimitTime=200,t.flickLimitDistance=100,t.resizePolling=60,t.probeType=0,t.stopPropagation=!1,t.preventDefault=!0,t.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},t.tagException={tagName:/^TEXTAREA$/},t.HWCompositing=!0,t.useTransition=!0,t.bindToWrapper=!1,t.bindToTarget=!1,t.disableMouse=lr,t.disableTouch=!lr,t.autoBlur=!0,t.autoEndDistance=5,t.outOfBoundaryDampingFactor=1/3,t.specifiedIndexAsContent=0,t.quadrant=1,t}return e.prototype.merge=function(t){if(!t)return this;for(var n in t){if(n==="bounce"){this.bounce=this.resolveBounce(t[n]);continue}this[n]=t[n]}return this},e.prototype.process=function(){return this.translateZ=this.HWCompositing&&fn?" translateZ(1px)":"",this.useTransition=this.useTransition&&hn,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},e.prototype.resolveBounce=function(t){var n={top:!0,right:!0,bottom:!0,left:!0},o={top:!1,right:!1,bottom:!1,left:!1},i;return typeof t=="object"?i=bt(n,t):i=t?n:o,i},e}(bn),kn=function(){function r(e,t){this.wrapper=e,this.options=t,this.hooks=new be(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return r.prototype.handleDOMEvents=function(){var e=this.options,t=e.bindToWrapper,n=e.disableMouse,o=e.disableTouch,i=e.click,a=this.wrapper,c=t?a:window,u=[],l=[],f=!o,p=!n;i&&u.push({name:"click",handler:this.click.bind(this),capture:!0}),f&&(u.push({name:"touchstart",handler:this.start.bind(this)}),l.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),p&&(u.push({name:"mousedown",handler:this.start.bind(this)}),l.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new Je(a,u),this.targetEventRegister=new Je(c,l)},r.prototype.beforeHandler=function(e,t){var n=this.options,o=n.preventDefault,i=n.stopPropagation,a=n.preventDefaultException,c={start:function(){return o&&!Xe(e.target,a)},end:function(){return o&&!Xe(e.target,a)},move:function(){return o}};c[t]()&&e.preventDefault(),i&&e.stopPropagation()},r.prototype.setInitiated=function(e){e===void 0&&(e=0),this.initiated=e},r.prototype.start=function(e){var t=St[e.type];if(!(this.initiated&&this.initiated!==t)){if(this.setInitiated(t),pn(e.target,this.options.tagException)){this.setInitiated();return}if(!(t===2&&e.button!==0)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,e)){this.beforeHandler(e,"start");var n=e.touches?e.touches[0]:e;this.pointX=n.pageX,this.pointY=n.pageY,this.hooks.trigger(this.hooks.eventTypes.start,e)}}},r.prototype.move=function(e){if(St[e.type]===this.initiated){this.beforeHandler(e,"move");var t=e.touches?e.touches[0]:e,n=t.pageX-this.pointX,o=t.pageY-this.pointY;if(this.pointX=t.pageX,this.pointY=t.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:n,deltaY:o,e})){var i=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,a=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,c=this.pointX-i,u=this.pointY-a,l=this.options.autoEndDistance;(c>document.documentElement.clientWidth-l||u>document.documentElement.clientHeight-l||c<l||u<l)&&this.end(e)}}},r.prototype.end=function(e){St[e.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(e,"end"),this.hooks.trigger(this.hooks.eventTypes.end,e))},r.prototype.click=function(e){this.hooks.trigger(this.hooks.eventTypes.click,e)},r.prototype.setContent=function(e){e!==this.wrapper&&(this.wrapper=e,this.rebindDOMEvents())},r.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},r.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},r}(),Pt={x:["translateX","px"],y:["translateY","px"]},Sn=function(){function r(e){this.setContent(e),this.hooks=new be(["beforeTranslate","translate"])}return r.prototype.getComputedPosition=function(){var e=window.getComputedStyle(this.content,null),t=e[xe.transform].split(")")[0].split(", "),n=+(t[12]||t[4])||0,o=+(t[13]||t[5])||0;return{x:n,y:o}},r.prototype.translate=function(e){var t=[];Object.keys(e).forEach(function(n){if(Pt[n]){var o=Pt[n][0];if(o){var i=Pt[n][1],a=e[n];t.push(o+"("+a+i+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,t,e),this.style[xe.transform]=t.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,e)},r.prototype.setContent=function(e){this.content!==e&&(this.content=e,this.style=e.style)},r.prototype.destroy=function(){this.hooks.destroy()},r}(),vr=function(){function r(e,t,n){this.translater=t,this.options=n,this.timer=0,this.hooks=new be(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(e)}return r.prototype.translate=function(e){this.translater.translate(e)},r.prototype.setPending=function(e){this.pending=e},r.prototype.setForceStopped=function(e){this.forceStopped=e},r.prototype.setCallStop=function(e){this.callStopWhenPending=e},r.prototype.setContent=function(e){this.content!==e&&(this.content=e,this.style=e.style,this.stop())},r.prototype.clearTimer=function(){this.timer&&(we(this.timer),this.timer=0)},r.prototype.destroy=function(){this.hooks.destroy(),we(this.timer)},r}(),xn=function(r,e,t,n){var o=function(l,f){var p=l-f,b=p>0?-1:p<0?1:0;return b},i=o(e.x,r.x),a=o(e.y,r.y),c=t.x-n.x,u=t.y-n.y;return i*c<=0&&a*u<=0},Pn=function(r){Ke(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.startProbe=function(t,n){var o=this,i=t,a=function(){var c=o.translater.getComputedPosition();xn(t,n,c,i)&&o.hooks.trigger(o.hooks.eventTypes.move,c),o.pending||(o.callStopWhenPending?o.callStopWhenPending=!1:o.hooks.trigger(o.hooks.eventTypes.end,c)),i=c,o.pending&&(o.timer=pr(a))};this.callStopWhenPending&&this.setCallStop(!1),we(this.timer),a()},e.prototype.transitionTime=function(t){t===void 0&&(t=0),this.style[xe.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[xe.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[xe.transitionProperty]=xe.transform},e.prototype.move=function(t,n,o,i){this.setPending(o>0),this.transitionTimingFunction(i),this.transitionProperty(),this.transitionTime(o),this.translate(n);var a=this.options.probeType===3;o&&a&&this.startProbe(t,n),o||(this._reflow=this.content.offsetHeight,a&&this.hooks.trigger(this.hooks.eventTypes.move,n),this.hooks.trigger(this.hooks.eventTypes.end,n))},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),we(this.timer);var n=this.translater.getComputedPosition(),o=n.x,i=n.y;this.transitionTime(),this.translate({x:o,y:i}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:o,y:i})}return t},e.prototype.stop=function(){var t=this.doStop();t&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(vr),wn=function(r){Ke(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.move=function(t,n,o,i){if(!o){this.translate(n),this.options.probeType===3&&this.hooks.trigger(this.hooks.eventTypes.move,n),this.hooks.trigger(this.hooks.eventTypes.end,n);return}this.animate(t,n,o,i)},e.prototype.animate=function(t,n,o,i){var a=this,c=Se(),u=c+o,l=this.options.probeType===3,f=function(){var p=Se();if(p>=u){a.translate(n),l&&a.hooks.trigger(a.hooks.eventTypes.move,n),a.hooks.trigger(a.hooks.eventTypes.end,n);return}p=(p-c)/o;var b=i(p),_={};Object.keys(n).forEach(function(R){var I=t[R],B=n[R];_[R]=(B-I)*b+I}),a.translate(_),l&&a.hooks.trigger(a.hooks.eventTypes.move,_),a.pending&&(a.timer=pr(f)),a.pending||(a.callStopWhenPending?a.callStopWhenPending=!1:a.hooks.trigger(a.hooks.eventTypes.end,n))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),we(this.timer),f()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),we(this.timer);var n=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,n)}return t},e.prototype.stop=function(){var t=this.doStop();t&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(vr);function Cn(r,e,t){var n=t.useTransition,o={};return Object.defineProperty(o,"probeType",{enumerable:!0,configurable:!1,get:function(){return t.probeType}}),n?new Pn(r,e,o):new wn(r,e,o)}var mr=function(){function r(e,t,n){this.wrapper=e,this.options=n,this.hooks=new be(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(t)}return r.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},r.prototype.move=function(e){return e=this.hasScroll?e:0,this.setMovingDirection(e),this.performDampingAlgorithm(e,this.options.outOfBoundaryDampingFactor)},r.prototype.setMovingDirection=function(e){this.movingDirection=e>0?-1:e<0?1:0},r.prototype.setDirection=function(e){this.direction=e>0?-1:e<0?1:0},r.prototype.performDampingAlgorithm=function(e,t){var n=this.currentPos+e;return(n>this.minScrollPos||n<this.maxScrollPos)&&(n>this.minScrollPos&&this.options.bounces[0]||n<this.maxScrollPos&&this.options.bounces[1]?n=this.currentPos+e*t:n=n>this.minScrollPos?this.minScrollPos:this.maxScrollPos),n},r.prototype.end=function(e){var t={duration:0},n=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&e<this.options.momentumLimitTime&&n>this.options.momentumLimitDistance){var o=this.direction===-1&&this.options.bounces[0]||this.direction===1&&this.options.bounces[1]?this.wrapperSize:0;t=this.hasScroll?this.momentum(this.currentPos,this.startPos,e,this.maxScrollPos,this.minScrollPos,o,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,t);return t},r.prototype.momentum=function(e,t,n,o,i,a,c){c===void 0&&(c=this.options);var u=e-t,l=Math.abs(u)/n,f=c.deceleration,p=c.swipeBounceTime,b=c.swipeTime,_=Math.min(b,l*2/f),R={destination:e+l*l/f*(u<0?-1:1),duration:_,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,R,u),R.destination<o?(R.destination=a?Math.max(o-a/4,o-a/R.rate*l):o,R.duration=p):R.destination>i&&(R.destination=a?Math.min(i+a/4,i+a/R.rate*l):i,R.duration=p),R.destination=Math.round(R.destination),R},r.prototype.updateDirection=function(){var e=this.currentPos-this.absStartPos;this.setDirection(e)},r.prototype.refresh=function(e){var t=this.options.rect,n=t.size,o=t.position,i=window.getComputedStyle(this.wrapper,null).position==="static",a=ur(this.wrapper);this.wrapperSize=this.wrapper[n==="width"?"clientWidth":"clientHeight"],this.setContent(e);var c=ur(this.content);this.contentSize=c[n],this.relativeOffset=c[o],i&&(this.relativeOffset-=a[o]),this.computeBoundary(),this.setDirection(0)},r.prototype.setContent=function(e){e!==this.content&&(this.content=e,this.resetState())},r.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},r.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var e={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};e.maxScrollPos<0&&(e.maxScrollPos-=this.relativeOffset,this.options.specifiedIndexAsContent===0&&(e.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,e),this.minScrollPos=e.minScrollPos,this.maxScrollPos=e.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},r.prototype.updatePosition=function(e){this.currentPos=e},r.prototype.getCurrentPos=function(){return this.currentPos},r.prototype.checkInBoundary=function(){var e=this.adjustPosition(this.currentPos),t=e===this.getCurrentPos();return{position:e,inBoundary:t}},r.prototype.adjustPosition=function(e){return!this.hasScroll&&!this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?e=this.minScrollPos:e>this.minScrollPos?e=this.minScrollPos:e<this.maxScrollPos&&(e=this.maxScrollPos),e},r.prototype.updateStartPos=function(){this.startPos=this.currentPos},r.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},r.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},r.prototype.getAbsDist=function(e){return this.dist+=e,Math.abs(this.dist)},r.prototype.destroy=function(){this.hooks.destroy()},r}(),Ze,Qe,et,tt,yr=(Ze={},Ze.yes=function(r){return!0},Ze.no=function(r){return sr(r),!1},Ze),_n=(Qe={},Qe.horizontal=(et={},et.yes="horizontal",et.no="vertical",et),Qe.vertical=(tt={},tt.yes="vertical",tt.no="horizontal",tt),Qe),On=function(){function r(e,t,n){this.directionLockThreshold=e,this.freeScroll=t,this.eventPassthrough=n,this.reset()}return r.prototype.reset=function(){this.directionLocked=""},r.prototype.checkMovingDirection=function(e,t,n){return this.computeDirectionLock(e,t),this.handleEventPassthrough(n)},r.prototype.adjustDelta=function(e,t){return this.directionLocked==="horizontal"?t=0:this.directionLocked==="vertical"&&(e=0),{deltaX:e,deltaY:t}},r.prototype.computeDirectionLock=function(e,t){this.directionLocked===""&&!this.freeScroll&&(e>t+this.directionLockThreshold?this.directionLocked="horizontal":t>=e+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},r.prototype.handleEventPassthrough=function(e){var t=_n[this.directionLocked];if(t){if(this.eventPassthrough===t.yes)return yr.yes(e);if(this.eventPassthrough===t.no)return yr.no(e)}return!1},r}(),Rn=function(r,e,t){return t===2?[e,-r]:t===3?[-r,-e]:t===4?[-e,r]:[r,e]},Dn=function(){function r(e,t,n,o,i){this.hooks=new be(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=e,this.scrollBehaviorY=t,this.actionsHandler=n,this.animater=o,this.options=i,this.directionLockAction=new On(i.directionLockThreshold,i.freeScroll,i.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return r.prototype.bindActionsHandler=function(){var e=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(t){return e.enabled?e.handleStart(t):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(t){var n=t.deltaX,o=t.deltaY,i=t.e;if(!e.enabled)return!0;var a=Rn(n,o,e.options.quadrant),c=a[0],u=a[1],l={deltaX:c,deltaY:u};return e.hooks.trigger(e.hooks.eventTypes.coordinateTransformation,l),e.handleMove(l.deltaX,l.deltaY,i)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(t){return e.enabled?e.handleEnd(t):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(t){e.enabled&&!t._constructed&&e.handleClick(t)})},r.prototype.handleStart=function(e){var t=Se();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=t,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,e)},r.prototype.handleMove=function(e,t,n){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,n)){var o=this.scrollBehaviorX.getAbsDist(e),i=this.scrollBehaviorY.getAbsDist(t),a=Se();if(this.checkMomentum(o,i,a))return!0;if(this.directionLockAction.checkMovingDirection(o,i,n))return this.actionsHandler.setInitiated(),!0;var c=this.directionLockAction.adjustDelta(e,t),u=this.scrollBehaviorX.getCurrentPos(),l=this.scrollBehaviorX.move(c.deltaX),f=this.scrollBehaviorY.getCurrentPos(),p=this.scrollBehaviorY.move(c.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var b=l!==u||p!==f;!this.contentMoved&&!b&&this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&b&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&b&&(this.animater.translate({x:l,y:p}),this.dispatchScroll(a))}}},r.prototype.dispatchScroll=function(e){e-this.startTime>this.options.momentumLimitTime&&(this.startTime=e,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())},r.prototype.checkMomentum=function(e,t,n){return n-this.endTime>this.options.momentumLimitTime&&t<this.options.momentumLimitDistance&&e<this.options.momentumLimitDistance},r.prototype.handleEnd=function(e){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,e)){var t=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,e,t))return!0;t=this.ensureIntegerPos(t),this.animater.translate(t),this.endTime=Se();var n=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,t,n)}},r.prototype.ensureIntegerPos=function(e){this.ensuringInteger=!0;var t=e.x,n=e.y,o=this.scrollBehaviorX,i=o.minScrollPos,a=o.maxScrollPos,c=this.scrollBehaviorY,u=c.minScrollPos,l=c.maxScrollPos;return t=t>0?Math.ceil(t):Math.floor(t),n=n>0?Math.ceil(n):Math.floor(n),t=or(t,a,i),n=or(n,l,u),{x:t,y:n}},r.prototype.handleClick=function(e){Xe(e.target,this.options.preventDefaultException)||(sr(e),e.stopPropagation())},r.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},r.prototype.refresh=function(){this.endTime=0},r.prototype.destroy=function(){this.hooks.destroy()},r}();function An(r){var e=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce(function(t,n){return t[n]=r[n],t},{});return e}function gr(r,e,t,n){var o=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce(function(i,a){return i[a]=r[a],i},{});return o.scrollable=!!r[e],o.bounces=t,o.rect=n,o}function wt(r,e,t){t.forEach(function(n){var o,i;typeof n=="string"?o=i=n:(o=n.source,i=n.target),r.on(o,function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return e.trigger.apply(e,tr([i],a))})})}function Mn(r,e){for(var t=Object.keys(r),n=0,o=t;n<o.length;n++){var i=o[n];if(r[i]!==e[i])return!1}return!0}var Tr=1,In=function(){function r(e,t,n){this.wrapper=e,this.content=t,this.resizeTimeout=0,this.hooks=new be(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=n;var o=this.options.bounce,i=o.left,a=o.right,c=o.top,u=o.bottom;this.scrollBehaviorX=new mr(e,t,gr(n,"scrollX",[i,a],{size:"width",position:"left"})),this.scrollBehaviorY=new mr(e,t,gr(n,"scrollY",[c,u],{size:"height",position:"top"})),this.translater=new Sn(this.content),this.animater=Cn(this.content,this.translater,this.options),this.actionsHandler=new kn(this.options.bindToTarget?this.content:e,An(this.options)),this.actions=new Dn(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var l=this.resize.bind(this);this.resizeRegister=new Je(window,[{name:"orientationchange",handler:l},{name:"resize",handler:l}]),this.registerTransitionEnd(),this.init()}return r.prototype.init=function(){var e=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,function(){e.togglePointerEvents(!0)})},r.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new Je(this.content,[{name:xe.transitionEnd,handler:this.transitionEnd.bind(this)}])},r.prototype.bindTranslater=function(){var e=this,t=this.translater.hooks;t.on(t.eventTypes.beforeTranslate,function(n){e.options.translateZ&&n.push(e.options.translateZ)}),t.on(t.eventTypes.translate,function(n){var o=e.getCurrentPos();if(e.updatePositions(n),e.actions.ensuringInteger===!0){e.actions.ensuringInteger=!1;return}(n.x!==o.x||n.y!==o.y)&&e.togglePointerEvents(!1)})},r.prototype.bindAnimater=function(){var e=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,function(t){e.resetPosition(e.options.bounceTime)||(e.animater.setPending(!1),e.hooks.trigger(e.hooks.eventTypes.scrollEnd,t))}),wt(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}])},r.prototype.bindActions=function(){var e=this,t=this.actions;wt(t.hooks,this.hooks,[{source:t.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:t.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:t.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:t.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:t.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:t.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),t.hooks.on(t.hooks.eventTypes.end,function(n,o){if(e.hooks.trigger(e.hooks.eventTypes.touchEnd,o),e.hooks.trigger(e.hooks.eventTypes.end,o)||!t.fingerMoved&&(e.hooks.trigger(e.hooks.eventTypes.scrollCancel),e.checkClick(n)))return!0;if(e.resetPosition(e.options.bounceTime,Pe.bounce))return e.animater.setForceStopped(!1),!0}),t.hooks.on(t.hooks.eventTypes.scrollEnd,function(n,o){var i=Math.abs(n.x-e.scrollBehaviorX.startPos),a=Math.abs(n.y-e.scrollBehaviorY.startPos);if(e.checkFlick(o,i,a)){e.animater.setForceStopped(!1),e.hooks.trigger(e.hooks.eventTypes.flick);return}if(e.momentum(n,o)){e.animater.setForceStopped(!1);return}t.contentMoved&&e.hooks.trigger(e.hooks.eventTypes.scrollEnd,n),e.animater.forceStopped&&e.animater.setForceStopped(!1)})},r.prototype.checkFlick=function(e,t,n){var o=1;if(this.hooks.events.flick.length>1&&e<this.options.flickLimitTime&&t<this.options.flickLimitDistance&&n<this.options.flickLimitDistance&&(n>o||t>o))return!0},r.prototype.momentum=function(e,t){var n={time:0,easing:Pe.swiper,newX:e.x,newY:e.y},o=this.scrollBehaviorX.end(t),i=this.scrollBehaviorY.end(t);if(n.newX=Et(o.destination)?n.newX:o.destination,n.newY=Et(i.destination)?n.newY:i.destination,n.time=Math.max(o.duration,i.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,n,this),n.newX!==e.x||n.newY!==e.y)return(n.newX>this.scrollBehaviorX.minScrollPos||n.newX<this.scrollBehaviorX.maxScrollPos||n.newY>this.scrollBehaviorY.minScrollPos||n.newY<this.scrollBehaviorY.maxScrollPos)&&(n.easing=Pe.swipeBounce),this.scrollTo(n.newX,n.newY,n.time,n.easing),!0},r.prototype.checkClick=function(e){var t={preventClick:this.animater.forceStopped};if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!t.preventClick){var n=this.options.dblclick,o=!1;if(n&&this.lastClickTime){var i=n.delay,a=i===void 0?300:i;Se()-this.lastClickTime<a&&(o=!0,vn(e))}return this.options.tap&&dn(e,this.options.tap),this.options.click&&!Xe(e.target,this.options.preventDefaultException)&&fr(e),this.lastClickTime=o?null:Se(),!0}return!1},r.prototype.resize=function(){var e=this;this.actions.enabled&&(on&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(function(){e.hooks.trigger(e.hooks.eventTypes.resize)},this.options.resizePolling))},r.prototype.transitionEnd=function(e){if(!(e.target!==this.content||!this.animater.pending)){var t=this.animater;t.transitionTime(),this.resetPosition(this.options.bounceTime,Pe.bounce)||(this.animater.setPending(!1),this.options.probeType!==3&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos()))}},r.prototype.togglePointerEvents=function(e){e===void 0&&(e=!0);for(var t=this.content.children.length?this.content.children:[this.content],n=e?"auto":"none",o=0;o<t.length;o++){var i=t[o];i.isBScrollContainer||(i.style.pointerEvents=n)}},r.prototype.refresh=function(e){var t=this.setContent(e);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(e),this.scrollBehaviorY.refresh(e),t&&(this.translater.setContent(e),this.animater.setContent(e),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(e)),this.actions.refresh(),this.wrapperOffset=ar(this.wrapper)},r.prototype.setContent=function(e){var t=e!==this.content;return t&&(this.content=e),t},r.prototype.scrollBy=function(e,t,n,o){n===void 0&&(n=0);var i=this.getCurrentPos(),a=i.x,c=i.y;o=o||Pe.bounce,e+=a,t+=c,this.scrollTo(e,t,n,o)},r.prototype.scrollTo=function(e,t,n,o,i){n===void 0&&(n=0),o===void 0&&(o=Pe.bounce),i===void 0&&(i={start:{},end:{}});var a=this.options.useTransition?o.style:o.fn,c=this.getCurrentPos(),u=Fe({x:c.x,y:c.y},i.start),l=Fe({x:e,y:t},i.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,l),!Mn(u,l)){var f=Math.abs(l.x-u.x),p=Math.abs(l.y-u.y);f<Tr&&p<Tr&&(n=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(u,l,n,a)}},r.prototype.scrollToElement=function(e,t,n,o,i){var a=ir(e),c=ar(a),u=function(f,p,b){return typeof f=="number"?f:f?Math.round(p/2-b/2):0};n=u(n,a.offsetWidth,this.wrapper.offsetWidth),o=u(o,a.offsetHeight,this.wrapper.offsetHeight);var l=function(f,p,b,_){return f-=p,f=_.adjustPosition(f-b),f};c.left=l(c.left,this.wrapperOffset.left,n,this.scrollBehaviorX),c.top=l(c.top,this.wrapperOffset.top,o,this.scrollBehaviorY),!this.hooks.trigger(this.hooks.eventTypes.scrollToElement,a,c)&&this.scrollTo(c.left,c.top,t,i)},r.prototype.resetPosition=function(e,t){e===void 0&&(e=0),t===void 0&&(t=Pe.bounce);var n=this.scrollBehaviorX.checkInBoundary(),o=n.position,i=n.inBoundary,a=this.scrollBehaviorY.checkInBoundary(),c=a.position,u=a.inBoundary;return i&&u?!1:(sn&&this.reflow(),this.scrollTo(o,c,e,t),!0)},r.prototype.reflow=function(){this._reflow=this.content.offsetHeight},r.prototype.updatePositions=function(e){this.scrollBehaviorX.updatePosition(e.x),this.scrollBehaviorY.updatePosition(e.y)},r.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},r.prototype.enable=function(){this.actions.enabled=!0},r.prototype.disable=function(){we(this.animater.timer),this.actions.enabled=!1},r.prototype.destroy=function(){var e=this,t=["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"];t.forEach(function(n){return e[n].destroy()})},r}(),rt=function(r){Ke(e,r);function e(t,n){var o=r.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,i=ir(t);return i?(o.plugins={},o.options=new En().merge(n).process(),o.setContent(i).valid&&(o.hooks=new be(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),o.init(i)),o):(Ge("Can not resolve the wrapper DOM."),o)}return e.use=function(t){var n=t.pluginName,o=e.plugins.some(function(i){return t===i.ctor});return o?e:Et(n)?(Ge("Plugin Class must specify plugin's name in static property by 'pluginName' field."),e):(e.pluginsMap[n]=!0,e.plugins.push({name:n,applyOrder:t.applyOrder,ctor:t}),e)},e.prototype.setContent=function(t){var n=!1,o=!0,i=t.children[this.options.specifiedIndexAsContent];return i?(n=this.content!==i,n&&(this.content=i)):(Ge("The wrapper need at least one child element to be content element to scroll."),o=!1),{valid:o,contentChanged:n}},e.prototype.init=function(t){var n=this;this.wrapper=t,t.isBScrollContainer=!0,this.scroller=new In(t,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,function(){n.refresh()}),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(rn),this.applyPlugins(),this.refreshWithoutReset(this.content);var o=this.options,i=o.startX,a=o.startY,c={x:i,y:a};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,c)||this.scroller.scrollTo(c.x,c.y)},e.prototype.applyPlugins=function(){var t=this,n=this.options;e.plugins.sort(function(o,i){var a,c=(a={},a.pre=-1,a.post=1,a),u=o.applyOrder?c[o.applyOrder]:0,l=i.applyOrder?c[i.applyOrder]:0;return u-l}).forEach(function(o){var i=o.ctor;n[o.name]&&typeof i=="function"&&(t.plugins[o.name]=new i(t))})},e.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,function(){var t=document.activeElement;t&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA")&&t.blur()})},e.prototype.eventBubbling=function(){wt(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])},e.prototype.refreshWithoutReset=function(t){this.scroller.refresh(t),this.hooks.trigger(this.hooks.eventTypes.refresh,t),this.trigger(this.eventTypes.refresh,t)},e.prototype.proxy=function(t){var n=this;t.forEach(function(o){var i=o.key,a=o.sourceKey;Tn(n,a,i)})},e.prototype.refresh=function(){var t=this.setContent(this.wrapper),n=t.contentChanged,o=t.valid;if(o){var i=this.content;this.refreshWithoutReset(i),n&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,i),this.trigger(this.eventTypes.contentChanged,i)),this.scroller.resetPosition()}},e.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},e.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},e.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},e.prototype.eventRegister=function(t){this.registerType(t)},e.plugins=[],e.pluginsMap={},e}(be);function We(r,e){var t=new rt(r,e);return t}We.use=rt.use,We.plugins=rt.plugins,We.pluginsMap=rt.pluginsMap;var Yn=We;/*!
|
|
68
|
-
* better-scroll / wheel
|
|
69
|
-
* (c) 2016-2023 ustbhuangyi
|
|
70
|
-
* Released under the MIT License.
|
|
71
|
-
*/var ze=typeof window<"u",nt=ze&&navigator.userAgent.toLowerCase();nt&&nt.indexOf("android")>0,function(){if(typeof nt=="string"){var r=/os (\d\d?_\d(_\d)?)/,e=r.exec(nt);if(!e)return!1;var t=e[1].split("_").map(function(n){return parseInt(n,10)});return t[0]===13&&t[1]>=4}return!1}();var Bn=!1;if(ze){var jn="test-passive";try{var br={};Object.defineProperty(br,"passive",{get:function(){Bn=!0}}),window.addEventListener(jn,function(){},br)}catch{}}var Nn=function(r,e){for(var t in e)r[t]=e[t];return r},Er=ze&&document.createElement("div").style,Me=function(){if(!ze)return!1;for(var r=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],e=0,t=r;e<t.length;e++){var n=t[e];if(Er[n.value]!==void 0)return n.key}return!1}();function me(r){return Me===!1?r:Me==="standard"?r==="transitionEnd"?"transitionend":r:Me+r.charAt(0).toUpperCase()+r.substr(1)}Me&&Me!=="standard"&&""+Me.toLowerCase();var Ln=me("transform"),$n=me("transition");ze&&me("perspective")in Er;var Ct={transform:Ln,transition:$n,transitionTimingFunction:me("transitionTimingFunction"),transitionDuration:me("transitionDuration"),transitionDelay:me("transitionDelay"),transformOrigin:me("transformOrigin"),transitionEnd:me("transitionEnd"),transitionProperty:me("transitionProperty")};function ot(r,e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return t.test(r.className)}function Fn(r){return Array.prototype.slice.call(r,0)}var Xn={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(r){return 1+--r*r*r*r*r}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(r){return r*(2-r)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(r){return 1- --r*r*r*r}}},Wn="plugins.wheel",zn=[{key:"wheelTo",name:"wheelTo"},{key:"getSelectedIndex",name:"getSelectedIndex"},{key:"restorePosition",name:"restorePosition"}],Hn=zn.map(function(r){return{key:r.key,sourceKey:Wn+"."+r.name}}),kr="wheelIndexChanged",Un={rate:4},qn=function(){function r(e){this.scroll=e,this.init()}return r.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.refreshBoundary(),this.setSelectedIndex(this.options.selectedIndex)},r.prototype.handleBScroll=function(){this.scroll.proxy(Hn),this.scroll.registerType([kr])},r.prototype.handleOptions=function(){var e=this.scroll.options.wheel===!0?{}:this.scroll.options.wheel,t={wheelWrapperClass:"wheel-scroll",wheelItemClass:"wheel-item",rotate:25,adjustTime:400,selectedIndex:0,wheelDisabledItemClass:"wheel-disabled-item"};this.options=Nn(t,e)},r.prototype.handleHooks=function(){var e=this,t=this.scroll,n=this.scroll.scroller,o=n.actionsHandler,i=n.scrollBehaviorX,a=n.scrollBehaviorY,c=n.animater,u=n.content;t.on(t.eventTypes.scrollEnd,function(l){var f=e.findNearestValidWheel(l.y).index;if(n.animater.forceStopped&&!e.isAdjustingPosition)return e.target=e.items[f],!0;e.setSelectedIndex(f),e.isAdjustingPosition&&(e.isAdjustingPosition=!1)}),this.scroll.hooks.on(this.scroll.hooks.eventTypes.refresh,function(l){l!==u&&(u=l,e.setSelectedIndex(e.options.selectedIndex,!0)),e.rotateX(e.scroll.y),e.wheelTo(e.selectedIndex,0)}),this.scroll.hooks.on(this.scroll.hooks.eventTypes.beforeInitialScrollTo,function(l){l.x=0,l.y=-(e.selectedIndex*e.itemHeight)}),n.hooks.on(n.hooks.eventTypes.checkClick,function(){var l=Fn(e.items).indexOf(e.target);return l===-1||e.wheelTo(l,e.options.adjustTime,Xn.swipe),!0}),n.hooks.on(n.hooks.eventTypes.scrollTo,function(l){l.y=e.findNearestValidWheel(l.y).y}),n.hooks.on(n.hooks.eventTypes.minDistanceScroll,function(){var l=n.animater;l.forceStopped===!0&&(l.forceStopped=!1)}),n.hooks.on(n.hooks.eventTypes.scrollToElement,function(l,f){if(ot(l,e.options.wheelItemClass))f.top=e.findNearestValidWheel(f.top).y;else return!0}),o.hooks.on(o.hooks.eventTypes.beforeStart,function(l){e.target=l.target}),i.hooks.on(i.hooks.eventTypes.computeBoundary,function(l){l.maxScrollPos=0,l.minScrollPos=0}),a.hooks.on(a.hooks.eventTypes.computeBoundary,function(l){e.items=e.scroll.scroller.content.children,e.checkWheelAllDisabled(),e.itemHeight=e.items.length>0?a.contentSize/e.items.length:0,l.maxScrollPos=-e.itemHeight*(e.items.length-1),l.minScrollPos=0}),a.hooks.on(a.hooks.eventTypes.momentum,function(l){l.rate=Un.rate,l.destination=e.findNearestValidWheel(l.destination).y}),a.hooks.on(a.hooks.eventTypes.end,function(l){var f=e.findNearestValidWheel(a.currentPos);l.destination=f.y,l.duration=e.options.adjustTime}),c.hooks.on(c.hooks.eventTypes.time,function(l){e.transitionDuration(l)}),c.hooks.on(c.hooks.eventTypes.timeFunction,function(l){e.timeFunction(l)}),c.hooks.on(c.hooks.eventTypes.callStop,function(){var l=e.findNearestValidWheel(e.scroll.y).index;e.isAdjustingPosition=!0,e.wheelTo(l,0)}),c.translater.hooks.on(c.translater.hooks.eventTypes.translate,function(l){e.rotateX(l.y)})},r.prototype.refreshBoundary=function(){var e=this.scroll.scroller,t=e.scrollBehaviorX,n=e.scrollBehaviorY,o=e.content;t.refresh(o),n.refresh(o)},r.prototype.setSelectedIndex=function(e,t){t===void 0&&(t=!1);var n=this.selectedIndex;this.selectedIndex=e,n!==e&&!t&&this.scroll.trigger(kr,e)},r.prototype.getSelectedIndex=function(){return this.selectedIndex},r.prototype.wheelTo=function(e,t,n){e===void 0&&(e=0),t===void 0&&(t=0);var o=-e*this.itemHeight;this.scroll.scrollTo(0,o,t,n)},r.prototype.restorePosition=function(){var e=this.scroll.pending;if(e){var t=this.getSelectedIndex();this.scroll.scroller.animater.clearTimer(),this.wheelTo(t,0)}},r.prototype.transitionDuration=function(e){for(var t=0;t<this.items.length;t++)this.items[t].style[Ct.transitionDuration]=e+"ms"},r.prototype.timeFunction=function(e){for(var t=0;t<this.items.length;t++)this.items[t].style[Ct.transitionTimingFunction]=e},r.prototype.rotateX=function(e){for(var t=this.options.rotate,n=t===void 0?25:t,o=0;o<this.items.length;o++){var i=n*(e/this.itemHeight+o),a=i.toFixed(3);this.items[o].style[Ct.transform]="rotateX("+a+"deg)"}},r.prototype.findNearestValidWheel=function(e){e=e>0?0:e<this.scroll.maxScrollY?this.scroll.maxScrollY:e;for(var t=Math.abs(Math.round(-e/this.itemHeight)),n=t,o=this.items,i=this.options.wheelDisabledItemClass;t>=0&&ot(o[t],i);)t--;if(t<0)for(t=n;t<=o.length-1&&ot(o[t],i);)t++;return t===o.length&&(t=n),{index:this.wheelItemsAllDisabled?-1:t,y:-t*this.itemHeight}},r.prototype.checkWheelAllDisabled=function(){var e=this.options.wheelDisabledItemClass,t=this.items;this.wheelItemsAllDisabled=!0;for(var n=0;n<t.length;n++)if(!ot(t[n],e)){this.wheelItemsAllDisabled=!1;break}},r.pluginName="wheel",r}();Yn.use(qn);const it=Array.isArray,Vn=r=>typeof r=="string",Sr=r=>typeof r=="number",Kn=r=>typeof r=="object"&&r!==null;function _t(r){return it(r)&&r.length===3}function Gn(r){return r%4===0&&(r%100!==0||r%400===0)}function Ie(r,e){const t=[];for(let n=r;n<=e;n++)t.push(n);return t}function Ot(r,e){const t=[];for(let n=r;n<=e;n++)t.push(`${n}`.padStart(2,"0"));return t}function Jn(){const r=Ot(0,23),e=Ot(0,59),t=Ot(0,59);return{timeList:[r,e,t],getTimeAnchors:Zn}}function Zn(r){return(_t(r)?r:Qn()).map(t=>Number(t))}function Qn(){const r=new Date,e=r.getHours(),t=r.getMinutes(),n=r.getSeconds();return[e,t,n]}function eo(){const t=new Date,n=t.getFullYear(),o=t.getMonth()+1,i=t.getDate(),[a,c]=N.useState(n),[u,l]=N.useState(o),f=Ie(1900,2100),p=Ie(1,12),b=N.useMemo(()=>{const B=[4,6,9,11],X=[1,3,5,7,8,10,12];return B.includes(u)?Ie(1,30):X.includes(u)?Ie(1,31):Gn(a)?Ie(1,29):Ie(1,28)},[u,a]),_=N.useMemo(()=>[f,p,b],[b]);function R(B){return(_t(B)?B:[n,o,i]).map((D,H)=>{if(!Sr(D))return 0;const W=_[H].indexOf(D);return W!==-1?W:0})}function I(B){const[X,D]=B;c(_[0][X]),l(_[1][D])}return{dateList:_,setSelectYear:c,setSelectMonth:l,updateDateSelect:I,getDateAnchors:R}}function to({data:r,isShowPicker:e,anchor:t,swipeTime:n,type:o,onChangeAnchor:i,onClose:a,onCancel:c,onConfirm:u}){const[l,f]=N.useState([]),[p,b]=N.useState([]),[_,R]=N.useState(!1),I=N.useRef(null),{dateList:B,setSelectYear:X,setSelectMonth:D,updateDateSelect:H,getDateAnchors:W}=eo(),{timeList:v,getTimeAnchors:te}=Jn(),Z=o==="date",K=o==="time",re=N.useMemo(()=>Z?W(t):K?te(t):it(t)?t:[t],[Z,K,t,_]);N.useEffect(()=>{pe()},[r,o,B]),N.useEffect(()=>{e&&(ie(),se(),ae())},[e]),N.useEffect(()=>{ie()},[l]),N.useEffect(()=>{ae()},[re]);function ie(){l.forEach((T,k)=>ne(k)),Q()}function pe(){const T={date:B,time:v},E=it(r[0])?[...r]:[r],x=o?T[o]:E;f(x)}function se(){!Z&&!K||(Z&&H(re),!_t(t)&&R(!_))}function ne(T){var x;const k=(x=I.current)==null?void 0:x.children[T];if(!k)return;const E=p[T];if(E)E.refresh();else{const S=We(k,{wheel:{selectedIndex:0,rotate:25},swipeTime:n});b(w=>{const O=[...w];return O[T]=S,O}),S.on("scrollEnd",()=>G(T,S))}}function G(T,k){if(Z){if(T===2)return;const E=k.getSelectedIndex(),x=B[T][E];T===0&&X(x),T===1&&D(x)}}function ae(){setTimeout(()=>{p.forEach((T,k)=>{const E=re[k];T.wheelTo(E??0)})})}function Q(){const T=l.length;if(p.length<=T)return;const k=p.splice(T);b(E=>E.slice(0,T)),k.forEach(E=>E.destroy())}function ce(){c==null||c(),de()}function ye(){p.some(x=>x.isInTransition)&&d();const{item:k,anchor:E}=g();u==null||u(k),i(E),de()}function de(){a()}function d(){p.forEach(T=>T.stop())}function g(){const{item:T,anchor:k}=p.reduce((E,x,S)=>{const w=x.getSelectedIndex(),O=l[S][w];return E.item.push(K?+O:O),E.anchor.push(Z?O:w),E},{item:[],anchor:[]});return T.length>1?{item:T,anchor:k}:{item:T[0],anchor:k[0]}}return{pickerData:l,wheelWrapper:I,cancel:ce,confirm:ye,closePicker:de}}const ro={cancelClass:"",confirmClass:"",titleClass:"",cancelColor:"#999",confirmColor:"#42b983",titleColor:"",cancelText:"Cancel",confirmText:"Confirm",titleText:""},no=[],oo={};function io({data:r=no,isShowPicker:e,options:t=oo,anchor:n,showKey:o="",swipeTime:i=500,type:a="",onChangeAnchor:c,onClose:u,onCancel:l,onConfirm:f}){const p=N.useRef(null),b=N.useRef(null),{pickerData:_,wheelWrapper:R,cancel:I,confirm:B,closePicker:X}=to({data:r,isShowPicker:e,options:t,anchor:n,showKey:o,swipeTime:i,type:a,onClose:u,onChangeAnchor:c,onCancel:l,onConfirm:f}),D=N.useMemo(()=>({...ro,...t}),[t]),H=D.cancelColor,W=D.confirmColor,v=D.titleColor,te=N.useMemo(()=>it(o)?o:[o],[o]);function Z(K){p.current&&p.current.style.setProperty("display",K)}return V.jsxs("div",{children:[V.jsx(Ve,{in:e,classNames:"component-hook-picker-fade",timeout:300,nodeRef:b,unmountOnExit:!0,children:V.jsx("div",{ref:b,role:"presentation",className:"component-hook-picker-mask",onClick:X,onKeyDown:K=>{K.key==="Escape"&&X()}})}),V.jsx(Ve,{in:e,classNames:"component-hook-picker-slide",timeout:300,nodeRef:p,onEnter:()=>Z(""),onExited:()=>Z("none"),children:V.jsxs("div",{ref:p,className:"component-hook-picker",style:{display:"none"},children:[V.jsxs("div",{className:"component-hook-picker_title",children:[V.jsx("button",{className:`component-hook-picker_cancel ${D.cancelClass}`,style:{color:H},onClick:I,children:D.cancelText}),V.jsx("button",{className:`component-hook-picker_confirm ${D.confirmClass}`,style:{color:W},onClick:B,children:D.confirmText}),V.jsx("h4",{className:D.titleClass,style:{color:v},children:D.titleText})]}),V.jsxs("div",{className:"component-hook-picker_panel",children:[V.jsx("div",{className:"component-hook-picker_mask_top"}),V.jsx("div",{className:"component-hook-picker_mask_bottom"}),V.jsx("div",{ref:R,className:"component-hook-picker_wheel_wrapper",children:_.map((K,re)=>V.jsx("div",{className:"component-hook-picker_wheel",children:V.jsx("ul",{className:"component-hook-picker_wheel_scroll",children:K.map((ie,pe)=>{const se=te[re]&&Kn(ie)?ie[te[re]]:ie;return!Vn(se)&&!Sr(se)?null:V.jsx("li",{className:"component-hook-picker_wheel_item",children:se},pe)})})},re))})]})]})})]})}return io});
|
|
49
|
+
*/var Le,gr;function at(){if(gr)return Le;gr=1;var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function t(n){if(n==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}function i(){try{if(!Object.assign)return!1;var n=new String("abc");if(n[5]="de",Object.getOwnPropertyNames(n)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(s).map(function(v){return s[v]});if(u.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(v){f[v]=v}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Le=i()?Object.assign:function(n,s){for(var a,u=t(n),f,v=1;v<arguments.length;v++){a=Object(arguments[v]);for(var g in a)o.call(a,g)&&(u[g]=a[g]);if(r){f=r(a);for(var E=0;E<f.length;E++)l.call(a,f[E])&&(u[f[E]]=a[f[E]])}}return u},Le}var Ve,yr;function Ue(){if(yr)return Ve;yr=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ve=r,Ve}var We,Er;function br(){return Er||(Er=1,We=Function.call.bind(Object.prototype.hasOwnProperty)),We}var ze,kr;function st(){if(kr)return ze;kr=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var o=Ue(),l={},t=br();r=function(n){var s="Warning: "+n;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(n,s,a,u,f){if(process.env.NODE_ENV!=="production"){for(var v in n)if(t(n,v)){var g;try{if(typeof n[v]!="function"){var E=Error((u||"React class")+": "+a+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}g=n[v](s,v,u,a,null,o)}catch(U){g=U}if(g&&!(g instanceof Error)&&r((u||"React class")+": type specification of "+a+" `"+v+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in l)){l[g.message]=!0;var O=f?f():"";r("Failed "+a+" type: "+g.message+(O??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(l={})},ze=i,ze}var qe,Tr;function ct(){if(Tr)return qe;Tr=1;var r=mr(),o=at(),l=Ue(),t=br(),i=st(),n=function(){};process.env.NODE_ENV!=="production"&&(n=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return qe=function(a,u){var f=typeof Symbol=="function"&&Symbol.iterator,v="@@iterator";function g(c){var h=c&&(f&&c[f]||c[v]);if(typeof h=="function")return h}var E="<<anonymous>>",O={array:F("array"),bigint:F("bigint"),bool:F("boolean"),func:F("function"),number:F("number"),object:F("object"),string:F("string"),symbol:F("symbol"),any:H(),arrayOf:L,element:C(),elementType:p(),instanceOf:ne,node:W(),objectOf:ue,oneOf:le,oneOfType:ee,shape:Q,exact:re};function U(c,h){return c===h?c!==0||1/c===1/h:c!==c&&h!==h}function T(c,h){this.message=c,this.data=h&&typeof h=="object"?h:{},this.stack=""}T.prototype=Error.prototype;function I(c){if(process.env.NODE_ENV!=="production")var h={},b=0;function k(A,R,P,D,z,N,se){if(D=D||E,N=N||P,se!==l){if(u){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var de=D+":"+P;!h[de]&&b<3&&(n("You are manually calling a React.PropTypes validation function for the `"+N+"` prop on `"+D+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),h[de]=!0,b++)}}return R[P]==null?A?R[P]===null?new T("The "+z+" `"+N+"` is marked as required "+("in `"+D+"`, but its value is `null`.")):new T("The "+z+" `"+N+"` is marked as required in "+("`"+D+"`, but its value is `undefined`.")):null:c(R,P,D,z,N)}var x=k.bind(null,!1);return x.isRequired=k.bind(null,!0),x}function F(c){function h(b,k,x,A,R,P){var D=b[k],z=M(D);if(z!==c){var N=te(D);return new T("Invalid "+A+" `"+R+"` of type "+("`"+N+"` supplied to `"+x+"`, expected ")+("`"+c+"`."),{expectedType:c})}return null}return I(h)}function H(){return I(s)}function L(c){function h(b,k,x,A,R){if(typeof c!="function")return new T("Property `"+R+"` of component `"+x+"` has invalid PropType notation inside arrayOf.");var P=b[k];if(!Array.isArray(P)){var D=M(P);return new T("Invalid "+A+" `"+R+"` of type "+("`"+D+"` supplied to `"+x+"`, expected an array."))}for(var z=0;z<P.length;z++){var N=c(P,z,x,A,R+"["+z+"]",l);if(N instanceof Error)return N}return null}return I(h)}function C(){function c(h,b,k,x,A){var R=h[b];if(!a(R)){var P=M(R);return new T("Invalid "+x+" `"+A+"` of type "+("`"+P+"` supplied to `"+k+"`, expected a single ReactElement."))}return null}return I(c)}function p(){function c(h,b,k,x,A){var R=h[b];if(!r.isValidElementType(R)){var P=M(R);return new T("Invalid "+x+" `"+A+"` of type "+("`"+P+"` supplied to `"+k+"`, expected a single ReactElement type."))}return null}return I(c)}function ne(c){function h(b,k,x,A,R){if(!(b[k]instanceof c)){var P=c.name||E,D=K(b[k]);return new T("Invalid "+A+" `"+R+"` of type "+("`"+D+"` supplied to `"+x+"`, expected ")+("instance of `"+P+"`."))}return null}return I(h)}function le(c){if(!Array.isArray(c))return process.env.NODE_ENV!=="production"&&(arguments.length>1?n("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):n("Invalid argument supplied to oneOf, expected an array.")),s;function h(b,k,x,A,R){for(var P=b[k],D=0;D<c.length;D++)if(U(P,c[D]))return null;var z=JSON.stringify(c,function(se,m){var de=te(m);return de==="symbol"?String(m):m});return new T("Invalid "+A+" `"+R+"` of value `"+String(P)+"` "+("supplied to `"+x+"`, expected one of "+z+"."))}return I(h)}function ue(c){function h(b,k,x,A,R){if(typeof c!="function")return new T("Property `"+R+"` of component `"+x+"` has invalid PropType notation inside objectOf.");var P=b[k],D=M(P);if(D!=="object")return new T("Invalid "+A+" `"+R+"` of type "+("`"+D+"` supplied to `"+x+"`, expected an object."));for(var z in P)if(t(P,z)){var N=c(P,z,x,A,R+"."+z,l);if(N instanceof Error)return N}return null}return I(h)}function ee(c){if(!Array.isArray(c))return process.env.NODE_ENV!=="production"&&n("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var h=0;h<c.length;h++){var b=c[h];if(typeof b!="function")return n("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(b)+" at index "+h+"."),s}function k(x,A,R,P,D){for(var z=[],N=0;N<c.length;N++){var se=c[N],m=se(x,A,R,P,D,l);if(m==null)return null;m.data&&t(m.data,"expectedType")&&z.push(m.data.expectedType)}var de=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new T("Invalid "+P+" `"+D+"` supplied to "+("`"+R+"`"+de+"."))}return I(k)}function W(){function c(h,b,k,x,A){return j(h[b])?null:new T("Invalid "+x+" `"+A+"` supplied to "+("`"+k+"`, expected a ReactNode."))}return I(c)}function $(c,h,b,k,x){return new T((c||"React class")+": "+h+" type `"+b+"."+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+x+"`.")}function Q(c){function h(b,k,x,A,R){var P=b[k],D=M(P);if(D!=="object")return new T("Invalid "+A+" `"+R+"` of type `"+D+"` "+("supplied to `"+x+"`, expected `object`."));for(var z in c){var N=c[z];if(typeof N!="function")return $(x,A,R,z,te(N));var se=N(P,z,x,A,R+"."+z,l);if(se)return se}return null}return I(h)}function re(c){function h(b,k,x,A,R){var P=b[k],D=M(P);if(D!=="object")return new T("Invalid "+A+" `"+R+"` of type `"+D+"` "+("supplied to `"+x+"`, expected `object`."));var z=o({},b[k],c);for(var N in z){var se=c[N];if(t(c,N)&&typeof se!="function")return $(x,A,R,N,te(se));if(!se)return new T("Invalid "+A+" `"+R+"` key `"+N+"` supplied to `"+x+"`.\nBad object: "+JSON.stringify(b[k],null," ")+`
|
|
50
|
+
Valid keys: `+JSON.stringify(Object.keys(c),null," "));var m=se(P,N,x,A,R+"."+N,l);if(m)return m}return null}return I(h)}function j(c){switch(typeof c){case"number":case"string":case"undefined":return!0;case"boolean":return!c;case"object":if(Array.isArray(c))return c.every(j);if(c===null||a(c))return!0;var h=g(c);if(h){var b=h.call(c),k;if(h!==c.entries){for(;!(k=b.next()).done;)if(!j(k.value))return!1}else for(;!(k=b.next()).done;){var x=k.value;if(x&&!j(x[1]))return!1}}else return!1;return!0;default:return!1}}function J(c,h){return c==="symbol"?!0:h?h["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&h instanceof Symbol:!1}function M(c){var h=typeof c;return Array.isArray(c)?"array":c instanceof RegExp?"object":J(h,c)?"symbol":h}function te(c){if(typeof c>"u"||c===null)return""+c;var h=M(c);if(h==="object"){if(c instanceof Date)return"date";if(c instanceof RegExp)return"regexp"}return h}function q(c){var h=te(c);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function K(c){return!c.constructor||!c.constructor.name?E:c.constructor.name}return O.checkPropTypes=i,O.resetWarningCache=i.resetWarningCache,O.PropTypes=O,O},qe}var Xe,xr;function ut(){if(xr)return Xe;xr=1;var r=Ue();function o(){}function l(){}return l.resetWarningCache=o,Xe=function(){function t(s,a,u,f,v,g){if(g!==r){var E=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw E.name="Invariant Violation",E}}t.isRequired=t;function i(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:i,element:t,elementType:t,instanceOf:i,node:t,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:l,resetWarningCache:o};return n.PropTypes=n,n},Xe}if(process.env.NODE_ENV!=="production"){var ft=mr(),lt=!0;Fe.exports=ct()(ft.isElement,lt)}else Fe.exports=ut()();var dt=Fe.exports;const _=qr(dt);function pt(r,o){return r.classList?!!o&&r.classList.contains(o):(" "+(r.className.baseVal||r.className)+" ").indexOf(" "+o+" ")!==-1}function vt(r,o){r.classList?r.classList.add(o):pt(r,o)||(typeof r.className=="string"?r.className=r.className+" "+o:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+o))}function Sr(r,o){return r.replace(new RegExp("(^|\\s)"+o+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function ht(r,o){r.classList?r.classList.remove(o):typeof r.className=="string"?r.className=Sr(r.className,o):r.setAttribute("class",Sr(r.className&&r.className.baseVal||"",o))}const _r={disabled:!1};var mt=process.env.NODE_ENV!=="production"?_.oneOfType([_.number,_.shape({enter:_.number,exit:_.number,appear:_.number}).isRequired]):null,gt=process.env.NODE_ENV!=="production"?_.oneOfType([_.string,_.shape({enter:_.string,exit:_.string,active:_.string}),_.shape({enter:_.string,enterDone:_.string,enterActive:_.string,exit:_.string,exitDone:_.string,exitActive:_.string})]):null;const Or=w.createContext(null);var Cr=function(o){return o.scrollTop},Pe="unmounted",me="exited",ge="entering",ke="entered",Be="exiting",he=function(r){dr(o,r);function o(t,i){var n;n=r.call(this,t,i)||this;var s=i,a=s&&!s.isMounting?t.enter:t.appear,u;return n.appearStatus=null,t.in?a?(u=me,n.appearStatus=ge):u=ke:t.unmountOnExit||t.mountOnEnter?u=Pe:u=me,n.state={status:u},n.nextCallback=null,n}o.getDerivedStateFromProps=function(i,n){var s=i.in;return s&&n.status===Pe?{status:me}:null};var l=o.prototype;return l.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},l.componentDidUpdate=function(i){var n=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==ge&&s!==ke&&(n=ge):(s===ge||s===ke)&&(n=Be)}this.updateStatus(!1,n)},l.componentWillUnmount=function(){this.cancelNextCallback()},l.getTimeouts=function(){var i=this.props.timeout,n,s,a;return n=s=a=i,i!=null&&typeof i!="number"&&(n=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:n,enter:s,appear:a}},l.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===ge){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Oe.findDOMNode(this);s&&Cr(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===me&&this.setState({status:Pe})},l.performEnter=function(i){var n=this,s=this.props.enter,a=this.context?this.context.isMounting:i,u=this.props.nodeRef?[a]:[Oe.findDOMNode(this),a],f=u[0],v=u[1],g=this.getTimeouts(),E=a?g.appear:g.enter;if(!i&&!s||_r.disabled){this.safeSetState({status:ke},function(){n.props.onEntered(f)});return}this.props.onEnter(f,v),this.safeSetState({status:ge},function(){n.props.onEntering(f,v),n.onTransitionEnd(E,function(){n.safeSetState({status:ke},function(){n.props.onEntered(f,v)})})})},l.performExit=function(){var i=this,n=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Oe.findDOMNode(this);if(!n||_r.disabled){this.safeSetState({status:me},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Be},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:me},function(){i.props.onExited(a)})})})},l.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},l.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},l.setNextCallback=function(i){var n=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,n.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},l.onTransitionEnd=function(i,n){this.setNextCallback(n);var s=this.props.nodeRef?this.props.nodeRef.current:Oe.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],f=u[0],v=u[1];this.props.addEndListener(f,v)}i!=null&&setTimeout(this.nextCallback,i)},l.render=function(){var i=this.state.status;if(i===Pe)return null;var n=this.props,s=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var a=lr(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return w.createElement(Or.Provider,{value:null},typeof s=="function"?s(i,a):w.cloneElement(w.Children.only(s),a))},o}(w.Component);he.contextType=Or,he.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:_.shape({current:typeof Element>"u"?_.any:function(r,o,l,t,i,n){var s=r[o];return _.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(r,o,l,t,i,n)}}),children:_.oneOfType([_.func.isRequired,_.element.isRequired]).isRequired,in:_.bool,mountOnEnter:_.bool,unmountOnExit:_.bool,appear:_.bool,enter:_.bool,exit:_.bool,timeout:function(o){var l=mt;o.addEndListener||(l=l.isRequired);for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return l.apply(void 0,[o].concat(i))},addEndListener:_.func,onEnter:_.func,onEntering:_.func,onEntered:_.func,onExit:_.func,onExiting:_.func,onExited:_.func}:{};function Te(){}he.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Te,onEntering:Te,onEntered:Te,onExit:Te,onExiting:Te,onExited:Te},he.UNMOUNTED=Pe,he.EXITED=me,he.ENTERING=ge,he.ENTERED=ke,he.EXITING=Be;var yt=function(o,l){return o&&l&&l.split(" ").forEach(function(t){return vt(o,t)})},He=function(o,l){return o&&l&&l.split(" ").forEach(function(t){return ht(o,t)})},Me=function(r){dr(o,r);function o(){for(var t,i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];return t=r.call.apply(r,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(a,u){var f=t.resolveArguments(a,u),v=f[0],g=f[1];t.removeClasses(v,"exit"),t.addClass(v,g?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(a,u)},t.onEntering=function(a,u){var f=t.resolveArguments(a,u),v=f[0],g=f[1],E=g?"appear":"enter";t.addClass(v,E,"active"),t.props.onEntering&&t.props.onEntering(a,u)},t.onEntered=function(a,u){var f=t.resolveArguments(a,u),v=f[0],g=f[1],E=g?"appear":"enter";t.removeClasses(v,E),t.addClass(v,E,"done"),t.props.onEntered&&t.props.onEntered(a,u)},t.onExit=function(a){var u=t.resolveArguments(a),f=u[0];t.removeClasses(f,"appear"),t.removeClasses(f,"enter"),t.addClass(f,"exit","base"),t.props.onExit&&t.props.onExit(a)},t.onExiting=function(a){var u=t.resolveArguments(a),f=u[0];t.addClass(f,"exit","active"),t.props.onExiting&&t.props.onExiting(a)},t.onExited=function(a){var u=t.resolveArguments(a),f=u[0];t.removeClasses(f,"exit"),t.addClass(f,"exit","done"),t.props.onExited&&t.props.onExited(a)},t.resolveArguments=function(a,u){return t.props.nodeRef?[t.props.nodeRef.current,a]:[a,u]},t.getClassNames=function(a){var u=t.props.classNames,f=typeof u=="string",v=f&&u?u+"-":"",g=f?""+v+a:u[a],E=f?g+"-active":u[a+"Active"],O=f?g+"-done":u[a+"Done"];return{baseClassName:g,activeClassName:E,doneClassName:O}},t}var l=o.prototype;return l.addClass=function(i,n,s){var a=this.getClassNames(n)[s+"ClassName"],u=this.getClassNames("enter"),f=u.doneClassName;n==="appear"&&s==="done"&&f&&(a+=" "+f),s==="active"&&i&&Cr(i),a&&(this.appliedClasses[n][s]=a,yt(i,a))},l.removeClasses=function(i,n){var s=this.appliedClasses[n],a=s.base,u=s.active,f=s.done;this.appliedClasses[n]={},a&&He(i,a),u&&He(i,u),f&&He(i,f)},l.render=function(){var i=this.props;i.classNames;var n=lr(i,["classNames"]);return w.createElement(he,Ae({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},o}(w.Component);Me.defaultProps={classNames:""},Me.propTypes=process.env.NODE_ENV!=="production"?Ae({},he.propTypes,{classNames:gt,onEnter:_.func,onEntering:_.func,onEntered:_.func,onExit:_.func,onExiting:_.func,onExited:_.func}):{};function Et({show:r,onClose:o,onOpen:l,onClosed:t,children:i,teleport:n=document.body}){const s=w.useRef(null),a=w.useRef(null);w.useEffect(()=>(r?(document.body.style.overflow="hidden",l==null||l()):document.body.style.overflow="",()=>{document.body.style.overflow=""}),[r]);function u(f){s.current&&(s.current.style.setProperty("display",f),f==="none"&&(t==null||t()))}return Oe.createPortal(oe.jsxs(oe.Fragment,{children:[oe.jsx(Me,{in:r,timeout:300,nodeRef:a,classNames:"chook-picker-fade",unmountOnExit:!0,children:oe.jsx("div",{ref:a,role:"presentation",className:"chook-picker-mask",onClick:o,onKeyDown:f=>{f.key==="Escape"&&o()}})}),oe.jsx(Me,{in:r,timeout:300,nodeRef:s,classNames:"chook-picker-slide",onEnter:()=>u(""),onExited:()=>u("none"),children:oe.jsx("div",{ref:s,className:"chook-picker-container",style:{display:"none"},children:i})})]}),n)}const bt=16,Ge=48,kt=.52,Rr=150,Je=300,Tt=15,xt=.008,Pr=5,St="Select Date",_t=["year","month","day"],Ot="Select Time",Ct=["hour","minute","second"];function Rt(){const r={startX:0,startY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0};let o="",l=!0;const t=()=>o==="vertical",i=()=>o==="horizontal";function n(){r.deltaX=0,r.deltaY=0,r.offsetX=0,r.offsetY=0,o="",l=!0}function s(f){const v="touches"in f?f.touches[0]:f;n(),r.startX=v.clientX,r.startY=v.clientY}function a(f){if(!r.startX||!r.startY)return!0;const v="touches"in f?f.touches[0]:f;r.deltaX=Math.max(v.clientX,0)-r.startX,r.deltaY=v.clientY-r.startY,r.offsetX=Math.abs(r.deltaX),r.offsetY=Math.abs(r.deltaY);const g=10;(!o||r.offsetX<g&&r.offsetY<g)&&(o=Qr(r.offsetX,r.offsetY)),l&&(r.offsetX>Pr||r.offsetY>Pr)&&(l=!1)}function u(){r.startX=0,r.startY=0}return{pointer:r,move:a,start:s,stop:u,reset:n,isVertical:t,isHorizontal:i}}function Pt({column:r,onChange:o}){const t=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)/bt,[i,n]=w.useState(0),[s,a]=w.useState(0),u=w.useRef(0),f=w.useRef(0),v=w.useRef(0),g=w.useRef(!1),E=w.useRef(null),{pointer:O,start:U,move:T,stop:I}=w.useMemo(()=>Rt(),[]);function F(W){return W*t}function H(W){const $=r.length,Q=Math.round(-W/F(Ge));return Q<0?0:Q>=$?$-1:Q}function L(W){const $=-W*F(Ge),Q=()=>o==null?void 0:o(W);g.current&&$!==i?E.current=Q:Q(),n($)}function C(W){U(W),g.current=!0,a(0),f.current=Date.now(),u.current=i,v.current=u.current,E.current=null}function p(W){if(T(W))return;const Q=r.length,re=u.current+O.deltaY,j=F((Q-1)*-48),J=Math.min(Math.max(re,j),0),M=Date.now();n(J),!(M-f.current<=Je)&&(f.current=M,v.current=J)}function ne(){I();const W=i-v.current,$=Date.now()-f.current;if($<Je&&Math.abs(W)>Tt){le(W,$);return}const Q=H(i);a(Rr),L(Q),g.current=!1}function le(W,$){const Q=Math.abs(W/$),re=i+Q/xt*(W<0?-1:1),j=H(re);a(Je),L(j)}function ue(){a(0),g.current=!1,E.current&&(E.current(),E.current=null)}function ee(W,$="auto"){g.current&&$==="smooth"||(E.current=null,g.current=$==="smooth",a($==="smooth"?Rr:0),L(W))}return{offsetY:i,transitionDuration:s,onPointerDown:C,onPointerMove:p,onPointerUp:ne,stopInertialSliding:ue,scrollToIndex:ee}}const wr=w.forwardRef(({column:r,fields:o,selectedIndex:l=0,onChange:t},i)=>{const{offsetY:n,transitionDuration:s,onPointerDown:a,onPointerMove:u,onPointerUp:f,stopInertialSliding:v,scrollToIndex:g}=Pt({column:r,onChange:E});w.useImperativeHandle(i,()=>({scrollToSelected:O}));function E(T){T!==l&&t(T)}function O(T=l,I){g(T,I)}function U(T){T!==l&&O(T,"smooth")}return oe.jsx("div",{role:"presentation",className:"chook-picker-column",onTouchStart:a,onTouchMove:u,onTouchEnd:f,onTouchCancel:f,onMouseDown:a,onMouseMove:u,onMouseUp:f,children:oe.jsx("ul",{style:{overflowY:"hidden",transform:`translate3d(0, ${n}px, 0)`,transitionDuration:`${s}ms`,transitionProperty:s?"all":"none"},onTransitionEnd:v,children:r.map((T,I)=>oe.jsx("div",{tabIndex:0,role:"button","aria-label":"Select option",className:"chook-picker-column-item",onClick:()=>U(I),onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&U(I)},children:oe.jsx("p",{className:"chook-picker-column-label",style:{transform:`rotate3d(1, 0, 0, ${(I*Ge+n)*kt}deg)`},children:T[o.label]})},T[o.value]))})})});wr.displayName="Column";function Ke({show:r,values:o,title:l,columns:t,linkage:i=!1,loading:n=!1,loadingSlot:s,emptySlot:a,teleport:u,confirmButtonText:f="Confirm",cancelButtonText:v="Cancel",columnsFieldNames:g,onConfirm:E,onClose:O,onChange:U,onCancel:T,onOpen:I,onClosed:F}){const[H,L]=w.useState([]),[C,p]=w.useState([]),[ne,le]=w.useState([]),ue=w.useRef([]),ee=Jr(g),W=Gr(t,ee),$=w.useMemo(()=>W==="single"?[t]:W==="multiple"?t:Kr(t,C,ee),[t,W,C,ee]);w.useEffect(()=>{!o||o.every((K,c)=>K===C[c])||p(o)},[o]),w.useEffect(()=>{var h;const q=$.length,K=[];let c=!1;for(let b=0;b<q;b++){const k=$[b],x=C[b],A=ar(k,x,ee);if(A===-1){const P=(ne[b]??0)>=k.length?k.length-1:0;K[b]=P}else K[b]=A;K[b]!==ne[b]&&((h=ue.current[b])==null||h.scrollToSelected(K[b]),c=!0)}c&&le(K)},[C,$,ee]);function Q(q,K){const c=$[q],h=c[K][ee.value],b=C[q];if(h===b)return;const k=[...C];if(k[q]=h,W==="cascade"){const x=c[K],A=Zr(x,q,k,ee);p(A),re(A)}else p(k),re(k)}function re(q){U==null||U(q),i&&L(q)}function j(){L(C),O(),E==null||E(C)}function J(){O(),T==null||T()}function M(){I==null||I()}function te(){p(o?[...o]:[...H]),F==null||F()}return oe.jsxs(Et,{show:r,teleport:u,onOpen:M,onClose:O,onClosed:te,children:[oe.jsxs("div",{className:"chook-picker-header",children:[oe.jsx("button",{className:"chook-picker-cancel",onClick:J,children:v}),oe.jsx("p",{className:"chook-picker-title",children:l}),oe.jsx("button",{className:"chook-picker-confirm",onClick:j,children:f})]}),oe.jsxs("div",{className:"chook-picker-columns chook-picker-columns-backdrop",onTouchMove:q=>q.stopPropagation(),children:[!n&&!t.length?a:null,$.map((q,K)=>oe.jsx(wr,{ref:c=>ue.current[K]=c,column:q,fields:ee,selectedIndex:ne[K],onChange:c=>Q(K,c)},K)),oe.jsx("div",{className:"chook-picker-mask-backdrop"})]}),n?oe.jsx("div",{className:"chook-picker-loading",children:s}):null]})}function wt({show:r,values:o,title:l=St,columnsType:t=_t,minDate:i=new Date(new Date().getFullYear()-10,0,1),maxDate:n=new Date(new Date().getFullYear()+10,11,31),teleport:s,confirmButtonText:a,cancelButtonText:u,formatYearLabel:f=Ne,formatMonthLabel:v=Ne,formatDayLabel:g=Ne,onConfirm:E,onClose:O,onCancel:U,onOpen:T,onClosed:I}){const[F,H]=w.useState([]),[L,C]=w.useState([]),p=w.useMemo(()=>{const j={year:ne,month:le,day:ue};return t.map(J=>j[J]())},[t,i,n,L,f,v,g]);function ne(){const j=i.getFullYear(),J=n.getFullYear();return be(j,J,f)}function le(){const j=ee("year"),J=cr(j,i)?i.getMonth()+1:1,M=ur(j,n)?n.getMonth()+1:12;return be(J,M,v)}function ue(){const j=ee("year"),J=ee("month"),M=cr(j,i)&&et(J,i),te=ur(j,n)&&rt(J,n),q=M?i.getDate():1,K=te?n.getDate():tt(j,J);return be(q,K,g)}function ee(j){const J=t.indexOf(j),M=L[J];return M?Number(M):j==="year"?new Date().getFullYear():j==="month"?new Date().getMonth()+1:new Date().getDate()}function W(j){H(j),O(),E==null||E(j)}function $(){O(),U==null||U()}function Q(){T==null||T(),o&&o.length?C([...o]):C(t.map(ee))}function re(){C(o?[...o]:[...F]),I==null||I()}return oe.jsx(Ke,{values:L,show:r,title:l,columns:p,teleport:s,confirmButtonText:a,cancelButtonText:u,linkage:!0,onConfirm:W,onClose:O,onChange:C,onCancel:$,onOpen:Q,onClosed:re})}function At({show:r,values:o,title:l=Ot,columnsType:t=Ct,minTime:i,maxTime:n,teleport:s,confirmButtonText:a,cancelButtonText:u,formatHourLabel:f=Ye,formatMinuteLabel:v=Ye,formatSecondLabel:g=Ye,onConfirm:E,onClose:O,onCancel:U,onOpen:T,onClosed:I}){const[F,H]=w.useState([]),[L,C]=w.useState([]),p=w.useMemo(()=>fr(i??"")??{hour:0,minute:0,second:0},[i]),ne=w.useMemo(()=>fr(n??"")??{hour:23,minute:59,second:59},[n]),le=w.useMemo(()=>{const M={hour:ue,minute:ee,second:W};return t.map(te=>M[te]())},[t,p,ne,L,f,v,g]);function ue(){return be(p.hour,ne.hour,f)}function ee(){const M=$("hour"),{hour:te,minute:q}=p,{hour:K,minute:c}=ne;return be(M===te?q:0,M===K?c:59,v)}function W(){const M=$("hour"),te=$("minute"),{hour:q,minute:K,second:c}=p,{hour:h,minute:b,second:k}=ne;return be(M===q&&te===K?c:0,M===h&&te===b?k:59,g)}function $(M){const te=t.indexOf(M),q=L[te];return q!==void 0?Number(q):M==="hour"?new Date().getHours():M==="minute"?new Date().getMinutes():new Date().getSeconds()}function Q(M){H(M),O(),E==null||E(M)}function re(){O(),U==null||U()}function j(){T==null||T(),o&&o.length?C([...o]):C(t.map($))}function J(){C(o?[...o]:[...F]),I==null||I()}return oe.jsx(Ke,{values:L,show:r,title:l,columns:le,teleport:s,confirmButtonText:a,cancelButtonText:u,linkage:!0,onConfirm:Q,onClose:O,onChange:C,onCancel:re,onOpen:j,onClosed:J})}ve.DatePicker=wt,ve.Picker=Ke,ve.TimePicker=At,Object.defineProperty(ve,Symbol.toStringTag,{value:"Module"})});
|
package/dist/vue/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
:root{--chook-picker-background: #fff;--chook-picker-border-radius: .5rem;--chook-picker-padding-bottom: 1.25rem;--chook-picker-z-index: 2147483646;--chook-picker-mask-background: rgba(0, 0, 0, .2);--chook-picker-header-padding: .75rem 0;--chook-picker-header-margin-bottom: 1.25rem;--chook-picker-title-font-size: 1rem;--chook-picker-title-font-weight: 500;--chook-picker-title-color: #323233;--chook-picker-confirm-color: #1989fa;--chook-picker-confirm-font-size: .875rem;--chook-picker-confirm-padding: 0 1rem;--chook-picker-cancel-color: #969799;--chook-picker-cancel-font-size: .875rem;--chook-picker-cancel-padding: 0 1rem;--chook-picker-active-opacity: .6;--chook-picker-columns-margin: 0 1rem;--chook-picker-columns-backdrop: linear-gradient( to bottom, #f2f2f2 0px, #f2f2f2 .0625rem, transparent .0625rem, transparent calc(100% - .0625rem) , #f2f2f2 calc(100% - .0625rem) , #f2f2f2 100% );--chook-picker-mask-backdrop: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4));--chook-picker-column-label-color: #323233;--chook-picker-column-label-padding: 0 .25rem;--chook-picker-column-font-size: 1rem;--chook-picker-column-font-weight: 500}.chook-picker-mask{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--chook-picker-mask-background);z-index:calc(var(--chook-picker-z-index) - 1)}.chook-picker-container{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--chook-picker-z-index);-webkit-user-select:none;user-select:none;padding-bottom:var(--chook-picker-padding-bottom);background:var(--chook-picker-background);border-top-left-radius:var(--chook-picker-border-radius);border-top-right-radius:var(--chook-picker-border-radius)}.chook-picker-header{display:flex;align-items:center;justify-content:space-between;padding:var(--chook-picker-header-padding);margin-bottom:var(--chook-picker-header-margin-bottom)}.chook-picker-title{font-size:var(--chook-picker-title-font-size);font-weight:var(--chook-picker-title-font-weight);color:var(--chook-picker-title-color);margin:0}.chook-picker-columns{width:calc(100% - var(--chook-picker-columns-margin) * 2);height:13.5rem;overflow:hidden;position:relative;display:flex;margin:var(--chook-picker-columns-margin)}.chook-picker-columns-backdrop{background-image:var(--chook-picker-columns-backdrop);background-repeat:no-repeat;background-position:center;background-size:100% 3rem}.chook-picker-mask-backdrop{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;background-image:var(--chook-picker-mask-backdrop);background-repeat:no-repeat;background-position:top,bottom;background-size:100% 5.25rem}.chook-picker-loading{height:100%;width:100%;position:absolute;top:0;left:0}.chook-picker-column{flex:1 1 0%;overflow:hidden;padding:5.375rem 0;cursor:grab}.chook-picker-column ul{margin:0;padding:0;list-style:none}.chook-picker-column-item{height:3rem;display:flex;justify-content:center;align-items:center;cursor:grab}.chook-picker-column-label{color:var(--chook-picker-column-label-color);font-size:var(--chook-picker-column-font-size);font-weight:var(--chook-picker-column-font-weight);padding:var(--chook-picker-column-label-padding);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}button.chook-picker-confirm{color:var(--chook-picker-confirm-color);font-size:var(--chook-picker-confirm-font-size);background-color:transparent;padding:var(--chook-picker-confirm-padding);border:none}button.chook-picker-confirm:active{opacity:var(--chook-picker-active-opacity)}button.chook-picker-confirm:hover{color:var(--chook-picker-confirm-color);background-color:transparent}button.chook-picker-cancel{color:var(--chook-picker-cancel-color);font-size:var(--chook-picker-cancel-font-size);background-color:transparent;padding:var(--chook-picker-cancel-padding);border:none}button.chook-picker-cancel:active{opacity:var(--chook-picker-active-opacity)}button.chook-picker-cancel:hover{color:var(--chook-picker-cancel-color);background-color:transparent}.chook-picker-fade-enter-active,.chook-picker-fade-leave-active,.chook-picker-slide-enter-active,.chook-picker-slide-leave-active{transition:all .3s ease}.chook-picker-fade-enter-from,.chook-picker-fade-leave-to{opacity:0}.chook-picker-slide-enter-from,.chook-picker-slide-leave-to{opacity:.5;transform:translate3d(0,100%,0)}
|