ipynb2html/ipynb-viewer.bb5d0a15.js

19 lines
58 KiB
JavaScript
Raw Permalink 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.

/*!
* ${ipynb2html-viewer} ${ddd24dfb71e9a2a74ecb7dd2b3556ca12344f8ed}
*
* Copyright 2020 by Jakub Jirutka <jakub@jirutka.cz>
* This project is licensed under the terms of the MIT license.
*
* Date: 2020-06-21
* */
/*!
* Bundled npm packages
*
* | Name | Version | License(s) | Publisher | Source |
* | ---------------- | ------- | ---------- | ------------- | ---------------------------------------- |
* | @hyperapp/events | 0.0.4 | MIT | Jorge Bucaran | jorgebucaran/hyperapp/lib/events |
* | core-js | 3.6.5 | MIT | | https://github.com/zloirock/core-js |
* | hyperapp | 2.0.4 | MIT | Jorge Bucaran | https://github.com/jorgebucaran/hyperapp |
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("ipynb2html")):"function"==typeof define&&define.amd?define(["ipynb2html"],t):(e=e||self).init=t(e.ipynb2html)}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,l={f:c&&!u.call({1:2},1)?function(e){var t=c(this,e);return!!t&&t.enumerable}:u},f=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},s={}.toString,h=function(e){return s.call(e).slice(8,-1)},p="".split,v=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==h(e)?p.call(e,""):Object(e)}:Object,d=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},y=function(e){return v(d(e))},g=function(e){return"object"==typeof e?null!==e:"function"==typeof e},m=function(e,t){if(!g(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!g(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,w=function(e,t){return b.call(e,t)},S=o.document,E=g(S)&&g(S.createElement),x=function(e){return E?S.createElement(e):{}},k=!a&&!i((function(){return 7!=Object.defineProperty(x("div"),"a",{get:function(){return 7}}).a})),R=Object.getOwnPropertyDescriptor,A={f:a?R:function(e,t){if(e=y(e),t=m(t,!0),k)try{return R(e,t)}catch(e){}if(w(e,t))return f(!l.f.call(e,t),e[t])}},L=function(e){if(!g(e))throw TypeError(String(e)+" is not an object");return e},j=Object.defineProperty,O={f:a?j:function(e,t,n){if(L(e),t=m(t,!0),L(n),k)try{return j(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},T=a?function(e,t,n){return O.f(e,t,f(1,n))}:function(e,t,n){return e[t]=n,e},P=function(e,t){try{T(o,e,t)}catch(n){o[e]=t}return t},U=o["__core-js_shared__"]||P("__core-js_shared__",{}),I=Function.toString;"function"!=typeof U.inspectSource&&(U.inspectSource=function(e){return I.call(e)});var C,_,N,B=U.inspectSource,F=o.WeakMap,q="function"==typeof F&&/native code/.test(B(F)),M=n((function(e){(e.exports=function(e,t){return U[e]||(U[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),D=0,G=Math.random(),H=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++D+G).toString(36)},V=M("keys"),z=function(e){return V[e]||(V[e]=H(e))},W={},K=o.WeakMap;if(q){var $=new K,J=$.get,Y=$.has,Q=$.set;C=function(e,t){return Q.call($,e,t),t},_=function(e){return J.call($,e)||{}},N=function(e){return Y.call($,e)}}else{var X=z("state");W[X]=!0,C=function(e,t){return T(e,X,t),t},_=function(e){return w(e,X)?e[X]:{}},N=function(e){return w(e,X)}}var Z,ee,te={set:C,get:_,has:N,enforce:function(e){return N(e)?_(e):C(e,{})},getterFor:function(e){return function(t){var n;if(!g(t)||(n=_(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ne=n((function(e){var t=te.get,n=te.enforce,r=String(String).split("String");(e.exports=function(e,t,i,a){var u=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||w(i,"name")||T(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==o?(u?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=i:T(e,t,i)):c?e[t]=i:P(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||B(this)}))})),re=o,oe=function(e){return"function"==typeof e?e:void 0},ie=function(e,t){return arguments.length<2?oe(re[e])||oe(o[e]):re[e]&&re[e][t]||o[e]&&o[e][t]},ae=Math.ceil,ue=Math.floor,ce=function(e){return isNaN(e=+e)?0:(e>0?ue:ae)(e)},le=Math.min,fe=function(e){return e>0?le(ce(e),9007199254740991):0},se=Math.max,he=Math.min,pe=function(e,t){var n=ce(e);return n<0?se(n+t,0):he(n,t)},ve=function(e){return function(t,n,r){var o,i=y(t),a=fe(i.length),u=pe(r,a);if(e&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((e||u in i)&&i[u]===n)return e||u||0;return!e&&-1}},de={includes:ve(!0),indexOf:ve(!1)}.indexOf,ye=function(e,t){var n,r=y(e),o=0,i=[];for(n in r)!w(W,n)&&w(r,n)&&i.push(n);for(;t.length>o;)w(r,n=t[o++])&&(~de(i,n)||i.push(n));return i},ge=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],me=ge.concat("length","prototype"),be={f:Object.getOwnPropertyNames||function(e){return ye(e,me)}},we={f:Object.getOwnPropertySymbols},Se=ie("Reflect","ownKeys")||function(e){var t=be.f(L(e)),n=we.f;return n?t.concat(n(e)):t},Ee=function(e,t){for(var n=Se(t),r=O.f,o=A.f,i=0;i<n.length;i++){var a=n[i];w(e,a)||r(e,a,o(t,a))}},xe=/#|\.prototype\./,ke=function(e,t){var n=Ae[Re(e)];return n==je||n!=Le&&("function"==typeof t?i(t):!!t)},Re=ke.normalize=function(e){return String(e).replace(xe,".").toLowerCase()},Ae=ke.data={},Le=ke.NATIVE="N",je=ke.POLYFILL="P",Oe=ke,Te=A.f,Pe=function(e,t){var n,r,i,a,u,c=e.target,l=e.global,f=e.stat;if(n=l?o:f?o[c]||P(c,{}):(o[c]||{}).prototype)for(r in t){if(a=t[r],i=e.noTargetGet?(u=Te(n,r))&&u.value:n[r],!Oe(l?r:c+(f?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ee(a,i)}(e.sham||i&&i.sham)&&T(a,"sham",!0),ne(n,r,a,e)}},Ue=Array.isArray||function(e){return"Array"==h(e)},Ie=function(e){return Object(d(e))},Ce=function(e,t,n){var r=m(t);r in e?O.f(e,r,f(0,n)):e[r]=n},_e=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Ne=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Be=M("wks"),Fe=o.Symbol,qe=Ne?Fe:Fe&&Fe.withoutSetter||H,Me=function(e){return w(Be,e)||(_e&&w(Fe,e)?Be[e]=Fe[e]:Be[e]=qe("Symbol."+e)),Be[e]},De=Me("species"),Ge=function(e,t){var n;return Ue(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Ue(n.prototype)?g(n)&&null===(n=n[De])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},He=ie("navigator","userAgent")||"",Ve=o.process,ze=Ve&&Ve.versions,We=ze&&ze.v8;We?ee=(Z=We.split("."))[0]+Z[1]:He&&(!(Z=He.match(/Edge\/(\d+)/))||Z[1]>=74)&&(Z=He.match(/Chrome\/(\d+)/))&&(ee=Z[1]);var Ke=ee&&+ee,$e=Me("species"),Je=function(e){return Ke>=51||!i((function(){var t=[];return(t.constructor={})[$e]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ye=Me("isConcatSpreadable"),Qe=Ke>=51||!i((function(){var e=[];return e[Ye]=!1,e.concat()[0]!==e})),Xe=Je("concat"),Ze=function(e){if(!g(e))return!1;var t=e[Ye];return void 0!==t?!!t:Ue(e)};Pe({target:"Array",proto:!0,forced:!Qe||!Xe},{concat:function(e){var t,n,r,o,i,a=Ie(this),u=Ge(a,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Ze(i=-1===t?a:arguments[t])){if(c+(o=fe(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,c++)n in i&&Ce(u,c,i[n])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Ce(u,c++,i)}return u.length=c,u}});var et=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},tt=function(e,t,n){if(et(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},nt=[].push,rt=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=5==e||i;return function(u,c,l,f){for(var s,h,p=Ie(u),d=v(p),y=tt(c,l,3),g=fe(d.length),m=0,b=f||Ge,w=t?b(u,g):n?b(u,0):void 0;g>m;m++)if((a||m in d)&&(h=y(s=d[m],m,p),e))if(t)w[m]=h;else if(h)switch(e){case 3:return!0;case 5:return s;case 6:return m;case 2:nt.call(w,s)}else if(o)return!1;return i?-1:r||o?o:w}},ot={forEach:rt(0),map:rt(1),filter:rt(2),some:rt(3),every:rt(4),find:rt(5),findIndex:rt(6)},it=Object.defineProperty,at={},ut=function(e){throw e},ct=function(e,t){if(w(at,e))return at[e];t||(t={});var n=[][e],r=!!w(t,"ACCESSORS")&&t.ACCESSORS,o=w(t,0)?t[0]:ut,u=w(t,1)?t[1]:void 0;return at[e]=!!n&&!i((function(){if(r&&!a)return!0;var e={length:-1};r?it(e,1,{enumerable:!0,get:ut}):e[1]=1,n.call(e,o,u)}))},lt=ot.map,ft=Je("map"),st=ct("map");Pe({target:"Array",proto:!0,forced:!ft||!st},{map:function(e){return lt(this,e,arguments.length>1?arguments[1]:void 0)}});var ht=function(e){return function(t,n,r,o){et(n);var i=Ie(t),a=v(i),u=fe(i.length),c=e?u-1:0,l=e?-1:1;if(r<2)for(;;){if(c in a){o=a[c],c+=l;break}if(c+=l,e?c<0:u<=c)throw TypeError("Reduce of empty array with no initial value")}for(;e?c>=0:u>c;c+=l)c in a&&(o=n(o,a[c],c,i));return o}},pt={left:ht(!1),right:ht(!0)}.left,vt=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}("reduce"),dt=ct("reduce",{1:0});Pe({target:"Array",proto:!0,forced:!vt||!dt},{reduce:function(e){return pt(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var yt=Je("slice"),gt=ct("slice",{ACCESSORS:!0,0:0,1:2}),mt=Me("species"),bt=[].slice,wt=Math.max;Pe({target:"Array",proto:!0,forced:!yt||!gt},{slice:function(e,t){var n,r,o,i=y(this),a=fe(i.length),u=pe(e,a),c=pe(void 0===t?a:t,a);if(Ue(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Ue(n.prototype)?g(n)&&null===(n=n[mt])&&(n=void 0):n=void 0,n===Array||void 0===n))return bt.call(i,u,c);for(r=new(void 0===n?Array:n)(wt(c-u,0)),o=0;u<c;u++,o++)u in i&&Ce(r,o,i[u]);return r.length=o,r}});var St=O.f,Et=Function.prototype,xt=Et.toString,kt=/^\s*function ([^ (]*)/;function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a&&!("name"in Et)&&St(Et,"name",{configurable:!0,get:function(){try{return xt.call(this).match(kt)[1]}catch(e){return""}}});var At,Lt={},jt=[],Ot=jt.map,Tt=Array.isArray,Pt="undefined"!=typeof requestAnimationFrame?requestAnimationFrame:setTimeout,Ut=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},It=function e(t){return t.reduce((function(t,n){return t.concat(n&&!0!==n?"function"==typeof n[0]?[n]:e(n):0)}),jt)},Ct=function(e,t){return Tt(e)&&Tt(t)&&e[0]===t[0]&&"function"==typeof e[0]},_t=function(e,t){if(e!==t)for(var n in Ut(e,t)){if(e[n]!==t[n]&&!Ct(e[n],t[n]))return!0;t[n]=e[n]}},Nt=function(e,t,n,r,o,i){if("key"===t);else if("style"===t)for(var a in Ut(n,r))n=null==r||null==r[a]?"":r[a],"-"===a[0]?e[t].setProperty(a,n):e[t][a]=n;else"o"===t[0]&&"n"===t[1]?((e.actions||(e.actions={}))[t=t.slice(2).toLowerCase()]=r)?n||e.addEventListener(t,o):e.removeEventListener(t,o):!i&&"list"!==t&&t in e?e[t]=null==r?"":r:null==r||!1===r||"class"===t&&!(r=function e(t){var n="";if("string"==typeof t)return t;if(Tt(t)&&t.length>0)for(var r,o=0;o<t.length;o++)""!==(r=e(t[o]))&&(n+=(n&&" ")+r);else for(var o in t)t[o]&&(n+=(n&&" ")+o);return n}(r))?e.removeAttribute(t):e.setAttribute(t,r)},Bt=function e(t,n,r){var o=t.props,i=3===t.type?document.createTextNode(t.name):(r=r||"svg"===t.name)?document.createElementNS("http://www.w3.org/2000/svg",t.name,{is:o.is}):document.createElement(t.name,{is:o.is});for(var a in o)Nt(i,a,null,o[a],n,r);for(var u=0,c=t.children.length;u<c;u++)i.appendChild(e(t.children[u]=Mt(t.children[u]),n,r));return t.node=i},Ft=function(e){return null==e?null:e.key},qt=function(e){return"object"===Rt(e)?e:Gt(e)},Mt=function(e,t){return 2===e.type?((!t||!t.lazy||function(e,t){for(var n in e)if(e[n]!==t[n])return!0;for(var n in t)if(e[n]!==t[n])return!0}(t.lazy,e.lazy))&&((t=qt(e.lazy.view(e.lazy))).lazy=e.lazy),t):e},Dt=function(e,t,n,r,o,i){return{name:e,props:t,children:n,node:r,type:i,key:o}},Gt=function(e,t){return Dt(e,Lt,jt,t,void 0,3)},Ht=function(e){return{lazy:e,type:2}},Vt=function(e,t){for(var n,r=[],o=[],i=arguments.length;i-- >2;)r.push(arguments[i]);for(;r.length>0;)if(Tt(n=r.pop()))for(i=n.length;i-- >0;)r.push(n[i]);else!1===n||!0===n||null==n||o.push(qt(n));return t=t||Lt,"function"==typeof e?e(t,o):Dt(e,t,o,void 0,t.key)},zt=function(e){var t={},n=!1,r=e.view,o=e.node,i=o&&function e(t){return 3===t.nodeType?Gt(t.nodeValue,t):Dt(t.nodeName.toLowerCase(),Lt,Ot.call(t.childNodes,e),t,void 0,1)}(o),a=e.subscriptions,u=[],c=function(e){f(this.actions[e.type],e)},l=function(e){return t!==e&&(t=e,a&&(u=function(e,t,n){for(var r,o,i=0,a=[];i<e.length||i<t.length;i++)r=e[i],o=t[i],a.push(o?!r||o[0]!==r[0]||_t(o[1],r[1])?[o[0],o[1],o[0](n,o[1]),r&&r[2]()]:r:r&&r[2]());return a}(u,It([a(t)]),f)),r&&!n&&Pt(s,n=!0)),t},f=(e.middleware||function(e){return e})((function(e,n){return"function"==typeof e?f(e(t,n)):Tt(e)?"function"==typeof e[0]||Tt(e[0])?f(e[0],"function"==typeof e[1]?e[1](n):e[1]):(It(e.slice(1)).map((function(e){e&&e[0](f,e[1])}),l(e[0])),t):l(e)})),s=function(){n=!1,o=function e(t,n,r,o,i,a){if(r===o);else if(null!=r&&3===r.type&&3===o.type)r.name!==o.name&&(n.nodeValue=o.name);else if(null==r||r.name!==o.name)n=t.insertBefore(Bt(o=Mt(o),i,a),n),null!=r&&t.removeChild(r.node);else{var u,c,l,f,s=r.props,h=o.props,p=r.children,v=o.children,d=0,y=0,g=p.length-1,m=v.length-1;for(var b in a=a||"svg"===o.name,Ut(s,h))("value"===b||"selected"===b||"checked"===b?n[b]:s[b])!==h[b]&&Nt(n,b,s[b],h[b],i,a);for(;y<=m&&d<=g&&null!=(l=Ft(p[d]))&&l===Ft(v[y]);)e(n,p[d].node,p[d],v[y]=Mt(v[y++],p[d++]),i,a);for(;y<=m&&d<=g&&null!=(l=Ft(p[g]))&&l===Ft(v[m]);)e(n,p[g].node,p[g],v[m]=Mt(v[m--],p[g--]),i,a);if(d>g)for(;y<=m;)n.insertBefore(Bt(v[y]=Mt(v[y++]),i,a),(c=p[d])&&c.node);else if(y>m)for(;d<=g;)n.removeChild(p[d++].node);else{b=d;for(var w={},S={};b<=g;b++)null!=(l=p[b].key)&&(w[l]=p[b]);for(;y<=m;)l=Ft(c=p[d]),f=Ft(v[y]=Mt(v[y],c)),S[l]||null!=f&&f===Ft(p[d+1])?(null==l&&n.removeChild(c.node),d++):null==f||1===r.type?(null==l&&(e(n,c&&c.node,c,v[y],i,a),y++),d++):(l===f?(e(n,c.node,c,v[y],i,a),S[f]=!0,d++):null!=(u=w[f])?(e(n,n.insertBefore(u.node,c&&c.node),u,v[y],i,a),S[f]=!0):e(n,c&&c.node,null,v[y],i,a),y++);for(;d<=g;)null==Ft(c=p[d++])&&n.removeChild(c.node);for(var b in w)null==S[b]&&n.removeChild(w[b].node)}}return o.node=n}(o.parentNode,o,i,i=qt(r(t)),c)};f(e.init)},Wt=function(e){return t=e,function(e){return function(t){return[e,{action:t}]}}((function(e,n){var r=function(t){e(n.action,t)};return addEventListener(t,r),function(){removeEventListener(t,r)}}));var t},Kt=function(e){return function(t){return[e,t]}}((function(e,t){t.preventDefault&&t.event.preventDefault(),t.stopPropagation&&t.event.stopPropagation(),null!=t.action&&e(t.action,t.event)})),$t=function(e){return function(t,n){return[t,Kt({preventDefault:!0,action:e,event:n})]}},Jt=function(e){return e.target.value},Yt=Object.keys||function(e){return ye(e,ge)},Qt=a?Object.defineProperties:function(e,t){L(e);for(var n,r=Yt(t),o=r.length,i=0;o>i;)O.f(e,n=r[i++],t[n]);return e},Xt=ie("document","documentElement"),Zt=z("IE_PROTO"),en=function(){},tn=function(e){return"<script>"+e+"<\/script>"},nn=function(){try{At=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;nn=At?function(e){e.write(tn("")),e.close();var t=e.parentWindow.Object;return e=null,t}(At):((t=x("iframe")).style.display="none",Xt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(tn("document.F=Object")),e.close(),e.F);for(var n=ge.length;n--;)delete nn.prototype[ge[n]];return nn()};W[Zt]=!0;var rn=Object.create||function(e,t){var n;return null!==e?(en.prototype=L(e),n=new en,en.prototype=null,n[Zt]=e):n=nn(),void 0===t?n:Qt(n,t)},on=Me("unscopables"),an=Array.prototype;null==an[on]&&O.f(an,on,{configurable:!0,value:rn(null)});var un=function(e){an[on][e]=!0},cn=ot.find,ln=!0,fn=ct("find");"find"in[]&&Array(1).find((function(){ln=!1})),Pe({target:"Array",proto:!0,forced:ln||!fn},{find:function(e){return cn(this,e,arguments.length>1?arguments[1]:void 0)}}),un("find");var sn=function(e,t,n,r){try{return r?t(L(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&L(o.call(e)),t}},hn={},pn=Me("iterator"),vn=Array.prototype,dn=function(e){return void 0!==e&&(hn.Array===e||vn[pn]===e)},yn={};yn[Me("toStringTag")]="z";var gn="[object z]"===String(yn),mn=Me("toStringTag"),bn="Arguments"==h(function(){return arguments}()),wn=gn?h:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),mn))?n:bn?h(t):"Object"==(r=h(t))&&"function"==typeof t.callee?"Arguments":r},Sn=Me("iterator"),En=function(e){if(null!=e)return e[Sn]||e["@@iterator"]||hn[wn(e)]},xn=function(e){var t,n,r,o,i,a,u=Ie(e),c="function"==typeof this?this:Array,l=arguments.length,f=l>1?arguments[1]:void 0,s=void 0!==f,h=En(u),p=0;if(s&&(f=tt(f,l>2?arguments[2]:void 0,2)),null==h||c==Array&&dn(h))for(n=new c(t=fe(u.length));t>p;p++)a=s?f(u[p],p):u[p],Ce(n,p,a);else for(i=(o=h.call(u)).next,n=new c;!(r=i.call(o)).done;p++)a=s?sn(o,f,[r.value,p],!0):r.value,Ce(n,p,a);return n.length=p,n},kn=Me("iterator"),Rn=!1;try{var An=0,Ln={next:function(){return{done:!!An++}},return:function(){Rn=!0}};Ln[kn]=function(){return this},Array.from(Ln,(function(){throw 2}))}catch(e){}var jn=function(e,t){if(!t&&!Rn)return!1;var n=!1;try{var r={};r[kn]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},On=!jn((function(e){Array.from(e)}));Pe({target:"Array",stat:!0,forced:On},{from:xn});var Tn,Pn,Un,In=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Cn=z("IE_PROTO"),_n=Object.prototype,Nn=In?Object.getPrototypeOf:function(e){return e=Ie(e),w(e,Cn)?e[Cn]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?_n:null},Bn=Me("iterator"),Fn=!1;[].keys&&("next"in(Un=[].keys())?(Pn=Nn(Nn(Un)))!==Object.prototype&&(Tn=Pn):Fn=!0),null==Tn&&(Tn={}),w(Tn,Bn)||T(Tn,Bn,(function(){return this}));var qn={IteratorPrototype:Tn,BUGGY_SAFARI_ITERATORS:Fn},Mn=O.f,Dn=Me("toStringTag"),Gn=function(e,t,n){e&&!w(e=n?e:e.prototype,Dn)&&Mn(e,Dn,{configurable:!0,value:t})},Hn=qn.IteratorPrototype,Vn=function(){return this},zn=function(e,t,n){var r=t+" Iterator";return e.prototype=rn(Hn,{next:f(1,n)}),Gn(e,r,!1),hn[r]=Vn,e},Wn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return L(n),function(e){if(!g(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),Kn=qn.IteratorPrototype,$n=qn.BUGGY_SAFARI_ITERATORS,Jn=Me("iterator"),Yn=function(){return this},Qn=function(e,t,n,r,o,i,a){zn(n,t,r);var u,c,l,f=function(e){if(e===o&&d)return d;if(!$n&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},s=t+" Iterator",h=!1,p=e.prototype,v=p[Jn]||p["@@iterator"]||o&&p[o],d=!$n&&v||f(o),y="Array"==t&&p.entries||v;if(y&&(u=Nn(y.call(new e)),Kn!==Object.prototype&&u.next&&(Nn(u)!==Kn&&(Wn?Wn(u,Kn):"function"!=typeof u[Jn]&&T(u,Jn,Yn)),Gn(u,s,!0))),"values"==o&&v&&"values"!==v.name&&(h=!0,d=function(){return v.call(this)}),p[Jn]!==d&&T(p,Jn,d),hn[t]=d,o)if(c={values:f("values"),keys:i?d:f("keys"),entries:f("entries")},a)for(l in c)($n||h||!(l in p))&&ne(p,l,c[l]);else Pe({target:t,proto:!0,forced:$n||h},c);return c},Xn=te.set,Zn=te.getterFor("Array Iterator"),er=Qn(Array,"Array",(function(e,t){Xn(this,{type:"Array Iterator",target:y(e),index:0,kind:t})}),(function(){var e=Zn(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");hn.Arguments=hn.Array,un("keys"),un("values"),un("entries");var tr=gn?{}.toString:function(){return"[object "+wn(this)+"]"};gn||ne(Object.prototype,"toString",tr,{unsafe:!0});var nr=function(){var e=L(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function rr(e,t){return RegExp(e,t)}var or,ir,ar={UNSUPPORTED_Y:i((function(){var e=rr("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=rr("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},ur=RegExp.prototype.exec,cr=String.prototype.replace,lr=ur,fr=(or=/a/,ir=/b*/g,ur.call(or,"a"),ur.call(ir,"a"),0!==or.lastIndex||0!==ir.lastIndex),sr=ar.UNSUPPORTED_Y||ar.BROKEN_CARET,hr=void 0!==/()??/.exec("")[1];(fr||hr||sr)&&(lr=function(e){var t,n,r,o,i=this,a=sr&&i.sticky,u=nr.call(i),c=i.source,l=0,f=e;return a&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(c="(?: "+c+")",f=" "+f,l++),n=new RegExp("^(?:"+c+")",u)),hr&&(n=new RegExp("^"+c+"$(?!\\s)",u)),fr&&(t=i.lastIndex),r=ur.call(a?n:i,f),a?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:fr&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),hr&&r&&r.length>1&&cr.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var pr=lr;Pe({target:"RegExp",proto:!0,forced:/./.exec!==pr},{exec:pr});var vr=RegExp.prototype,dr=vr.toString,yr=i((function(){return"/a/b"!=dr.call({source:"a",flags:"b"})})),gr="toString"!=dr.name;(yr||gr)&&ne(RegExp.prototype,"toString",(function(){var e=L(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in vr)?nr.call(e):n)}),{unsafe:!0});var mr=function(e){return function(t,n){var r,o,i=String(d(t)),a=ce(n),u=i.length;return a<0||a>=u?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===u||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},br={codeAt:mr(!1),charAt:mr(!0)},wr=br.charAt,Sr=te.set,Er=te.getterFor("String Iterator");Qn(String,"String",(function(e){Sr(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Er(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=wr(n,r),t.index+=e.length,{value:e,done:!1})}));var xr=Me("species"),kr=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Rr="$0"==="a".replace(/./,"$0"),Ar=Me("replace"),Lr=!!/./[Ar]&&""===/./[Ar]("a","$0"),jr=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Or=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};!function(e,t,n,r){var o=Me(e),a=!i((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),u=a&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[xr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!a||!u||"replace"===e&&(!kr||!Rr||Lr)||"split"===e&&!jr){var c=/./[o],l=n(o,""[e],(function(e,t,n,r,o){return t.exec===pr?a&&!o?{done:!0,value:c.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Rr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Lr}),f=l[0],s=l[1];ne(String.prototype,e,f),ne(RegExp.prototype,o,2==t?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)})}r&&T(RegExp.prototype[o],"sham",!0)}("search",1,(function(e,t,n){return[function(t){var n=d(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=L(e),i=String(this),a=o.lastIndex;Or(a,0)||(o.lastIndex=0);var u=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==h(e))throw TypeError("RegExp#exec called on incompatible receiver");return pr.call(e,t)}(o,i);return Or(o.lastIndex,a)||(o.lastIndex=a),null===u?-1:u.index}]}));var Tr,Pr=Me("match"),Ur=function(e){if(function(e){var t;return g(e)&&(void 0!==(t=e[Pr])?!!t:"RegExp"==h(e))}(e))throw TypeError("The method doesn't accept regular expressions");return e},Ir=Me("match"),Cr=A.f,_r="".startsWith,Nr=Math.min,Br=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Ir]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),Fr=!(Br||(Tr=Cr(String.prototype,"startsWith"),!Tr||Tr.writable));Pe({target:"String",proto:!0,forced:!Fr&&!Br},{startsWith:function(e){var t=String(d(this));Ur(e);var n=fe(Nr(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return _r?_r.call(t,r,n):t.slice(n,n+r.length)===r}});var qr={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},Mr=Me("iterator"),Dr=Me("toStringTag"),Gr=er.values;for(var Hr in qr){var Vr=o[Hr],zr=Vr&&Vr.prototype;if(zr){if(zr[Mr]!==Gr)try{T(zr,Mr,Gr)}catch(e){zr[Mr]=Gr}if(zr[Dr]||T(zr,Dr,Hr),qr[Hr])for(var Wr in er)if(zr[Wr]!==er[Wr])try{T(zr,Wr,er[Wr])}catch(e){zr[Wr]=er[Wr]}}}var Kr=Me("iterator"),$r=!i((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Kr]||"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"!==n||"x"!==new URL("http://x",void 0).host})),Jr=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},Yr=Object.assign,Qr=Object.defineProperty,Xr=!Yr||i((function(){if(a&&1!==Yr({b:1},Yr(Qr({},"a",{enumerable:!0,get:function(){Qr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=Yr({},e)[n]||"abcdefghijklmnopqrst"!=Yt(Yr({},t)).join("")}))?function(e,t){for(var n=Ie(e),r=arguments.length,o=1,i=we.f,u=l.f;r>o;)for(var c,f=v(arguments[o++]),s=i?Yt(f).concat(i(f)):Yt(f),h=s.length,p=0;h>p;)c=s[p++],a&&!u.call(f,c)||(n[c]=f[c]);return n}:Yr,Zr=/[^\0-\u007E]/,eo=/[.\u3002\uFF0E\uFF61]/g,to="Overflow: input needs wider integers to process",no=Math.floor,ro=String.fromCharCode,oo=function(e){return e+22+75*(e<26)},io=function(e,t,n){var r=0;for(e=n?no(e/700):e>>1,e+=no(e/t);e>455;r+=36)e=no(e/35);return no(r+36*e/(e+38))},ao=function(e){var t,n,r=[],o=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}(e)).length,i=128,a=0,u=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(ro(n));var c=r.length,l=c;for(c&&r.push("-");l<o;){var f=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=i&&n<f&&(f=n);var s=l+1;if(f-i>no((2147483647-a)/s))throw RangeError(to);for(a+=(f-i)*s,i=f,t=0;t<e.length;t++){if((n=e[t])<i&&++a>2147483647)throw RangeError(to);if(n==i){for(var h=a,p=36;;p+=36){var v=p<=u?1:p>=u+26?26:p-u;if(h<v)break;var d=h-v,y=36-v;r.push(ro(oo(v+d%y))),h=no(d/y)}r.push(ro(oo(h))),u=io(a,s,l==c),a=0,++l}}++a,++i}return r.join("")},uo=function(e,t,n){for(var r in t)ne(e,r,t[r],n);return e},co=function(e){var t=En(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return L(t.call(e))},lo=ie("fetch"),fo=ie("Headers"),so=Me("iterator"),ho=te.set,po=te.getterFor("URLSearchParams"),vo=te.getterFor("URLSearchParamsIterator"),yo=/\+/g,go=Array(4),mo=function(e){return go[e-1]||(go[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},bo=function(e){try{return decodeURIComponent(e)}catch(t){return e}},wo=function(e){var t=e.replace(yo," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(mo(n--),bo);return t}},So=/[!'()~]|%20/g,Eo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},xo=function(e){return Eo[e]},ko=function(e){return encodeURIComponent(e).replace(So,xo)},Ro=function(e,t){if(t)for(var n,r,o=t.split("&"),i=0;i<o.length;)(n=o[i++]).length&&(r=n.split("="),e.push({key:wo(r.shift()),value:wo(r.join("="))}))},Ao=function(e){this.entries.length=0,Ro(this.entries,e)},Lo=function(e,t){if(e<t)throw TypeError("Not enough arguments")},jo=zn((function(e,t){ho(this,{type:"URLSearchParamsIterator",iterator:co(po(e).entries),kind:t})}),"Iterator",(function(){var e=vo(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),Oo=function(){Jr(this,Oo,"URLSearchParams");var e,t,n,r,o,i,a,u,c,l=arguments.length>0?arguments[0]:void 0,f=this,s=[];if(ho(f,{type:"URLSearchParams",entries:s,updateURL:function(){},updateSearchParams:Ao}),void 0!==l)if(g(l))if("function"==typeof(e=En(l)))for(n=(t=e.call(l)).next;!(r=n.call(t)).done;){if((a=(i=(o=co(L(r.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");s.push({key:a.value+"",value:u.value+""})}else for(c in l)w(l,c)&&s.push({key:c,value:l[c]+""});else Ro(s,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},To=Oo.prototype;uo(To,{append:function(e,t){Lo(arguments.length,2);var n=po(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){Lo(arguments.length,1);for(var t=po(this),n=t.entries,r=e+"",o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;t.updateURL()},get:function(e){Lo(arguments.length,1);for(var t=po(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Lo(arguments.length,1);for(var t=po(this).entries,n=e+"",r=[],o=0;o<t.length;o++)t[o].key===n&&r.push(t[o].value);return r},has:function(e){Lo(arguments.length,1);for(var t=po(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Lo(arguments.length,1);for(var n,r=po(this),o=r.entries,i=!1,a=e+"",u=t+"",c=0;c<o.length;c++)(n=o[c]).key===a&&(i?o.splice(c--,1):(i=!0,n.value=u));i||o.push({key:a,value:u}),r.updateURL()},sort:function(){var e,t,n,r=po(this),o=r.entries,i=o.slice();for(o.length=0,n=0;n<i.length;n++){for(e=i[n],t=0;t<n;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===n&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,n=po(this).entries,r=tt(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new jo(this,"keys")},values:function(){return new jo(this,"values")},entries:function(){return new jo(this,"entries")}},{enumerable:!0}),ne(To,so,To.entries),ne(To,"toString",(function(){for(var e,t=po(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(ko(e.key)+"="+ko(e.value));return n.join("&")}),{enumerable:!0}),Gn(Oo,"URLSearchParams"),Pe({global:!0,forced:!$r},{URLSearchParams:Oo}),$r||"function"!=typeof lo||"function"!=typeof fo||Pe({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,o=[e];return arguments.length>1&&(g(t=arguments[1])&&(n=t.body,"URLSearchParams"===wn(n)&&((r=t.headers?new fo(t.headers):new fo).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=rn(t,{body:f(0,String(n)),headers:f(0,r)}))),o.push(t)),lo.apply(this,o)}});var Po,Uo={URLSearchParams:Oo,getState:po},Io=br.codeAt,Co=o.URL,_o=Uo.URLSearchParams,No=Uo.getState,Bo=te.set,Fo=te.getterFor("URL"),qo=Math.floor,Mo=Math.pow,Do=/[A-Za-z]/,Go=/[\d+-.A-Za-z]/,Ho=/\d/,Vo=/^(0x|0X)/,zo=/^[0-7]+$/,Wo=/^\d+$/,Ko=/^[\dA-Fa-f]+$/,$o=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Jo=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Yo=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Qo=/[\u0009\u000A\u000D]/g,Xo=function(e,t){var n,r,o;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=ei(t.slice(1,-1))))return"Invalid host";e.host=n}else if(ci(e)){if(t=function(e){var t,n,r=[],o=e.toLowerCase().replace(eo,".").split(".");for(t=0;t<o.length;t++)n=o[t],r.push(Zr.test(n)?"xn--"+ao(n):n);return r.join(".")}(t),$o.test(t))return"Invalid host";if(null===(n=Zo(t)))return"Invalid host";e.host=n}else{if(Jo.test(t))return"Invalid host";for(n="",r=xn(t),o=0;o<r.length;o++)n+=ai(r[o],ni);e.host=n}},Zo=function(e){var t,n,r,o,i,a,u,c=e.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=c[r]))return e;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Vo.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Wo:8==i?zo:Ko).test(o))return e;a=parseInt(o,i)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=Mo(256,5-t))return null}else if(a>255)return null;for(u=n.pop(),r=0;r<n.length;r++)u+=n[r]*Mo(256,3-r);return u},ei=function(e){var t,n,r,o,i,a,u,c=[0,0,0,0,0,0,0,0],l=0,f=null,s=0,h=function(){return e.charAt(s)};if(":"==h()){if(":"!=e.charAt(1))return;s+=2,f=++l}for(;h();){if(8==l)return;if(":"!=h()){for(t=n=0;n<4&&Ko.test(h());)t=16*t+parseInt(h(),16),s++,n++;if("."==h()){if(0==n)return;if(s-=n,l>6)return;for(r=0;h();){if(o=null,r>0){if(!("."==h()&&r<4))return;s++}if(!Ho.test(h()))return;for(;Ho.test(h());){if(i=parseInt(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;s++}c[l]=256*c[l]+o,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(s++,!h())return}else if(h())return;c[l++]=t}else{if(null!==f)return;s++,f=++l}}if(null!==f)for(a=l-f,l=7;0!=l&&a>0;)u=c[l],c[l--]=c[f+a-1],c[f+--a]=u;else if(8!=l)return;return c},ti=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=qo(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},ni={},ri=Xr({},ni,{" ":1,'"':1,"<":1,">":1,"`":1}),oi=Xr({},ri,{"#":1,"?":1,"{":1,"}":1}),ii=Xr({},oi,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ai=function(e,t){var n=Io(e,0);return n>32&&n<127&&!w(t,e)?e:encodeURIComponent(e)},ui={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ci=function(e){return w(ui,e.scheme)},li=function(e){return""!=e.username||""!=e.password},fi=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},si=function(e,t){var n;return 2==e.length&&Do.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},hi=function(e){var t;return e.length>1&&si(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},pi=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&si(t[0],!0)||t.pop()},vi=function(e){return"."===e||"%2e"===e.toLowerCase()},di={},yi={},gi={},mi={},bi={},wi={},Si={},Ei={},xi={},ki={},Ri={},Ai={},Li={},ji={},Oi={},Ti={},Pi={},Ui={},Ii={},Ci={},_i={},Ni=function(e,t,n,r){var o,i,a,u,c,l=n||di,f=0,s="",h=!1,p=!1,v=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(Yo,"")),t=t.replace(Qo,""),o=xn(t);f<=o.length;){switch(i=o[f],l){case di:if(!i||!Do.test(i)){if(n)return"Invalid scheme";l=gi;continue}s+=i.toLowerCase(),l=yi;break;case yi:if(i&&(Go.test(i)||"+"==i||"-"==i||"."==i))s+=i.toLowerCase();else{if(":"!=i){if(n)return"Invalid scheme";s="",l=gi,f=0;continue}if(n&&(ci(e)!=w(ui,s)||"file"==s&&(li(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=s,n)return void(ci(e)&&ui[e.scheme]==e.port&&(e.port=null));s="","file"==e.scheme?l=ji:ci(e)&&r&&r.scheme==e.scheme?l=mi:ci(e)?l=Ei:"/"==o[f+1]?(l=bi,f++):(e.cannotBeABaseURL=!0,e.path.push(""),l=Ii)}break;case gi:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,l=_i;break}l="file"==r.scheme?ji:wi;continue;case mi:if("/"!=i||"/"!=o[f+1]){l=wi;continue}l=xi,f++;break;case bi:if("/"==i){l=ki;break}l=Ui;continue;case wi:if(e.scheme=r.scheme,i==Po)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==i||"\\"==i&&ci(e))l=Si;else if("?"==i)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",l=Ci;else{if("#"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),l=Ui;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",l=_i}break;case Si:if(!ci(e)||"/"!=i&&"\\"!=i){if("/"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,l=Ui;continue}l=ki}else l=xi;break;case Ei:if(l=xi,"/"!=i||"/"!=s.charAt(f+1))continue;f++;break;case xi:if("/"!=i&&"\\"!=i){l=ki;continue}break;case ki:if("@"==i){h&&(s="%40"+s),h=!0,a=xn(s);for(var d=0;d<a.length;d++){var y=a[d];if(":"!=y||v){var g=ai(y,ii);v?e.password+=g:e.username+=g}else v=!0}s=""}else if(i==Po||"/"==i||"?"==i||"#"==i||"\\"==i&&ci(e)){if(h&&""==s)return"Invalid authority";f-=xn(s).length+1,s="",l=Ri}else s+=i;break;case Ri:case Ai:if(n&&"file"==e.scheme){l=Ti;continue}if(":"!=i||p){if(i==Po||"/"==i||"?"==i||"#"==i||"\\"==i&&ci(e)){if(ci(e)&&""==s)return"Invalid host";if(n&&""==s&&(li(e)||null!==e.port))return;if(u=Xo(e,s))return u;if(s="",l=Pi,n)return;continue}"["==i?p=!0:"]"==i&&(p=!1),s+=i}else{if(""==s)return"Invalid host";if(u=Xo(e,s))return u;if(s="",l=Li,n==Ai)return}break;case Li:if(!Ho.test(i)){if(i==Po||"/"==i||"?"==i||"#"==i||"\\"==i&&ci(e)||n){if(""!=s){var m=parseInt(s,10);if(m>65535)return"Invalid port";e.port=ci(e)&&m===ui[e.scheme]?null:m,s=""}if(n)return;l=Pi;continue}return"Invalid port"}s+=i;break;case ji:if(e.scheme="file","/"==i||"\\"==i)l=Oi;else{if(!r||"file"!=r.scheme){l=Ui;continue}if(i==Po)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==i)e.host=r.host,e.path=r.path.slice(),e.query="",l=Ci;else{if("#"!=i){hi(o.slice(f).join(""))||(e.host=r.host,e.path=r.path.slice(),pi(e)),l=Ui;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",l=_i}}break;case Oi:if("/"==i||"\\"==i){l=Ti;break}r&&"file"==r.scheme&&!hi(o.slice(f).join(""))&&(si(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),l=Ui;continue;case Ti:if(i==Po||"/"==i||"\\"==i||"?"==i||"#"==i){if(!n&&si(s))l=Ui;else if(""==s){if(e.host="",n)return;l=Pi}else{if(u=Xo(e,s))return u;if("localhost"==e.host&&(e.host=""),n)return;s="",l=Pi}continue}s+=i;break;case Pi:if(ci(e)){if(l=Ui,"/"!=i&&"\\"!=i)continue}else if(n||"?"!=i)if(n||"#"!=i){if(i!=Po&&(l=Ui,"/"!=i))continue}else e.fragment="",l=_i;else e.query="",l=Ci;break;case Ui:if(i==Po||"/"==i||"\\"==i&&ci(e)||!n&&("?"==i||"#"==i)){if(".."===(c=(c=s).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(pi(e),"/"==i||"\\"==i&&ci(e)||e.path.push("")):vi(s)?"/"==i||"\\"==i&&ci(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&si(s)&&(e.host&&(e.host=""),s=s.charAt(0)+":"),e.path.push(s)),s="","file"==e.scheme&&(i==Po||"?"==i||"#"==i))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==i?(e.query="",l=Ci):"#"==i&&(e.fragment="",l=_i)}else s+=ai(i,oi);break;case Ii:"?"==i?(e.query="",l=Ci):"#"==i?(e.fragment="",l=_i):i!=Po&&(e.path[0]+=ai(i,ni));break;case Ci:n||"#"!=i?i!=Po&&("'"==i&&ci(e)?e.query+="%27":e.query+="#"==i?"%23":ai(i,ni)):(e.fragment="",l=_i);break;case _i:i!=Po&&(e.fragment+=ai(i,ri))}f++}},Bi=function(e){var t,n,r=Jr(this,Bi,"URL"),o=arguments.length>1?arguments[1]:void 0,i=String(e),u=Bo(r,{type:"URL"});if(void 0!==o)if(o instanceof Bi)t=Fo(o);else if(n=Ni(t={},String(o)))throw TypeError(n);if(n=Ni(u,i,null,t))throw TypeError(n);var c=u.searchParams=new _o,l=No(c);l.updateSearchParams(u.query),l.updateURL=function(){u.query=String(c)||null},a||(r.href=qi.call(r),r.origin=Mi.call(r),r.protocol=Di.call(r),r.username=Gi.call(r),r.password=Hi.call(r),r.host=Vi.call(r),r.hostname=zi.call(r),r.port=Wi.call(r),r.pathname=Ki.call(r),r.search=$i.call(r),r.searchParams=Ji.call(r),r.hash=Yi.call(r))},Fi=Bi.prototype,qi=function(){var e=Fo(this),t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,u=e.query,c=e.fragment,l=t+":";return null!==o?(l+="//",li(e)&&(l+=n+(r?":"+r:"")+"@"),l+=ti(o),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(l+="?"+u),null!==c&&(l+="#"+c),l},Mi=function(){var e=Fo(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&ci(e)?t+"://"+ti(e.host)+(null!==n?":"+n:""):"null"},Di=function(){return Fo(this).scheme+":"},Gi=function(){return Fo(this).username},Hi=function(){return Fo(this).password},Vi=function(){var e=Fo(this),t=e.host,n=e.port;return null===t?"":null===n?ti(t):ti(t)+":"+n},zi=function(){var e=Fo(this).host;return null===e?"":ti(e)},Wi=function(){var e=Fo(this).port;return null===e?"":String(e)},Ki=function(){var e=Fo(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},$i=function(){var e=Fo(this).query;return e?"?"+e:""},Ji=function(){return Fo(this).searchParams},Yi=function(){var e=Fo(this).fragment;return e?"#"+e:""},Qi=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(a&&Qt(Fi,{href:Qi(qi,(function(e){var t=Fo(this),n=String(e),r=Ni(t,n);if(r)throw TypeError(r);No(t.searchParams).updateSearchParams(t.query)})),origin:Qi(Mi),protocol:Qi(Di,(function(e){var t=Fo(this);Ni(t,String(e)+":",di)})),username:Qi(Gi,(function(e){var t=Fo(this),n=xn(String(e));if(!fi(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=ai(n[r],ii)}})),password:Qi(Hi,(function(e){var t=Fo(this),n=xn(String(e));if(!fi(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=ai(n[r],ii)}})),host:Qi(Vi,(function(e){var t=Fo(this);t.cannotBeABaseURL||Ni(t,String(e),Ri)})),hostname:Qi(zi,(function(e){var t=Fo(this);t.cannotBeABaseURL||Ni(t,String(e),Ai)})),port:Qi(Wi,(function(e){var t=Fo(this);fi(t)||(""==(e=String(e))?t.port=null:Ni(t,e,Li))})),pathname:Qi(Ki,(function(e){var t=Fo(this);t.cannotBeABaseURL||(t.path=[],Ni(t,e+"",Pi))})),search:Qi($i,(function(e){var t=Fo(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Ni(t,e,Ci)),No(t.searchParams).updateSearchParams(t.query)})),searchParams:Qi(Ji),hash:Qi(Yi,(function(e){var t=Fo(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Ni(t,e,_i)):t.fragment=null}))}),ne(Fi,"toJSON",(function(){return qi.call(this)}),{enumerable:!0}),ne(Fi,"toString",(function(){return qi.call(this)}),{enumerable:!0}),Co){var Xi=Co.createObjectURL,Zi=Co.revokeObjectURL;Xi&&ne(Bi,"createObjectURL",(function(e){return Xi.apply(Co,arguments)})),Zi&&ne(Bi,"revokeObjectURL",(function(e){return Zi.apply(Co,arguments)}))}Gn(Bi,"URL"),Pe({global:!0,forced:!$r,sham:!a},{URL:Bi});var ea=function(e,t){return(ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var ta=function(){return(ta=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function na(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function ra(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var oa,ia,aa,ua=o.Promise,ca=Me("species"),la=n((function(e){var t=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,n,r,o,i){var a,u,c,l,f,s,h,p=tt(n,r,o?2:1);if(i)a=e;else{if("function"!=typeof(u=En(e)))throw TypeError("Target is not iterable");if(dn(u)){for(c=0,l=fe(e.length);l>c;c++)if((f=o?p(L(h=e[c])[0],h[1]):p(e[c]))&&f instanceof t)return f;return new t(!1)}a=u.call(e)}for(s=a.next;!(h=s.call(a)).done;)if("object"==typeof(f=sn(a,p,h.value,o))&&f&&f instanceof t)return f;return new t(!1)}).stop=function(e){return new t(!0,e)}})),fa=Me("species"),sa=/(iphone|ipod|ipad).*applewebkit/i.test(He),ha=o.location,pa=o.setImmediate,va=o.clearImmediate,da=o.process,ya=o.MessageChannel,ga=o.Dispatch,ma=0,ba={},wa=function(e){if(ba.hasOwnProperty(e)){var t=ba[e];delete ba[e],t()}},Sa=function(e){return function(){wa(e)}},Ea=function(e){wa(e.data)},xa=function(e){o.postMessage(e+"",ha.protocol+"//"+ha.host)};pa&&va||(pa=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return ba[++ma]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},oa(ma),ma},va=function(e){delete ba[e]},"process"==h(da)?oa=function(e){da.nextTick(Sa(e))}:ga&&ga.now?oa=function(e){ga.now(Sa(e))}:ya&&!sa?(aa=(ia=new ya).port2,ia.port1.onmessage=Ea,oa=tt(aa.postMessage,aa,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||i(xa)||"file:"===ha.protocol?oa="onreadystatechange"in x("script")?function(e){Xt.appendChild(x("script")).onreadystatechange=function(){Xt.removeChild(this),wa(e)}}:function(e){setTimeout(Sa(e),0)}:(oa=xa,o.addEventListener("message",Ea,!1)));var ka,Ra,Aa,La,ja,Oa,Ta,Pa,Ua={set:pa,clear:va},Ia=A.f,Ca=Ua.set,_a=o.MutationObserver||o.WebKitMutationObserver,Na=o.process,Ba=o.Promise,Fa="process"==h(Na),qa=Ia(o,"queueMicrotask"),Ma=qa&&qa.value;Ma||(ka=function(){var e,t;for(Fa&&(e=Na.domain)&&e.exit();Ra;){t=Ra.fn,Ra=Ra.next;try{t()}catch(e){throw Ra?La():Aa=void 0,e}}Aa=void 0,e&&e.enter()},Fa?La=function(){Na.nextTick(ka)}:_a&&!sa?(ja=!0,Oa=document.createTextNode(""),new _a(ka).observe(Oa,{characterData:!0}),La=function(){Oa.data=ja=!ja}):Ba&&Ba.resolve?(Ta=Ba.resolve(void 0),Pa=Ta.then,La=function(){Pa.call(Ta,ka)}):La=function(){Ca.call(o,ka)});var Da,Ga,Ha,Va,za=Ma||function(e){var t={fn:e,next:void 0};Aa&&(Aa.next=t),Ra||(Ra=t,La()),Aa=t},Wa=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=et(t),this.reject=et(n)},Ka={f:function(e){return new Wa(e)}},$a=function(e,t){if(L(e),g(t)&&t.constructor===e)return t;var n=Ka.f(e);return(0,n.resolve)(t),n.promise},Ja=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Ya=Ua.set,Qa=Me("species"),Xa="Promise",Za=te.get,eu=te.set,tu=te.getterFor(Xa),nu=ua,ru=o.TypeError,ou=o.document,iu=o.process,au=ie("fetch"),uu=Ka.f,cu=uu,lu="process"==h(iu),fu=!!(ou&&ou.createEvent&&o.dispatchEvent),su=Oe(Xa,(function(){if(!(B(nu)!==String(nu))){if(66===Ke)return!0;if(!lu&&"function"!=typeof PromiseRejectionEvent)return!0}if(Ke>=51&&/native code/.test(nu))return!1;var e=nu.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[Qa]=t,!(e.then((function(){}))instanceof t)})),hu=su||!jn((function(e){nu.all(e).catch((function(){}))})),pu=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},vu=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;za((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var u,c,l,f=r[a++],s=i?f.ok:f.fail,h=f.resolve,p=f.reject,v=f.domain;try{s?(i||(2===t.rejection&&mu(e,t),t.rejection=1),!0===s?u=o:(v&&v.enter(),u=s(o),v&&(v.exit(),l=!0)),u===f.promise?p(ru("Promise-chain cycle")):(c=pu(u))?c.call(u,h,p):h(u)):p(o)}catch(e){v&&!l&&v.exit(),p(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&yu(e,t)}))}},du=function(e,t,n){var r,i;fu?((r=ou.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),o.dispatchEvent(r)):r={promise:t,reason:n},(i=o["on"+e])?i(r):"unhandledrejection"===e&&function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},yu=function(e,t){Ya.call(o,(function(){var n,r=t.value;if(gu(t)&&(n=Ja((function(){lu?iu.emit("unhandledRejection",r,e):du("unhandledrejection",e,r)})),t.rejection=lu||gu(t)?2:1,n.error))throw n.value}))},gu=function(e){return 1!==e.rejection&&!e.parent},mu=function(e,t){Ya.call(o,(function(){lu?iu.emit("rejectionHandled",e):du("rejectionhandled",e,t.value)}))},bu=function(e,t,n,r){return function(o){e(t,n,o,r)}},wu=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,vu(e,t,!0))},Su=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw ru("Promise can't be resolved itself");var o=pu(n);o?za((function(){var r={done:!1};try{o.call(n,bu(Su,e,r,t),bu(wu,e,r,t))}catch(n){wu(e,r,n,t)}})):(t.value=n,t.state=1,vu(e,t,!1))}catch(n){wu(e,{done:!1},n,t)}}};function Eu(e){return function(t){return[e,t]}}su&&(nu=function(e){Jr(this,nu,Xa),et(e),Da.call(this);var t=Za(this);try{e(bu(Su,this,t),bu(wu,this,t))}catch(e){wu(this,t,e)}},(Da=function(e){eu(this,{type:Xa,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=uo(nu.prototype,{then:function(e,t){var n,r,o,i=tu(this),a=uu((n=nu,void 0===(o=L(this).constructor)||null==(r=L(o)[fa])?n:et(r)));return a.ok="function"!=typeof e||e,a.fail="function"==typeof t&&t,a.domain=lu?iu.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&vu(this,i,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),Ga=function(){var e=new Da,t=Za(e);this.promise=e,this.resolve=bu(Su,e,t),this.reject=bu(wu,e,t)},Ka.f=uu=function(e){return e===nu||e===Ha?new Ga(e):cu(e)},"function"==typeof ua&&(Va=ua.prototype.then,ne(ua.prototype,"then",(function(e,t){var n=this;return new nu((function(e,t){Va.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof au&&Pe({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return $a(nu,au.apply(o,arguments))}}))),Pe({global:!0,wrap:!0,forced:su},{Promise:nu}),Gn(nu,Xa,!1),function(e){var t=ie(e),n=O.f;a&&t&&!t[ca]&&n(t,ca,{configurable:!0,get:function(){return this}})}(Xa),Ha=ie(Xa),Pe({target:Xa,stat:!0,forced:su},{reject:function(e){var t=uu(this);return t.reject.call(void 0,e),t.promise}}),Pe({target:Xa,stat:!0,forced:su},{resolve:function(e){return $a(this,e)}}),Pe({target:Xa,stat:!0,forced:hu},{all:function(e){var t=this,n=uu(t),r=n.resolve,o=n.reject,i=Ja((function(){var n=et(t.resolve),i=[],a=0,u=1;la(e,(function(e){var c=a++,l=!1;i.push(void 0),u++,n.call(t,e).then((function(e){l||(l=!0,i[c]=e,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=uu(t),r=n.reject,o=Ja((function(){var o=et(t.resolve);la(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var xu=Eu((function(e,t){var n=t.state,r=t.urlQuery,o=new URL(window.location.href);null!=r&&(o.search=r),history.pushState(n,document.title,o.href)})),ku=Eu((function(e,t){var n=t.file,r=t.onSuccess,o=t.onError,i=new FileReader;i.onload=function(t){var n,o,i;e(r,null!==(i=null===(o=null===(n=t.target)||void 0===n?void 0:n.result)||void 0===o?void 0:o.toString())&&void 0!==i?i:"")},o&&(i.onerror=function(){return e(o,i.error)}),i.readAsText(n,"utf8")})),Ru=Eu((function(e,t){var n=t.key,r=t.session,o=t.onSuccess,i=(r?window.sessionStorage:window.localStorage).getItem(n);null==i||e(o,JSON.parse(i))})),Au=Eu((function(e,t){var n=t.key,r=t.value,o=t.session?window.sessionStorage:window.localStorage;null==r?o.removeItem(n):o.setItem(n,JSON.stringify(r))})),Lu=function(e){function t(t){var n=this.constructor,r=e.call(this,t.status+" "+t.statusText)||this;return r.response=t,Object.setPrototypeOf(r,n.prototype),r}return function(e,t){function n(){this.constructor=e}ea(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),ju=Eu((function(e,t){var n=t.url,r=t.options,o=void 0===r?{}:r,i=t.onSuccess,a=t.onError;o.headers=ta(ta({},o.headers),{accept:"application/json"}),fetch(n,o).then((function(e){return na(void 0,void 0,void 0,(function(){return ra(this,(function(t){switch(t.label){case 0:if(!e.ok)throw new Lu(e);return[4,e.json()];case 1:return[2,t.sent()]}}))}))})).then((function(t){return e(i,t)})).catch((function(t){return e(a,t)}))})),Ou=Eu((function(e,t){document.title=t})),Tu={mainView:"BLANK",fileUrl:null,title:".ipynb viewer",notebook:null,error:null,dragover:!1,historyIdx:0,fromHistory:!1},Pu=function(e){return!!e&&!!Array.from(e.items).find((function(e){return"file"===e.kind}))},Uu=function(e){var t=new URL(e),n=t.host,r=t.pathname;switch(n){case"gist.github.com":return"https://gist.githubusercontent.com"+r+"/raw/";default:return e}},Iu=function(e){var t={};return e.fileUrl&&(t.url=e.fileUrl),new URLSearchParams(t).toString()},Cu=function(){var e=new URLSearchParams(window.location.search).get("url");return e?Mu(ta(ta({},Tu),{fileUrl:e})):Tu},_u=function(t,n){var r;if(!function(e){return"object"===Rt(e)&&!!(null==e?void 0:e.metadata)&&!!(null==e?void 0:e.cells)}(n="string"==typeof n?JSON.parse(n):n))return[Bu,{title:"Invalid Format",message:"The file is not in Jupyter Notebook format."}];var o=null!==(r=e.readNotebookTitle(n))&&void 0!==r?r:Tu.title,i=[Ou(o)];return t.fromHistory||(t.historyIdx++,i.push(Au({key:"notebook/"+t.historyIdx,value:n,session:!0}),xu({state:ta(ta({},t),{notebook:null}),urlQuery:Iu(t)}))),function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}([ta(ta({},t),{title:o,notebook:n,mainView:"NOTEBOOK",fromHistory:!1,error:null})],i)},Nu=function(e){return[e=ta(ta({},e),{mainView:"BLANK",fileUrl:null,notebook:null}),Ou(Tu.title),xu({state:e,urlQuery:""})]},Bu=function(e,t){var n="title"in t?t.title:"Error",r=t.message,o=t.message;return t instanceof SyntaxError&&t.message.startsWith("JSON.parse:")?(n="Malformed Notebook",r="The file is not a valid JSON."):t instanceof Lu?(n="HTTP Error",r="Failed to fetch notebook from the given address."):t instanceof TypeError&&("Failed to fetch"===t.message||t.message.startsWith("NetworkError "))?(n="Network Error",r="Failed to fetch notebook from the given address."):o="",console.error(t),ta(ta({},e),{mainView:"ERROR",error:{title:n,message:r,detail:o},notebook:null})},Fu=function(e){return e.fileUrl?Mu:Nu},qu=function(e,t){return ta(ta({},e),{fileUrl:t})},Mu=function(e){return[ta(ta({},e),{mainView:"FETCHING",notebook:null}),ju({url:Uu(e.fileUrl),options:{mode:"cors",redirect:"follow",referrerPolicy:"no-referrer"},onSuccess:_u,onError:Bu})]},Du=function(e,t){return[ta(ta({},e),{fileUrl:null}),ku({file:t,onSuccess:_u})]},Gu=function(e,t){var n;return[ta(ta({},e=null!==(n=t.state)&&void 0!==n?n:e),{fromHistory:!0}),Ru({key:"notebook/"+e.historyIdx,session:!0,onSuccess:_u})]},Hu=function(e,t){return Pu(t.dataTransfer)?(t.preventDefault(),t.dataTransfer.dropEffect="copy",ta(ta({},e),{dragover:!0})):e},Vu=function(e){return ta(ta({},e),{dragover:!1})},zu=function(e,t){var n;if(!Pu(t.dataTransfer))return e;t.preventDefault();var r=null===(n=t.dataTransfer.files)||void 0===n?void 0:n[0];return[ta(ta({},e),{dragover:!1,fileUrl:null}),ku({file:r,onSuccess:_u})]},Wu=Wt("dragover"),Ku=Wt("dragleave"),$u=Wt("drop"),Ju=Wt("popstate");function Yu(e){var t,n,r=null===(n=null===(t=e.target)||void 0===t?void 0:t.files)||void 0===n?void 0:n[0];if(!r)throw TypeError("Event doesn't contain any file");return r}var Qu=e.createRenderer(document),Xu=function(e){return Vt("body",{class:{dragover:e.dragover}},Vt(Zu,{fileUrl:e.fileUrl}),Vt("main",null,(t=e.mainView,{ERROR:function(){return Vt(tc,{error:e.error})},FETCHING:function(){return Vt(nc,null)},NOTEBOOK:function(){return Vt(Ht,{view:ec,notebook:e.notebook})},BLANK:function(){return null}}[t](t))));var t},Zu=function(e){var t=e.fileUrl;return Vt("header",{id:"header"},Vt("a",{class:"logo",href:"/"},"ipynb",Vt("sup",null,"viewer")),Vt("label",{class:"file-label",title:"Open a notebook"},Vt("input",{class:"file-input",type:"file",accept:".ipynb, .json, application/x-ipynb+json",onchange:[Du,Yu]})),Vt("form",{class:"url-form",onSubmit:$t(Fu)},Vt("input",{class:"url-input",name:"url",type:"url",placeholder:"Notebook URL",title:"URL of ipynb file or Gist with ipynb file to render",pattern:"https?://.*",value:t,onchange:[qu,Jt]})),Vt("a",{class:"github-link",href:"https://github.com/jirutka/ipynb2html",title:"Projects homepage"},"GitHub"))},ec=function(e){var t=e.notebook;return Vt("div",{class:"nb-notebook",innerHTML:Qu(t).innerHTML})},tc=function(e){var t=e.error;return Vt("aside",{class:"error",role:"alert"},Vt("h2",null,t.title),Vt("details",null,Vt("summary",null,t.message),Vt("p",null,t.detail)))},nc=function(){return Vt("aside",{class:"fetching",role:"alert"},Vt("p",null,"Fetching notebook…"))};return function(){return zt({node:document.body,init:Cu,view:Xu,subscriptions:function(){return[Wu(Hu),Ku($t(Vu)),$u(zu),Ju(Gu)]}})}}));
//# sourceMappingURL=ipynb-viewer.bb5d0a15.js.map