front-end-cache
Version:
支持typescript的前端浏览器缓存管理工具,browser front end cache (支持localstorage, sessionstorage, cookie)
10 lines (9 loc) • 27.5 kB
JavaScript
/** @license front-end-cache v1.0.2
* front-end-cache.min.js
*
* Copyright (c) sonamu.liao<liaoqingsong@front-end.com.cn>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},n=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),r={},o=function(t){try{return!!t()}catch(e){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={},a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,f=u&&!a.call({1:2},1);c.f=f?function(t){var e=u(this,t);return!!e&&e.enumerable}:a;var s=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},l={}.toString,p=function(t){return l.call(t).slice(8,-1)},h=p,d="".split,y=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==h(t)?d.call(t,""):Object(t)}:Object,g=function(t){if(t==undefined)throw TypeError("Can't call method on "+t);return t},v=y,m=g,b=function(t){return v(m(t))},S=function(t){return"object"==typeof t?null!==t:"function"==typeof t},w=S,O=function(t,e){if(!w(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!w(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},x=g,E=function(t){return Object(x(t))},j=E,T={}.hasOwnProperty,P=Object.hasOwn||function(t,e){return T.call(j(t),e)},k=S,R=n.document,_=k(R)&&k(R.createElement),I=function(t){return _?R.createElement(t):{}},C=I,L=!i&&!o((function(){return 7!=Object.defineProperty(C("div"),"a",{get:function(){return 7}}).a})),A=i,D=c,M=s,N=b,U=O,$=P,F=L,z=Object.getOwnPropertyDescriptor;r.f=A?z:function(t,e){if(t=N(t),e=U(e,!0),F)try{return z(t,e)}catch(n){}if($(t,e))return M(!D.f.call(t,e),t[e])};var G={},V=S,W=function(t){if(!V(t))throw TypeError(String(t)+" is not an object");return t},B=i,K=L,H=W,J=O,Y=Object.defineProperty;G.f=B?Y:function(t,e,n){if(H(t),e=J(e,!0),H(n),K)try{return Y(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var X=G,q=s,Q=i?function(t,e,n){return X.f(t,e,q(1,n))}:function(t,e,n){return t[e]=n,t},Z={exports:{}},tt=n,et=Q,nt=function(t,e){try{et(tt,t,e)}catch(n){tt[t]=e}return e},rt=nt,ot=n["__core-js_shared__"]||rt("__core-js_shared__",{}),it=ot,ct=Function.toString;"function"!=typeof it.inspectSource&&(it.inspectSource=function(t){return ct.call(t)});var at=it.inspectSource,ut=at,ft=n.WeakMap,st="function"==typeof ft&&/native code/.test(ut(ft)),lt={exports:{}},pt=ot;(lt.exports=function(t,e){return pt[t]||(pt[t]=e!==undefined?e:{})})("versions",[]).push({version:"3.14.0",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var ht,dt,yt,gt=0,vt=Math.random(),mt=function(t){return"Symbol("+String(t===undefined?"":t)+")_"+(++gt+vt).toString(36)},bt=lt.exports,St=mt,wt=bt("keys"),Ot=function(t){return wt[t]||(wt[t]=St(t))},xt={},Et=st,jt=S,Tt=Q,Pt=P,kt=ot,Rt=Ot,_t=xt,It=n.WeakMap;if(Et||kt.state){var Ct=kt.state||(kt.state=new It),Lt=Ct.get,At=Ct.has,Dt=Ct.set;ht=function(t,e){if(At.call(Ct,t))throw new TypeError("Object already initialized");return e.facade=t,Dt.call(Ct,t,e),e},dt=function(t){return Lt.call(Ct,t)||{}},yt=function(t){return At.call(Ct,t)}}else{var Mt=Rt("state");_t[Mt]=!0,ht=function(t,e){if(Pt(t,Mt))throw new TypeError("Object already initialized");return e.facade=t,Tt(t,Mt,e),e},dt=function(t){return Pt(t,Mt)?t[Mt]:{}},yt=function(t){return Pt(t,Mt)}}var Nt={set:ht,get:dt,has:yt,enforce:function(t){return yt(t)?dt(t):ht(t,{})},getterFor:function(t){return function(e){var n;if(!jt(e)||(n=dt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},Ut=n,$t=Q,Ft=P,zt=nt,Gt=at,Vt=Nt.get,Wt=Nt.enforce,Bt=String(String).split("String");(Z.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,c=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||Ft(n,"name")||$t(n,"name",e),(o=Wt(n)).source||(o.source=Bt.join("string"==typeof e?e:""))),t!==Ut?(i?!a&&t[e]&&(c=!0):delete t[e],c?t[e]=n:$t(t,e,n)):c?t[e]=n:zt(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Vt(this).source||Gt(this)}));var Kt=n,Ht=Kt,Jt=n,Yt=function(t){return"function"==typeof t?t:undefined},Xt=function(t,e){return arguments.length<2?Yt(Ht[t])||Yt(Jt[t]):Ht[t]&&Ht[t][e]||Jt[t]&&Jt[t][e]},qt={},Qt=Math.ceil,Zt=Math.floor,te=function(t){return isNaN(t=+t)?0:(t>0?Zt:Qt)(t)},ee=te,ne=Math.min,re=function(t){return t>0?ne(ee(t),9007199254740991):0},oe=te,ie=Math.max,ce=Math.min,ae=b,ue=re,fe=function(t,e){var n=oe(t);return n<0?ie(n+e,0):ce(n,e)},se=function(t){return function(e,n,r){var o,i=ae(e),c=ue(i.length),a=fe(r,c);if(t&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},le={includes:se(!0),indexOf:se(!1)},pe=P,he=b,de=le.indexOf,ye=xt,ge=function(t,e){var n,r=he(t),o=0,i=[];for(n in r)!pe(ye,n)&&pe(r,n)&&i.push(n);for(;e.length>o;)pe(r,n=e[o++])&&(~de(i,n)||i.push(n));return i},ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],me=ge,be=ve.concat("length","prototype");qt.f=Object.getOwnPropertyNames||function(t){return me(t,be)};var Se={};Se.f=Object.getOwnPropertySymbols;var we=qt,Oe=Se,xe=W,Ee=Xt("Reflect","ownKeys")||function(t){var e=we.f(xe(t)),n=Oe.f;return n?e.concat(n(t)):e},je=P,Te=Ee,Pe=r,ke=G,Re=o,_e=/#|\.prototype\./,Ie=function(t,e){var n=Le[Ce(t)];return n==De||n!=Ae&&("function"==typeof e?Re(e):!!e)},Ce=Ie.normalize=function(t){return String(t).replace(_e,".").toLowerCase()},Le=Ie.data={},Ae=Ie.NATIVE="N",De=Ie.POLYFILL="P",Me=Ie,Ne=n,Ue=r.f,$e=Q,Fe=Z.exports,ze=nt,Ge=function(t,e){for(var n=Te(e),r=ke.f,o=Pe.f,i=0;i<n.length;i++){var c=n[i];je(t,c)||r(t,c,o(e,c))}},Ve=Me,We=function(t,e){var n,r,o,i,c,a=t.target,u=t.global,f=t.stat;if(n=u?Ne:f?Ne[a]||ze(a,{}):(Ne[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(c=Ue(n,r))&&c.value:n[r],!Ve(u?r:a+(f?".":"#")+r,t.forced)&&o!==undefined){if(typeof i==typeof o)continue;Ge(i,o)}(t.sham||o&&o.sham)&&$e(i,"sham",!0),Fe(n,r,i,t)}},Be=ge,Ke=ve,He=Object.keys||function(t){return Be(t,Ke)},Je=E,Ye=He;We({target:"Object",stat:!0,forced:o((function(){Ye(1)}))},{keys:function(t){return Ye(Je(t))}});var Xe,qe,Qe=Xt("navigator","userAgent")||"",Ze=n.process,tn=Ze&&Ze.versions,en=tn&&tn.v8;en?qe=(Xe=en.split("."))[0]<4?1:Xe[0]+Xe[1]:Qe&&(!(Xe=Qe.match(/Edge\/(\d+)/))||Xe[1]>=74)&&(Xe=Qe.match(/Chrome\/(\d+)/))&&(qe=Xe[1]);var nn,rn=qe&&+qe,on=rn,cn=o,an=!!Object.getOwnPropertySymbols&&!cn((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&on&&on<41})),un=an&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fn=p,sn=Array.isArray||function(t){return"Array"==fn(t)},ln=G,pn=W,hn=He,dn=i?Object.defineProperties:function(t,e){pn(t);for(var n,r=hn(e),o=r.length,i=0;o>i;)ln.f(t,n=r[i++],e[n]);return t},yn=Xt("document","documentElement"),gn=W,vn=dn,mn=ve,bn=xt,Sn=yn,wn=I,On=Ot("IE_PROTO"),xn=function(){},En=function(t){return"<script>"+t+"<\/script>"},jn=function(){try{nn=document.domain&&new ActiveXObject("htmlfile")}catch(r){}var t,e;jn=nn?function(t){t.write(En("")),t.close();var e=t.parentWindow.Object;return t=null,e}(nn):((e=wn("iframe")).style.display="none",Sn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(En("document.F=Object")),t.close(),t.F);for(var n=mn.length;n--;)delete jn.prototype[mn[n]];return jn()};bn[On]=!0;var Tn=Object.create||function(t,e){var n;return null!==t?(xn.prototype=gn(t),n=new xn,xn.prototype=null,n[On]=t):n=jn(),e===undefined?n:vn(n,e)},Pn={},kn=b,Rn=qt.f,_n={}.toString,In="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Pn.f=function(t){return In&&"[object Window]"==_n.call(t)?function(t){try{return Rn(t)}catch(e){return In.slice()}}(t):Rn(kn(t))};var Cn=n,Ln=lt.exports,An=P,Dn=mt,Mn=an,Nn=un,Un=Ln("wks"),$n=Cn.Symbol,Fn=Nn?$n:$n&&$n.withoutSetter||Dn,zn=function(t){return An(Un,t)&&(Mn||"string"==typeof Un[t])||(Mn&&An($n,t)?Un[t]=$n[t]:Un[t]=Fn("Symbol."+t)),Un[t]},Gn={},Vn=zn;Gn.f=Vn;var Wn=Kt,Bn=P,Kn=Gn,Hn=G.f,Jn=G.f,Yn=P,Xn=zn("toStringTag"),qn=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Qn=S,Zn=sn,tr=zn("species"),er=function(t,e){var n;return Zn(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Zn(n.prototype)?Qn(n)&&null===(n=n[tr])&&(n=undefined):n=undefined),new(n===undefined?Array:n)(0===e?0:e)},nr=function(t,e,n){if(qn(t),e===undefined)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},rr=y,or=E,ir=re,cr=er,ar=[].push,ur=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,c=7==t,a=5==t||i;return function(u,f,s,l){for(var p,h,d=or(u),y=rr(d),g=nr(f,s,3),v=ir(y.length),m=0,b=l||cr,S=e?b(u,v):n||c?b(u,0):undefined;v>m;m++)if((a||m in y)&&(h=g(p=y[m],m,d),t))if(e)S[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:ar.call(S,p)}else switch(t){case 4:return!1;case 7:ar.call(S,p)}return i?-1:r||o?o:S}},fr={forEach:ur(0),map:ur(1),filter:ur(2),some:ur(3),every:ur(4),find:ur(5),findIndex:ur(6),filterOut:ur(7)},sr=We,lr=n,pr=Xt,hr=i,dr=an,yr=un,gr=o,vr=P,mr=sn,br=S,Sr=W,wr=E,Or=b,xr=O,Er=s,jr=Tn,Tr=He,Pr=qt,kr=Pn,Rr=Se,_r=r,Ir=G,Cr=c,Lr=Q,Ar=Z.exports,Dr=lt.exports,Mr=xt,Nr=mt,Ur=zn,$r=Gn,Fr=function(t){var e=Wn.Symbol||(Wn.Symbol={});Bn(e,t)||Hn(e,t,{value:Kn.f(t)})},zr=function(t,e,n){t&&!Yn(t=n?t:t.prototype,Xn)&&Jn(t,Xn,{configurable:!0,value:e})},Gr=Nt,Vr=fr.forEach,Wr=Ot("hidden"),Br=Ur("toPrimitive"),Kr=Gr.set,Hr=Gr.getterFor("Symbol"),Jr=Object.prototype,Yr=lr.Symbol,Xr=pr("JSON","stringify"),qr=_r.f,Qr=Ir.f,Zr=kr.f,to=Cr.f,eo=Dr("symbols"),no=Dr("op-symbols"),ro=Dr("string-to-symbol-registry"),oo=Dr("symbol-to-string-registry"),io=Dr("wks"),co=lr.QObject,ao=!co||!co.prototype||!co.prototype.findChild,uo=hr&&gr((function(){return 7!=jr(Qr({},"a",{get:function(){return Qr(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=qr(Jr,e);r&&delete Jr[e],Qr(t,e,n),r&&t!==Jr&&Qr(Jr,e,r)}:Qr,fo=function(t,e){var n=eo[t]=jr(Yr.prototype);return Kr(n,{type:"Symbol",tag:t,description:e}),hr||(n.description=e),n},so=yr?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Yr},lo=function(t,e,n){t===Jr&&lo(no,e,n),Sr(t);var r=xr(e,!0);return Sr(n),vr(eo,r)?(n.enumerable?(vr(t,Wr)&&t[Wr][r]&&(t[Wr][r]=!1),n=jr(n,{enumerable:Er(0,!1)})):(vr(t,Wr)||Qr(t,Wr,Er(1,{})),t[Wr][r]=!0),uo(t,r,n)):Qr(t,r,n)},po=function(t,e){Sr(t);var n=Or(e),r=Tr(n).concat(vo(n));return Vr(r,(function(e){hr&&!ho.call(n,e)||lo(t,e,n[e])})),t},ho=function(t){var e=xr(t,!0),n=to.call(this,e);return!(this===Jr&&vr(eo,e)&&!vr(no,e))&&(!(n||!vr(this,e)||!vr(eo,e)||vr(this,Wr)&&this[Wr][e])||n)},yo=function(t,e){var n=Or(t),r=xr(e,!0);if(n!==Jr||!vr(eo,r)||vr(no,r)){var o=qr(n,r);return!o||!vr(eo,r)||vr(n,Wr)&&n[Wr][r]||(o.enumerable=!0),o}},go=function(t){var e=Zr(Or(t)),n=[];return Vr(e,(function(t){vr(eo,t)||vr(Mr,t)||n.push(t)})),n},vo=function(t){var e=t===Jr,n=Zr(e?no:Or(t)),r=[];return Vr(n,(function(t){!vr(eo,t)||e&&!vr(Jr,t)||r.push(eo[t])})),r};(dr||(Ar((Yr=function(){if(this instanceof Yr)throw TypeError("Symbol is not a constructor");var t=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,e=Nr(t),n=function(t){this===Jr&&n.call(no,t),vr(this,Wr)&&vr(this[Wr],e)&&(this[Wr][e]=!1),uo(this,e,Er(1,t))};return hr&&ao&&uo(Jr,e,{configurable:!0,set:n}),fo(e,t)}).prototype,"toString",(function(){return Hr(this).tag})),Ar(Yr,"withoutSetter",(function(t){return fo(Nr(t),t)})),Cr.f=ho,Ir.f=lo,_r.f=yo,Pr.f=kr.f=go,Rr.f=vo,$r.f=function(t){return fo(Ur(t),t)},hr&&(Qr(Yr.prototype,"description",{configurable:!0,get:function(){return Hr(this).description}}),Ar(Jr,"propertyIsEnumerable",ho,{unsafe:!0}))),sr({global:!0,wrap:!0,forced:!dr,sham:!dr},{Symbol:Yr}),Vr(Tr(io),(function(t){Fr(t)})),sr({target:"Symbol",stat:!0,forced:!dr},{"for":function(t){var e=String(t);if(vr(ro,e))return ro[e];var n=Yr(e);return ro[e]=n,oo[n]=e,n},keyFor:function(t){if(!so(t))throw TypeError(t+" is not a symbol");if(vr(oo,t))return oo[t]},useSetter:function(){ao=!0},useSimple:function(){ao=!1}}),sr({target:"Object",stat:!0,forced:!dr,sham:!hr},{create:function(t,e){return e===undefined?jr(t):po(jr(t),e)},defineProperty:lo,defineProperties:po,getOwnPropertyDescriptor:yo}),sr({target:"Object",stat:!0,forced:!dr},{getOwnPropertyNames:go,getOwnPropertySymbols:vo}),sr({target:"Object",stat:!0,forced:gr((function(){Rr.f(1)}))},{getOwnPropertySymbols:function(t){return Rr.f(wr(t))}}),Xr)&&sr({target:"JSON",stat:!0,forced:!dr||gr((function(){var t=Yr();return"[null]"!=Xr([t])||"{}"!=Xr({a:t})||"{}"!=Xr(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(br(e)||t!==undefined)&&!so(t))return mr(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!so(e))return e}),o[1]=e,Xr.apply(null,o)}});Yr.prototype[Br]||Lr(Yr.prototype,Br,Yr.prototype.valueOf),zr(Yr,"Symbol"),Mr[Wr]=!0;var mo=o,bo=rn,So=zn("species"),wo=function(t){return bo>=51||!mo((function(){var e=[];return(e.constructor={})[So]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Oo=fr.filter;We({target:"Array",proto:!0,forced:!wo("filter")},{filter:function(t){return Oo(this,t,arguments.length>1?arguments[1]:undefined)}});var xo=We,Eo=o,jo=b,To=r.f,Po=i,ko=Eo((function(){To(1)}));xo({target:"Object",stat:!0,forced:!Po||ko,sham:!Po},{getOwnPropertyDescriptor:function(t,e){return To(jo(t),e)}});var Ro=o,_o=fr.forEach,Io=function(t,e){var n=[][t];return!!n&&Ro((function(){n.call(null,e||function(){throw 1},1)}))}("forEach")?[].forEach:function(t){return _o(this,t,arguments.length>1?arguments[1]:undefined)};We({target:"Array",proto:!0,forced:[].forEach!=Io},{forEach:Io});var Co=n,Lo={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},Ao=Io,Do=Q;for(var Mo in Lo){var No=Co[Mo],Uo=No&&No.prototype;if(Uo&&Uo.forEach!==Ao)try{Do(Uo,"forEach",Ao)}catch(ga){Uo.forEach=Ao}}var $o=O,Fo=G,zo=s,Go=function(t,e,n){var r=$o(e);r in t?Fo.f(t,r,zo(0,n)):t[r]=n},Vo=Ee,Wo=b,Bo=r,Ko=Go;We({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=Wo(t),o=Bo.f,i=Vo(r),c={},a=0;i.length>a;)(n=o(r,e=i[a++]))!==undefined&&Ko(c,e,n);return c}});We({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:dn});function Ho(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}We({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:G.f});var Xo=Z.exports,qo=Date.prototype,Qo=qo.toString,Zo=qo.getTime;new Date(NaN)+""!="Invalid Date"&&Xo(qo,"toString",(function(){var t=Zo.call(this);return t==t?Qo.call(this):"Invalid Date"}));var ti=We,ei=o,ni=sn,ri=S,oi=E,ii=re,ci=Go,ai=er,ui=wo,fi=rn,si=zn("isConcatSpreadable"),li=fi>=51||!ei((function(){var t=[];return t[si]=!1,t.concat()[0]!==t})),pi=ui("concat"),hi=function(t){if(!ri(t))return!1;var e=t[si];return e!==undefined?!!e:ni(t)};ti({target:"Array",proto:!0,forced:!li||!pi},{concat:function(t){var e,n,r,o,i,c=oi(this),a=ai(c,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(hi(i=-1===e?c:arguments[e])){if(u+(o=ii(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,u++)n in i&&ci(a,u,i[n])}else{if(u>=9007199254740991)throw TypeError("Maximum allowed index exceeded");ci(a,u++,i)}return a.length=u,a}});var di=W,yi=function(){var t=di(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},gi={},vi=o;function mi(t,e){return RegExp(t,e)}gi.UNSUPPORTED_Y=vi((function(){var t=mi("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),gi.BROKEN_CARET=vi((function(){var t=mi("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var bi=yi,Si=gi,wi=lt.exports,Oi=RegExp.prototype.exec,xi=wi("native-string-replace",String.prototype.replace),Ei=Oi,ji=function(){var t=/a/,e=/b*/g;return Oi.call(t,"a"),Oi.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Ti=Si.UNSUPPORTED_Y||Si.BROKEN_CARET,Pi=/()??/.exec("")[1]!==undefined;(ji||Pi||Ti)&&(Ei=function(t){var e,n,r,o,i=this,c=Ti&&i.sticky,a=bi.call(i),u=i.source,f=0,s=t;return c&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),s=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",s=" "+s,f++),n=new RegExp("^(?:"+u+")",a)),Pi&&(n=new RegExp("^"+u+"$(?!\\s)",a)),ji&&(e=i.lastIndex),r=Oi.call(c?n:i,s),c?r?(r.input=r.input.slice(f),r[0]=r[0].slice(f),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:ji&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),Pi&&r&&r.length>1&&xi.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)arguments[o]===undefined&&(r[o]=undefined)})),r});var ki=Ei;We({target:"RegExp",proto:!0,forced:/./.exec!==ki},{exec:ki});var Ri=Z.exports,_i=ki,Ii=o,Ci=zn,Li=Q,Ai=Ci("species"),Di=RegExp.prototype,Mi=!Ii((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Ni="$0"==="a".replace(/./,"$0"),Ui=Ci("replace"),$i=!!/./[Ui]&&""===/./[Ui]("a","$0"),Fi=!Ii((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),zi=te,Gi=g,Vi=function(t){return function(e,n){var r,o,i=String(Gi(e)),c=zi(n),a=i.length;return c<0||c>=a?t?"":undefined:(r=i.charCodeAt(c))<55296||r>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):r:t?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},Wi={codeAt:Vi(!1),charAt:Vi(!0)}.charAt,Bi=E,Ki=Math.floor,Hi="".replace,Ji=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Yi=/\$([$&'`]|\d{1,2})/g,Xi=p,qi=ki,Qi=function(t,e,n,r){var o=Ci(t),i=!Ii((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),c=i&&!Ii((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Ai]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!c||"replace"===t&&(!Mi||!Ni||$i)||"split"===t&&!Fi){var a=/./[o],u=n(o,""[t],(function(t,e,n,r,o){var c=e.exec;return c===_i||c===Di.exec?i&&!o?{done:!0,value:a.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Ni,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:$i}),f=u[0],s=u[1];Ri(String.prototype,t,f),Ri(Di,o,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)})}r&&Li(Di[o],"sham",!0)},Zi=W,tc=re,ec=te,nc=g,rc=function(t,e,n){return e+(n?Wi(t,e).length:1)},oc=function(t,e,n,r,o,i){var c=n+t.length,a=r.length,u=Yi;return o!==undefined&&(o=Bi(o),u=Ji),Hi.call(i,u,(function(i,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(c);case"<":f=o[u.slice(1,-1)];break;default:var s=+u;if(0===s)return i;if(s>a){var l=Ki(s/10);return 0===l?i:l<=a?r[l-1]===undefined?u.charAt(1):r[l-1]+u.charAt(1):i}f=r[s-1]}return f===undefined?"":f}))},ic=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Xi(t))throw TypeError("RegExp#exec called on incompatible receiver");return qi.call(t,e)},cc=Math.max,ac=Math.min;Qi("replace",2,(function(t,e,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,c=o?"$":"$0";return[function(n,r){var o=nc(this),i=n==undefined?undefined:n[t];return i!==undefined?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(c)){var a=n(e,t,this,r);if(a.done)return a.value}var u=Zi(t),f=String(this),s="function"==typeof r;s||(r=String(r));var l=u.global;if(l){var p=u.unicode;u.lastIndex=0}for(var h=[];;){var d=ic(u,f);if(null===d)break;if(h.push(d),!l)break;""===String(d[0])&&(u.lastIndex=rc(f,tc(u.lastIndex),p))}for(var y,g="",v=0,m=0;m<h.length;m++){d=h[m];for(var b=String(d[0]),S=cc(ac(ec(d.index),f.length),0),w=[],O=1;O<d.length;O++)w.push((y=d[O])===undefined?y:String(y));var x=d.groups;if(s){var E=[b].concat(w,S,f);x!==undefined&&E.push(x);var j=String(r.apply(undefined,E))}else j=oc(b,f,S,w,x,r);S>=v&&(g+=f.slice(v,S)+j,v=S+b.length)}return g+f.slice(v)}]}));var uc=S,fc=W,sc=function(t){if(!uc(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},lc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(ga){}return function(n,r){return fc(n),sc(r),e?t.call(n,r):n.__proto__=r,n}}():undefined),pc=S,hc=lc,dc=S,yc=p,gc=zn("match"),vc=function(t){var e;return dc(t)&&((e=t[gc])!==undefined?!!e:"RegExp"==yc(t))},mc=Xt,bc=G,Sc=i,wc=zn("species"),Oc=i,xc=n,Ec=Me,jc=function(t,e,n){var r,o;return hc&&"function"==typeof(r=e.constructor)&&r!==n&&pc(o=r.prototype)&&o!==n.prototype&&hc(t,o),t},Tc=G.f,Pc=qt.f,kc=vc,Rc=yi,_c=gi,Ic=Z.exports,Cc=o,Lc=Nt.enforce,Ac=function(t){var e=mc(t),n=bc.f;Sc&&e&&!e[wc]&&n(e,wc,{configurable:!0,get:function(){return this}})},Dc=zn("match"),Mc=xc.RegExp,Nc=Mc.prototype,Uc=/a/g,$c=/a/g,Fc=new Mc(Uc)!==Uc,zc=_c.UNSUPPORTED_Y;if(Oc&&Ec("RegExp",!Fc||zc||Cc((function(){return $c[Dc]=!1,Mc(Uc)!=Uc||Mc($c)==$c||"/a/i"!=Mc(Uc,"i")})))){for(var Gc=function(t,e){var n,r=this instanceof Gc,o=kc(t),i=e===undefined;if(!r&&o&&t.constructor===Gc&&i)return t;Fc?o&&!i&&(t=t.source):t instanceof Gc&&(i&&(e=Rc.call(t)),t=t.source),zc&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var c=jc(Fc?new Mc(t,e):Mc(t,e),r?this:Nc,Gc);zc&&n&&(Lc(c).sticky=!0);return c},Vc=function(t){t in Gc||Tc(Gc,t,{configurable:!0,get:function(){return Mc[t]},set:function(e){Mc[t]=e}})},Wc=Pc(Mc),Bc=0;Wc.length>Bc;)Vc(Wc[Bc++]);Nc.constructor=Gc,Gc.prototype=Nc,Ic(xc,"RegExp",Gc)}Ac("RegExp");var Kc=Z.exports,Hc=W,Jc=o,Yc=yi,Xc=RegExp.prototype,qc=Xc.toString,Qc=Jc((function(){return"/a/b"!=qc.call({source:"a",flags:"b"})})),Zc="toString"!=qc.name;(Qc||Zc)&&Kc(RegExp.prototype,"toString",(function(){var t=Hc(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(n===undefined&&t instanceof RegExp&&!("flags"in Xc)?Yc.call(t):n)}),{unsafe:!0});var ta,ea=vc,na=zn("match"),ra=We,oa=r.f,ia=re,ca=function(t){if(ea(t))throw TypeError("The method doesn't accept regular expressions");return t},aa=g,ua=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[na]=!1,"/./"[t](e)}catch(r){}}return!1},fa="".startsWith,sa=Math.min,la=ua("startsWith");function pa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ha(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pa(Object(n),!0).forEach((function(e){Yo(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}ra({target:"String",proto:!0,forced:!!(la||(ta=oa(String.prototype,"startsWith"),!ta||ta.writable))&&!la},{startsWith:function(t){var e=String(aa(this));ca(t);var n=ia(sa(arguments.length>1?arguments[1]:undefined,e.length)),r=String(t);return fa?fa.call(e,r,n):e.slice(n,n+r.length)===r}}),We({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var da={years:"FullYear",months:"Month",days:"Date",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},ya=function(){function t(e){var n,r,o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Ho(this,t),Yo(this,"key",void 0),Yo(this,"options",void 0),this.options=ha({domain:location.hostname,path:"/",expiresUnit:"seconds",secure:!1,type:"localStorage"},o),this.key=(null===(n=(r=this.options).encryKey)||void 0===n?void 0:n.call(r,e))||e,"cookie"===this.options.type&&(this.key=encodeURIComponent(e))}var e,n,r;return e=t,(n=[{key:"expiresTimeStamp",get:function(){if("number"!=typeof this.options.expires)return null;var t=new Date,e=da[this.options.expiresUnit];return t["set".concat(e)](t["get".concat(e)]()+this.options.expires),t.getTime()}},{key:"serializeValue",value:function(t){var e;return e=!1===this.options.serialize?"".concat(t):JSON.stringify(t),"cookie"===this.options.type&&(e=encodeURIComponent(e)),e}},{key:"deserialization",value:function(t){try{var e=null!=t?t:"";return"cookie"===this.options.type&&(e=decodeURIComponent(e)),!1===this.options.serialize?e:JSON.parse(e)}catch(n){return null}}},{key:"setCookie",value:function(t){var e="".concat(this.key,"=").concat(this.serializeValue(t),";");e+="path=".concat(this.options.path,";"),e+="domain=".concat(this.options.domain,";"),this.expiresTimeStamp&&(e+="expires=".concat(new Date(this.expiresTimeStamp).toUTCString(),";")),document.cookie=e}},{key:"getCookie",value:function(){var t=document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*".concat(this.key.replace(/[-.+*]/g,"\\$&"),"\\s*\\=\\s*([^;]*).*$)|^.*$")),"$1");return this.deserialization(t)}},{key:"removeCookie",value:function(){document.cookie="".concat(this.key,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=").concat(this.options.domain,";path=").concat(this.options.path)}},{key:"setItem",value:function(t){if("cookie"===this.options.type)return this.setCookie(t),t;var e=[t,this.options.path];return this.expiresTimeStamp&&(e[2]=this.expiresTimeStamp),window[this.options.type].setItem(this.key,this.serializeValue(e)),t}},{key:"getItem",value:function(t){var e,n,r=null;if("cookie"===this.options.type)r=this.getCookie();else{var o=this.deserialization(window[this.options.type].getItem(this.key));o&&location.pathname.startsWith(o[1])&&(!o[2]||new Date(o[2]).getTime()-Date.now()>=0)&&(r=o[0])}return null!==(e=null!==(n=r)&&void 0!==n?n:t)&&void 0!==e?e:null}},{key:"removeItem",value:function(){"cookie"===this.options.type?this.removeCookie():window[this.options.type].removeItem(this.key)}}])&&Jo(e.prototype,n),r&&Jo(e,r),t}();module.exports=ya;