Files
svgedit/dist/editor/extensions/ext-storage/ext-storage.js
2020-09-09 01:35:47 +02:00

23 lines
70 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var check=function(t){return t&&t.Math==Math&&t},e=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof t&&t)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},r=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i={f:o&&!n.call({1:2},1)?function propertyIsEnumerable(t){var e=o(this,t);return!!e&&e.enumerable}:n},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},a={}.toString,classofRaw=function(t){return a.call(t).slice(8,-1)},c="".split,u=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?c.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return u(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,e){if(!isObject(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!isObject(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},s={}.hasOwnProperty,has=function(t,e){return s.call(t,e)},f=e.document,l=isObject(f)&&isObject(f.createElement),documentCreateElement=function(t){return l?f.createElement(t):{}},h=!r&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),p=Object.getOwnPropertyDescriptor,v={f:r?p:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),h)try{return p(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!i.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},d=Object.defineProperty,y={f:r?d:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),h)try{return d(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},g=r?function(t,e,r){return y.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,r){try{g(e,t,r)}catch(n){e[t]=r}return r},m=e["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),b=Function.toString;"function"!=typeof m.inspectSource&&(m.inspectSource=function(t){return b.call(t)});var w,S,x,E=m.inspectSource,O=e.WeakMap,P="function"==typeof O&&/native code/.test(E(O)),L=createCommonjsModule((function(t){(t.exports=function(t,e){return m[t]||(m[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),A=0,j=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++A+j).toString(36)},k=L("keys"),sharedKey=function(t){return k[t]||(k[t]=uid(t))},R={},I=e.WeakMap;if(P){var T=new I,_=T.get,C=T.has,U=T.set;w=function(t,e){return U.call(T,t,e),e},S=function(t){return _.call(T,t)||{}},x=function(t){return C.call(T,t)}}else{var M=sharedKey("state");R[M]=!0,w=function(t,e){return g(t,M,e),e},S=function(t){return has(t,M)?t[M]:{}},x=function(t){return has(t,M)}}var G={set:w,get:S,has:x,enforce:function(t){return x(t)?S(t):w(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=S(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},N=createCommonjsModule((function(t){var r=G.get,n=G.enforce,o=String(String).split("String");(t.exports=function(t,r,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,s=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof r||has(i,"name")||g(i,"name",r),n(i).source=o.join("string"==typeof r?r:"")),t!==e?(c?!s&&t[r]&&(u=!0):delete t[r],u?t[r]=i:g(t,r,i)):u?t[r]=i:setGlobal(r,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&r(this).source||E(this)}))})),q=e,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,r){return arguments.length<2?aFunction(q[t])||aFunction(e[t]):q[t]&&q[t][r]||e[t]&&e[t][r]},B=Math.ceil,D=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?D:B)(t)},$=Math.min,toLength=function(t){return t>0?$(toInteger(t),9007199254740991):0},V=Math.max,W=Math.min,toAbsoluteIndex=function(t,e){var r=toInteger(t);return r<0?V(r+e,0):W(r,e)},createMethod=function(t){return function(e,r,n){var o,i=toIndexedObject(e),a=toLength(i.length),c=toAbsoluteIndex(n,a);if(t&&r!=r){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},K={includes:createMethod(!0),indexOf:createMethod(!1)},Y=K.indexOf,objectKeysInternal=function(t,e){var r,n=toIndexedObject(t),o=0,i=[];for(r in n)!has(R,r)&&has(n,r)&&i.push(r);for(;e.length>o;)has(n,r=e[o++])&&(~Y(i,r)||i.push(r));return i},z=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],H=z.concat("length","prototype"),J={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,H)}},X={f:Object.getOwnPropertySymbols},Z=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=J.f(anObject(t)),r=X.f;return r?e.concat(r(t)):e},copyConstructorProperties=function(t,e){for(var r=Z(e),n=y.f,o=v.f,i=0;i<r.length;i++){var a=r[i];has(t,a)||n(t,a,o(e,a))}},Q=/#|\.prototype\./,isForced=function(t,e){var r=et[tt(t)];return r==nt||r!=rt&&("function"==typeof e?fails(e):!!e)},tt=isForced.normalize=function(t){return String(t).replace(Q,".").toLowerCase()},et=isForced.data={},rt=isForced.NATIVE="N",nt=isForced.POLYFILL="P",ot=isForced,it=v.f,_export=function(t,r){var n,o,i,a,c,u=t.target,s=t.global,f=t.stat;if(n=s?e:f?e[u]||setGlobal(u,{}):(e[u]||{}).prototype)for(o in r){if(a=r[o],i=t.noTargetGet?(c=it(n,o))&&c.value:n[o],!ot(s?o:u+(f?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(t.sham||i&&i.sham)&&g(a,"sham",!0),N(n,o,a,t)}},aFunction$1=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},functionBindContext=function(t,e,r){if(aFunction$1(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},toObject=function(t){return Object(requireObjectCoercible(t))},at=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},ct=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),ut=ct&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,st=L("wks"),ft=e.Symbol,lt=ut?ft:ft&&ft.withoutSetter||uid,wellKnownSymbol=function(t){return has(st,t)||(ct&&has(ft,t)?st[t]=ft[t]:st[t]=lt("Symbol."+t)),st[t]},ht=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var r;return at(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!at(r.prototype)?isObject(r)&&null===(r=r[ht])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},pt=[].push,createMethod$1=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=5==t||i;return function(c,s,f,l){for(var h,p,v=toObject(c),d=u(v),y=functionBindContext(s,f,3),g=toLength(d.length),m=0,b=l||arraySpeciesCreate,w=e?b(c,g):r?b(c,0):void 0;g>m;m++)if((a||m in d)&&(p=y(h=d[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:pt.call(w,h)}else if(o)return!1;return i?-1:n||o?o:w}},vt={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6)},dt=Object.defineProperty,yt={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,e){if(has(yt,t))return yt[t];e||(e={});var n=[][t],o=!!has(e,"ACCESSORS")&&e.ACCESSORS,i=has(e,0)?e[0]:thrower,a=has(e,1)?e[1]:void 0;return yt[t]=!!n&&!fails((function(){if(o&&!r)return!0;var t={length:-1};o?dt(t,1,{enumerable:!0,get:thrower}):t[1]=1,n.call(t,i,a)}))},gt=vt.forEach,mt=function(t,e){var r=[][t];return!!r&&fails((function(){r.call(null,e||function(){throw 1},1)}))}("forEach"),bt=arrayMethodUsesToLength("forEach"),wt=mt&&bt?[].forEach:function forEach(t){return gt(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=wt},{forEach:wt});var St,xt=Object.keys||function keys(t){return objectKeysInternal(t,z)},Et=r?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var r,n=xt(e),o=n.length,i=0;o>i;)y.f(t,r=n[i++],e[r]);return t},Ot=getBuiltIn("document","documentElement"),Pt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"<\/script>"},NullProtoObject=function(){try{St=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=St?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(St):((e=documentCreateElement("iframe")).style.display="none",Ot.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var r=z.length;r--;)delete NullProtoObject.prototype[z[r]];return NullProtoObject()};R[Pt]=!0;var Lt=Object.create||function create(t,e){var r;return null!==t?(EmptyConstructor.prototype=anObject(t),r=new EmptyConstructor,EmptyConstructor.prototype=null,r[Pt]=t):r=NullProtoObject(),void 0===e?r:Et(r,e)},At=wellKnownSymbol("unscopables"),jt=Array.prototype;null==jt[At]&&y.f(jt,At,{configurable:!0,value:Lt(null)});var addToUnscopables=function(t){jt[At][t]=!0},kt=K.includes,Rt=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!Rt},{includes:function includes(t){return kt(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var It,Tt,_t,Ct={},Ut=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Ft=sharedKey("IE_PROTO"),Mt=Object.prototype,Gt=Ut?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,Ft)?t[Ft]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Mt:null},Nt=wellKnownSymbol("iterator"),qt=!1;[].keys&&("next"in(_t=[].keys())?(Tt=Gt(Gt(_t)))!==Object.prototype&&(It=Tt):qt=!0),null==It&&(It={}),has(It,Nt)||g(It,Nt,(function(){return this}));var Bt={IteratorPrototype:It,BUGGY_SAFARI_ITERATORS:qt},Dt=y.f,$t=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,r){t&&!has(t=r?t:t.prototype,$t)&&Dt(t,$t,{configurable:!0,value:e})},Vt=Bt.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,e,r){var n=e+" Iterator";return t.prototype=Lt(Vt,{next:createPropertyDescriptor(1,r)}),setToStringTag(t,n,!1),Ct[n]=returnThis$1,t},Wt=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function setPrototypeOf(r,n){return anObject(r),function(t){if(!isObject(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Kt=Bt.IteratorPrototype,Yt=Bt.BUGGY_SAFARI_ITERATORS,zt=wellKnownSymbol("iterator"),returnThis$2=function(){return this},defineIterator=function(t,e,r,n,o,i,a){createIteratorConstructor(r,e,n);var c,u,s,getIterationMethod=function(t){if(t===o&&v)return v;if(!Yt&&t in h)return h[t];switch(t){case"keys":return function keys(){return new r(this,t)};case"values":return function values(){return new r(this,t)};case"entries":return function entries(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",l=!1,h=t.prototype,p=h[zt]||h["@@iterator"]||o&&h[o],v=!Yt&&p||getIterationMethod(o),d="Array"==e&&h.entries||p;if(d&&(c=Gt(d.call(new t)),Kt!==Object.prototype&&c.next&&(Gt(c)!==Kt&&(Wt?Wt(c,Kt):"function"!=typeof c[zt]&&g(c,zt,returnThis$2)),setToStringTag(c,f,!0))),"values"==o&&p&&"values"!==p.name&&(l=!0,v=function values(){return p.call(this)}),h[zt]!==v&&g(h,zt,v),Ct[e]=v,o)if(u={values:getIterationMethod("values"),keys:i?v:getIterationMethod("keys"),entries:getIterationMethod("entries")},a)for(s in u)(Yt||l||!(s in h))&&N(h,s,u[s]);else _export({target:e,proto:!0,forced:Yt||l},u);return u},Ht=G.set,Jt=G.getterFor("Array Iterator"),Xt=defineIterator(Array,"Array",(function(t,e){Ht(this,{type:"Array Iterator",target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=Jt(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");Ct.Arguments=Ct.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var Zt=i.f,createMethod$2=function(t){return function(e){for(var n,o=toIndexedObject(e),i=xt(o),a=i.length,c=0,u=[];a>c;)n=i[c++],r&&!Zt.call(o,n)||u.push(t?[n,o[n]]:o[n]);return u}},Qt={entries:createMethod$2(!0),values:createMethod$2(!1)}.entries;_export({target:"Object",stat:!0},{entries:function entries(t){return Qt(t)}});var te=fails((function(){xt(1)}));_export({target:"Object",stat:!0,forced:te},{keys:function keys(t){return xt(toObject(t))}});var ee={};ee[wellKnownSymbol("toStringTag")]="z";var re="[object z]"===String(ee),ne=wellKnownSymbol("toStringTag"),oe="Arguments"==classofRaw(function(){return arguments}()),ie=re?classofRaw:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),ne))?r:oe?classofRaw(e):"Object"==(n=classofRaw(e))&&"function"==typeof e.callee?"Arguments":n},ae=re?{}.toString:function toString(){return"[object "+ie(this)+"]"};re||N(Object.prototype,"toString",ae,{unsafe:!0});var ce=e.Promise,redefineAll=function(t,e,r){for(var n in e)N(t,n,e[n],r);return t},ue=wellKnownSymbol("species"),anInstance=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},se=wellKnownSymbol("iterator"),fe=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Ct.Array===t||fe[se]===t)},le=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[le]||t["@@iterator"]||Ct[ie(t)]},callWithSafeIterationClosing=function(t,e,r,n){try{return n?e(anObject(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&anObject(o.call(t)),e}},he=createCommonjsModule((function(t){var Result=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,r,n,o){var i,a,c,u,s,f,l,h=functionBindContext(e,r,n?2:1);if(o)i=t;else{if("function"!=typeof(a=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(a)){for(c=0,u=toLength(t.length);u>c;c++)if((s=n?h(anObject(l=t[c])[0],l[1]):h(t[c]))&&s instanceof Result)return s;return new Result(!1)}i=a.call(t)}for(f=i.next;!(l=f.call(i)).done;)if("object"==typeof(s=callWithSafeIterationClosing(i,h,l.value,n))&&s&&s instanceof Result)return s;return new Result(!1)}).stop=function(t){return new Result(!0,t)}})),pe=wellKnownSymbol("iterator"),ve=!1;try{var de=0,ye={next:function(){return{done:!!de++}},return:function(){ve=!0}};ye[pe]=function(){return this},Array.from(ye,(function(){throw 2}))}catch(t){}var ge,me,be,we=wellKnownSymbol("species"),Se=getBuiltIn("navigator","userAgent")||"",xe=/(iphone|ipod|ipad).*applewebkit/i.test(Se),Ee=e.location,Oe=e.setImmediate,Pe=e.clearImmediate,Le=e.process,Ae=e.MessageChannel,je=e.Dispatch,ke=0,Re={},run=function(t){if(Re.hasOwnProperty(t)){var e=Re[t];delete Re[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){e.postMessage(t+"",Ee.protocol+"//"+Ee.host)};Oe&&Pe||(Oe=function setImmediate(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return Re[++ke]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},ge(ke),ke},Pe=function clearImmediate(t){delete Re[t]},"process"==classofRaw(Le)?ge=function(t){Le.nextTick(runner(t))}:je&&je.now?ge=function(t){je.now(runner(t))}:Ae&&!xe?(be=(me=new Ae).port2,me.port1.onmessage=listener,ge=functionBindContext(be.postMessage,be,1)):!e.addEventListener||"function"!=typeof postMessage||e.importScripts||fails(post)||"file:"===Ee.protocol?ge="onreadystatechange"in documentCreateElement("script")?function(t){Ot.appendChild(documentCreateElement("script")).onreadystatechange=function(){Ot.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(ge=post,e.addEventListener("message",listener,!1)));var Ie,Te,_e,Ce,Ue,Fe,Me,Ge,Ne={set:Oe,clear:Pe},qe=v.f,Be=Ne.set,De=e.MutationObserver||e.WebKitMutationObserver,$e=e.process,Ve=e.Promise,We="process"==classofRaw($e),Ke=qe(e,"queueMicrotask"),Ye=Ke&&Ke.value;Ye||(Ie=function(){var t,e;for(We&&(t=$e.domain)&&t.exit();Te;){e=Te.fn,Te=Te.next;try{e()}catch(t){throw Te?Ce():_e=void 0,t}}_e=void 0,t&&t.enter()},We?Ce=function(){$e.nextTick(Ie)}:De&&!xe?(Ue=!0,Fe=document.createTextNode(""),new De(Ie).observe(Fe,{characterData:!0}),Ce=function(){Fe.data=Ue=!Ue}):Ve&&Ve.resolve?(Me=Ve.resolve(void 0),Ge=Me.then,Ce=function(){Ge.call(Me,Ie)}):Ce=function(){Be.call(e,Ie)});var ze,He,Je=Ye||function(t){var e={fn:t,next:void 0};_e&&(_e.next=e),Te||(Te=e,Ce()),_e=e},PromiseCapability=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=aFunction$1(e),this.reject=aFunction$1(r)},Xe={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var r=Xe.f(t);return(0,r.resolve)(e),r.promise},perform=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ze=e.process,Qe=Ze&&Ze.versions,tr=Qe&&Qe.v8;tr?He=(ze=tr.split("."))[0]+ze[1]:Se&&(!(ze=Se.match(/Edge\/(\d+)/))||ze[1]>=74)&&(ze=Se.match(/Chrome\/(\d+)/))&&(He=ze[1]);var er,rr,nr,or,ir=He&&+He,ar=Ne.set,cr=wellKnownSymbol("species"),ur="Promise",sr=G.get,fr=G.set,lr=G.getterFor(ur),hr=ce,pr=e.TypeError,vr=e.document,dr=e.process,yr=getBuiltIn("fetch"),gr=Xe.f,mr=gr,br="process"==classofRaw(dr),wr=!!(vr&&vr.createEvent&&e.dispatchEvent),Sr=ot(ur,(function(){if(!(E(hr)!==String(hr))){if(66===ir)return!0;if(!br&&"function"!=typeof PromiseRejectionEvent)return!0}if(ir>=51&&/native code/.test(hr))return!1;var t=hr.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[cr]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),xr=Sr||!function(t,e){if(!e&&!ve)return!1;var r=!1;try{var n={};n[pe]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){hr.all(t).catch((function(){}))})),isThenable=function(t){var e;return!(!isObject(t)||"function"!=typeof(e=t.then))&&e},notify$1=function(t,e,r){if(!e.notified){e.notified=!0;var n=e.reactions;Je((function(){for(var o=e.value,i=1==e.state,a=0;n.length>a;){var c,u,s,f=n[a++],l=i?f.ok:f.fail,h=f.resolve,p=f.reject,v=f.domain;try{l?(i||(2===e.rejection&&onHandleUnhandled(t,e),e.rejection=1),!0===l?c=o:(v&&v.enter(),c=l(o),v&&(v.exit(),s=!0)),c===f.promise?p(pr("Promise-chain cycle")):(u=isThenable(c))?u.call(c,h,p):h(c)):p(o)}catch(t){v&&!s&&v.exit(),p(t)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(t,e)}))}},dispatchEvent=function(t,r,n){var o,i;wr?((o=vr.createEvent("Event")).promise=r,o.reason=n,o.initEvent(t,!1,!0),e.dispatchEvent(o)):o={promise:r,reason:n},(i=e["on"+t])?i(o):"unhandledrejection"===t&&function(t,r){var n=e.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,r))}("Unhandled promise rejection",n)},onUnhandled=function(t,r){ar.call(e,(function(){var e,n=r.value;if(isUnhandled(r)&&(e=perform((function(){br?dr.emit("unhandledRejection",n,t):dispatchEvent("unhandledrejection",t,n)})),r.rejection=br||isUnhandled(r)?2:1,e.error))throw e.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,r){ar.call(e,(function(){br?dr.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,r.value)}))},bind=function(t,e,r,n){return function(o){t(e,r,o,n)}},internalReject=function(t,e,r,n){e.done||(e.done=!0,n&&(e=n),e.value=r,e.state=2,notify$1(t,e,!0))},internalResolve=function(t,e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(t===r)throw pr("Promise can't be resolved itself");var o=isThenable(r);o?Je((function(){var n={done:!1};try{o.call(r,bind(internalResolve,t,n,e),bind(internalReject,t,n,e))}catch(r){internalReject(t,n,r,e)}})):(e.value=r,e.state=1,notify$1(t,e,!1))}catch(r){internalReject(t,{done:!1},r,e)}}};Sr&&(hr=function Promise(t){anInstance(this,hr,ur),aFunction$1(t),er.call(this);var e=sr(this);try{t(bind(internalResolve,this,e),bind(internalReject,this,e))}catch(t){internalReject(this,e,t)}},(er=function Promise(t){fr(this,{type:ur,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(hr.prototype,{then:function then(t,e){var r,n,o,i=lr(this),a=gr((r=hr,void 0===(o=anObject(this).constructor)||null==(n=anObject(o)[we])?r:aFunction$1(n)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=br?dr.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&notify$1(this,i,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),rr=function(){var t=new er,e=sr(t);this.promise=t,this.resolve=bind(internalResolve,t,e),this.reject=bind(internalReject,t,e)},Xe.f=gr=function(t){return t===hr||t===nr?new rr(t):mr(t)},"function"==typeof ce&&(or=ce.prototype.then,N(ce.prototype,"then",(function then(t,e){var r=this;return new hr((function(t,e){or.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof yr&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(hr,yr.apply(e,arguments))}}))),_export({global:!0,wrap:!0,forced:Sr},{Promise:hr}),setToStringTag(hr,ur,!1),function(t){var e=getBuiltIn(t),n=y.f;r&&e&&!e[ue]&&n(e,ue,{configurable:!0,get:function(){return this}})}(ur),nr=getBuiltIn(ur),_export({target:ur,stat:!0,forced:Sr},{reject:function reject(t){var e=gr(this);return e.reject.call(void 0,t),e.promise}}),_export({target:ur,stat:!0,forced:Sr},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:ur,stat:!0,forced:xr},{all:function all(t){var e=this,r=gr(e),n=r.resolve,o=r.reject,i=perform((function(){var r=aFunction$1(e.resolve),i=[],a=0,c=1;he(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,r.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise},race:function race(t){var e=this,r=gr(e),n=r.reject,o=perform((function(){var o=aFunction$1(e.resolve);he(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var regexpFlags=function(){var t=anObject(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};function RE(t,e){return RegExp(t,e)}var Er,Or,Pr={UNSUPPORTED_Y:fails((function(){var t=RE("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:fails((function(){var t=RE("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Lr=RegExp.prototype.exec,Ar=String.prototype.replace,jr=Lr,kr=(Er=/a/,Or=/b*/g,Lr.call(Er,"a"),Lr.call(Or,"a"),0!==Er.lastIndex||0!==Or.lastIndex),Rr=Pr.UNSUPPORTED_Y||Pr.BROKEN_CARET,Ir=void 0!==/()??/.exec("")[1];(kr||Ir||Rr)&&(jr=function exec(t){var e,r,n,o,i=this,a=Rr&&i.sticky,c=regexpFlags.call(i),u=i.source,s=0,f=t;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),f=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,s++),r=new RegExp("^(?:"+u+")",c)),Ir&&(r=new RegExp("^"+u+"$(?!\\s)",c)),kr&&(e=i.lastIndex),n=Lr.call(a?r:i,f),a?n?(n.input=n.input.slice(s),n[0]=n[0].slice(s),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:kr&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),Ir&&n&&n.length>1&&Ar.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var Tr=jr;_export({target:"RegExp",proto:!0,forced:/./.exec!==Tr},{exec:Tr});var _r=wellKnownSymbol("match"),notARegexp=function(t){if(function(t){var e;return isObject(t)&&(void 0!==(e=t[_r])?!!e:"RegExp"==classofRaw(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},Cr=wellKnownSymbol("match");_export({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Cr]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function includes(t){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(t),arguments.length>1?arguments[1]:void 0)}});var createMethod$3=function(t){return function(e,r){var n,o,i=String(requireObjectCoercible(e)),a=toInteger(r),c=i.length;return a<0||a>=c?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},Ur={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},Fr=Ur.charAt,Mr=G.set,Gr=G.getterFor("String Iterator");defineIterator(String,"String",(function(t){Mr(this,{type:"String Iterator",string:String(t),index:0})}),(function next(){var t,e=Gr(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Fr(r,n),e.index+=t.length,{value:t,done:!1})}));var Nr=wellKnownSymbol("species"),qr=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Br="$0"==="a".replace(/./,"$0"),Dr=wellKnownSymbol("replace"),$r=!!/./[Dr]&&""===/./[Dr]("a","$0"),Vr=!fails((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),fixRegexpWellKnownSymbolLogic=function(t,e,r,n){var o=wellKnownSymbol(t),i=!fails((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!fails((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Nr]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||"replace"===t&&(!qr||!Br||$r)||"split"===t&&!Vr){var c=/./[o],u=r(o,""[t],(function(t,e,r,n,o){return e.exec===Tr?i&&!o?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Br,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:$r}),s=u[0],f=u[1];N(String.prototype,t,s),N(RegExp.prototype,o,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}n&&g(RegExp.prototype[o],"sham",!0)},Wr=Ur.charAt,advanceStringIndex=function(t,e,r){return e+(r?Wr(t,e).length:1)},regexpExecAbstract=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==classofRaw(t))throw TypeError("RegExp#exec called on incompatible receiver");return Tr.call(t,e)};fixRegexpWellKnownSymbolLogic("match",1,(function(t,e,r){return[function match(e){var r=requireObjectCoercible(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var o=anObject(t),i=String(this);if(!o.global)return regexpExecAbstract(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],s=0;null!==(c=regexpExecAbstract(o,i));){var f=String(c[0]);u[s]=f,""===f&&(o.lastIndex=advanceStringIndex(i,toLength(o.lastIndex),a)),s++}return 0===s?null:u}]}));var Kr=Math.max,Yr=Math.min,zr=Math.floor,Hr=/\$([$&'`]|\d\d?|<[^>]*>)/g,Jr=/\$([$&'`]|\d\d?)/g;fixRegexpWellKnownSymbolLogic("replace",2,(function(t,e,r,n){var o=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=n.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function replace(r,n){var o=requireObjectCoercible(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,n){if(!o&&i||"string"==typeof n&&-1===n.indexOf(a)){var c=r(e,t,this,n);if(c.done)return c.value}var u=anObject(t),s=String(this),f="function"==typeof n;f||(n=String(n));var l=u.global;if(l){var h=u.unicode;u.lastIndex=0}for(var p=[];;){var v=regexpExecAbstract(u,s);if(null===v)break;if(p.push(v),!l)break;""===String(v[0])&&(u.lastIndex=advanceStringIndex(s,toLength(u.lastIndex),h))}for(var d,y="",g=0,m=0;m<p.length;m++){v=p[m];for(var b=String(v[0]),w=Kr(Yr(toInteger(v.index),s.length),0),S=[],x=1;x<v.length;x++)S.push(void 0===(d=v[x])?d:String(d));var E=v.groups;if(f){var O=[b].concat(S,w,s);void 0!==E&&O.push(E);var P=String(n.apply(void 0,O))}else P=getSubstitution(b,s,w,S,E,n);w>=g&&(y+=s.slice(g,w)+P,g=w+b.length)}return y+s.slice(g)}];function getSubstitution(t,r,n,o,i,a){var c=n+t.length,u=o.length,s=Jr;return void 0!==i&&(i=toObject(i),s=Hr),e.call(a,s,(function(e,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(c);case"<":s=i[a.slice(1,-1)];break;default:var f=+a;if(0===f)return e;if(f>u){var l=zr(f/10);return 0===l?e:l<=u?void 0===o[l-1]?a.charAt(1):o[l-1]+a.charAt(1):e}s=o[f-1]}return void 0===s?"":s}))}}));var Xr={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};for(var Zr in Xr){var Qr=e[Zr],tn=Qr&&Qr.prototype;if(tn&&tn.forEach!==wt)try{g(tn,"forEach",wt)}catch(t){tn.forEach=wt}}var en=wellKnownSymbol("iterator"),rn=wellKnownSymbol("toStringTag"),nn=Xt.values;for(var on in Xr){var an=e[on],cn=an&&an.prototype;if(cn){if(cn[en]!==nn)try{g(cn,en,nn)}catch(t){cn[en]=nn}if(cn[rn]||g(cn,rn,on),Xr[on])for(var un in Xt)if(cn[un]!==Xt[un])try{g(cn,un,Xt[un])}catch(t){cn[un]=Xt[un]}}}var sn=wellKnownSymbol("iterator"),fn=!fails((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[sn]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),ln=Object.assign,hn=Object.defineProperty,pn=!ln||fails((function(){if(r&&1!==ln({b:1},ln(hn({},"a",{enumerable:!0,get:function(){hn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=ln({},t)[n]||xt(ln({},e)).join("")!=o}))?function assign(t,e){for(var n=toObject(t),o=arguments.length,a=1,c=X.f,s=i.f;o>a;)for(var f,l=u(arguments[a++]),h=c?xt(l).concat(c(l)):xt(l),p=h.length,v=0;p>v;)f=h[v++],r&&!s.call(l,f)||(n[f]=l[f]);return n}:ln,createProperty=function(t,e,r){var n=toPrimitive(e);n in t?y.f(t,n,createPropertyDescriptor(0,r)):t[n]=r},vn=function from(t){var e,r,n,o,i,a,c=toObject(t),u="function"==typeof this?this:Array,s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,h=getIteratorMethod(c),p=0;if(l&&(f=functionBindContext(f,s>2?arguments[2]:void 0,2)),null==h||u==Array&&isArrayIteratorMethod(h))for(r=new u(e=toLength(c.length));e>p;p++)a=l?f(c[p],p):c[p],createProperty(r,p,a);else for(i=(o=h.call(c)).next,r=new u;!(n=i.call(o)).done;p++)a=l?callWithSafeIterationClosing(o,f,[n.value,p],!0):n.value,createProperty(r,p,a);return r.length=p,r},dn=/[^\0-\u007E]/,yn=/[.\u3002\uFF0E\uFF61]/g,gn="Overflow: input needs wider integers to process",mn=Math.floor,bn=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,e,r){var n=0;for(t=r?mn(t/700):t>>1,t+=mn(t/e);t>455;n+=36)t=mn(t/35);return mn(n+36*t/(t+38))},encode=function(t){var e,r,n=[],o=(t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t)).length,i=128,a=0,c=72;for(e=0;e<t.length;e++)(r=t[e])<128&&n.push(bn(r));var u=n.length,s=u;for(u&&n.push("-");s<o;){var f=2147483647;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<f&&(f=r);var l=s+1;if(f-i>mn((2147483647-a)/l))throw RangeError(gn);for(a+=(f-i)*l,i=f,e=0;e<t.length;e++){if((r=t[e])<i&&++a>2147483647)throw RangeError(gn);if(r==i){for(var h=a,p=36;;p+=36){var v=p<=c?1:p>=c+26?26:p-c;if(h<v)break;var d=h-v,y=36-v;n.push(bn(digitToBasic(v+d%y))),h=mn(d/y)}n.push(bn(digitToBasic(h))),c=adapt(a,l,s==u),a=0,++s}}++a,++i}return n.join("")},getIterator=function(t){var e=getIteratorMethod(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return anObject(e.call(t))},wn=getBuiltIn("fetch"),Sn=getBuiltIn("Headers"),xn=wellKnownSymbol("iterator"),En=G.set,On=G.getterFor("URLSearchParams"),Pn=G.getterFor("URLSearchParamsIterator"),Ln=/\+/g,An=Array(4),percentSequence=function(t){return An[t-1]||(An[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return decodeURIComponent(t)}catch(e){return t}},deserialize=function(t){var e=t.replace(Ln," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(percentSequence(r--),percentDecode);return e}},jn=/[!'()~]|%20/g,kn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return kn[t]},serialize=function(t){return encodeURIComponent(t).replace(jn,replacer)},parseSearchParams=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:deserialize(n.shift()),value:deserialize(n.join("="))}))},updateSearchParams=function(t){this.entries.length=0,parseSearchParams(this.entries,t)},validateArgumentsLength=function(t,e){if(t<e)throw TypeError("Not enough arguments")},Rn=createIteratorConstructor((function Iterator(t,e){En(this,{type:"URLSearchParamsIterator",iterator:getIterator(On(t).entries),kind:e})}),"Iterator",(function next(){var t=Pn(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),In=function URLSearchParams(){anInstance(this,In,"URLSearchParams");var t,e,r,n,o,i,a,c,u,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(En(f,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==s)if(isObject(s))if("function"==typeof(t=getIteratorMethod(s)))for(r=(e=t.call(s)).next;!(n=r.call(e)).done;){if((a=(i=(o=getIterator(anObject(n.value))).next).call(o)).done||(c=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");l.push({key:a.value+"",value:c.value+""})}else for(u in s)has(s,u)&&l.push({key:u,value:s[u]+""});else parseSearchParams(l,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:s+"")},Tn=In.prototype;redefineAll(Tn,{append:function append(t,e){validateArgumentsLength(arguments.length,2);var r=On(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var e=On(this),r=e.entries,n=t+"",o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function get(t){validateArgumentsLength(arguments.length,1);for(var e=On(this).entries,r=t+"",n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function getAll(t){validateArgumentsLength(arguments.length,1);for(var e=On(this).entries,r=t+"",n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function has(t){validateArgumentsLength(arguments.length,1);for(var e=On(this).entries,r=t+"",n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function set(t,e){validateArgumentsLength(arguments.length,1);for(var r,n=On(this),o=n.entries,i=!1,a=t+"",c=e+"",u=0;u<o.length;u++)(r=o[u]).key===a&&(i?o.splice(u--,1):(i=!0,r.value=c));i||o.push({key:a,value:c}),n.updateURL()},sort:function sort(){var t,e,r,n=On(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function forEach(t){for(var e,r=On(this).entries,n=functionBindContext(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function keys(){return new Rn(this,"keys")},values:function values(){return new Rn(this,"values")},entries:function entries(){return new Rn(this,"entries")}},{enumerable:!0}),N(Tn,xn,Tn.entries),N(Tn,"toString",(function toString(){for(var t,e=On(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(serialize(t.key)+"="+serialize(t.value));return r.join("&")}),{enumerable:!0}),setToStringTag(In,"URLSearchParams"),_export({global:!0,forced:!fn},{URLSearchParams:In}),fn||"function"!=typeof wn||"function"!=typeof Sn||_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){var e,r,n,o=[t];return arguments.length>1&&(isObject(e=arguments[1])&&(r=e.body,"URLSearchParams"===ie(r)&&((n=e.headers?new Sn(e.headers):new Sn).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=Lt(e,{body:createPropertyDescriptor(0,String(r)),headers:createPropertyDescriptor(0,n)}))),o.push(e)),wn.apply(this,o)}});var _n,Cn={URLSearchParams:In,getState:On},Un=Ur.codeAt,Fn=e.URL,Mn=Cn.URLSearchParams,Gn=Cn.getState,Nn=G.set,qn=G.getterFor("URL"),Bn=Math.floor,Dn=Math.pow,$n=/[A-Za-z]/,Vn=/[\d+-.A-Za-z]/,Wn=/\d/,Kn=/^(0x|0X)/,Yn=/^[0-7]+$/,zn=/^\d+$/,Hn=/^[\dA-Fa-f]+$/,Jn=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Xn=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Zn=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Qn=/[\u0009\u000A\u000D]/g,parseHost=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(r=parseIPv6(e.slice(1,-1))))return"Invalid host";t.host=r}else if(isSpecial(t)){if(e=function(t){var e,r,n=[],o=t.toLowerCase().replace(yn,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(dn.test(r)?"xn--"+encode(r):r);return n.join(".")}(e),Jn.test(e))return"Invalid host";if(null===(r=parseIPv4(e)))return"Invalid host";t.host=r}else{if(Xn.test(e))return"Invalid host";for(r="",n=vn(e),o=0;o<n.length;o++)r+=percentEncode(n[o],to);t.host=r}},parseIPv4=function(t){var e,r,n,o,i,a,c,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(e=u.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=u[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Kn.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?zn:8==i?Yn:Hn).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=Dn(256,5-e))return null}else if(a>255)return null;for(c=r.pop(),n=0;n<r.length;n++)c+=r[n]*Dn(256,3-n);return c},parseIPv6=function(t){var e,r,n,o,i,a,c,u=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,char=function(){return t.charAt(l)};if(":"==char()){if(":"!=t.charAt(1))return;l+=2,f=++s}for(;char();){if(8==s)return;if(":"!=char()){for(e=r=0;r<4&&Hn.test(char());)e=16*e+parseInt(char(),16),l++,r++;if("."==char()){if(0==r)return;if(l-=r,s>6)return;for(n=0;char();){if(o=null,n>0){if(!("."==char()&&n<4))return;l++}if(!Wn.test(char()))return;for(;Wn.test(char());){if(i=parseInt(char(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}u[s]=256*u[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==char()){if(l++,!char())return}else if(char())return;u[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)c=u[s],u[s--]=u[f+a-1],u[f+--a]=c;else if(8!=s)return;return u},serializeHost=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=Bn(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},to={},eo=pn({},to,{" ":1,'"':1,"<":1,">":1,"`":1}),ro=pn({},eo,{"#":1,"?":1,"{":1,"}":1}),no=pn({},ro,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,e){var r=Un(t,0);return r>32&&r<127&&!has(e,t)?t:encodeURIComponent(t)},oo={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(oo,t.scheme)},includesCredentials=function(t){return""!=t.username||""!=t.password},cannotHaveUsernamePasswordPort=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},isWindowsDriveLetter=function(t,e){var r;return 2==t.length&&$n.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},startsWithWindowsDriveLetter=function(t){var e;return t.length>1&&isWindowsDriveLetter(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},shortenURLsPath=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&isWindowsDriveLetter(e[0],!0)||e.pop()},isSingleDot=function(t){return"."===t||"%2e"===t.toLowerCase()},io={},ao={},co={},uo={},so={},fo={},lo={},ho={},po={},vo={},yo={},go={},mo={},bo={},wo={},So={},xo={},Eo={},Oo={},Po={},Lo={},parseURL=function(t,e,r,n){var o,i,a,c,u,s=r||io,f=0,l="",h=!1,p=!1,v=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(Zn,"")),e=e.replace(Qn,""),o=vn(e);f<=o.length;){switch(i=o[f],s){case io:if(!i||!$n.test(i)){if(r)return"Invalid scheme";s=co;continue}l+=i.toLowerCase(),s=ao;break;case ao:if(i&&(Vn.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return"Invalid scheme";l="",s=co,f=0;continue}if(r&&(isSpecial(t)!=has(oo,l)||"file"==l&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(isSpecial(t)&&oo[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=bo:isSpecial(t)&&n&&n.scheme==t.scheme?s=uo:isSpecial(t)?s=ho:"/"==o[f+1]?(s=so,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=Oo)}break;case co:if(!n||n.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=Lo;break}s="file"==n.scheme?bo:fo;continue;case uo:if("/"!=i||"/"!=o[f+1]){s=fo;continue}s=po,f++;break;case so:if("/"==i){s=vo;break}s=Eo;continue;case fo:if(t.scheme=n.scheme,i==_n)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query;else if("/"==i||"\\"==i&&isSpecial(t))s=lo;else if("?"==i)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query="",s=Po;else{if("#"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.path.pop(),s=Eo;continue}t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=Lo}break;case lo:if(!isSpecial(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=Eo;continue}s=vo}else s=po;break;case ho:if(s=po,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case po:if("/"!=i&&"\\"!=i){s=vo;continue}break;case vo:if("@"==i){h&&(l="%40"+l),h=!0,a=vn(l);for(var d=0;d<a.length;d++){var y=a[d];if(":"!=y||v){var g=percentEncode(y,no);v?t.password+=g:t.username+=g}else v=!0}l=""}else if(i==_n||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(h&&""==l)return"Invalid authority";f-=vn(l).length+1,l="",s=yo}else l+=i;break;case yo:case go:if(r&&"file"==t.scheme){s=So;continue}if(":"!=i||p){if(i==_n||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(isSpecial(t)&&""==l)return"Invalid host";if(r&&""==l&&(includesCredentials(t)||null!==t.port))return;if(c=parseHost(t,l))return c;if(l="",s=xo,r)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return"Invalid host";if(c=parseHost(t,l))return c;if(l="",s=mo,r==go)return}break;case mo:if(!Wn.test(i)){if(i==_n||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return"Invalid port";t.port=isSpecial(t)&&m===oo[t.scheme]?null:m,l=""}if(r)return;s=xo;continue}return"Invalid port"}l+=i;break;case bo:if(t.scheme="file","/"==i||"\\"==i)s=wo;else{if(!n||"file"!=n.scheme){s=Eo;continue}if(i==_n)t.host=n.host,t.path=n.path.slice(),t.query=n.query;else if("?"==i)t.host=n.host,t.path=n.path.slice(),t.query="",s=Po;else{if("#"!=i){startsWithWindowsDriveLetter(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),shortenURLsPath(t)),s=Eo;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=Lo}}break;case wo:if("/"==i||"\\"==i){s=So;break}n&&"file"==n.scheme&&!startsWithWindowsDriveLetter(o.slice(f).join(""))&&(isWindowsDriveLetter(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=Eo;continue;case So:if(i==_n||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&isWindowsDriveLetter(l))s=Eo;else if(""==l){if(t.host="",r)return;s=xo}else{if(c=parseHost(t,l))return c;if("localhost"==t.host&&(t.host=""),r)return;l="",s=xo}continue}l+=i;break;case xo:if(isSpecial(t)){if(s=Eo,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=_n&&(s=Eo,"/"!=i))continue}else t.fragment="",s=Lo;else t.query="",s=Po;break;case Eo:if(i==_n||"/"==i||"\\"==i&&isSpecial(t)||!r&&("?"==i||"#"==i)){if(".."===(u=(u=l).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(shortenURLsPath(t),"/"==i||"\\"==i&&isSpecial(t)||t.path.push("")):isSingleDot(l)?"/"==i||"\\"==i&&isSpecial(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&isWindowsDriveLetter(l)&&(t.host&&(t.host=""),l=l.charAt(0)+":"),t.path.push(l)),l="","file"==t.scheme&&(i==_n||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=Po):"#"==i&&(t.fragment="",s=Lo)}else l+=percentEncode(i,ro);break;case Oo:"?"==i?(t.query="",s=Po):"#"==i?(t.fragment="",s=Lo):i!=_n&&(t.path[0]+=percentEncode(i,to));break;case Po:r||"#"!=i?i!=_n&&("'"==i&&isSpecial(t)?t.query+="%27":t.query+="#"==i?"%23":percentEncode(i,to)):(t.fragment="",s=Lo);break;case Lo:i!=_n&&(t.fragment+=percentEncode(i,eo))}f++}},Ao=function URL(t){var e,n,o=anInstance(this,Ao,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(t),c=Nn(o,{type:"URL"});if(void 0!==i)if(i instanceof Ao)e=qn(i);else if(n=parseURL(e={},String(i)))throw TypeError(n);if(n=parseURL(c,a,null,e))throw TypeError(n);var u=c.searchParams=new Mn,s=Gn(u);s.updateSearchParams(c.query),s.updateURL=function(){c.query=String(u)||null},r||(o.href=serializeURL.call(o),o.origin=getOrigin.call(o),o.protocol=getProtocol.call(o),o.username=getUsername.call(o),o.password=getPassword.call(o),o.host=getHost.call(o),o.hostname=getHostname.call(o),o.port=getPort.call(o),o.pathname=getPathname.call(o),o.search=getSearch.call(o),o.searchParams=getSearchParams.call(o),o.hash=getHash.call(o))},jo=Ao.prototype,serializeURL=function(){var t=qn(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,c=t.query,u=t.fragment,s=e+":";return null!==o?(s+="//",includesCredentials(t)&&(s+=r+(n?":"+n:"")+"@"),s+=serializeHost(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==c&&(s+="?"+c),null!==u&&(s+="#"+u),s},getOrigin=function(){var t=qn(this),e=t.scheme,r=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&isSpecial(t)?e+"://"+serializeHost(t.host)+(null!==r?":"+r:""):"null"},getProtocol=function(){return qn(this).scheme+":"},getUsername=function(){return qn(this).username},getPassword=function(){return qn(this).password},getHost=function(){var t=qn(this),e=t.host,r=t.port;return null===e?"":null===r?serializeHost(e):serializeHost(e)+":"+r},getHostname=function(){var t=qn(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=qn(this).port;return null===t?"":String(t)},getPathname=function(){var t=qn(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},getSearch=function(){var t=qn(this).query;return t?"?"+t:""},getSearchParams=function(){return qn(this).searchParams},getHash=function(){var t=qn(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(r&&Et(jo,{href:accessorDescriptor(serializeURL,(function(t){var e=qn(this),r=String(t),n=parseURL(e,r);if(n)throw TypeError(n);Gn(e.searchParams).updateSearchParams(e.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var e=qn(this);parseURL(e,String(t)+":",io)})),username:accessorDescriptor(getUsername,(function(t){var e=qn(this),r=vn(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=percentEncode(r[n],no)}})),password:accessorDescriptor(getPassword,(function(t){var e=qn(this),r=vn(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=percentEncode(r[n],no)}})),host:accessorDescriptor(getHost,(function(t){var e=qn(this);e.cannotBeABaseURL||parseURL(e,String(t),yo)})),hostname:accessorDescriptor(getHostname,(function(t){var e=qn(this);e.cannotBeABaseURL||parseURL(e,String(t),go)})),port:accessorDescriptor(getPort,(function(t){var e=qn(this);cannotHaveUsernamePasswordPort(e)||(""==(t=String(t))?e.port=null:parseURL(e,t,mo))})),pathname:accessorDescriptor(getPathname,(function(t){var e=qn(this);e.cannotBeABaseURL||(e.path=[],parseURL(e,t+"",xo))})),search:accessorDescriptor(getSearch,(function(t){var e=qn(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",parseURL(e,t,Po)),Gn(e.searchParams).updateSearchParams(e.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var e=qn(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",parseURL(e,t,Lo)):e.fragment=null}))}),N(jo,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),N(jo,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),Fn){var ko=Fn.createObjectURL,Ro=Fn.revokeObjectURL;ko&&N(Ao,"createObjectURL",(function createObjectURL(t){return ko.apply(Fn,arguments)})),Ro&&N(Ao,"revokeObjectURL",(function revokeObjectURL(t){return Ro.apply(Fn,arguments)}))}setToStringTag(Ao,"URL"),_export({global:!0,forced:!fn,sham:!r},{URL:Ao});var Io=J.f,To={}.toString,_o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Co={f:function getOwnPropertyNames(t){return _o&&"[object Window]"==To.call(t)?function(t){try{return Io(t)}catch(t){return _o.slice()}}(t):Io(toIndexedObject(t))}},Uo={f:wellKnownSymbol},Fo=y.f,defineWellKnownSymbol=function(t){var e=q.Symbol||(q.Symbol={});has(e,t)||Fo(e,t,{value:Uo.f(t)})},Mo=vt.forEach,Go=sharedKey("hidden"),No=wellKnownSymbol("toPrimitive"),qo=G.set,Bo=G.getterFor("Symbol"),Do=Object.prototype,$o=e.Symbol,Vo=getBuiltIn("JSON","stringify"),Wo=v.f,Ko=y.f,Yo=Co.f,zo=i.f,Ho=L("symbols"),Jo=L("op-symbols"),Xo=L("string-to-symbol-registry"),Zo=L("symbol-to-string-registry"),Qo=L("wks"),ti=e.QObject,ei=!ti||!ti.prototype||!ti.prototype.findChild,ri=r&&fails((function(){return 7!=Lt(Ko({},"a",{get:function(){return Ko(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Wo(Do,e);n&&delete Do[e],Ko(t,e,r),n&&t!==Do&&Ko(Do,e,n)}:Ko,wrap=function(t,e){var n=Ho[t]=Lt($o.prototype);return qo(n,{type:"Symbol",tag:t,description:e}),r||(n.description=e),n},ni=ut?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof $o},oi=function defineProperty(t,e,r){t===Do&&oi(Jo,e,r),anObject(t);var n=toPrimitive(e,!0);return anObject(r),has(Ho,n)?(r.enumerable?(has(t,Go)&&t[Go][n]&&(t[Go][n]=!1),r=Lt(r,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,Go)||Ko(t,Go,createPropertyDescriptor(1,{})),t[Go][n]=!0),ri(t,n,r)):Ko(t,n,r)},ii=function defineProperties(t,e){anObject(t);var n=toIndexedObject(e),o=xt(n).concat(si(n));return Mo(o,(function(e){r&&!ai.call(n,e)||oi(t,e,n[e])})),t},ai=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),r=zo.call(this,e);return!(this===Do&&has(Ho,e)&&!has(Jo,e))&&(!(r||!has(this,e)||!has(Ho,e)||has(this,Go)&&this[Go][e])||r)},ci=function getOwnPropertyDescriptor(t,e){var r=toIndexedObject(t),n=toPrimitive(e,!0);if(r!==Do||!has(Ho,n)||has(Jo,n)){var o=Wo(r,n);return!o||!has(Ho,n)||has(r,Go)&&r[Go][n]||(o.enumerable=!0),o}},ui=function getOwnPropertyNames(t){var e=Yo(toIndexedObject(t)),r=[];return Mo(e,(function(t){has(Ho,t)||has(R,t)||r.push(t)})),r},si=function getOwnPropertySymbols(t){var e=t===Do,r=Yo(e?Jo:toIndexedObject(t)),n=[];return Mo(r,(function(t){!has(Ho,t)||e&&!has(Do,t)||n.push(Ho[t])})),n};if(ct||(N(($o=function Symbol(){if(this instanceof $o)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=uid(t),setter=function(t){this===Do&&setter.call(Jo,t),has(this,Go)&&has(this[Go],e)&&(this[Go][e]=!1),ri(this,e,createPropertyDescriptor(1,t))};return r&&ei&&ri(Do,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return Bo(this).tag})),N($o,"withoutSetter",(function(t){return wrap(uid(t),t)})),i.f=ai,y.f=oi,v.f=ci,J.f=Co.f=ui,X.f=si,Uo.f=function(t){return wrap(wellKnownSymbol(t),t)},r&&(Ko($o.prototype,"description",{configurable:!0,get:function description(){return Bo(this).description}}),N(Do,"propertyIsEnumerable",ai,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!ct,sham:!ct},{Symbol:$o}),Mo(xt(Qo),(function(t){defineWellKnownSymbol(t)})),_export({target:"Symbol",stat:!0,forced:!ct},{for:function(t){var e=String(t);if(has(Xo,e))return Xo[e];var r=$o(e);return Xo[e]=r,Zo[r]=e,r},keyFor:function keyFor(t){if(!ni(t))throw TypeError(t+" is not a symbol");if(has(Zo,t))return Zo[t]},useSetter:function(){ei=!0},useSimple:function(){ei=!1}}),_export({target:"Object",stat:!0,forced:!ct,sham:!r},{create:function create(t,e){return void 0===e?Lt(t):ii(Lt(t),e)},defineProperty:oi,defineProperties:ii,getOwnPropertyDescriptor:ci}),_export({target:"Object",stat:!0,forced:!ct},{getOwnPropertyNames:ui,getOwnPropertySymbols:si}),_export({target:"Object",stat:!0,forced:fails((function(){X.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return X.f(toObject(t))}}),Vo){var fi=!ct||fails((function(){var t=$o();return"[null]"!=Vo([t])||"{}"!=Vo({a:t})||"{}"!=Vo(Object(t))}));_export({target:"JSON",stat:!0,forced:fi},{stringify:function stringify(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(isObject(e)||void 0!==t)&&!ni(t))return at(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!ni(e))return e}),o[1]=e,Vo.apply(null,o)}})}$o.prototype[No]||g($o.prototype,No,$o.prototype.valueOf),setToStringTag($o,"Symbol"),R[Go]=!0;var li=y.f,hi=e.Symbol;if(r&&"function"==typeof hi&&(!("description"in hi.prototype)||void 0!==hi().description)){var pi={},vi=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof vi?new hi(t):void 0===t?hi():hi(t);return""===t&&(pi[e]=!0),e};copyConstructorProperties(vi,hi);var di=vi.prototype=hi.prototype;di.constructor=vi;var yi=di.toString,gi="Symbol(test)"==String(hi("test")),mi=/^Symbol\((.*)\)[^)]+$/;li(di,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=yi.call(t);if(has(pi,t))return"";var r=gi?e.slice(7,-1):e.replace(mi,"$1");return""===r?void 0:r}}),_export({global:!0,forced:!0},{Symbol:vi})}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var bi=[].reverse,wi=[1,2];_export({target:"Array",proto:!0,forced:String(wi)===String(wi.reverse())},{reverse:function reverse(){return at(this)&&(this.length=this.length),bi.call(this)}});var Si=wellKnownSymbol("species"),xi=function(t){return ir>=51||!fails((function(){var e=[];return(e.constructor={})[Si]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("slice"),Ei=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),Oi=wellKnownSymbol("species"),Pi=[].slice,Li=Math.max;_export({target:"Array",proto:!0,forced:!xi||!Ei},{slice:function slice(t,e){var r,n,o,i=toIndexedObject(this),a=toLength(i.length),c=toAbsoluteIndex(t,a),u=toAbsoluteIndex(void 0===e?a:e,a);if(at(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!at(r.prototype)?isObject(r)&&null===(r=r[Oi])&&(r=void 0):r=void 0,r===Array||void 0===r))return Pi.call(i,c,u);for(n=new(void 0===r?Array:r)(Li(u-c,0)),o=0;c<u;c++,o++)c in i&&createProperty(n,o,i[c]);return n.length=o,n}});var Ai=Date.prototype,ji=Ai.toString,ki=Ai.getTime;new Date(NaN)+""!="Invalid Date"&&N(Ai,"toString",(function toString(){var t=ki.call(this);return t==t?ji.call(this):"Invalid Date"}));var Ri=y.f,Ii=Function.prototype,Ti=Ii.toString,_i=/^\s*function ([^ (]*)/;r&&!("name"in Ii)&&Ri(Ii,"name",{configurable:!0,get:function(){try{return Ti.call(this).match(_i)[1]}catch(t){return""}}}),setToStringTag(e.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!r},{create:Lt}),_export({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:y.f});var Ci=fails((function(){Gt(1)}));_export({target:"Object",stat:!0,forced:Ci,sham:!Ut},{getPrototypeOf:function getPrototypeOf(t){return Gt(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:Wt});var Ui=RegExp.prototype,Fi=Ui.toString,Mi=fails((function(){return"/a/b"!=Fi.call({source:"a",flags:"b"})})),Gi="toString"!=Fi.name;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||function _unsupportedIterableToArray(t,e){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(t,e)}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}(Mi||Gi)&&N(RegExp.prototype,"toString",(function toString(){var t=anObject(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in Ui)?regexpFlags.call(t):r)}),{unsafe:!0});createCommonjsModule((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var o=e&&e.prototype instanceof Generator?e:Generator,i=Object.create(o.prototype),a=new Context(n||[]);return i._invoke=function makeInvokeMethod(t,e,r){var n=u;return function invoke(o,i){if(n===f)throw new Error("Generator is already running");if(n===l){if("throw"===o)throw i;return doneResult()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=maybeInvokeDelegate(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=l,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var p=tryCatch(t,e,r);if("normal"===p.type){if(n=r.done?l:s,p.arg===h)continue;return{value:p.arg,done:r.done}}"throw"===p.type&&(n=l,r.method="throw",r.arg=p.arg)}}}(t,r,a),i}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var u="suspendedStart",s="suspendedYield",f="executing",l="completed",h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};p[i]=function(){return this};var v=Object.getPrototypeOf,d=v&&v(v(values([])));d&&d!==r&&n.call(d,i)&&(p=d);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){var r;this._invoke=function enqueue(o,i){function callInvokeWithMethodAndArg(){return new e((function(r,a){!function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"===_typeof(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}(o,i,r,a)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,maybeInvokeDelegate(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=tryCatch(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function next(){for(;++o<t.length;)if(n.call(t,o))return next.value=t[o],next.done=!1,next;return next.value=e,next.done=!0,next};return a.next=a}}return{next:doneResult}}function doneResult(){return{value:e,done:!0}}return GeneratorFunction.prototype=y.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[a]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),y[i]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function next(){for(;e.length;){var r=e.pop();if(r in t)return next.value=r,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),h}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,n){return this.delegate={iterator:values(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));
/**
* @file ext-storage.js
*
* This extension allows automatic saving of the SVG canvas contents upon
* page unload (which can later be automatically retrieved upon future
* editor loads).
*
* The functionality was originally part of the SVG Editor, but moved to a
* separate extension to make the setting behavior optional, and adapted
* to inform the user of its setting of local data.
*
* @license MIT
*
* @copyright 2010 Brett Zamir
* @todo Revisit on whether to use `svgEditor.pref` over directly setting
* `curConfig` in all extensions for a more public API (not only for `extPath`
* and `imagePath`, but other currently used config in the extensions)
* @todo We might provide control of storage settings through the UI besides the
* initial (or URL-forced) dialog. *
*/var Ni={name:"storage",init:function init(t){var e=t.$,r=this,n=r.canvas,o=r.curConfig,i=o.emptyStorageOnDecline,a=o.noStorageOnLoad,c=o.forceStorage,u=r.storage,s=r.updateCanvas;function replaceStoragePrompt(t){t=t?"storagePrompt="+t:"";var e=top.location;e.href.includes("storagePrompt=")?e.href=e.href.replace(/([&?])storagePrompt=[^&]*(&?)/,(function(e,r,n){return(t?r:"")+t+(!t&&n?r:n||"")})):e.href+=(e.href.includes("?")?"&":"?")+t}function setSVGContentStorage(t){if(u){var e="svgedit-"+r.curConfig.canvasName;t?u.setItem(e,t):u.removeItem(e)}}function expireCookie(t){document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"}function setupBeforeUnloadListener(){window.addEventListener("beforeunload",(function(t){if(document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/)){document.cookie.match(/(?:^|;\s*)svgeditstore=prefsAndContent/)&&setSVGContentStorage(n.getSvgString()),r.setConfig({no_save_warning:!0});var e=r.curPrefs;Object.entries(e).forEach((function(t){var e=_slicedToArray(t,2),r=e[0],n=e[1];r="svg-edit-"+r,void 0!==n&&(u?u.setItem(r,n):window.widget?window.widget.setPreferenceForKey(n,r):(n=encodeURIComponent(n),document.cookie=encodeURIComponent(r)+"="+n+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"))}))}}))}var f=!1;return{name:"storage",langReady:function langReady(t){return function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function _next(t){asyncGeneratorStep(i,n,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(i,n,o,_next,_throw,"throw",t)}_next(void 0)}))}}(regeneratorRuntime.mark((function _callee(){var n,o,l,h,p,v,d,y,g,m,b,w,S,x,E,O,P,L,A,j;return regeneratorRuntime.wrap((function _callee$(k){for(;;)switch(k.prev=k.next){case 0:return n=t.lang,o=new URL(top.location).searchParams.get("storagePrompt"),k.next=4,import("./locale/".concat(n,".js"));case 4:if(l=k.sent,h=l.default,p=h.message,v=h.storagePrefsAndContent,d=h.storagePrefsOnly,y=h.storagePrefs,g=h.storageNoPrefsOrContent,m=h.storageNoPrefs,b=h.rememberLabel,w=h.rememberTooltip,!f){k.next=9;break}return k.abrupt("return");case 9:if(f=!0,c||"true"!==o&&("false"===o||document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/))){k.next=45;break}return S=[],u?S.unshift({value:"prefsAndContent",text:v},{value:"prefsOnly",text:d},{value:"noPrefsOrContent",text:g}):S.unshift({value:"prefsOnly",text:y},{value:"noPrefsOrContent",text:m}),x=e("#dialog_container")[0].style.width,E=e("#dialog_container")[0].style.marginLeft,O=e("#dialog_content")[0].style.height,P=e("#dialog_container")[0].style.height,e("#dialog_content")[0].style.height="120px",e("#dialog_container")[0].style.height="170px",e("#dialog_container")[0].style.width="800px",e("#dialog_container")[0].style.marginLeft="-400px",r.storagePromptState="waiting",k.next=21,e.select(p,S,null,null,{label:b,checked:!0,tooltip:w});case 21:if(L=k.sent,A=L.response,j=L.checked,!A||"noPrefsOrContent"===A){k.next=31;break}if(document.cookie="svgeditstore="+encodeURIComponent(A)+"; expires=Fri, 31 Dec 9999 23:59:59 GMT","true"!==o||!j){k.next=29;break}return replaceStoragePrompt(),k.abrupt("return");case 29:k.next=36;break;case 31:if(expireCookie("svgeditstore"),A&&i&&(setSVGContentStorage(""),Object.keys(r.curPrefs).forEach((function(t){t="svg-edit-"+t,u&&u.removeItem(t),expireCookie(t)}))),!A||!j){k.next=36;break}return replaceStoragePrompt("false"),k.abrupt("return");case 36:e("#dialog_container")[0].style.width=x,e("#dialog_container")[0].style.marginLeft=E,e("#dialog_content")[0].style.height=O,e("#dialog_container")[0].style.height=P,setupBeforeUnloadListener(),r.storagePromptState="closed",s(!0),k.next=46;break;case 45:a&&!c||setupBeforeUnloadListener();case 46:case"end":return k.stop()}}),_callee)})))()}}}};export default Ni;
//# sourceMappingURL=ext-storage.js.map