mazey 3.4.1 → 3.5.0
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 +108 -43
- package/examples/index.ts +44 -1
- package/lib/index.cjs.js +2 -2
- package/lib/index.d.ts +66 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.esm.js +2 -2
- package/lib/mazey.min.js +2 -2
- package/package.json +5 -4
- package/src/index.ts +124 -1
package/lib/mazey.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* mazey v3.
|
|
2
|
+
* mazey v3.5.0
|
|
3
3
|
* (c) 2018-2023 Mazey Chu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var mazey=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!c.call({1:2},1)?function(e){var t=u(this,e);return!!t&&t.enumerable}:c},f=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},s={}.toString,d=function(e){return s.call(e).slice(8,-1)},p="".split,g=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?p.call(e,""):Object(e)}:Object,v=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},h=function(e){return g(v(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,b=function(e,t){return w.call(e,t)},S=o.document,x=m(S)&&m(S.createElement),E=function(e){return x?S.createElement(e):{}},O=!a&&!i((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),T=Object.getOwnPropertyDescriptor,A={f:a?T:function(e,t){if(e=h(e),t=y(t,!0),O)try{return T(e,t)}catch(e){}if(b(e,t))return f(!l.f.call(e,t),e[t])}},j=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},R=Object.defineProperty,C={f:a?R:function(e,t,n){if(j(e),t=y(t,!0),j(n),O)try{return R(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},P=a?function(e,t,n){return C.f(e,t,f(1,n))}:function(e,t,n){return e[t]=n,e},_=function(e,t){try{P(o,e,t)}catch(n){o[e]=t}return t},M="__core-js_shared__",k=o[M]||_(M,{}),L=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(e){return L.call(e)});var N,I,F,D=k.inspectSource,B=o.WeakMap,U="function"==typeof B&&/native code/.test(D(B)),$=n((function(e){(e.exports=function(e,t){return k[e]||(k[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),q=0,V=Math.random(),W=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++q+V).toString(36)},z=$("keys"),G=function(e){return z[e]||(z[e]=W(e))},H={},K=o.WeakMap;if(U){var J=new K,Q=J.get,X=J.has,Y=J.set;N=function(e,t){return Y.call(J,e,t),t},I=function(e){return Q.call(J,e)||{}},F=function(e){return X.call(J,e)}}else{var Z=G("state");H[Z]=!0,N=function(e,t){return P(e,Z,t),t},I=function(e){return b(e,Z)?e[Z]:{}},F=function(e){return b(e,Z)}}var ee,te,ne={set:N,get:I,has:F,enforce:function(e){return F(e)?I(e):N(e,{})},getterFor:function(e){return function(t){var n;if(!m(t)||(n=I(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},re=n((function(e){var t=ne.get,n=ne.enforce,r=String(String).split("String");(e.exports=function(e,t,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||b(i,"name")||P(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==o?(c?!l&&e[t]&&(u=!0):delete e[t],u?e[t]=i:P(e,t,i)):u?e[t]=i:_(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||D(this)}))})),oe=o,ie=function(e){return"function"==typeof e?e:void 0},ae=function(e,t){return arguments.length<2?ie(oe[e])||ie(o[e]):oe[e]&&oe[e][t]||o[e]&&o[e][t]},ce=Math.ceil,ue=Math.floor,le=function(e){return isNaN(e=+e)?0:(e>0?ue:ce)(e)},fe=Math.min,se=function(e){return e>0?fe(le(e),9007199254740991):0},de=Math.max,pe=Math.min,ge=function(e,t){var n=le(e);return n<0?de(n+t,0):pe(n,t)},ve=function(e){return function(t,n,r){var o,i=h(t),a=se(i.length),c=ge(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},he={includes:ve(!0),indexOf:ve(!1)},me=he.indexOf,ye=function(e,t){var n,r=h(e),o=0,i=[];for(n in r)!b(H,n)&&b(r,n)&&i.push(n);for(;t.length>o;)b(r,n=t[o++])&&(~me(i,n)||i.push(n));return i},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],be=we.concat("length","prototype"),Se={f:Object.getOwnPropertyNames||function(e){return ye(e,be)}},xe={f:Object.getOwnPropertySymbols},Ee=ae("Reflect","ownKeys")||function(e){var t=Se.f(j(e)),n=xe.f;return n?t.concat(n(e)):t},Oe=function(e,t){for(var n=Ee(t),r=C.f,o=A.f,i=0;i<n.length;i++){var a=n[i];b(e,a)||r(e,a,o(t,a))}},Te=/#|\.prototype\./,Ae=function(e,t){var n=Re[je(e)];return n==Pe||n!=Ce&&("function"==typeof t?i(t):!!t)},je=Ae.normalize=function(e){return String(e).replace(Te,".").toLowerCase()},Re=Ae.data={},Ce=Ae.NATIVE="N",Pe=Ae.POLYFILL="P",_e=Ae,Me=A.f,ke=function(e,t){var n,r,i,a,c,u=e.target,l=e.global,f=e.stat;if(n=l?o:f?o[u]||_(u,{}):(o[u]||{}).prototype)for(r in t){if(a=t[r],i=e.noTargetGet?(c=Me(n,r))&&c.value:n[r],!_e(l?r:u+(f?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Oe(a,i)}(e.sham||i&&i.sham)&&P(a,"sham",!0),re(n,r,a,e)}},Le=Array.isArray||function(e){return"Array"==d(e)},Ne=function(e){return Object(v(e))},Ie=function(e,t,n){var r=y(t);r in e?C.f(e,r,f(0,n)):e[r]=n},Fe=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),De=Fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Be=$("wks"),Ue=o.Symbol,$e=De?Ue:Ue&&Ue.withoutSetter||W,qe=function(e){return b(Be,e)||(Fe&&b(Ue,e)?Be[e]=Ue[e]:Be[e]=$e("Symbol."+e)),Be[e]},Ve=qe("species"),We=function(e,t){var n;return Le(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Le(n.prototype)?m(n)&&null===(n=n[Ve])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},ze=ae("navigator","userAgent")||"",Ge=o.process,He=Ge&&Ge.versions,Ke=He&&He.v8;Ke?te=(ee=Ke.split("."))[0]+ee[1]:ze&&(!(ee=ze.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=ze.match(/Chrome\/(\d+)/))&&(te=ee[1]);var Je=te&&+te,Qe=qe("species"),Xe=function(e){return Je>=51||!i((function(){var t=[];return(t.constructor={})[Qe]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ye=qe("isConcatSpreadable"),Ze=9007199254740991,et="Maximum allowed index exceeded",tt=Je>=51||!i((function(){var e=[];return e[Ye]=!1,e.concat()[0]!==e})),nt=Xe("concat"),rt=function(e){if(!m(e))return!1;var t=e[Ye];return void 0!==t?!!t:Le(e)};ke({target:"Array",proto:!0,forced:!tt||!nt},{concat:function(e){var t,n,r,o,i,a=Ne(this),c=We(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(rt(i=-1===t?a:arguments[t])){if(u+(o=se(i.length))>Ze)throw TypeError(et);for(n=0;n<o;n++,u++)n in i&&Ie(c,u,i[n])}else{if(u>=Ze)throw TypeError(et);Ie(c,u++,i)}return c.length=u,c}});var ot,it=Object.keys||function(e){return ye(e,we)},at=a?Object.defineProperties:function(e,t){j(e);for(var n,r=it(t),o=r.length,i=0;o>i;)C.f(e,n=r[i++],t[n]);return e},ct=ae("document","documentElement"),ut=G("IE_PROTO"),lt=function(){},ft=function(e){return"<script>"+e+"</"+"script>"},st=function(){try{ot=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;st=ot?function(e){e.write(ft("")),e.close();var t=e.parentWindow.Object;return e=null,t}(ot):((t=E("iframe")).style.display="none",ct.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ft("document.F=Object")),e.close(),e.F);for(var n=we.length;n--;)delete st.prototype[we[n]];return st()};H[ut]=!0;var dt=Object.create||function(e,t){var n;return null!==e?(lt.prototype=j(e),n=new lt,lt.prototype=null,n[ut]=e):n=st(),void 0===t?n:at(n,t)},pt=qe("unscopables"),gt=Array.prototype;null==gt[pt]&&C.f(gt,pt,{configurable:!0,value:dt(null)});var vt=function(e){gt[pt][e]=!0};ke({target:"Array",proto:!0},{fill:function(e){for(var t=Ne(this),n=se(t.length),r=arguments.length,o=ge(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:ge(i,n);a>o;)t[o++]=e;return t}}),vt("fill");var ht=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},mt=function(e,t,n){if(ht(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},yt=[].push,wt=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=5==e||i;return function(c,u,l,f){for(var s,d,p=Ne(c),v=g(p),h=mt(u,l,3),m=se(v.length),y=0,w=f||We,b=t?w(c,m):n?w(c,0):void 0;m>y;y++)if((a||y in v)&&(d=h(s=v[y],y,p),e))if(t)b[y]=d;else if(d)switch(e){case 3:return!0;case 5:return s;case 6:return y;case 2:yt.call(b,s)}else if(o)return!1;return i?-1:r||o?o:b}},bt={forEach:wt(0),map:wt(1),filter:wt(2),some:wt(3),every:wt(4),find:wt(5),findIndex:wt(6)},St=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))},xt=Object.defineProperty,Et={},Ot=function(e){throw e},Tt=function(e,t){if(b(Et,e))return Et[e];t||(t={});var n=[][e],r=!!b(t,"ACCESSORS")&&t.ACCESSORS,o=b(t,0)?t[0]:Ot,c=b(t,1)?t[1]:void 0;return Et[e]=!!n&&!i((function(){if(r&&!a)return!0;var e={length:-1};r?xt(e,1,{enumerable:!0,get:Ot}):e[1]=1,n.call(e,o,c)}))},At=bt.forEach,jt=St("forEach"),Rt=Tt("forEach"),Ct=jt&&Rt?[].forEach:function(e){return At(this,e,arguments.length>1?arguments[1]:void 0)};ke({target:"Array",proto:!0,forced:[].forEach!=Ct},{forEach:Ct});var Pt=he.includes;ke({target:"Array",proto:!0,forced:!Tt("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return Pt(this,e,arguments.length>1?arguments[1]:void 0)}}),vt("includes");var _t=he.indexOf,Mt=[].indexOf,kt=!!Mt&&1/[1].indexOf(1,-0)<0,Lt=St("indexOf"),Nt=Tt("indexOf",{ACCESSORS:!0,1:0});ke({target:"Array",proto:!0,forced:kt||!Lt||!Nt},{indexOf:function(e){return kt?Mt.apply(this,arguments)||0:_t(this,e,arguments.length>1?arguments[1]:void 0)}});var It=[].join,Ft=g!=Object,Dt=St("join",",");ke({target:"Array",proto:!0,forced:Ft||!Dt},{join:function(e){return It.call(h(this),void 0===e?",":e)}});var Bt=function(e){return function(t,n,r,o){ht(n);var i=Ne(t),a=g(i),c=se(i.length),u=e?c-1:0,l=e?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=l;break}if(u+=l,e?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:c>u;u+=l)u in a&&(o=n(o,a[u],u,i));return o}},Ut={left:Bt(!1),right:Bt(!0)}.left,$t=St("reduce"),qt=Tt("reduce",{1:0});ke({target:"Array",proto:!0,forced:!$t||!qt},{reduce:function(e){return Ut(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Vt=Xe("slice"),Wt=Tt("slice",{ACCESSORS:!0,0:0,1:2}),zt=qe("species"),Gt=[].slice,Ht=Math.max;ke({target:"Array",proto:!0,forced:!Vt||!Wt},{slice:function(e,t){var n,r,o,i=h(this),a=se(i.length),c=ge(e,a),u=ge(void 0===t?a:t,a);if(Le(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Le(n.prototype)?m(n)&&null===(n=n[zt])&&(n=void 0):n=void 0,n===Array||void 0===n))return Gt.call(i,c,u);for(r=new(void 0===n?Array:n)(Ht(u-c,0)),o=0;c<u;c++,o++)c in i&&Ie(r,o,i[c]);return r.length=o,r}});var Kt=C.f,Jt=Function.prototype,Qt=Jt.toString,Xt=/^\s*function ([^ (]*)/,Yt="name";a&&!(Yt in Jt)&&Kt(Jt,Yt,{configurable:!0,get:function(){try{return Qt.call(this).match(Xt)[1]}catch(e){return""}}});var Zt="".repeat||function(e){var t=String(v(this)),n="",r=le(e);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},en=1..toFixed,tn=Math.floor,nn=function(e,t,n){return 0===t?n:t%2==1?nn(e,t-1,n*e):nn(e*e,t/2,n)};ke({target:"Number",proto:!0,forced:en&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!i((function(){en.call({})}))},{toFixed:function(e){var t,n,r,o,i=function(e){if("number"!=typeof e&&"Number"!=d(e))throw TypeError("Incorrect invocation");return+e}(this),a=le(e),c=[0,0,0,0,0,0],u="",l="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=tn(r/1e7)},s=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=tn(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+Zt.call("0",7-n.length)+n}return t};if(a<0||a>20)throw RangeError("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(u="-",i=-i),i>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(i*nn(2,69,1))-69)<0?i*nn(2,-t,1):i/nn(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),r=a;r>=7;)f(1e7,0),r-=7;for(f(nn(10,r,1),0),r=t-1;r>=23;)s(1<<23),r-=23;s(1<<r),f(1,1),s(2),l=p()}else f(0,n),f(1<<-t,0),l=p()+Zt.call("0",a);return l=a>0?u+((o=l.length)<=a?"0."+Zt.call("0",a-o)+l:l.slice(0,o-a)+"."+l.slice(o-a)):u+l}});var rn=Object.assign,on=Object.defineProperty,an=!rn||i((function(){if(a&&1!==rn({b:1},rn(on({},"a",{enumerable:!0,get:function(){on(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=rn({},e)[n]||it(rn({},t)).join("")!=r}))?function(e,t){for(var n=Ne(e),r=arguments.length,o=1,i=xe.f,c=l.f;r>o;)for(var u,f=g(arguments[o++]),s=i?it(f).concat(i(f)):it(f),d=s.length,p=0;d>p;)u=s[p++],a&&!c.call(f,u)||(n[u]=f[u]);return n}:rn;ke({target:"Object",stat:!0,forced:Object.assign!==an},{assign:an});var cn=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),un=G("IE_PROTO"),ln=Object.prototype,fn=cn?Object.getPrototypeOf:function(e){return e=Ne(e),b(e,un)?e[un]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ln:null};ke({target:"Object",stat:!0,forced:i((function(){fn(1)})),sham:!cn},{getPrototypeOf:function(e){return fn(Ne(e))}}),ke({target:"Object",stat:!0,forced:i((function(){it(1)}))},{keys:function(e){return it(Ne(e))}});var sn={};sn[qe("toStringTag")]="z";var dn="[object z]"===String(sn),pn=qe("toStringTag"),gn="Arguments"==d(function(){return arguments}()),vn=dn?d:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),pn))?n:gn?d(t):"Object"==(r=d(t))&&"function"==typeof t.callee?"Arguments":r},hn=dn?{}.toString:function(){return"[object "+vn(this)+"]"};dn||re(Object.prototype,"toString",hn,{unsafe:!0});var mn="\t\n\v\f\r \u2028\u2029\ufeff",yn="["+mn+"]",wn=RegExp("^"+yn+yn+"*"),bn=RegExp(yn+yn+"*$"),Sn=function(e){return function(t){var n=String(v(t));return 1&e&&(n=n.replace(wn,"")),2&e&&(n=n.replace(bn,"")),n}},xn={start:Sn(1),end:Sn(2),trim:Sn(3)}.trim,En=o.parseFloat,On=1/En(mn+"-0")!=-1/0?function(e){var t=xn(String(e)),n=En(t);return 0===n&&"-"==t.charAt(0)?-0:n}:En;ke({global:!0,forced:parseFloat!=On},{parseFloat:On});var Tn=o.Promise,An=C.f,jn=qe("toStringTag"),Rn=qe("species"),Cn=function(e){var t=ae(e),n=C.f;a&&t&&!t[Rn]&&n(t,Rn,{configurable:!0,get:function(){return this}})},Pn={},_n=qe("iterator"),Mn=Array.prototype,kn=qe("iterator"),Ln=function(e,t,n,r){try{return r?t(j(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&j(o.call(e)),t}},Nn=n((function(e){var t=function(e,t){this.stopped=e,this.result=t},n=e.exports=function(e,n,r,o,i){var a,c,u,l,f,s,d,p,g=mt(n,r,o?2:1);if(i)a=e;else{if(c=function(e){if(null!=e)return e[kn]||e["@@iterator"]||Pn[vn(e)]}(e),"function"!=typeof c)throw TypeError("Target is not iterable");if(void 0!==(p=c)&&(Pn.Array===p||Mn[_n]===p)){for(u=0,l=se(e.length);l>u;u++)if((f=o?g(j(d=e[u])[0],d[1]):g(e[u]))&&f instanceof t)return f;return new t(!1)}a=c.call(e)}for(s=a.next;!(d=s.call(a)).done;)if("object"==typeof(f=Ln(a,g,d.value,o))&&f&&f instanceof t)return f;return new t(!1)};n.stop=function(e){return new t(!0,e)}})),In=qe("iterator"),Fn=!1;try{var Dn=0,Bn={next:function(){return{done:!!Dn++}},return:function(){Fn=!0}};Bn[In]=function(){return this},Array.from(Bn,(function(){throw 2}))}catch(e){}var Un,$n,qn,Vn=qe("species"),Wn=function(e,t){var n,r=j(e).constructor;return void 0===r||null==(n=j(r)[Vn])?t:ht(n)},zn=/(iphone|ipod|ipad).*applewebkit/i.test(ze),Gn=o.location,Hn=o.setImmediate,Kn=o.clearImmediate,Jn=o.process,Qn=o.MessageChannel,Xn=o.Dispatch,Yn=0,Zn={},er="onreadystatechange",tr=function(e){if(Zn.hasOwnProperty(e)){var t=Zn[e];delete Zn[e],t()}},nr=function(e){return function(){tr(e)}},rr=function(e){tr(e.data)},or=function(e){o.postMessage(e+"",Gn.protocol+"//"+Gn.host)};Hn&&Kn||(Hn=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Zn[++Yn]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},Un(Yn),Yn},Kn=function(e){delete Zn[e]},"process"==d(Jn)?Un=function(e){Jn.nextTick(nr(e))}:Xn&&Xn.now?Un=function(e){Xn.now(nr(e))}:Qn&&!zn?(qn=($n=new Qn).port2,$n.port1.onmessage=rr,Un=mt(qn.postMessage,qn,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||i(or)||"file:"===Gn.protocol?Un=er in E("script")?function(e){ct.appendChild(E("script")).onreadystatechange=function(){ct.removeChild(this),tr(e)}}:function(e){setTimeout(nr(e),0)}:(Un=or,o.addEventListener("message",rr,!1)));var ir,ar,cr,ur,lr,fr,sr,dr,pr={set:Hn,clear:Kn},gr=A.f,vr=pr.set,hr=o.MutationObserver||o.WebKitMutationObserver,mr=o.process,yr=o.Promise,wr="process"==d(mr),br=gr(o,"queueMicrotask"),Sr=br&&br.value;Sr||(ir=function(){var e,t;for(wr&&(e=mr.domain)&&e.exit();ar;){t=ar.fn,ar=ar.next;try{t()}catch(e){throw ar?ur():cr=void 0,e}}cr=void 0,e&&e.enter()},wr?ur=function(){mr.nextTick(ir)}:hr&&!zn?(lr=!0,fr=document.createTextNode(""),new hr(ir).observe(fr,{characterData:!0}),ur=function(){fr.data=lr=!lr}):yr&&yr.resolve?(sr=yr.resolve(void 0),dr=sr.then,ur=function(){dr.call(sr,ir)}):ur=function(){vr.call(o,ir)});var xr,Er,Or,Tr,Ar,jr,Rr,Cr=Sr||function(e){var t={fn:e,next:void 0};cr&&(cr.next=t),ar||(ar=t,ur()),cr=t},Pr=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=ht(t),this.reject=ht(n)},_r={f:function(e){return new Pr(e)}},Mr=function(e,t){if(j(e),m(t)&&t.constructor===e)return t;var n=_r.f(e);return(0,n.resolve)(t),n.promise},kr=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Lr=pr.set,Nr=qe("species"),Ir="Promise",Fr=ne.get,Dr=ne.set,Br=ne.getterFor(Ir),Ur=Tn,$r=o.TypeError,qr=o.document,Vr=o.process,Wr=ae("fetch"),zr=_r.f,Gr=zr,Hr="process"==d(Vr),Kr=!!(qr&&qr.createEvent&&o.dispatchEvent),Jr="unhandledrejection",Qr=_e(Ir,(function(){if(!(D(Ur)!==String(Ur))){if(66===Je)return!0;if(!Hr&&"function"!=typeof PromiseRejectionEvent)return!0}if(Je>=51&&/native code/.test(Ur))return!1;var e=Ur.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[Nr]=t,!(e.then((function(){}))instanceof t)})),Xr=Qr||!function(e,t){if(!t&&!Fn)return!1;var n=!1;try{var r={};r[In]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}((function(e){Ur.all(e).catch((function(){}))})),Yr=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},Zr=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;Cr((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var c,u,l,f=r[a++],s=i?f.ok:f.fail,d=f.resolve,p=f.reject,g=f.domain;try{s?(i||(2===t.rejection&&ro(e,t),t.rejection=1),!0===s?c=o:(g&&g.enter(),c=s(o),g&&(g.exit(),l=!0)),c===f.promise?p($r("Promise-chain cycle")):(u=Yr(c))?u.call(c,d,p):d(c)):p(o)}catch(e){g&&!l&&g.exit(),p(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&to(e,t)}))}},eo=function(e,t,n){var r,i;Kr?((r=qr.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),o.dispatchEvent(r)):r={promise:t,reason:n},(i=o["on"+e])?i(r):e===Jr&&function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},to=function(e,t){Lr.call(o,(function(){var n,r=t.value;if(no(t)&&(n=kr((function(){Hr?Vr.emit("unhandledRejection",r,e):eo(Jr,e,r)})),t.rejection=Hr||no(t)?2:1,n.error))throw n.value}))},no=function(e){return 1!==e.rejection&&!e.parent},ro=function(e,t){Lr.call(o,(function(){Hr?Vr.emit("rejectionHandled",e):eo("rejectionhandled",e,t.value)}))},oo=function(e,t,n,r){return function(o){e(t,n,o,r)}},io=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,Zr(e,t,!0))},ao=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw $r("Promise can't be resolved itself");var o=Yr(n);o?Cr((function(){var r={done:!1};try{o.call(n,oo(ao,e,r,t),oo(io,e,r,t))}catch(n){io(e,r,n,t)}})):(t.value=n,t.state=1,Zr(e,t,!1))}catch(n){io(e,{done:!1},n,t)}}};Qr&&(Ur=function(e){!function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,Ur,Ir),ht(e),xr.call(this);var t=Fr(this);try{e(oo(ao,this,t),oo(io,this,t))}catch(e){io(this,t,e)}},(xr=function(e){Dr(this,{type:Ir,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,n){for(var r in t)re(e,r,t[r],n);return e}(Ur.prototype,{then:function(e,t){var n=Br(this),r=zr(Wn(this,Ur));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=Hr?Vr.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Zr(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Er=function(){var e=new xr,t=Fr(e);this.promise=e,this.resolve=oo(ao,e,t),this.reject=oo(io,e,t)},_r.f=zr=function(e){return e===Ur||e===Or?new Er(e):Gr(e)},"function"==typeof Tn&&(Tr=Tn.prototype.then,re(Tn.prototype,"then",(function(e,t){var n=this;return new Ur((function(e,t){Tr.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof Wr&&ke({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Mr(Ur,Wr.apply(o,arguments))}}))),ke({global:!0,wrap:!0,forced:Qr},{Promise:Ur}),jr=Ir,Rr=!1,(Ar=Ur)&&!b(Ar=Rr?Ar:Ar.prototype,jn)&&An(Ar,jn,{configurable:!0,value:jr}),Cn(Ir),Or=ae(Ir),ke({target:Ir,stat:!0,forced:Qr},{reject:function(e){var t=zr(this);return t.reject.call(void 0,e),t.promise}}),ke({target:Ir,stat:!0,forced:Qr},{resolve:function(e){return Mr(this,e)}}),ke({target:Ir,stat:!0,forced:Xr},{all:function(e){var t=this,n=zr(t),r=n.resolve,o=n.reject,i=kr((function(){var n=ht(t.resolve),i=[],a=0,c=1;Nn(e,(function(e){var u=a++,l=!1;i.push(void 0),c++,n.call(t,e).then((function(e){l||(l=!0,i[u]=e,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=zr(t),r=n.reject,o=kr((function(){var o=ht(t.resolve);Nn(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var co=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return j(n),function(e){if(!m(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),uo=qe("match"),lo=function(e){var t;return m(e)&&(void 0!==(t=e[uo])?!!t:"RegExp"==d(e))},fo=function(){var e=j(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function so(e,t){return RegExp(e,t)}var po={UNSUPPORTED_Y:i((function(){var e=so("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=so("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},go=C.f,vo=Se.f,ho=ne.set,mo=qe("match"),yo=o.RegExp,wo=yo.prototype,bo=/a/g,So=/a/g,xo=new yo(bo)!==bo,Eo=po.UNSUPPORTED_Y;if(a&&_e("RegExp",!xo||Eo||i((function(){return So[mo]=!1,yo(bo)!=bo||yo(So)==So||"/a/i"!=yo(bo,"i")})))){for(var Oo=function(e,t){var n,r=this instanceof Oo,o=lo(e),i=void 0===t;if(!r&&o&&e.constructor===Oo&&i)return e;xo?o&&!i&&(e=e.source):e instanceof Oo&&(i&&(t=fo.call(e)),e=e.source),Eo&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var a,c,u,l,f,s=(a=xo?new yo(e,t):yo(e,t),c=r?this:wo,u=Oo,co&&"function"==typeof(l=c.constructor)&&l!==u&&m(f=l.prototype)&&f!==u.prototype&&co(a,f),a);return Eo&&n&&ho(s,{sticky:n}),s},To=function(e){e in Oo||go(Oo,e,{configurable:!0,get:function(){return yo[e]},set:function(t){yo[e]=t}})},Ao=vo(yo),jo=0;Ao.length>jo;)To(Ao[jo++]);wo.constructor=Oo,Oo.prototype=wo,re(o,"RegExp",Oo)}Cn("RegExp");var Ro=RegExp.prototype.exec,Co=String.prototype.replace,Po=Ro,_o=function(){var e=/a/,t=/b*/g;return Ro.call(e,"a"),Ro.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Mo=po.UNSUPPORTED_Y||po.BROKEN_CARET,ko=void 0!==/()??/.exec("")[1];(_o||ko||Mo)&&(Po=function(e){var t,n,r,o,i=this,a=Mo&&i.sticky,c=fo.call(i),u=i.source,l=0,f=e;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,l++),n=new RegExp("^(?:"+u+")",c)),ko&&(n=new RegExp("^"+u+"$(?!\\s)",c)),_o&&(t=i.lastIndex),r=Ro.call(a?n:i,f),a?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:_o&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),ko&&r&&r.length>1&&Co.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var Lo=Po;ke({target:"RegExp",proto:!0,forced:/./.exec!==Lo},{exec:Lo});var No="toString",Io=RegExp.prototype,Fo=Io.toString,Do=i((function(){return"/a/b"!=Fo.call({source:"a",flags:"b"})})),Bo=Fo.name!=No;(Do||Bo)&&re(RegExp.prototype,No,(function(){var e=j(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in Io)?fo.call(e):n)}),{unsafe:!0});var Uo=function(e){if(lo(e))throw TypeError("The method doesn't accept regular expressions");return e},$o=qe("match");ke({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[$o]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~String(v(this)).indexOf(Uo(e),arguments.length>1?arguments[1]:void 0)}}),ke({target:"RegExp",proto:!0,forced:/./.exec!==Lo},{exec:Lo});var qo=qe("species"),Vo=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Wo="$0"==="a".replace(/./,"$0"),zo=qe("replace"),Go=!!/./[zo]&&""===/./[zo]("a","$0"),Ho=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Ko=function(e,t,n,r){var o=qe(e),a=!i((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=a&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[qo]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!a||!c||"replace"===e&&(!Vo||!Wo||Go)||"split"===e&&!Ho){var u=/./[o],l=n(o,""[e],(function(e,t,n,r,o){return t.exec===Lo?a&&!o?{done:!0,value:u.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Wo,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Go}),f=l[0],s=l[1];re(String.prototype,e,f),re(RegExp.prototype,o,2==t?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)})}r&&P(RegExp.prototype[o],"sham",!0)},Jo=function(e){return function(t,n){var r,o,i=String(v(t)),a=le(n),c=i.length;return a<0||a>=c?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},Qo={codeAt:Jo(!1),charAt:Jo(!0)}.charAt,Xo=function(e,t,n){return t+(n?Qo(e,t).length:1)},Yo=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==d(e))throw TypeError("RegExp#exec called on incompatible receiver");return Lo.call(e,t)};Ko("match",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this);if(!o.global)return Yo(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],l=0;null!==(c=Yo(o,i));){var f=String(c[0]);u[l]=f,""===f&&(o.lastIndex=Xo(i,se(o.lastIndex),a)),l++}return 0===l?null:u}]}));var Zo=Math.max,ei=Math.min,ti=Math.floor,ni=/\$([$&'`]|\d\d?|<[^>]*>)/g,ri=/\$([$&'`]|\d\d?)/g,oi=function(e){return void 0===e?e:String(e)};Ko("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=v(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var u=n(t,e,this,r);if(u.done)return u.value}var l=j(e),f=String(this),s="function"==typeof r;s||(r=String(r));var d=l.global;if(d){var p=l.unicode;l.lastIndex=0}for(var g=[];;){var v=Yo(l,f);if(null===v)break;if(g.push(v),!d)break;""===String(v[0])&&(l.lastIndex=Xo(f,se(l.lastIndex),p))}for(var h="",m=0,y=0;y<g.length;y++){v=g[y];for(var w=String(v[0]),b=Zo(ei(le(v.index),f.length),0),S=[],x=1;x<v.length;x++)S.push(oi(v[x]));var E=v.groups;if(s){var O=[w].concat(S,b,f);void 0!==E&&O.push(E);var T=String(r.apply(void 0,O))}else T=c(w,f,b,S,E,r);b>=m&&(h+=f.slice(m,b)+T,m=b+w.length)}return h+f.slice(m)}];function c(e,n,r,o,i,a){var c=r+e.length,u=o.length,l=ri;return void 0!==i&&(i=Ne(i),l=ni),t.call(a,l,(function(t,a){var l;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":l=i[a.slice(1,-1)];break;default:var f=+a;if(0===f)return t;if(f>u){var s=ti(f/10);return 0===s?t:s<=u?void 0===o[s-1]?a.charAt(1):o[s-1]+a.charAt(1):t}l=o[f-1]}return void 0===l?"":l}))}}));var ii=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Ko("search",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this),a=o.lastIndex;ii(a,0)||(o.lastIndex=0);var c=Yo(o,i);return ii(o.lastIndex,a)||(o.lastIndex=a),null===c?-1:c.index}]}));var ai=[].push,ci=Math.min,ui=4294967295,li=!i((function(){return!RegExp(ui,"y")}));Ko("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(v(this)),o=void 0===n?ui:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!lo(e))return t.call(r,e,o);for(var i,a,c,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,s=new RegExp(e.source,l+"g");(i=Lo.call(s,r))&&!((a=s.lastIndex)>f&&(u.push(r.slice(f,i.index)),i.length>1&&i.index<r.length&&ai.apply(u,i.slice(1)),c=i[0].length,f=a,u.length>=o));)s.lastIndex===i.index&&s.lastIndex++;return f===r.length?!c&&s.test("")||u.push(""):u.push(r.slice(f)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=v(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var a=j(e),c=String(this),u=Wn(a,RegExp),l=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(li?"y":"g"),s=new u(li?a:"^(?:"+a.source+")",f),d=void 0===o?ui:o>>>0;if(0===d)return[];if(0===c.length)return null===Yo(s,c)?[c]:[];for(var p=0,g=0,v=[];g<c.length;){s.lastIndex=li?g:0;var h,m=Yo(s,li?c:c.slice(g));if(null===m||(h=ci(se(s.lastIndex+(li?0:g)),c.length))===p)g=Xo(c,g,l);else{if(v.push(c.slice(p,g)),v.length===d)return v;for(var y=1;y<=m.length-1;y++)if(v.push(m[y]),v.length===d)return v;g=p=h}}return v.push(c.slice(p)),v}]}),!li);for(var fi in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var si=o[fi],di=si&&si.prototype;if(di&&di.forEach!==Ct)try{P(di,"forEach",Ct)}catch(e){di.forEach=Ct}}var pi,gi=n((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),vi=(pi=gi)&&pi.__esModule&&Object.prototype.hasOwnProperty.call(pi,"default")?pi.default:pi;function hi(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r}function mi(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substr(1):t}function yi(e){return JSON.parse(JSON.stringify(e))}function wi(e){void 0===e&&(e=5);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function bi(e,t){void 0===t&&(t={isNaNAsNumber:!1,isUnFiniteAsNumber:!1});var n=Object.assign({isNaNAsNumber:!1,isUnFiniteAsNumber:!1},t),r=n.isNaNAsNumber,o=!0;return"number"!=typeof e&&(o=!1),!1!==n.isUnFiniteAsNumber||isFinite(e)||(o=!1),!1===r&&isNaN(e)&&(o=!1),o}function Si(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,t)),r}function xi(){return Date.now?Date.now():(new Date).getTime()}function Ei(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function Oi(){try{var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){var n=e.match(t),r="";return n&&(r=n.toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")),r},r="",o="";t(/windows|win32|win64|wow32|wow64/g)?r="windows":t(/macintosh|macintel/g)?r="macos":t(/x11/g)?r="linux":t(/android|adr/g)?r="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(r="ios",t(/iphone/g)?o="iphone":t(/ipad/g)?o="ipad":t(/iwatch/g)?o="iwatch":t(/ipod/g)&&(o="ipod"));var i="";"windows"===r?t(/windows nt 5.0|windows 2000/g)?i="2000":t(/windows nt 5.1|windows xp/g)?i="xp":t(/windows nt 5.2|windows 2003/g)?i="2003":t(/windows nt 6.0|windows vista/g)?i="vista":t(/windows nt 6.1|windows 7/g)?i="7":t(/windows nt 6.2|windows 8/g)?i="8":t(/windows nt 6.3|windows 8.1/g)?i="8.1":t(/windows nt 10.0|windows 10/g)&&(i="10"):"macos"===r?i=n(/os x [\d._]+/g):"android"===r?i=n(/android [\d._]+/g):"ios"===r&&(i=n(/os [\d._]+/g));var a="";"windows"===r||"macos"===r||"linux"===r?a="desktop":("android"===r||"ios"===r||t(/mobile/g))&&(a="mobile");var c="",u="";t(/applewebkit/g)?(c="webkit",t(/edge/g)?u="edge":t(/opr/g)?u="opera":t(/chrome/g)?u="chrome":t(/safari/g)&&(u="safari")):t(/gecko/g)&&t(/firefox/g)?(c="gecko",u="firefox"):t(/presto/g)?(c="presto",u="opera"):t(/trident|compatible|msie/g)&&(c="trident",u="iexplore");var l="";"webkit"===c?l=n(/applewebkit\/[\d._]+/g):"gecko"===c?l=n(/gecko\/[\d._]+/g):"presto"===c?l=n(/presto\/[\d._]+/g):"trident"===c&&(l=n(/trident\/[\d._]+/g));var f="";"chrome"===u?f=n(/chrome\/[\d._]+/g):"safari"===u?f=n(/version\/[\d._]+/g):"firefox"===u?f=n(/firefox\/[\d._]+/g):"opera"===u?f=n(/opr\/[\d._]+/g):"iexplore"===u?f=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===u&&(f=n(/edge\/[\d._]+/g));var s="",d="";return t(/micromessenger/g)?(s="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(s="qq_browser",d=n(/qqbrowser\/[\d._]+/g)):t(/\sqq/g)?s="qq_app":t(/ucbrowser/g)?(s="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?s="360":t(/2345explorer/g)?(s="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?s="sougou":t(/lbbrowser/g)?s="liebao":t(/maxthon/g)?(s="maxthon",d=n(/maxthon\/[\d._]+/g)):t(/biliapp/g)&&(s="bilibili"),Object.assign({engine:c,engineVs:l,platform:a,supporter:u,supporterVs:f,system:r,systemVs:i},{shell:s,shellVs:d,appleType:o})}catch(e){return console.warn("mazey:",e),{engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:""}}}return e.addClass=function(e,t){var n,r=e.className,o="";""!==r&&(o=" "),n=r+o+t,e.className=n},e.addStyle=function(e,t){if(void 0===t&&(t={id:""}),!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o=""+t.id,(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0},e.calLongestCommonSubsequence=function(e,t){for(var n=e.length,r=t.length,o=yi(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}else{var u=[0,0],l=u[0],f=u[1];a>0&&(l=o[i][a-1]),i>0&&(f=o[i-1][a]),o[i][a]=Math.max(l,f)}var s=Array.prototype.concat.apply([],o);return Math.max.apply(Math,s)},e.calLongestCommonSubstring=function(e,t){for(var n=e.length,r=t.length,o=yi(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}var u=Array.prototype.concat.apply([],o);return Math.max.apply(Math,u)},e.camelCase2Underscore=mi,e.camelCaseToKebabCase=function(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substr(1):t},e.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.clearHtml=function(e){return e.replace(/<\/?.+?>/g,"").replace(/[\r\n]/g,"")},e.cutCHSString=function(e,t,n){if(void 0===n&&(n=!1),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>t));u++)o+=a;return n&&c>t&&(o+="..."),o}return""},e.debounce=function(e,t,n){var r=null,o=null,i=null,a=null,c=null,u=function u(){var l=xi()-i;l<t&&l>=0?o=setTimeout(u,t-l):(o=null,n||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];r=this,a=l,i=xi();var s=n&&!o;return o||(o=setTimeout(u,t)),s&&(c=e.apply(r,a),r=a=null),c}},e.deepCopyObject=yi,e.doFn=Si,e.floatFixed=function(e,t){return void 0===t&&(t=0),parseFloat(e).toFixed(t)},e.floatToPercent=function(e,t){return void 0===t&&(t=0),(t?(100*e).toFixed(t):String(Math.floor(100*e)))+"%"},e.friendlyInterval=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n={type:"d"});var r=n.type;bi(e)||(e=new Date(e).getTime()),bi(t)||(t=new Date(t).getTime());var o=t-e,i="",a=new Array(4).fill(0),c=a[0],u=(a[1],a[2],a[3]);if(o>=0)switch(c=Math.floor(o/1e3/60/60/24),Math.floor(o/1e3/60/60),Math.floor(o/1e3/60),u=Math.floor(o/1e3),r){case"d":i=c;break;case"text":i=(c=Math.floor(o/1e3/60/60/24))+" 天 "+Math.floor(o/1e3/60/60%24)+" 时 "+Math.floor(o/1e3/60%60)+" 分 "+(u=Math.floor(o/1e3%60))+" 秒";break;default:i=u}return i},e.genCustomConsole=function(e,t){void 0===e&&(e=""),void 0===t&&(t={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var n=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},t),r=n.isClosed,o=n.showWrap,i=n.showDate,a=n.locales,c=n.logFn,u=n.errorFn,l=Object.create(null),f=function(){return(new Date).toLocaleDateString(a,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(t){l[t]=function(){for(var n,a,l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];if(r)return!1;var d=e,p=e;if("string"==typeof e&&e.length>=2){var g=e.length;d=":"===e[g-1]?e.substring(0,g-1):e}o&&console.log("--- "+d+" - begin ---"),i&&(p=e?f()+" "+e:""+f()),e||i?(n=console)[t].apply(n,hi([p],l)):(a=console)[t].apply(a,l),"log"===t&&c(),"error"===t&&u(),o&&console.log("--- "+d+" - end ---")}})),l},e.genHashCode=function(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},e.generateRndNum=wi,e.generateUniqueNum=function(e){void 0===e&&(e=3);var t=[xi(),wi(e||3)];return t[0]+t[1]},e.getBrowserInfo=Oi,e.getCookie=Ei,e.getDomain=function(e,t){void 0===t&&(t=["hostname"]);var n=document.createElement("a");return n.href=e,t.reduce((function(e,t){return e+=n[t]}),"")},e.getFileSize=function(e){var t=function(e){return String(Math.ceil(e))};if(!e)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"},e.getHashQueryParam=function(e){var t=location.hash.split("?");if(1===t.length)return"";var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),r=t[1].match(n);return r?r[2]:""},e.getLocalStorage=function(e){var t=null;if(e){var n=localStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getPerformance=function(e){var t,n;void 0===e&&(e=!0);var r,o,i=new Promise((function(e,r){var o;t=(o=[e,r])[0],n=o[1]})),a=window.performance.timing,c=a.navigationStart||a.fetchStart;function u(){try{if(window.performance&&Boolean(window.performance.getEntriesByType))window.performance.getEntriesByType("paint").forEach((function(e,t,n){var i=Math.round(e.startTime);"first-paint"===e.name?r=i:"first-contentful-paint"===e.name&&(o=i)}));else console.error("paint")}catch(e){console.error(e.message)}if(window.performance&&"function"==typeof window.performance.getEntries){var i,u=(window.performance.getEntries()||[])[0]||{},v={os:l(),osVersion:f(),deviceType:s(),network:d(),screenDirection:p(),unloadTime:a.unloadEventEnd-a.unloadEventStart,redirectTime:a.redirectEnd-a.redirectStart,dnsTime:a.domainLookupEnd-a.domainLookupStart,tcpTime:a.connectEnd-a.connectStart,sslTime:g(a.connectEnd,a.secureConnectionStart),responseTime:a.responseStart-a.requestStart,downloadTime:a.responseEnd-a.responseStart,firstPaintTime:r,firstContentfulPaintTime:o,domreadyTime:a.domContentLoadedEventStart-c||0,onloadTime:a.loadEventStart-c||0,whiteTime:a.responseStart-c,renderTime:a.loadEventEnd-c||0,decodedBodySize:u.decodedBodySize||"",encodedBodySize:u.encodedBodySize||""};if(Object.keys(v).forEach((function(e){bi(v[e])&&v[e]<0&&(v[e]=0)})),bi(v.whiteTime)&&v.whiteTime>v.onloadTime&&(v.whiteTime=0),c>0)e||Object.keys(v).forEach((function(e){i||(i={}),i[mi(e)]=v[e]})),t(i||v);else n(Error("startTime"))}else n(Error("getEntries"))}function l(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function f(){var e,t=navigator.userAgent,n=t.indexOf("Android")>-1||t.indexOf("Linux")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return n&&(e=(navigator.userAgent.split(";")[1].match(/\d+\.\d+/g)||[])[0]),r&&(e=(navigator.userAgent.split(";")[1].match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e}function s(){var e=navigator.userAgent.toLowerCase(),t=e.match(/(ipad)/i)&&"ipad",n=e.match(/iphone os/i)&&"iphone os",r=e.match(/midp/i)&&"midp",o=e.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",i=e.match(/ucweb/i)&&"ucweb",a=e.match(/android/i)&&"android",c=e.match(/windows ce/i)&&"windows ce",u=e.match(/windows mobile/i)&&"windows mobile";return t||n||r||o||i||a||c||u?n||r||o||i||a||c||u?"phone":t?"ipad":void 0:"pc"}function d(){var e;if(navigator.connection&&navigator.connection.effectiveType)switch(navigator.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e}function p(){var e;return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function g(e,t){var n;return t&&(n=e-t),n}return window.performance&&window.performance.timing&&window.performance.timing.loadEventEnd>0?u():window.addEventListener("load",(function(){window.setTimeout((function(){u()}),0)})),i},e.getQueryParam=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=location.search.substr(1).match(t);return null!==n?decodeURIComponent(n[2]):""},e.getSessionStorage=function(e){var t=null;if(e){var n=sessionStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getUrlParam=function(e,t){var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){if(void 0!==n[t]){var o=n[t];n[t]=[].concat(o,r)}else n[t]=r})),n[t]||""},e.hasClass=function(e,t){for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},e.inRate=function(e){return Math.random()<e},e.isJsonString=function(e){try{if("object"===vi(JSON.parse(e)))return!0}catch(e){}return!1},e.isNonEmptyArray=function(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t},e.isNumber=bi,e.isSafePWAEnv=function(){var e=Oi();return!(!("serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches))||e.shell)},e.isSupportWebp=function(){return new Promise((function(e){var t=new Image;t.onload=function(){e(t.width>0&&t.height>0)},t.onerror=function(){e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))},e.loadCSS=function(e,t){void 0===t&&(t={id:""});var n,r=t.id,o=new Promise((function(e,t){n=[e,t][0]})),i=function(){n(!0)},a=document.createElement("link"),c="onload"in a,u=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==r&&(a.id=r),document.getElementsByTagName("head")[0].appendChild(a),u||!c)return setTimeout((function(){f(a,i,0)}),1),o;function l(){a.onload=a.onerror=a.onreadystatechange=null,a=null,i()}function f(e,t,n){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e=null,void t();if(u)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){r?t():f(e,t,n)}),20)}return c?(a.onload=l,a.onerror=function(){l()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&l()},o},e.loadScript=function(e,t){void 0===t&&(t={id:"",callback:function(){},timeout:5e3,isDefer:!1});var n=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},t),r=n.id,o=n.callback,i=n.timeout,a=n.isDefer,c=null,u=null,l=document.createElement("script"),f=document.getElementsByTagName("script")[0];return l.type="text/javascript",a&&(l.defer="defer"),r&&(l.id=r),l.readyState?l.onreadystatechange=function(){"loaded"!==l.readyState&&"complete"!==l.readyState||(l.onreadystatechange=null,Si(o),Si(c,!0))}:l.onload=function(){Si(o),Si(c,!0)},l.src=e,f&&f.parentNode.insertBefore(l,f),new Promise((function(e,t){var n;c=(n=[e,t])[0],u=n[1],i&&setTimeout(u.bind(null,Error("timeout")),i)}))},e.mNow=xi,e.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)},e.newLine=function(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")},e.removeClass=function(e,t){var n;n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n},e.setCookie=function(e,t,n,r){var o,i,a;n?((a=new Date).setTime(a.getTime()+24*n*60*60*1e3),i="; expires="+a.toGMTString()):i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+t+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+t+i+"; path=/; domain="+r,null!==Ei(e)&&Ei(e)===t||(r=r||"."+c,document.cookie=e+"="+t+i+"; path=/; domain="+r))},e.setLocalStorage=function(e,t){void 0===t&&(t=null),e&&localStorage.setItem(e,JSON.stringify(t))},e.setSessionStorage=function(e,t){void 0===t&&(t=null),e&&sessionStorage.setItem(e,JSON.stringify(t))},e.throttle=function(e,t,n){void 0===n&&(n={}),n=Object.assign({},n);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],l=function(){u=!1===n.leading?0:xi(),i=null,c=e.apply(r,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var s=xi();u||!1!==n.leading||(u=s);var d=t-(s-u);return r=this,o=a,d<=0||d>t?(i&&(clearTimeout(i),i=null),u=s,c=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,d)),c}},e.updateQueryParam=function(e,t,n){var r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+o+t+"="+n},e.windowLoaded=function(e){void 0===e&&(e=90);var t,n=function(){},r=new Promise((function(e,r){n=e,t=r}));return"complete"===document.readyState?n("complete"):window.addEventListener("load",(function(){return n("load")})),setTimeout((function(){return t(Error("timeout"))}),1e3*e),r},e.zAxiosIsValidRes=function(e,t){void 0===t&&(t={validStatusRange:[200,300],validCode:[0]});var n=Object.assign({validStatusRange:[200,300],validCode:[0]},t),r=n.validStatusRange,o=n.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
6
|
+
var mazey=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!c.call({1:2},1)?function(e){var t=u(this,e);return!!t&&t.enumerable}:c},s=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},f={}.toString,d=function(e){return f.call(e).slice(8,-1)},p="".split,g=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?p.call(e,""):Object(e)}:Object,v=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},h=function(e){return g(v(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,b=function(e,t){return w.call(e,t)},S=o.document,x=m(S)&&m(S.createElement),E=function(e){return x?S.createElement(e):{}},O=!a&&!i((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),A=Object.getOwnPropertyDescriptor,T={f:a?A:function(e,t){if(e=h(e),t=y(t,!0),O)try{return A(e,t)}catch(e){}if(b(e,t))return s(!l.f.call(e,t),e[t])}},j=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},M=Object.defineProperty,_={f:a?M:function(e,t,n){if(j(e),t=y(t,!0),j(n),O)try{return M(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},C=a?function(e,t,n){return _.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e},N=function(e,t){try{C(o,e,t)}catch(n){o[e]=t}return t},P="__core-js_shared__",R=o[P]||N(P,{}),I=Function.toString;"function"!=typeof R.inspectSource&&(R.inspectSource=function(e){return I.call(e)});var k,L,F,D=R.inspectSource,U=o.WeakMap,B="function"==typeof U&&/native code/.test(D(U)),$=n((function(e){(e.exports=function(e,t){return R[e]||(R[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),V=0,q=Math.random(),G=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++V+q).toString(36)},H=$("keys"),W=function(e){return H[e]||(H[e]=G(e))},z={},K=o.WeakMap;if(B){var J=new K,Y=J.get,X=J.has,Q=J.set;k=function(e,t){return Q.call(J,e,t),t},L=function(e){return Y.call(J,e)||{}},F=function(e){return X.call(J,e)}}else{var Z=W("state");z[Z]=!0,k=function(e,t){return C(e,Z,t),t},L=function(e){return b(e,Z)?e[Z]:{}},F=function(e){return b(e,Z)}}var ee,te,ne={set:k,get:L,has:F,enforce:function(e){return F(e)?L(e):k(e,{})},getterFor:function(e){return function(t){var n;if(!m(t)||(n=L(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},re=n((function(e){var t=ne.get,n=ne.enforce,r=String(String).split("String");(e.exports=function(e,t,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||b(i,"name")||C(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==o?(c?!l&&e[t]&&(u=!0):delete e[t],u?e[t]=i:C(e,t,i)):u?e[t]=i:N(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||D(this)}))})),oe=o,ie=function(e){return"function"==typeof e?e:void 0},ae=function(e,t){return arguments.length<2?ie(oe[e])||ie(o[e]):oe[e]&&oe[e][t]||o[e]&&o[e][t]},ce=Math.ceil,ue=Math.floor,le=function(e){return isNaN(e=+e)?0:(e>0?ue:ce)(e)},se=Math.min,fe=function(e){return e>0?se(le(e),9007199254740991):0},de=Math.max,pe=Math.min,ge=function(e,t){var n=le(e);return n<0?de(n+t,0):pe(n,t)},ve=function(e){return function(t,n,r){var o,i=h(t),a=fe(i.length),c=ge(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},he={includes:ve(!0),indexOf:ve(!1)},me=he.indexOf,ye=function(e,t){var n,r=h(e),o=0,i=[];for(n in r)!b(z,n)&&b(r,n)&&i.push(n);for(;t.length>o;)b(r,n=t[o++])&&(~me(i,n)||i.push(n));return i},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],be=we.concat("length","prototype"),Se={f:Object.getOwnPropertyNames||function(e){return ye(e,be)}},xe={f:Object.getOwnPropertySymbols},Ee=ae("Reflect","ownKeys")||function(e){var t=Se.f(j(e)),n=xe.f;return n?t.concat(n(e)):t},Oe=function(e,t){for(var n=Ee(t),r=_.f,o=T.f,i=0;i<n.length;i++){var a=n[i];b(e,a)||r(e,a,o(t,a))}},Ae=/#|\.prototype\./,Te=function(e,t){var n=Me[je(e)];return n==Ce||n!=_e&&("function"==typeof t?i(t):!!t)},je=Te.normalize=function(e){return String(e).replace(Ae,".").toLowerCase()},Me=Te.data={},_e=Te.NATIVE="N",Ce=Te.POLYFILL="P",Ne=Te,Pe=T.f,Re=function(e,t){var n,r,i,a,c,u=e.target,l=e.global,s=e.stat;if(n=l?o:s?o[u]||N(u,{}):(o[u]||{}).prototype)for(r in t){if(a=t[r],i=e.noTargetGet?(c=Pe(n,r))&&c.value:n[r],!Ne(l?r:u+(s?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Oe(a,i)}(e.sham||i&&i.sham)&&C(a,"sham",!0),re(n,r,a,e)}},Ie=Array.isArray||function(e){return"Array"==d(e)},ke=function(e){return Object(v(e))},Le=function(e,t,n){var r=y(t);r in e?_.f(e,r,s(0,n)):e[r]=n},Fe=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),De=Fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ue=$("wks"),Be=o.Symbol,$e=De?Be:Be&&Be.withoutSetter||G,Ve=function(e){return b(Ue,e)||(Fe&&b(Be,e)?Ue[e]=Be[e]:Ue[e]=$e("Symbol."+e)),Ue[e]},qe=Ve("species"),Ge=function(e,t){var n;return Ie(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Ie(n.prototype)?m(n)&&null===(n=n[qe])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},He=ae("navigator","userAgent")||"",We=o.process,ze=We&&We.versions,Ke=ze&&ze.v8;Ke?te=(ee=Ke.split("."))[0]+ee[1]:He&&(!(ee=He.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=He.match(/Chrome\/(\d+)/))&&(te=ee[1]);var Je=te&&+te,Ye=Ve("species"),Xe=function(e){return Je>=51||!i((function(){var t=[];return(t.constructor={})[Ye]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Qe=Ve("isConcatSpreadable"),Ze=9007199254740991,et="Maximum allowed index exceeded",tt=Je>=51||!i((function(){var e=[];return e[Qe]=!1,e.concat()[0]!==e})),nt=Xe("concat"),rt=function(e){if(!m(e))return!1;var t=e[Qe];return void 0!==t?!!t:Ie(e)};Re({target:"Array",proto:!0,forced:!tt||!nt},{concat:function(e){var t,n,r,o,i,a=ke(this),c=Ge(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(rt(i=-1===t?a:arguments[t])){if(u+(o=fe(i.length))>Ze)throw TypeError(et);for(n=0;n<o;n++,u++)n in i&&Le(c,u,i[n])}else{if(u>=Ze)throw TypeError(et);Le(c,u++,i)}return c.length=u,c}});var ot,it=Object.keys||function(e){return ye(e,we)},at=a?Object.defineProperties:function(e,t){j(e);for(var n,r=it(t),o=r.length,i=0;o>i;)_.f(e,n=r[i++],t[n]);return e},ct=ae("document","documentElement"),ut=W("IE_PROTO"),lt=function(){},st=function(e){return"<script>"+e+"</"+"script>"},ft=function(){try{ot=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;ft=ot?function(e){e.write(st("")),e.close();var t=e.parentWindow.Object;return e=null,t}(ot):((t=E("iframe")).style.display="none",ct.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(st("document.F=Object")),e.close(),e.F);for(var n=we.length;n--;)delete ft.prototype[we[n]];return ft()};z[ut]=!0;var dt=Object.create||function(e,t){var n;return null!==e?(lt.prototype=j(e),n=new lt,lt.prototype=null,n[ut]=e):n=ft(),void 0===t?n:at(n,t)},pt=Ve("unscopables"),gt=Array.prototype;null==gt[pt]&&_.f(gt,pt,{configurable:!0,value:dt(null)});var vt=function(e){gt[pt][e]=!0};Re({target:"Array",proto:!0},{fill:function(e){for(var t=ke(this),n=fe(t.length),r=arguments.length,o=ge(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:ge(i,n);a>o;)t[o++]=e;return t}}),vt("fill");var ht=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},mt=function(e,t,n){if(ht(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},yt=[].push,wt=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=5==e||i;return function(c,u,l,s){for(var f,d,p=ke(c),v=g(p),h=mt(u,l,3),m=fe(v.length),y=0,w=s||Ge,b=t?w(c,m):n?w(c,0):void 0;m>y;y++)if((a||y in v)&&(d=h(f=v[y],y,p),e))if(t)b[y]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:yt.call(b,f)}else if(o)return!1;return i?-1:r||o?o:b}},bt={forEach:wt(0),map:wt(1),filter:wt(2),some:wt(3),every:wt(4),find:wt(5),findIndex:wt(6)},St=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))},xt=Object.defineProperty,Et={},Ot=function(e){throw e},At=function(e,t){if(b(Et,e))return Et[e];t||(t={});var n=[][e],r=!!b(t,"ACCESSORS")&&t.ACCESSORS,o=b(t,0)?t[0]:Ot,c=b(t,1)?t[1]:void 0;return Et[e]=!!n&&!i((function(){if(r&&!a)return!0;var e={length:-1};r?xt(e,1,{enumerable:!0,get:Ot}):e[1]=1,n.call(e,o,c)}))},Tt=bt.forEach,jt=St("forEach"),Mt=At("forEach"),_t=jt&&Mt?[].forEach:function(e){return Tt(this,e,arguments.length>1?arguments[1]:void 0)};Re({target:"Array",proto:!0,forced:[].forEach!=_t},{forEach:_t});var Ct=he.includes;Re({target:"Array",proto:!0,forced:!At("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return Ct(this,e,arguments.length>1?arguments[1]:void 0)}}),vt("includes");var Nt=he.indexOf,Pt=[].indexOf,Rt=!!Pt&&1/[1].indexOf(1,-0)<0,It=St("indexOf"),kt=At("indexOf",{ACCESSORS:!0,1:0});Re({target:"Array",proto:!0,forced:Rt||!It||!kt},{indexOf:function(e){return Rt?Pt.apply(this,arguments)||0:Nt(this,e,arguments.length>1?arguments[1]:void 0)}});var Lt=[].join,Ft=g!=Object,Dt=St("join",",");Re({target:"Array",proto:!0,forced:Ft||!Dt},{join:function(e){return Lt.call(h(this),void 0===e?",":e)}});var Ut=function(e){return function(t,n,r,o){ht(n);var i=ke(t),a=g(i),c=fe(i.length),u=e?c-1:0,l=e?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=l;break}if(u+=l,e?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:c>u;u+=l)u in a&&(o=n(o,a[u],u,i));return o}},Bt={left:Ut(!1),right:Ut(!0)}.left,$t=St("reduce"),Vt=At("reduce",{1:0});Re({target:"Array",proto:!0,forced:!$t||!Vt},{reduce:function(e){return Bt(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var qt=Xe("slice"),Gt=At("slice",{ACCESSORS:!0,0:0,1:2}),Ht=Ve("species"),Wt=[].slice,zt=Math.max;Re({target:"Array",proto:!0,forced:!qt||!Gt},{slice:function(e,t){var n,r,o,i=h(this),a=fe(i.length),c=ge(e,a),u=ge(void 0===t?a:t,a);if(Ie(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Ie(n.prototype)?m(n)&&null===(n=n[Ht])&&(n=void 0):n=void 0,n===Array||void 0===n))return Wt.call(i,c,u);for(r=new(void 0===n?Array:n)(zt(u-c,0)),o=0;c<u;c++,o++)c in i&&Le(r,o,i[c]);return r.length=o,r}});var Kt=_.f,Jt=Function.prototype,Yt=Jt.toString,Xt=/^\s*function ([^ (]*)/,Qt="name";a&&!(Qt in Jt)&&Kt(Jt,Qt,{configurable:!0,get:function(){try{return Yt.call(this).match(Xt)[1]}catch(e){return""}}});var Zt=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return j(n),function(e){if(!m(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),en=function(e,t,n){var r,o;return Zt&&"function"==typeof(r=t.constructor)&&r!==n&&m(o=r.prototype)&&o!==n.prototype&&Zt(e,o),e},tn="\t\n\v\f\r \u2028\u2029\ufeff",nn="["+tn+"]",rn=RegExp("^"+nn+nn+"*"),on=RegExp(nn+nn+"*$"),an=function(e){return function(t){var n=String(v(t));return 1&e&&(n=n.replace(rn,"")),2&e&&(n=n.replace(on,"")),n}},cn={start:an(1),end:an(2),trim:an(3)},un=Se.f,ln=T.f,sn=_.f,fn=cn.trim,dn="Number",pn=o.Number,gn=pn.prototype,vn=d(dt(gn))==dn,hn=function(e){var t,n,r,o,i,a,c,u,l=y(e,!1);if("string"==typeof l&&l.length>2)if(43===(t=(l=fn(l)).charCodeAt(0))||45===t){if(88===(n=l.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(a=(i=l.slice(2)).length,c=0;c<a;c++)if((u=i.charCodeAt(c))<48||u>o)return NaN;return parseInt(i,r)}return+l};if(Ne(dn,!pn(" 0o1")||!pn("0b1")||pn("+0x1"))){for(var mn,yn=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof yn&&(vn?i((function(){gn.valueOf.call(n)})):d(n)!=dn)?en(new pn(hn(t)),n,yn):hn(t)},wn=a?un(pn):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),bn=0;wn.length>bn;bn++)b(pn,mn=wn[bn])&&!b(yn,mn)&&sn(yn,mn,ln(pn,mn));yn.prototype=gn,gn.constructor=yn,re(o,dn,yn)}var Sn="".repeat||function(e){var t=String(v(this)),n="",r=le(e);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},xn=1..toFixed,En=Math.floor,On=function(e,t,n){return 0===t?n:t%2==1?On(e,t-1,n*e):On(e*e,t/2,n)};Re({target:"Number",proto:!0,forced:xn&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!i((function(){xn.call({})}))},{toFixed:function(e){var t,n,r,o,i=function(e){if("number"!=typeof e&&"Number"!=d(e))throw TypeError("Incorrect invocation");return+e}(this),a=le(e),c=[0,0,0,0,0,0],u="",l="0",s=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=En(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=En(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+Sn.call("0",7-n.length)+n}return t};if(a<0||a>20)throw RangeError("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(u="-",i=-i),i>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(i*On(2,69,1))-69)<0?i*On(2,-t,1):i/On(2,t,1),n*=4503599627370496,(t=52-t)>0){for(s(0,n),r=a;r>=7;)s(1e7,0),r-=7;for(s(On(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<<r),s(1,1),f(2),l=p()}else s(0,n),s(1<<-t,0),l=p()+Sn.call("0",a);return l=a>0?u+((o=l.length)<=a?"0."+Sn.call("0",a-o)+l:l.slice(0,o-a)+"."+l.slice(o-a)):u+l}});var An=Object.assign,Tn=Object.defineProperty,jn=!An||i((function(){if(a&&1!==An({b:1},An(Tn({},"a",{enumerable:!0,get:function(){Tn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=An({},e)[n]||it(An({},t)).join("")!=r}))?function(e,t){for(var n=ke(e),r=arguments.length,o=1,i=xe.f,c=l.f;r>o;)for(var u,s=g(arguments[o++]),f=i?it(s).concat(i(s)):it(s),d=f.length,p=0;d>p;)u=f[p++],a&&!c.call(s,u)||(n[u]=s[u]);return n}:An;Re({target:"Object",stat:!0,forced:Object.assign!==jn},{assign:jn});var Mn=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),_n=W("IE_PROTO"),Cn=Object.prototype,Nn=Mn?Object.getPrototypeOf:function(e){return e=ke(e),b(e,_n)?e[_n]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Cn:null};Re({target:"Object",stat:!0,forced:i((function(){Nn(1)})),sham:!Mn},{getPrototypeOf:function(e){return Nn(ke(e))}}),Re({target:"Object",stat:!0,forced:i((function(){it(1)}))},{keys:function(e){return it(ke(e))}});var Pn={};Pn[Ve("toStringTag")]="z";var Rn="[object z]"===String(Pn),In=Ve("toStringTag"),kn="Arguments"==d(function(){return arguments}()),Ln=Rn?d:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),In))?n:kn?d(t):"Object"==(r=d(t))&&"function"==typeof t.callee?"Arguments":r},Fn=Rn?{}.toString:function(){return"[object "+Ln(this)+"]"};Rn||re(Object.prototype,"toString",Fn,{unsafe:!0});var Dn=cn.trim,Un=o.parseFloat,Bn=1/Un(tn+"-0")!=-1/0?function(e){var t=Dn(String(e)),n=Un(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Un;Re({global:!0,forced:parseFloat!=Bn},{parseFloat:Bn});var $n=o.Promise,Vn=_.f,qn=Ve("toStringTag"),Gn=Ve("species"),Hn=function(e){var t=ae(e),n=_.f;a&&t&&!t[Gn]&&n(t,Gn,{configurable:!0,get:function(){return this}})},Wn={},zn=Ve("iterator"),Kn=Array.prototype,Jn=Ve("iterator"),Yn=function(e,t,n,r){try{return r?t(j(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&j(o.call(e)),t}},Xn=n((function(e){var t=function(e,t){this.stopped=e,this.result=t},n=e.exports=function(e,n,r,o,i){var a,c,u,l,s,f,d,p,g=mt(n,r,o?2:1);if(i)a=e;else{if(c=function(e){if(null!=e)return e[Jn]||e["@@iterator"]||Wn[Ln(e)]}(e),"function"!=typeof c)throw TypeError("Target is not iterable");if(void 0!==(p=c)&&(Wn.Array===p||Kn[zn]===p)){for(u=0,l=fe(e.length);l>u;u++)if((s=o?g(j(d=e[u])[0],d[1]):g(e[u]))&&s instanceof t)return s;return new t(!1)}a=c.call(e)}for(f=a.next;!(d=f.call(a)).done;)if("object"==typeof(s=Yn(a,g,d.value,o))&&s&&s instanceof t)return s;return new t(!1)};n.stop=function(e){return new t(!0,e)}})),Qn=Ve("iterator"),Zn=!1;try{var er=0,tr={next:function(){return{done:!!er++}},return:function(){Zn=!0}};tr[Qn]=function(){return this},Array.from(tr,(function(){throw 2}))}catch(e){}var nr,rr,or,ir=Ve("species"),ar=function(e,t){var n,r=j(e).constructor;return void 0===r||null==(n=j(r)[ir])?t:ht(n)},cr=/(iphone|ipod|ipad).*applewebkit/i.test(He),ur=o.location,lr=o.setImmediate,sr=o.clearImmediate,fr=o.process,dr=o.MessageChannel,pr=o.Dispatch,gr=0,vr={},hr="onreadystatechange",mr=function(e){if(vr.hasOwnProperty(e)){var t=vr[e];delete vr[e],t()}},yr=function(e){return function(){mr(e)}},wr=function(e){mr(e.data)},br=function(e){o.postMessage(e+"",ur.protocol+"//"+ur.host)};lr&&sr||(lr=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return vr[++gr]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},nr(gr),gr},sr=function(e){delete vr[e]},"process"==d(fr)?nr=function(e){fr.nextTick(yr(e))}:pr&&pr.now?nr=function(e){pr.now(yr(e))}:dr&&!cr?(or=(rr=new dr).port2,rr.port1.onmessage=wr,nr=mt(or.postMessage,or,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||i(br)||"file:"===ur.protocol?nr=hr in E("script")?function(e){ct.appendChild(E("script")).onreadystatechange=function(){ct.removeChild(this),mr(e)}}:function(e){setTimeout(yr(e),0)}:(nr=br,o.addEventListener("message",wr,!1)));var Sr,xr,Er,Or,Ar,Tr,jr,Mr,_r={set:lr,clear:sr},Cr=T.f,Nr=_r.set,Pr=o.MutationObserver||o.WebKitMutationObserver,Rr=o.process,Ir=o.Promise,kr="process"==d(Rr),Lr=Cr(o,"queueMicrotask"),Fr=Lr&&Lr.value;Fr||(Sr=function(){var e,t;for(kr&&(e=Rr.domain)&&e.exit();xr;){t=xr.fn,xr=xr.next;try{t()}catch(e){throw xr?Or():Er=void 0,e}}Er=void 0,e&&e.enter()},kr?Or=function(){Rr.nextTick(Sr)}:Pr&&!cr?(Ar=!0,Tr=document.createTextNode(""),new Pr(Sr).observe(Tr,{characterData:!0}),Or=function(){Tr.data=Ar=!Ar}):Ir&&Ir.resolve?(jr=Ir.resolve(void 0),Mr=jr.then,Or=function(){Mr.call(jr,Sr)}):Or=function(){Nr.call(o,Sr)});var Dr,Ur,Br,$r,Vr,qr,Gr,Hr=Fr||function(e){var t={fn:e,next:void 0};Er&&(Er.next=t),xr||(xr=t,Or()),Er=t},Wr=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=ht(t),this.reject=ht(n)},zr={f:function(e){return new Wr(e)}},Kr=function(e,t){if(j(e),m(t)&&t.constructor===e)return t;var n=zr.f(e);return(0,n.resolve)(t),n.promise},Jr=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Yr=_r.set,Xr=Ve("species"),Qr="Promise",Zr=ne.get,eo=ne.set,to=ne.getterFor(Qr),no=$n,ro=o.TypeError,oo=o.document,io=o.process,ao=ae("fetch"),co=zr.f,uo=co,lo="process"==d(io),so=!!(oo&&oo.createEvent&&o.dispatchEvent),fo="unhandledrejection",po=Ne(Qr,(function(){if(!(D(no)!==String(no))){if(66===Je)return!0;if(!lo&&"function"!=typeof PromiseRejectionEvent)return!0}if(Je>=51&&/native code/.test(no))return!1;var e=no.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[Xr]=t,!(e.then((function(){}))instanceof t)})),go=po||!function(e,t){if(!t&&!Zn)return!1;var n=!1;try{var r={};r[Qn]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}((function(e){no.all(e).catch((function(){}))})),vo=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},ho=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;Hr((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var c,u,l,s=r[a++],f=i?s.ok:s.fail,d=s.resolve,p=s.reject,g=s.domain;try{f?(i||(2===t.rejection&&bo(e,t),t.rejection=1),!0===f?c=o:(g&&g.enter(),c=f(o),g&&(g.exit(),l=!0)),c===s.promise?p(ro("Promise-chain cycle")):(u=vo(c))?u.call(c,d,p):d(c)):p(o)}catch(e){g&&!l&&g.exit(),p(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&yo(e,t)}))}},mo=function(e,t,n){var r,i;so?((r=oo.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),o.dispatchEvent(r)):r={promise:t,reason:n},(i=o["on"+e])?i(r):e===fo&&function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},yo=function(e,t){Yr.call(o,(function(){var n,r=t.value;if(wo(t)&&(n=Jr((function(){lo?io.emit("unhandledRejection",r,e):mo(fo,e,r)})),t.rejection=lo||wo(t)?2:1,n.error))throw n.value}))},wo=function(e){return 1!==e.rejection&&!e.parent},bo=function(e,t){Yr.call(o,(function(){lo?io.emit("rejectionHandled",e):mo("rejectionhandled",e,t.value)}))},So=function(e,t,n,r){return function(o){e(t,n,o,r)}},xo=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,ho(e,t,!0))},Eo=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw ro("Promise can't be resolved itself");var o=vo(n);o?Hr((function(){var r={done:!1};try{o.call(n,So(Eo,e,r,t),So(xo,e,r,t))}catch(n){xo(e,r,n,t)}})):(t.value=n,t.state=1,ho(e,t,!1))}catch(n){xo(e,{done:!1},n,t)}}};po&&(no=function(e){!function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,no,Qr),ht(e),Dr.call(this);var t=Zr(this);try{e(So(Eo,this,t),So(xo,this,t))}catch(e){xo(this,t,e)}},(Dr=function(e){eo(this,{type:Qr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,n){for(var r in t)re(e,r,t[r],n);return e}(no.prototype,{then:function(e,t){var n=to(this),r=co(ar(this,no));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=lo?io.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&ho(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Ur=function(){var e=new Dr,t=Zr(e);this.promise=e,this.resolve=So(Eo,e,t),this.reject=So(xo,e,t)},zr.f=co=function(e){return e===no||e===Br?new Ur(e):uo(e)},"function"==typeof $n&&($r=$n.prototype.then,re($n.prototype,"then",(function(e,t){var n=this;return new no((function(e,t){$r.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof ao&&Re({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Kr(no,ao.apply(o,arguments))}}))),Re({global:!0,wrap:!0,forced:po},{Promise:no}),qr=Qr,Gr=!1,(Vr=no)&&!b(Vr=Gr?Vr:Vr.prototype,qn)&&Vn(Vr,qn,{configurable:!0,value:qr}),Hn(Qr),Br=ae(Qr),Re({target:Qr,stat:!0,forced:po},{reject:function(e){var t=co(this);return t.reject.call(void 0,e),t.promise}}),Re({target:Qr,stat:!0,forced:po},{resolve:function(e){return Kr(this,e)}}),Re({target:Qr,stat:!0,forced:go},{all:function(e){var t=this,n=co(t),r=n.resolve,o=n.reject,i=Jr((function(){var n=ht(t.resolve),i=[],a=0,c=1;Xn(e,(function(e){var u=a++,l=!1;i.push(void 0),c++,n.call(t,e).then((function(e){l||(l=!0,i[u]=e,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=co(t),r=n.reject,o=Jr((function(){var o=ht(t.resolve);Xn(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Oo=Ve("match"),Ao=function(e){var t;return m(e)&&(void 0!==(t=e[Oo])?!!t:"RegExp"==d(e))},To=function(){var e=j(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function jo(e,t){return RegExp(e,t)}var Mo={UNSUPPORTED_Y:i((function(){var e=jo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=jo("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},_o=_.f,Co=Se.f,No=ne.set,Po=Ve("match"),Ro=o.RegExp,Io=Ro.prototype,ko=/a/g,Lo=/a/g,Fo=new Ro(ko)!==ko,Do=Mo.UNSUPPORTED_Y;if(a&&Ne("RegExp",!Fo||Do||i((function(){return Lo[Po]=!1,Ro(ko)!=ko||Ro(Lo)==Lo||"/a/i"!=Ro(ko,"i")})))){for(var Uo=function(e,t){var n,r=this instanceof Uo,o=Ao(e),i=void 0===t;if(!r&&o&&e.constructor===Uo&&i)return e;Fo?o&&!i&&(e=e.source):e instanceof Uo&&(i&&(t=To.call(e)),e=e.source),Do&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var a=en(Fo?new Ro(e,t):Ro(e,t),r?this:Io,Uo);return Do&&n&&No(a,{sticky:n}),a},Bo=function(e){e in Uo||_o(Uo,e,{configurable:!0,get:function(){return Ro[e]},set:function(t){Ro[e]=t}})},$o=Co(Ro),Vo=0;$o.length>Vo;)Bo($o[Vo++]);Io.constructor=Uo,Uo.prototype=Io,re(o,"RegExp",Uo)}Hn("RegExp");var qo=RegExp.prototype.exec,Go=String.prototype.replace,Ho=qo,Wo=function(){var e=/a/,t=/b*/g;return qo.call(e,"a"),qo.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),zo=Mo.UNSUPPORTED_Y||Mo.BROKEN_CARET,Ko=void 0!==/()??/.exec("")[1];(Wo||Ko||zo)&&(Ho=function(e){var t,n,r,o,i=this,a=zo&&i.sticky,c=To.call(i),u=i.source,l=0,s=e;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),s=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",s=" "+s,l++),n=new RegExp("^(?:"+u+")",c)),Ko&&(n=new RegExp("^"+u+"$(?!\\s)",c)),Wo&&(t=i.lastIndex),r=qo.call(a?n:i,s),a?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Wo&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),Ko&&r&&r.length>1&&Go.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var Jo=Ho;Re({target:"RegExp",proto:!0,forced:/./.exec!==Jo},{exec:Jo});var Yo="toString",Xo=RegExp.prototype,Qo=Xo.toString,Zo=i((function(){return"/a/b"!=Qo.call({source:"a",flags:"b"})})),ei=Qo.name!=Yo;(Zo||ei)&&re(RegExp.prototype,Yo,(function(){var e=j(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in Xo)?To.call(e):n)}),{unsafe:!0});var ti=function(e){if(Ao(e))throw TypeError("The method doesn't accept regular expressions");return e},ni=Ve("match");Re({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ni]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~String(v(this)).indexOf(ti(e),arguments.length>1?arguments[1]:void 0)}});var ri=Ve("species"),oi=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),ii="$0"==="a".replace(/./,"$0"),ai=Ve("replace"),ci=!!/./[ai]&&""===/./[ai]("a","$0"),ui=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),li=function(e,t,n,r){var o=Ve(e),a=!i((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=a&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ri]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!a||!c||"replace"===e&&(!oi||!ii||ci)||"split"===e&&!ui){var u=/./[o],l=n(o,""[e],(function(e,t,n,r,o){return t.exec===Jo?a&&!o?{done:!0,value:u.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:ii,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ci}),s=l[0],f=l[1];re(String.prototype,e,s),re(RegExp.prototype,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&C(RegExp.prototype[o],"sham",!0)},si=function(e){return function(t,n){var r,o,i=String(v(t)),a=le(n),c=i.length;return a<0||a>=c?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},fi={codeAt:si(!1),charAt:si(!0)}.charAt,di=function(e,t,n){return t+(n?fi(e,t).length:1)},pi=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==d(e))throw TypeError("RegExp#exec called on incompatible receiver");return Jo.call(e,t)};li("match",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this);if(!o.global)return pi(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],l=0;null!==(c=pi(o,i));){var s=String(c[0]);u[l]=s,""===s&&(o.lastIndex=di(i,fe(o.lastIndex),a)),l++}return 0===l?null:u}]}));var gi=Math.max,vi=Math.min,hi=Math.floor,mi=/\$([$&'`]|\d\d?|<[^>]*>)/g,yi=/\$([$&'`]|\d\d?)/g,wi=function(e){return void 0===e?e:String(e)};li("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=v(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var u=n(t,e,this,r);if(u.done)return u.value}var l=j(e),s=String(this),f="function"==typeof r;f||(r=String(r));var d=l.global;if(d){var p=l.unicode;l.lastIndex=0}for(var g=[];;){var v=pi(l,s);if(null===v)break;if(g.push(v),!d)break;""===String(v[0])&&(l.lastIndex=di(s,fe(l.lastIndex),p))}for(var h="",m=0,y=0;y<g.length;y++){v=g[y];for(var w=String(v[0]),b=gi(vi(le(v.index),s.length),0),S=[],x=1;x<v.length;x++)S.push(wi(v[x]));var E=v.groups;if(f){var O=[w].concat(S,b,s);void 0!==E&&O.push(E);var A=String(r.apply(void 0,O))}else A=c(w,s,b,S,E,r);b>=m&&(h+=s.slice(m,b)+A,m=b+w.length)}return h+s.slice(m)}];function c(e,n,r,o,i,a){var c=r+e.length,u=o.length,l=yi;return void 0!==i&&(i=ke(i),l=mi),t.call(a,l,(function(t,a){var l;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":l=i[a.slice(1,-1)];break;default:var s=+a;if(0===s)return t;if(s>u){var f=hi(s/10);return 0===f?t:f<=u?void 0===o[f-1]?a.charAt(1):o[f-1]+a.charAt(1):t}l=o[s-1]}return void 0===l?"":l}))}}));var bi=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};li("search",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this),a=o.lastIndex;bi(a,0)||(o.lastIndex=0);var c=pi(o,i);return bi(o.lastIndex,a)||(o.lastIndex=a),null===c?-1:c.index}]}));var Si=[].push,xi=Math.min,Ei=4294967295,Oi=!i((function(){return!RegExp(Ei,"y")}));li("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(v(this)),o=void 0===n?Ei:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!Ao(e))return t.call(r,e,o);for(var i,a,c,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),s=0,f=new RegExp(e.source,l+"g");(i=Jo.call(f,r))&&!((a=f.lastIndex)>s&&(u.push(r.slice(s,i.index)),i.length>1&&i.index<r.length&&Si.apply(u,i.slice(1)),c=i[0].length,s=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return s===r.length?!c&&f.test("")||u.push(""):u.push(r.slice(s)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=v(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var a=j(e),c=String(this),u=ar(a,RegExp),l=a.unicode,s=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Oi?"y":"g"),f=new u(Oi?a:"^(?:"+a.source+")",s),d=void 0===o?Ei:o>>>0;if(0===d)return[];if(0===c.length)return null===pi(f,c)?[c]:[];for(var p=0,g=0,v=[];g<c.length;){f.lastIndex=Oi?g:0;var h,m=pi(f,Oi?c:c.slice(g));if(null===m||(h=xi(fe(f.lastIndex+(Oi?0:g)),c.length))===p)g=di(c,g,l);else{if(v.push(c.slice(p,g)),v.length===d)return v;for(var y=1;y<=m.length-1;y++)if(v.push(m[y]),v.length===d)return v;g=p=h}}return v.push(c.slice(p)),v}]}),!Oi);for(var Ai in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Ti=o[Ai],ji=Ti&&Ti.prototype;if(ji&&ji.forEach!==_t)try{C(ji,"forEach",_t)}catch(e){ji.forEach=_t}}var Mi,_i=n((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),Ci=(Mi=_i)&&Mi.__esModule&&Object.prototype.hasOwnProperty.call(Mi,"default")?Mi.default:Mi;function Ni(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}function Pi(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substr(1):t}function Ri(e){return JSON.parse(JSON.stringify(e))}function Ii(e){void 0===e&&(e=5);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function ki(e,t){void 0===t&&(t={isNaNAsNumber:!1,isUnFiniteAsNumber:!1});var n=Object.assign({isNaNAsNumber:!1,isUnFiniteAsNumber:!1},t),r=n.isNaNAsNumber,o=!0;return"number"!=typeof e&&(o=!1),!1!==n.isUnFiniteAsNumber||isFinite(e)||(o=!1),!1===r&&isNaN(e)&&(o=!1),o}function Li(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,t)),r}function Fi(){return Date.now?Date.now():(new Date).getTime()}function Di(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function Ui(){try{var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){var n=e.match(t),r="";return n&&(r=n.toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")),r},r="",o="";t(/windows|win32|win64|wow32|wow64/g)?r="windows":t(/macintosh|macintel/g)?r="macos":t(/x11/g)?r="linux":t(/android|adr/g)?r="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(r="ios",t(/iphone/g)?o="iphone":t(/ipad/g)?o="ipad":t(/iwatch/g)?o="iwatch":t(/ipod/g)&&(o="ipod"));var i="";"windows"===r?t(/windows nt 5.0|windows 2000/g)?i="2000":t(/windows nt 5.1|windows xp/g)?i="xp":t(/windows nt 5.2|windows 2003/g)?i="2003":t(/windows nt 6.0|windows vista/g)?i="vista":t(/windows nt 6.1|windows 7/g)?i="7":t(/windows nt 6.2|windows 8/g)?i="8":t(/windows nt 6.3|windows 8.1/g)?i="8.1":t(/windows nt 10.0|windows 10/g)&&(i="10"):"macos"===r?i=n(/os x [\d._]+/g):"android"===r?i=n(/android [\d._]+/g):"ios"===r&&(i=n(/os [\d._]+/g));var a="";"windows"===r||"macos"===r||"linux"===r?a="desktop":("android"===r||"ios"===r||t(/mobile/g))&&(a="mobile");var c="",u="";t(/applewebkit/g)?(c="webkit",t(/edge/g)?u="edge":t(/opr/g)?u="opera":t(/chrome/g)?u="chrome":t(/safari/g)&&(u="safari")):t(/gecko/g)&&t(/firefox/g)?(c="gecko",u="firefox"):t(/presto/g)?(c="presto",u="opera"):t(/trident|compatible|msie/g)&&(c="trident",u="iexplore");var l="";"webkit"===c?l=n(/applewebkit\/[\d._]+/g):"gecko"===c?l=n(/gecko\/[\d._]+/g):"presto"===c?l=n(/presto\/[\d._]+/g):"trident"===c&&(l=n(/trident\/[\d._]+/g));var s="";"chrome"===u?s=n(/chrome\/[\d._]+/g):"safari"===u?s=n(/version\/[\d._]+/g):"firefox"===u?s=n(/firefox\/[\d._]+/g):"opera"===u?s=n(/opr\/[\d._]+/g):"iexplore"===u?s=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===u&&(s=n(/edge\/[\d._]+/g));var f="",d="";return t(/micromessenger/g)?(f="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(f="qq_browser",d=n(/qqbrowser\/[\d._]+/g)):t(/\sqq/g)?f="qq_app":t(/ucbrowser/g)?(f="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?f="360":t(/2345explorer/g)?(f="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?f="sougou":t(/lbbrowser/g)?f="liebao":t(/maxthon/g)?(f="maxthon",d=n(/maxthon\/[\d._]+/g)):t(/biliapp/g)&&(f="bilibili"),Object.assign({engine:c,engineVs:l,platform:a,supporter:u,supporterVs:s,system:r,systemVs:i},{shell:f,shellVs:d,appleType:o})}catch(e){return console.warn("mazey:",e),{engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:""}}}return e.addClass=function(e,t){var n,r=e.className,o="";""!==r&&(o=" "),n=r+o+t,e.className=n},e.addStyle=function(e,t){if(void 0===t&&(t={id:""}),!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0},e.calLongestCommonSubsequence=function(e,t){for(var n=e.length,r=t.length,o=Ri(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}else{var u=[0,0],l=u[0],s=u[1];a>0&&(l=o[i][a-1]),i>0&&(s=o[i-1][a]),o[i][a]=Math.max(l,s)}var f=Array.prototype.concat.apply([],o);return Math.max.apply(Math,f)},e.calLongestCommonSubstring=function(e,t){for(var n=e.length,r=t.length,o=Ri(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}var u=Array.prototype.concat.apply([],o);return Math.max.apply(Math,u)},e.camelCase2Underscore=Pi,e.camelCaseToKebabCase=function(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substr(1):t},e.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.clearHtml=function(e){return e.replace(/<\/?.+?>/g,"").replace(/[\r\n]/g,"")},e.cutCHSString=function(e,t,n){if(void 0===n&&(n=!1),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>t));u++)o+=a;return n&&c>t&&(o+="..."),o}return""},e.debounce=function(e,t,n){var r=null,o=null,i=null,a=null,c=null,u=function u(){var l=Fi()-i;l<t&&l>=0?o=setTimeout(u,t-l):(o=null,n||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];r=this,a=l,i=Fi();var f=n&&!o;return o||(o=setTimeout(u,t)),f&&(c=e.apply(r,a),r=a=null),c}},e.deepCopyObject=Ri,e.doFn=Li,e.floatFixed=function(e,t){return void 0===t&&(t=0),parseFloat(e).toFixed(t)},e.floatToPercent=function(e,t){void 0===t&&(t=0);var n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")},e.formatDate=function(e,t){void 0===t&&(t="yyyy-MM-dd"),e||(e=new Date);var n=new Date(e),r={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate(),hh:n.getHours()<10?"0"+n.getHours():n.getHours(),mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds()},o=t||"yyyy-MM-dd";return Object.keys(r).forEach((function(e){var t=r[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),o=o.replace(e,String(t))})),o},e.friendlyInterval=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n={type:"d"});var r=n.type;ki(e)||(e=new Date(e).getTime()),ki(t)||(t=new Date(t).getTime());var o=t-e,i="",a=new Array(4).fill(0),c=a[0],u=(a[1],a[2],a[3]);if(o>=0)switch(c=Math.floor(o/1e3/60/60/24),Math.floor(o/1e3/60/60),Math.floor(o/1e3/60),u=Math.floor(o/1e3),r){case"d":i=c;break;case"text":i=(c=Math.floor(o/1e3/60/60/24))+" 天 "+Math.floor(o/1e3/60/60%24)+" 时 "+Math.floor(o/1e3/60%60)+" 分 "+(u=Math.floor(o/1e3%60))+" 秒";break;default:i=u}return i},e.genCustomConsole=function(e,t){void 0===e&&(e=""),void 0===t&&(t={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var n=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},t),r=n.isClosed,o=n.showWrap,i=n.showDate,a=n.locales,c=n.logFn,u=n.errorFn,l=Object.create(null),s=function(){return(new Date).toLocaleDateString(a,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(t){l[t]=function(){for(var n,a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];if(r)return!1;var d=e,p=e;if("string"==typeof e&&e.length>=2){var g=e.length;d=":"===e[g-1]?e.substring(0,g-1):e}o&&console.log("--- ".concat(d," - begin ---")),i&&(p=e?"".concat(s()," ").concat(e):"".concat(s())),e||i?(n=console)[t].apply(n,Ni([p],l)):(a=console)[t].apply(a,l),"log"===t&&c(),"error"===t&&u(),o&&console.log("--- ".concat(d," - end ---"))}})),l},e.genHashCode=function(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},e.generateRndNum=Ii,e.generateUniqueNum=function(e){void 0===e&&(e=3);var t=[Fi(),Ii(e||3)];return t[0]+t[1]},e.getBrowserInfo=Ui,e.getCookie=Di,e.getDomain=function(e,t){void 0===t&&(t=["hostname"]);var n=document.createElement("a");return n.href=e,t.reduce((function(e,t){return e+=n[t]}),"")},e.getFileSize=function(e){var t=function(e){return String(Math.ceil(e))};if(!e)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"},e.getHashQueryParam=function(e){var t=location.hash.split("?");if(1===t.length)return"";var n=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=t[1].match(n);return r?r[2]:""},e.getLocalStorage=function(e){var t=null;if(e){var n=localStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getPerformance=function(e){var t,n;void 0===e&&(e=!0);var r,o,i=new Promise((function(e,r){var o;t=(o=[e,r])[0],n=o[1]})),a=window.performance.timing,c=a.navigationStart||a.fetchStart;function u(){try{if(window.performance&&Boolean(window.performance.getEntriesByType))window.performance.getEntriesByType("paint").forEach((function(e,t,n){var i=Math.round(e.startTime);"first-paint"===e.name?r=i:"first-contentful-paint"===e.name&&(o=i)}));else console.error("paint")}catch(e){console.error(e.message)}if(window.performance&&"function"==typeof window.performance.getEntries){var i,u=(window.performance.getEntries()||[])[0]||{},v={os:l(),osVersion:s(),deviceType:f(),network:d(),screenDirection:p(),unloadTime:a.unloadEventEnd-a.unloadEventStart,redirectTime:a.redirectEnd-a.redirectStart,dnsTime:a.domainLookupEnd-a.domainLookupStart,tcpTime:a.connectEnd-a.connectStart,sslTime:g(a.connectEnd,a.secureConnectionStart),responseTime:a.responseStart-a.requestStart,downloadTime:a.responseEnd-a.responseStart,firstPaintTime:r,firstContentfulPaintTime:o,domreadyTime:a.domContentLoadedEventStart-c||0,onloadTime:a.loadEventStart-c||0,whiteTime:a.responseStart-c,renderTime:a.loadEventEnd-c||0,decodedBodySize:u.decodedBodySize||"",encodedBodySize:u.encodedBodySize||""};if(Object.keys(v).forEach((function(e){ki(v[e])&&v[e]<0&&(v[e]=0)})),ki(v.whiteTime)&&v.whiteTime>v.onloadTime&&(v.whiteTime=0),c>0)e||Object.keys(v).forEach((function(e){i||(i={}),i[Pi(e)]=v[e]})),t(i||v);else n(Error("startTime"))}else n(Error("getEntries"))}function l(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function s(){var e,t=navigator.userAgent,n=t.indexOf("Android")>-1||t.indexOf("Linux")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return n&&(e=(navigator.userAgent.split(";")[1].match(/\d+\.\d+/g)||[])[0]),r&&(e=(navigator.userAgent.split(";")[1].match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e}function f(){var e=navigator.userAgent.toLowerCase(),t=e.match(/(ipad)/i)&&"ipad",n=e.match(/iphone os/i)&&"iphone os",r=e.match(/midp/i)&&"midp",o=e.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",i=e.match(/ucweb/i)&&"ucweb",a=e.match(/android/i)&&"android",c=e.match(/windows ce/i)&&"windows ce",u=e.match(/windows mobile/i)&&"windows mobile";return t||n||r||o||i||a||c||u?n||r||o||i||a||c||u?"phone":t?"ipad":void 0:"pc"}function d(){var e;if(navigator.connection&&navigator.connection.effectiveType)switch(navigator.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e}function p(){var e;return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function g(e,t){var n;return t&&(n=e-t),n}return window.performance&&window.performance.timing&&window.performance.timing.loadEventEnd>0?u():window.addEventListener("load",(function(){window.setTimeout((function(){u()}),0)})),i},e.getQueryParam=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=location.search.substr(1).match(t);return null!==n?decodeURIComponent(n[2]):""},e.getSessionStorage=function(e){var t=null;if(e){var n=sessionStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getUrlParam=function(e,t){var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){if(void 0!==n[t]){var o=n[t];n[t]=[].concat(o,r)}else n[t]=r})),n[t]||""},e.hasClass=function(e,t){for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},e.inRate=function(e){return Math.random()<e},e.isJsonString=function(e){try{if("object"===Ci(JSON.parse(e)))return!0}catch(e){}return!1},e.isNonEmptyArray=function(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t},e.isNumber=ki,e.isSafePWAEnv=function(){var e=Ui();return!(!("serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches))||e.shell)},e.isSupportWebp=function(){return new Promise((function(e){var t=new Image;t.onload=function(){e(t.width>0&&t.height>0)},t.onerror=function(){e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))},e.isValidData=function(e,t,n){var r=!1;return t.reduce((function(e,t){return e[t]?e=e[t]:Object.create(null)}),e)===n&&(r=!0),r},e.loadCSS=function(e,t){void 0===t&&(t={id:""});var n,r=t.id,o=new Promise((function(e,t){n=[e,t][0]})),i=function(){n(!0)},a=document.createElement("link"),c="onload"in a,u=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==r&&(a.id=r),document.getElementsByTagName("head")[0].appendChild(a),u||!c)return setTimeout((function(){s(a,i,0)}),1),o;function l(){a.onload=a.onerror=a.onreadystatechange=null,a=null,i()}function s(e,t,n){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e=null,void t();if(u)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){r?t():s(e,t,n)}),20)}return c?(a.onload=l,a.onerror=function(){l()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&l()},o},e.loadScript=function(e,t){void 0===t&&(t={id:"",callback:function(){},timeout:5e3,isDefer:!1});var n=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},t),r=n.id,o=n.callback,i=n.timeout,a=n.isDefer,c=null,u=null,l=document.createElement("script"),s=document.getElementsByTagName("script")[0];return l.type="text/javascript",a&&(l.defer="defer"),r&&(l.id=r),l.readyState?l.onreadystatechange=function(){"loaded"!==l.readyState&&"complete"!==l.readyState||(l.onreadystatechange=null,Li(o),Li(c,!0))}:l.onload=function(){Li(o),Li(c,!0)},l.src=e,s&&s.parentNode.insertBefore(l,s),new Promise((function(e,t){var n;c=(n=[e,t])[0],u=n[1],i&&setTimeout(u.bind(null,Error("timeout")),i)}))},e.mNow=Fi,e.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)},e.newLine=function(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")},e.removeClass=function(e,t){var n;n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n},e.setCookie=function(e,t,n,r){var o,i,a;n?((a=new Date).setTime(a.getTime()+24*n*60*60*1e3),i="; expires="+a.toGMTString()):i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+t+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+t+i+"; path=/; domain="+r,null!==Di(e)&&Di(e)===t||(r=r||"."+c,document.cookie=e+"="+t+i+"; path=/; domain="+r))},e.setLocalStorage=function(e,t){void 0===t&&(t=null),e&&localStorage.setItem(e,JSON.stringify(t))},e.setSessionStorage=function(e,t){void 0===t&&(t=null),e&&sessionStorage.setItem(e,JSON.stringify(t))},e.throttle=function(e,t,n){void 0===n&&(n={}),n=Object.assign({},n);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],l=function(){u=!1===n.leading?0:Fi(),i=null,c=e.apply(r,o),i||(r=o=null)};return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var f=Fi();u||!1!==n.leading||(u=f);var d=t-(f-u);return r=this,o=a,d<=0||d>t?(i&&(clearTimeout(i),i=null),u=f,c=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,d)),c}},e.updateQueryParam=function(e,t,n){var r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+o+t+"="+n},e.windowLoaded=function(e){void 0===e&&(e=90);var t,n=function(){},r=new Promise((function(e,r){n=e,t=r}));return"complete"===document.readyState?n("complete"):window.addEventListener("load",(function(){return n("load")})),setTimeout((function(){return t(Error("timeout"))}),1e3*e),r},e.zAxiosIsValidRes=function(e,t){void 0===t&&(t={validStatusRange:[200,300],validCode:[0]});var n=Object.assign({validStatusRange:[200,300],validCode:[0]},t),r=n.validStatusRange,o=n.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mazey",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Mazey's library for front-end.",
|
|
5
5
|
"main": "lib/index.cjs.js",
|
|
6
6
|
"module": "lib/index.esm.js",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@typescript-eslint/eslint-plugin": "^4.22.0",
|
|
73
73
|
"@typescript-eslint/parser": "^4.22.0",
|
|
74
74
|
"clean-webpack-plugin": "^1.0.1",
|
|
75
|
-
"cross-env": "^7.0.3",
|
|
76
75
|
"core-js": "^3.6.5",
|
|
76
|
+
"cross-env": "^7.0.3",
|
|
77
77
|
"date-fns": "^2.29.3",
|
|
78
78
|
"eslint": "^6.8.0",
|
|
79
79
|
"eslint-config-standard": "^14.1.0",
|
|
@@ -95,10 +95,11 @@
|
|
|
95
95
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
96
96
|
"rollup-plugin-copy": "^3.4.0",
|
|
97
97
|
"rollup-plugin-terser": "^7.0.2",
|
|
98
|
-
"rollup-plugin-typescript2": "^0.
|
|
98
|
+
"rollup-plugin-typescript2": "^0.30.0",
|
|
99
99
|
"ts-loader": "^8.0.2",
|
|
100
|
+
"tslib": "^2.4.1",
|
|
100
101
|
"typedoc": "^0.18.0",
|
|
101
|
-
"typescript": "^
|
|
102
|
+
"typescript": "^4.4.4",
|
|
102
103
|
"webpack": "^4.30.0",
|
|
103
104
|
"webpack-cli": "^3.3.2",
|
|
104
105
|
"webpack-dev-server": "^3.10.3"
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author: Mazey Chu
|
|
3
|
+
*/
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* EN: Computes the longest common substring of two strings.
|
|
@@ -2065,6 +2067,64 @@ export function isNonEmptyArray(arr: any[]): boolean {
|
|
|
2065
2067
|
return ret;
|
|
2066
2068
|
}
|
|
2067
2069
|
|
|
2070
|
+
/**
|
|
2071
|
+
* Determine the validity of the data.
|
|
2072
|
+
*
|
|
2073
|
+
* Usage:
|
|
2074
|
+
*
|
|
2075
|
+
* ```
|
|
2076
|
+
* const validData = {
|
|
2077
|
+
* a: {
|
|
2078
|
+
* b: {
|
|
2079
|
+
* c: 413
|
|
2080
|
+
* }
|
|
2081
|
+
* }
|
|
2082
|
+
* };
|
|
2083
|
+
*
|
|
2084
|
+
* const isValidDataResA = isValidData(validData, ['a', 'b', 'c'], 2333);
|
|
2085
|
+
* const isValidDataResB = isValidData(validData, ['a', 'b', 'c'], 413);
|
|
2086
|
+
* const isValidDataResC = isValidData(validData, ['d', 'd'], 413);
|
|
2087
|
+
*
|
|
2088
|
+
* console.log('isValidDataResA:', isValidDataResA);
|
|
2089
|
+
* console.log('isValidDataResB:', isValidDataResB);
|
|
2090
|
+
* console.log('isValidDataResC:', isValidDataResC);
|
|
2091
|
+
* ```
|
|
2092
|
+
*
|
|
2093
|
+
* Output:
|
|
2094
|
+
*
|
|
2095
|
+
* ```
|
|
2096
|
+
* isValidDataResA: false
|
|
2097
|
+
* isValidDataResB: true
|
|
2098
|
+
* isValidDataResC: false
|
|
2099
|
+
* ```
|
|
2100
|
+
*
|
|
2101
|
+
* @param {any} data Original Data
|
|
2102
|
+
* @param {string[]} attributes Data Attributes
|
|
2103
|
+
* @param {any} validValue Given Value for verifying.
|
|
2104
|
+
* @returns {boolean} Return TRUE if the data is valid.
|
|
2105
|
+
*/
|
|
2106
|
+
export function isValidData(
|
|
2107
|
+
data: any,
|
|
2108
|
+
attributes: string[],
|
|
2109
|
+
validValue: any
|
|
2110
|
+
): boolean {
|
|
2111
|
+
let ret = false;
|
|
2112
|
+
const foundRet = attributes.reduce((foundValue, curr) => {
|
|
2113
|
+
if (foundValue[curr]) {
|
|
2114
|
+
foundValue = foundValue[curr];
|
|
2115
|
+
} else {
|
|
2116
|
+
return Object.create(null);
|
|
2117
|
+
}
|
|
2118
|
+
// console.log('foundValue', foundValue);
|
|
2119
|
+
return foundValue;
|
|
2120
|
+
}, data);
|
|
2121
|
+
// console.log('foundRet', foundRet);
|
|
2122
|
+
if (foundRet === validValue) {
|
|
2123
|
+
ret = true;
|
|
2124
|
+
}
|
|
2125
|
+
return ret;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2068
2128
|
/**
|
|
2069
2129
|
* 语义化文件大小, 把字节转换成正常文件大小.
|
|
2070
2130
|
*/
|
|
@@ -2123,3 +2183,66 @@ export function genHashCode(str: string): number {
|
|
|
2123
2183
|
}
|
|
2124
2184
|
return hash;
|
|
2125
2185
|
}
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* Return the formatted date string in the given format.
|
|
2189
|
+
*
|
|
2190
|
+
* Usage:
|
|
2191
|
+
*
|
|
2192
|
+
* ```
|
|
2193
|
+
* console.log('Default formatDate value:', formatDate());
|
|
2194
|
+
* console.log('String formatDate value:', formatDate('Tue Jan 11 2022 14:12:26 GMT+0800 (China Standard Time)', 'yyyy-MM-dd hh:mm:ss'));
|
|
2195
|
+
* console.log('Number formatDate value:', formatDate(1641881235000, 'yyyy-MM-dd hh:mm:ss'));
|
|
2196
|
+
* console.log('Date formatDate value:', formatDate(new Date(2014, 1, 11), 'MM/dd/yyyy'));
|
|
2197
|
+
* ```
|
|
2198
|
+
*
|
|
2199
|
+
* Output:
|
|
2200
|
+
*
|
|
2201
|
+
* ```
|
|
2202
|
+
* Default formatDate value: 2023-01-11
|
|
2203
|
+
* String formatDate value: 2022-01-11 14:12:26
|
|
2204
|
+
* Number formatDate value: 2022-01-11 14:07:15
|
|
2205
|
+
* Date formatDate value: 02/11/2014
|
|
2206
|
+
* ```
|
|
2207
|
+
*
|
|
2208
|
+
* @param {Date|number|string} dateIns Original Date
|
|
2209
|
+
* @param {string} format Format String
|
|
2210
|
+
* @returns {string} Return the formatted date string.
|
|
2211
|
+
*/
|
|
2212
|
+
export function formatDate(
|
|
2213
|
+
dateIns?: Date | number | string,
|
|
2214
|
+
format = 'yyyy-MM-dd'
|
|
2215
|
+
): string {
|
|
2216
|
+
if (!dateIns) {
|
|
2217
|
+
dateIns = new Date();
|
|
2218
|
+
}
|
|
2219
|
+
const tempDate = new Date(dateIns);
|
|
2220
|
+
const o: {
|
|
2221
|
+
[key: string]: string | number;
|
|
2222
|
+
} = {
|
|
2223
|
+
yyyy: tempDate.getFullYear(),
|
|
2224
|
+
MM: tempDate.getMonth() + 1,
|
|
2225
|
+
dd: tempDate.getDate(),
|
|
2226
|
+
hh:
|
|
2227
|
+
tempDate.getHours() < 10
|
|
2228
|
+
? '0' + tempDate.getHours()
|
|
2229
|
+
: tempDate.getHours(),
|
|
2230
|
+
mm:
|
|
2231
|
+
tempDate.getMinutes() < 10
|
|
2232
|
+
? '0' + tempDate.getMinutes()
|
|
2233
|
+
: tempDate.getMinutes(),
|
|
2234
|
+
ss:
|
|
2235
|
+
tempDate.getSeconds() < 10
|
|
2236
|
+
? '0' + tempDate.getSeconds()
|
|
2237
|
+
: tempDate.getSeconds()
|
|
2238
|
+
};
|
|
2239
|
+
let tempFormat = format || 'yyyy-MM-dd';
|
|
2240
|
+
Object.keys(o).forEach(key => {
|
|
2241
|
+
let value = o[key];
|
|
2242
|
+
if (key === 'MM' && Number(value) <= 9) {
|
|
2243
|
+
value = `0${value}`;
|
|
2244
|
+
}
|
|
2245
|
+
tempFormat = tempFormat.replace(key, String(value));
|
|
2246
|
+
});
|
|
2247
|
+
return tempFormat;
|
|
2248
|
+
}
|