forked from Arquisoft/dechat_en3a
-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
15 lines (15 loc) · 203 KB
/
popup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=120)}([function(e,t){var n=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";n.d(t,"c",function(){return a}),n.d(t,"b",function(){return c}),n.d(t,"a",function(){return M}),n.d(t,"e",function(){return U}),n.d(t,"d",function(){return r});var r={},o=[],i=[];function a(e,t){var n,a,u,s,c=i;for(s=arguments.length;s-- >2;)o.push(arguments[s]);for(t&&null!=t.children&&(o.length||o.push(t.children),delete t.children);o.length;)if((a=o.pop())&&void 0!==a.pop)for(s=a.length;s--;)o.push(a[s]);else"boolean"==typeof a&&(a=null),(u="function"!=typeof e)&&(null==a?a="":"number"==typeof a?a=String(a):"string"!=typeof a&&(u=!1)),u&&n?c[c.length-1]+=a:c===i?c=[a]:c.push(a),n=u;var f=new function(){};return f.nodeName=e,f.children=c,f.attributes=null==t?void 0:t,f.key=null==t?void 0:t.key,void 0!==r.vnode&&r.vnode(f),f}function u(e,t){for(var n in t)e[n]=t[n];return e}var s="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(e,t){return a(e.nodeName,u(u({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,l=[];function p(e){!e._dirty&&(e._dirty=!0)&&1==l.push(e)&&(r.debounceRendering||s)(d)}function d(){var e,t=l;for(l=[];e=t.pop();)e._dirty&&C(e)}function h(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&y(e,t.nodeName):n||e._componentConstructor===t.nodeName}function y(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function v(e){var t=u({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function g(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===f.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,b,a):e.removeEventListener(t,b,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)!function(e,t,n){try{e[t]=n}catch(e){}}(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var u=o&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?u?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(u?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function b(e){return this._listeners[e.type](r.event&&r.event(e)||e)}var w=[],_=0,x=!1,S=!1;function k(){for(var e;e=w.pop();)r.afterMount&&r.afterMount(e),e.componentDidMount&&e.componentDidMount()}function E(e,t,n,r,o,i){_++||(x=null!=o&&void 0!==o.ownerSVGElement,S=null!=e&&!("__preactattr_"in e));var a=O(e,t,n,r,i);return o&&a.parentNode!==o&&o.appendChild(a),--_||(S=!1,i||k()),a}function O(e,t,n,r,o){var i=e,a=x;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),A(e,!0))),i.__preactattr_=!0,i;var u=t.nodeName;if("function"==typeof u)return function(e,t,n,r){var o=e&&e._component,i=o,a=e,u=o&&e._componentConstructor===t.nodeName,s=u,c=v(t);for(;o&&!s&&(o=o._parentComponent);)s=o.constructor===t.nodeName;o&&s&&(!r||o._component)?(I(o,c,3,n,r),e=o.base):(i&&!u&&(N(i),e=a=null),o=T(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,a=null),I(o,c,1,n,r),e=o.base,a&&e!==a&&(a._component=null,A(a,!1)));return e}(e,t,n,r);if(x="svg"===u||"foreignObject"!==u&&x,u=String(u),(!e||!y(e,u))&&(i=function(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}(u,x),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),A(e,!0)}var s=i.firstChild,c=i.__preactattr_,f=t.children;if(null==c){c=i.__preactattr_={};for(var l=i.attributes,p=l.length;p--;)c[l[p].name]=l[p].value}return!S&&f&&1===f.length&&"string"==typeof f[0]&&null!=s&&void 0!==s.splitText&&null==s.nextSibling?s.nodeValue!=f[0]&&(s.nodeValue=f[0]):(f&&f.length||null!=s)&&function(e,t,n,r,o){var i,a,u,s,c,f=e.childNodes,l=[],p={},d=0,y=0,v=f.length,g=0,b=t?t.length:0;if(0!==v)for(var w=0;w<v;w++){var _=f[w],x=_.__preactattr_,S=b&&x?_._component?_._component.__key:x.key:null;null!=S?(d++,p[S]=_):(x||(void 0!==_.splitText?!o||_.nodeValue.trim():o))&&(l[g++]=_)}if(0!==b)for(var w=0;w<b;w++){s=t[w],c=null;var S=s.key;if(null!=S)d&&void 0!==p[S]&&(c=p[S],p[S]=void 0,d--);else if(!c&&y<g)for(i=y;i<g;i++)if(void 0!==l[i]&&h(a=l[i],s,o)){c=a,l[i]=void 0,i===g-1&&g--,i===y&&y++;break}c=O(c,s,n,r),u=f[w],c&&c!==e&&c!==u&&(null==u?e.appendChild(c):c===u.nextSibling?m(u):e.insertBefore(c,u))}if(d)for(var w in p)void 0!==p[w]&&A(p[w],!1);for(;y<=g;)void 0!==(c=l[g--])&&A(c,!1)}(i,f,n,r,S||null!=c.dangerouslySetInnerHTML),function(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||g(e,r,n[r],n[r]=void 0,x);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||g(e,r,n[r],n[r]=t[r],x)}(i,t.attributes,c),x=a,i}function A(e,t){var n=e._component;n?N(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||m(e),P(e))}function P(e){for(e=e.lastChild;e;){var t=e.previousSibling;A(e,!0),e=t}}var j={};function T(e,t,n){var r,o=j[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),M.call(r,t,n)):((r=new M(t,n)).constructor=e,r.render=R),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function R(e,t,n){return this.constructor(e,n)}function I(e,t,n,o,i){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||i?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,o),o&&o!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=o),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===r.syncComponentUpdates&&e.base?p(e):C(e,1,i)),e.__ref&&e.__ref(e))}function C(e,t,n,o){if(!e._disable){var i,a,s,c=e.props,f=e.state,l=e.context,p=e.prevProps||c,d=e.prevState||f,h=e.prevContext||l,y=e.base,m=e.nextBase,g=y||m,b=e._component,x=!1;if(y&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(c,f,l)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(c,f,l),e.props=c,e.state=f,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){i=e.render(c,f,l),e.getChildContext&&(l=u(u({},l),e.getChildContext()));var S,O,P=i&&i.nodeName;if("function"==typeof P){var j=v(i);(a=b)&&a.constructor===P&&j.key==a.__key?I(a,j,1,l,!1):(S=a,e._component=a=T(P,j,l),a.nextBase=a.nextBase||m,a._parentComponent=e,I(a,j,0,l,!1),C(a,1,n,!0)),O=a.base}else s=g,(S=b)&&(s=e._component=null),(g||1===t)&&(s&&(s._component=null),O=E(s,i,l,n||!y,g&&g.parentNode,!0));if(g&&O!==g&&a!==b){var R=g.parentNode;R&&O!==R&&(R.replaceChild(O,g),S||(g._component=null,A(g,!1)))}if(S&&N(S),e.base=O,O&&!o){for(var M=e,U=e;U=U._parentComponent;)(M=U).base=O;O._component=M,O._componentConstructor=M.constructor}}if(!y||n?w.unshift(e):x||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),r.afterUpdate&&r.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);_||o||k()}}function N(e){r.beforeUnmount&&r.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?N(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,m(t),function(e){var t=e.constructor.name;(j[t]||(j[t]=[])).push(e)}(e),P(t)),e.__ref&&e.__ref(null)}function M(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function U(e,t,n){return E(n,e,{},!1,t,!1)}u(M.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=u({},n)),u(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),p(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),C(this,2)},render:function(){}})},function(e,t,n){var r=n(55)("wks"),o=n(37),i=n(3).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";e.exports={Formats:n(99),Initializer:n(100),JSONDocument:n(183),JSONMapping:n(184),JSONPatch:n(101),JSONPointer:n(69),JSONSchema:n(185),Validator:n(102)}},function(e,t,n){var r=n(3),o=n(0),i=n(20),a=n(15),u=n(16),s=function(e,t,n){var c,f,l,p=e&s.F,d=e&s.G,h=e&s.S,y=e&s.P,v=e&s.B,m=e&s.W,g=d?o:o[t]||(o[t]={}),b=g.prototype,w=d?r:h?r[t]:(r[t]||{}).prototype;for(c in d&&(n=t),n)(f=!p&&w&&void 0!==w[c])&&u(g,c)||(l=f?w[c]:n[c],g[c]=d&&"function"!=typeof w[c]?n[c]:v&&f?i(l,r):m&&w[c]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):y&&"function"==typeof l?i(Function.call,l):l,y&&((g.virtual||(g.virtual={}))[c]=l,e&s.R&&b&&!b[c]&&a(b,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r=n(10);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=n(126)},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(12));t.default=function(e){return function(){var t=e.apply(this,arguments);return new r.default(function(e,n){return function o(i,a){try{var u=t[i](a),s=u.value}catch(e){return void n(e)}if(!u.done)return r.default.resolve(s).then(function(e){o("next",e)},function(e){o("throw",e)});e(s)}("next")})}}},function(e,t,n){var r=n(6),o=n(72),i=n(50),a=Object.defineProperty;t.f=n(11)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(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}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(21)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports={default:n(128),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(64));t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,r.default)(e,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){var r=n(9),o=n(26);e.exports=n(11)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postMessageStorage=t.memStorage=t.updateStorage=t.getData=t.defaultStorage=t.NAMESPACE=void 0;var r=c(n(12)),o=c(n(65)),i=c(n(7)),a=c(n(8)),u=t.getData=function(){var e=(0,a.default)(i.default.mark(function e(t){var n,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0,r=void 0,e.prev=2,e.next=5,t.getItem(f);case 5:n=e.sent,r=JSON.parse(n||"{}"),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(2),console.warn("Could not deserialize data:",n),console.error(e.t0),r={};case 14:return e.abrupt("return",r);case 15:case"end":return e.stop()}},e,this,[[2,9]])}));return function(t){return e.apply(this,arguments)}}();t.updateStorage=function(){var e=(0,a.default)(i.default.mark(function e(t,n){var r,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u(t);case 2:return r=e.sent,a=n(r),e.next=6,t.setItem(f,(0,o.default)(a));case 6:return e.abrupt("return",a);case 7:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}();t.asyncStorage=l;var s=n(32);function c(e){return e&&e.__esModule?e:{default:e}}var f=t.NAMESPACE="solid-auth-client";t.defaultStorage=function(){try{if(window&&window.localStorage)return l(window.localStorage)}catch(e){if(!(e instanceof ReferenceError))throw e}return console.warn("'window.localStorage' unavailable. Creating a (not very useful) in-memory storage object as the default storage interface."),l(p())};function l(e){return{getItem:function(t){return r.default.resolve(e.getItem(t))},setItem:function(t,n){return r.default.resolve(e.setItem(t,n))},removeItem:function(t){return r.default.resolve(e.removeItem(t))}}}var p=t.memStorage=function(){var e={};return{getItem:function(t){return void 0===e[t]?null:e[t]},setItem:function(t,n){e[t]=n},removeItem:function(t){delete e[t]}}};t.postMessageStorage=function(e,t){var n=(0,s.client)(e,t);return{getItem:function(){var e=(0,a.default)(i.default.mark(function e(t){var r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({method:"storage/getItem",args:[t]});case 2:if("string"==typeof(r=e.sent)){e.next=5;break}throw new Error("expected postMessage call for 'storage/getItem' to return a string, but got value "+r);case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}(),setItem:function(e,t){return n({method:"storage/setItem",args:[e,t]})},removeItem:function(e){return n({method:"storage/removeItem",args:[e]})}}}},function(e,t,n){e.exports=n(186).default,e.exports.default=e.exports},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(35));t.default=r.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){var r=n(36);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){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)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(74),o=n(51);e.exports=function(e){return r(o(e))}},function(e,t){e.exports={}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var r=n(187),o=n(188),i=n(189);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|d(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?u(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=u(e,t<0?0:0|d(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){var i,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var f=-1;for(i=n;i<u;i++)if(c(e,i)===c(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===s)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var l=!0,p=0;p<s;p++)if(c(e,i+p)!==c(t,p)){l=!1;break}if(l)return i}return-1}function g(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function b(e,t,n,r){return F(z(t,e.length-n),e,n,r)}function w(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return w(e,t,n,r)}function x(e,t,n,r){return F(J(t),e,n,r)}function S(e,t,n,r){return F(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,c=e[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(f=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=l}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=O));return n}(r)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return c(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?u(e,t):void 0!==n?"string"==typeof r?u(e,t).fill(n,r):u(e,t).fill(n):u(e,t)}(null,e,t,n)},s.allocUnsafe=function(e){return l(null,e)},s.allocUnsafeSlow=function(e){return l(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var i=o-r,a=n-t,u=Math.min(i,a),c=this.slice(r,o),f=e.slice(t,n),l=0;l<u;++l)if(c[l]!==f[l]){i=c[l],a=f[l];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return g(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function j(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=D(e[i]);return o}function T(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function C(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=s.prototype;else{var o=t-e;n=new s(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,a=1,u=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,a=1,u=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=s.isBuffer(e)?e:z(new s(e,r).toString()),u=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%u]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(24))},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(73),o=n(56);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(51);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var r=n(129)(!0);n(76)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"version",function(){return a}),n.d(t,"DOM",function(){return O}),n.d(t,"Children",function(){return k}),n.d(t,"render",function(){return g}),n.d(t,"createClass",function(){return B}),n.d(t,"createFactory",function(){return E}),n.d(t,"createElement",function(){return j}),n.d(t,"cloneElement",function(){return R}),n.d(t,"isValidElement",function(){return I}),n.d(t,"findDOMNode",function(){return U}),n.d(t,"unmountComponentAtNode",function(){return _}),n.d(t,"Component",function(){return K}),n.d(t,"PureComponent",function(){return W}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return w}),n.d(t,"__spread",function(){return N});var r=n(48),o=n.n(r);n.d(t,"PropTypes",function(){return o.a});var i=n(1),a="15.1.0",u="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),s="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,c="undefined"!=typeof Symbol&&Symbol.for?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",f={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},l=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,p={},d=void 0===e||!e.env||!1;function h(){return null}var y=Object(i.c)("a",null).constructor;y.prototype.$$typeof=s,y.prototype.preactCompatUpgraded=!1,y.prototype.preactCompatNormalized=!1,Object.defineProperty(y.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(y.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var v=i.d.event;i.d.event=function(e){return v&&(e=v(e)),e.persist=Object,e.nativeEvent=e,e};var m=i.d.vnode;function g(e,t,n){var r=t&&t._preactCompatRendered&&t._preactCompatRendered.base;r&&r.parentNode!==t&&(r=null),!r&&t&&(r=t.firstElementChild);for(var o=t.childNodes.length;o--;)t.childNodes[o]!==r&&t.removeChild(t.childNodes[o]);var a=Object(i.e)(e,t,r);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof n&&n(),a&&a._component||a}i.d.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=N({},e.attributes);"function"==typeof t?(!0===t[c]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||T(e),function(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&N(e.attributes,t.defaultProps);n&&N(e.attributes,n)}(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),function(e,t){var n,r,o;if(t){for(o in t)if(n=l.test(o))break;if(n)for(o in r=e.attributes={},t)t.hasOwnProperty(o)&&(r[l.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}(e,n))}m&&m(e)};var b=function(){};function w(e,t,n,r){var o=g(Object(i.c)(b,{context:e.context},t),n),a=o._component||o.base;return r&&r.call(a,o),a}function _(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(Object(i.e)(Object(i.c)(h),e,t),!0)}b.prototype.getChildContext=function(){return this.props.context},b.prototype.render=function(e){return e.children[0]};var x,S=[],k={map:function(e,t,n){return null==e?null:(e=k.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=k.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(1!==(e=k.toArray(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:S.concat(e)}};function E(e){return j.bind(null,e)}for(var O={},A=u.length;A--;)O[u[A]]=E(u[A]);function P(e){var t=e[c];return t?!0===t?e:t:(t=function(e){return B({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}(e),Object.defineProperty(t,c,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,c,{configurable:!0,value:t}),t)}function j(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function e(t,n){for(var r=n||0;r<t.length;r++){var o=t[r];Array.isArray(o)?e(o):o&&"object"==typeof o&&!I(o)&&(o.props&&o.type||o.attributes&&o.nodeName||o.children)&&(t[r]=j(o.type||o.nodeName,o.props||o.attributes,o.children))}}(e,2),T(i.c.apply(void 0,e))}function T(e){e.preactCompatNormalized=!0,function(e){var t=e.attributes||(e.attributes={});C.enumerable="className"in t,t.className&&(t.class=t.className);Object.defineProperty(t,"className",C)}(e),function(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}(e.nodeName)&&(e.nodeName=P(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!x||"string"!==n&&"number"!==n||(e.attributes.ref=function(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}(t,x)),function(e){var t=e.nodeName,n=e.attributes;if(!n||"string"!=typeof t)return;var r={};for(var o in n)r[o.toLowerCase()]=o;r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]);if(r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=r.oninput||"oninput";n[i]||(n[i]=z([n[i],n[r.onchange]]),delete n[r.onchange])}}(e),e}function R(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];if(!I(e))return e;var o=e.attributes||e.props,a=[Object(i.c)(e.nodeName||e.type,N({},o),e.children||o&&o.children),t];return n&&n.length?a.push(n):t&&t.children&&a.push(t.children),T(i.b.apply(void 0,a))}function I(e){return e&&(e instanceof y||e.$$typeof===s)}var C={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};function N(e,t){for(var n=arguments,r=1,o=void 0;r<arguments.length;r++)if(o=n[r])for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e}function M(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function U(e){return e&&e.base||e}function L(){}function B(e){function t(e,t){!function(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||f.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}(this),K.call(this,e,t,p),J.call(this,e,t)}return(e=N({constructor:t},e)).mixins&&function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=z(t[n].concat(e[n]||S),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}(e,function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}(e.mixins)),e.statics&&N(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps.call(t)),L.prototype=K.prototype,t.prototype=N(new L,e),t.displayName=e.displayName||"Component",t}function D(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function z(e,t){return function(){for(var n,r=arguments,o=0;o<e.length;o++){var i=D(this,e[o],r);if(t&&null!=i)for(var a in n||(n={}),i)i.hasOwnProperty(a)&&(n[a]=i[a]);else void 0!==i&&(n=i)}return n}}function J(e,t){F.call(this,e,t),this.componentWillReceiveProps=z([F,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=z([F,H,this.render||"render",q])}function F(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof y)&&(e.children=n[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),d){var r="function"==typeof this?this:this.constructor,i=this.propTypes||r.propTypes,a=this.displayName||r.name;i&&o.a.checkPropTypes(i,e,"prop",a)}}}function H(e){x=this}function q(){x===this&&(x=null)}function K(e,t,n){i.a.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==p&&J.call(this,e,t)}function W(e,t){K.call(this,e,t)}N(K.prototype=new i.a,{constructor:K,isReactComponent:{},replaceState:function(e,t){for(var n in this.setState(e,t),this.state)n in e||delete this.state[n]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),L.prototype=K.prototype,W.prototype=new L,W.prototype.isPureReactComponent=!0,W.prototype.shouldComponentUpdate=function(e,t){return M(this.props,e)||M(this.state,t)};var V={version:a,DOM:O,PropTypes:o.a,Children:k,render:g,createClass:B,createFactory:E,createElement:j,cloneElement:R,isValidElement:I,findDOMNode:U,unmountComponentAtNode:_,Component:K,PureComponent:W,unstable_renderSubtreeIntoContainer:w,__spread:N};t.default=V}.call(this,n(87))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineHandlers=t.server=t.client=void 0;var r=c(n(7)),o=c(n(8)),i=c(n(12)),a=c(n(42)),u=c(n(90)),s=c(n(161));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){return(0,u.default)({},"solid-auth-client",e)},l=function(e){if(!e||"object"!==(void 0===e?"undefined":(0,a.default)(e)))return null;var t=e["solid-auth-client"];return t&&"object"===(void 0===t?"undefined":(0,a.default)(t))?t:null},p=function(e){var t=l(e);if(!t)return null;var n=t.id,r=t.method,o=t.args;return null!=n&&"string"==typeof n&&"string"==typeof r&&Array.isArray(o)?{id:n,method:r,args:o}:null};t.client=function(e,t){return function(n){return new i.default(function(r,o){var i=(0,s.default)();window.addEventListener("message",function e(n){var o=n.data,a=n.origin,u=function(e){var t=l(e);if(!t)return null;var n=t.id,r=t.ret;return null!=n&&"string"==typeof n&&t.hasOwnProperty("ret")?{id:n,ret:r}:null}(o);"*"!==t&&a!==t||!u||u.id===i&&(r(u.ret),window.removeEventListener("message",e))}),e.postMessage({"solid-auth-client":{id:i,method:n.method,args:n.args}},t)})}},t.server=function(e,t){return function(n){var i=function(){var i=(0,o.default)(r.default.mark(function o(i){var a,u,s,c;return r.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(a=i.data,u=i.origin,s=p(a)){r.next=4;break}return r.abrupt("return");case 4:if(u===t){r.next=7;break}return console.warn("SECURITY WARNING: solid-auth-client is listening for messages from "+t+", but received a message from "+u+". Ignoring the message."),r.abrupt("return");case 7:return r.next=9,n(s);case 9:(c=r.sent)&&e.postMessage(f(c),t);case 11:case"end":return r.stop()}},o,void 0)}));return function(e){return i.apply(this,arguments)}}(),a={start:function(){return window.addEventListener("message",i),a},stop:function(){return window.removeEventListener("message",i),a}};return a}},t.combineHandlers=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.map(function(t){return t(e)}).find(function(e){return null!==e})}}},function(e,t,n){e.exports={default:n(166),__esModule:!0}},function(e,t,n){"use strict";var r=n(70),o=n(107),i=n(198),a=n(199),u=n(113),s=n(110),c=n(112),f=n(47),l=n(108),p=n(111),d=n(109);e.exports={JWA:r,JWK:o,JWKSet:i,JWT:a,JWS:u,Base64URLSchema:s,JOSEHeaderSchema:c,JWKSchema:f,JWKSetSchema:l,JWTClaimsSetSchema:p,JWTSchema:d}},function(e,t,n){e.exports={default:n(121),__esModule:!0}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=!0},function(e,t,n){var r=n(9).f,o=n(16),i=n(2)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){n(132);for(var r=n(3),o=n(15),i=n(23),a=n(2)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<u.length;s++){var c=u[s],f=r[c],l=f&&f.prototype;l&&!l[a]&&o(l,a,c),i[c]=i.Array}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(148)),o=a(n(150)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===i(r.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(42));t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(92)),o=a(n(93)),i=a(n(42));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t){e.exports=window},function(e,t){e.exports=crypto},function(e,t,n){"use strict";var r=n(4).JSONSchema,o=(n(197).BASE64_REGEXP,new r({type:"object",properties:{kty:{type:"string",enum:["RSA","EC","oct"]},use:{type:"string",enum:["sig","enc"]},key_ops:{type:"array",items:{enum:["sign","verify","encrypt","decrypt","wrapKey","unwrapKey","deriveKey","deriveBits"]}},alg:{type:"string",enum:["HS256","HS384","HS512","RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512","none"]},kid:{type:"string"},x5u:{type:"string"},x5c:{type:"array"},x5t:{type:"string"}}}));e.exports=o},function(e,t,n){e.exports=n(144)()},function(e,t,n){var r=n(10),o=n(3).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(10);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(53),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(55)("keys"),o=n(37);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(3),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(6),o=n(131),i=n(56),a=n(54)("IE_PROTO"),u=function(){},s=function(){var e,t=n(49)("iframe"),r=i.length;for(t.style.display="none",n(78).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[i[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(u.prototype=r(e),n=new u,u.prototype=null,n[a]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(28),o=n(2)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(59),o=n(2)("iterator"),i=n(23);e.exports=n(0).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r=n(36);e.exports.f=function(e){return new 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=r(t),this.reject=r(n)}(e)}},function(e,t,n){t.f=n(2)},function(e,t,n){var r=n(3),o=n(0),i=n(39),a=n(62),u=n(9).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},function(e,t,n){e.exports={default:n(159),__esModule:!0}},function(e,t,n){e.exports={default:n(164),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSession=t.getSession=void 0;var r=u(n(19)),o=u(n(7)),i=u(n(8));t.getSession=function(){var e=(0,i.default)(o.default.mark(function e(t){var n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.getData)(t);case 2:return n=e.sent,e.abrupt("return",n.session||null);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.clearSession=function(){var e=(0,i.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.updateStorage)(t,function(e){return(0,r.default)({},e,{session:null})});case 2:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}();t.saveSession=function(e){var t=this;return function(){var n=(0,i.default)(o.default.mark(function n(i){var u;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,a.updateStorage)(e,function(e){return(0,r.default)({},e,{session:i})});case 2:return u=t.sent,t.abrupt("return",u.session);case 4:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()};var a=n(17);function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchWithCredentials=t.requiresAuth=t.getRegisteredRp=t.logout=t.currentSession=t.login=void 0;var r=d(n(19)),o=d(n(7)),i=d(n(8)),a=function(){var e=(0,i.default)(o.default.mark(function e(t){var n,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.getData)(t);case 2:if(n=e.sent,!(r=n.rpConfig)){e.next=9;break}return r.store=t,e.abrupt("return",c.default.from(r));case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),u=function(){var e=(0,i.default)(o.default.mark(function e(t,n,i){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.updateStorage)(t,function(e){return(0,r.default)({},e,{rpConfig:i})});case 2:return e.abrupt("return",i);case 3:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}();n(95);var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(176)),c=d(n(179)),f=d(n(218)),l=n(71),p=n(17);function d(e){return e&&e.__esModule?e:{default:e}}t.login=function(){var e=(0,i.default)(o.default.mark(function e(t,n){var r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h(t,n);case 3:return r=e.sent,e.next=6,m(n.storage);case 6:return e.abrupt("return",v(r,n));case 9:return e.prev=9,e.t0=e.catch(0),console.warn("Error logging in with WebID-OIDC"),console.error(e.t0),e.abrupt("return",null);case 14:case"end":return e.stop()}},e,void 0,[[0,9]])}));return function(t,n){return e.apply(this,arguments)}}(),t.currentSession=function(){var e=(0,i.default)(o.default.mark(function e(){var t,n,r,i,u,s,c,f,d,h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,p.defaultStorage)();return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a(h);case 3:if(t=e.sent){e.next=6;break}return e.abrupt("return",null);case 6:if((n=(0,l.currentUrl)())&&n.includes("#")){e.next=9;break}return e.abrupt("return",null);case 9:return e.next=11,(0,p.getData)(h);case 11:return r=e.sent,e.next=14,t.validateResponse(n,r);case 14:if(i=e.sent){e.next=17;break}return e.abrupt("return",null);case 17:return e.next=19,g(h);case 19:return u=i.idp,s=i.idToken,c=i.accessToken,f=i.clientId,d=i.sessionKey,e.abrupt("return",{webId:i.decoded.payload.sub,idp:u,idToken:s,accessToken:c,clientId:f,sessionKey:d});case 23:return e.prev=23,e.t0=e.catch(0),console.warn("Error finding a WebID-OIDC session"),console.error(e.t0),e.abrupt("return",null);case 28:case"end":return e.stop()}},e,void 0,[[0,23]])}));return function(){return e.apply(this,arguments)}}(),t.logout=function(e){return a(e).then(function(e){return e?e.logout():void 0}).catch(function(e){console.warn("Error logging out of the WebID-OIDC session"),console.error(e)})};var h=t.getRegisteredRp=function(e,t){return a(t.storage).then(function(n){return n&&n.provider.url===e?n:y(e,t).then(function(n){return u(t.storage,e,n)})})},y=function(e,t){var n=t.storage,r=t.callbackUri,o={issuer:e,grant_types:["implicit"],redirect_uris:[r],response_types:["id_token token"],scope:"openid profile"},i={defaults:{authenticate:{redirect_uri:r,response_type:"id_token token"}},store:n};return c.default.register(e,o,i)},v=function(){var e=(0,i.default)(o.default.mark(function e(t,n){var r,i,a=n.callbackUri,u=n.storage;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.getData)(u);case 2:return r=e.sent,e.next=5,t.createRequest({redirect_uri:a},r);case 5:return i=e.sent,e.next=8,(0,p.updateStorage)(u,function(){return r});case 8:return e.abrupt("return",(0,l.navigateTo)(i));case 9:case"end":return e.stop()}},e,void 0)}));return function(t,n){return e.apply(this,arguments)}}(),m=function(e){return(0,p.updateStorage)(e,function(e){return(0,r.default)({},e,{appHashFragment:window.location.hash})})},g=function(e){return(0,p.updateStorage)(e,function(e){return window.location.hash=e.appHashFragment,delete e.appHashFragment,e})};t.requiresAuth=function(e){if(401!==e.status)return!1;var t=e.headers.get("www-authenticate");if(!t)return!1;var n=s.parse(t);return"Bearer"===n.scheme&&n.params&&"openid webid"===n.params.scope},t.fetchWithCredentials=function(e){return function(){var t=(0,i.default)(o.default.mark(function t(n,i){var a,u;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.default.issueFor(n,e);case 2:return a=t.sent,u=(0,r.default)({},i,{headers:(0,r.default)({},i&&i.headers?i.headers:{},{authorization:"Bearer "+a})}),t.abrupt("return",fetch(n,u));case 5:case"end":return t.stop()}},t,void 0)}));return function(e,n){return t.apply(this,arguments)}}()}},function(e,t,n){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var i=n(180),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,s="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function f(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var l=e.exports=m,p=/\s*function\s+([^\(\s]*)\s*/;function d(e){if(i.isFunction(e)){if(s)return e.name;var t=e.toString().match(p);return t&&t[1]}}function h(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function y(e){if(s||!i.isFunction(e))return i.inspect(e);var t=d(e);return"[Function"+(t?": "+t:"")+"]"}function v(e,t,n,r,o){throw new l.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}function m(e,t){e||v(e,!0,t,"==",l.ok)}function g(e,t,n,a){if(e===t)return!0;if(o(e)&&o(t))return 0===r(e,t);if(i.isDate(e)&&i.isDate(t))return e.getTime()===t.getTime();if(i.isRegExp(e)&&i.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===r(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var s=(a=a||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),function(e,t,n,r){if(null===e||void 0===e||null===t||void 0===t)return!1;if(i.isPrimitive(e)||i.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=b(e),a=b(t);if(o&&!a||!o&&a)return!1;if(o)return e=u.call(e),t=u.call(t),g(e,t,n);var s,c,f=x(e),l=x(t);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),c=f.length-1;c>=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(s=f[c],!g(e[s],t[s],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&v(o,n,"Missing expected exception"+r);var a="string"==typeof r,u=!e&&i.isError(o),s=!e&&o&&!n;if((u&&a&&w(o,n)||s)&&v(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}l.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return h(y(e.actual),128)+" "+e.operator+" "+h(y(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},i.inherits(l.AssertionError,Error),l.fail=v,l.ok=m,l.equal=function(e,t,n){e!=t&&v(e,t,n,"==",l.equal)},l.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",l.notEqual)},l.deepEqual=function(e,t,n){g(e,t,!1)||v(e,t,n,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(e,t,n){g(e,t,!0)||v(e,t,n,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(e,t,n){g(e,t,!1)&&v(e,t,n,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function e(t,n,r){g(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},l.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",l.strictEqual)},l.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",l.notStrictEqual)},l.throws=function(e,t,n){_(!0,e,t,n)},l.doesNotThrow=function(e,t,n){_(!1,e,t,n)},l.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(24))},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=0,i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.expr=t,this.mode=n||o,this.tokens=t&&"#"===t.charAt(0)?this.parseURIFragmentIdentifier(t):this.parseJSONString(t)}return r(e,[{key:"escape",value:function(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}},{key:"unescape",value:function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},{key:"parseJSONString",value:function(e){if("string"!=typeof e)throw new Error("JSON Pointer must be a string");if(""===e)return[];if("/"!==e.charAt(0))throw new Error("Invalid JSON Pointer");return"/"===e?[""]:e.substr(1).split("/").map(this.unescape)}},{key:"toJSONString",value:function(){return"/"+this.tokens.map(this.escape).join("/")}},{key:"parseURIFragmentIdentifier",value:function(e){if("string"!=typeof e)throw new Error("JSON Pointer must be a string");if("#"!==e.charAt(0))throw new Error("Invalid JSON Pointer URI Fragment Identifier");return this.parseJSONString(decodeURIComponent(e.substr(1)))}},{key:"toURIFragmentIdentifier",value:function(){var e=this;return"#/"+this.tokens.map(function(t){return encodeURIComponent(e.escape(t))}).join("/")}},{key:"get",value:function(e){for(var t=e,n=this.tokens,r=0;r<n.length;r++){if(!t||void 0===t[n[r]]){if(this.mode!==o)return;throw new Error("Invalid JSON Pointer reference")}t=t[n[r]]}return t}},{key:"add",value:function(e,t){for(var n=this.tokens,r=e,i=0;i<n.length;i++){var a=n[i];if(i===n.length-1)"-"===a?r.push(t):Array.isArray(r)?r.splice(a,0,t):void 0!==t&&(r[a]=t);else if(r[a])r=r[a];else switch(this.mode){case o:throw new Error("Invalid JSON Pointer reference");case 1:r=r[a]=parseInt(a)?[]:{};break;case 2:return;default:throw new Error("Invalid pointer mode")}}}},{key:"replace",value:function(e,t){for(var n=this.tokens,r=e,o=0;o<n.length;o++){var i=n[o];o===n.length-1?r[i]=t:r=r[i]?r[i]:r[i]=parseInt(i)?[]:{}}}},{key:"remove",value:function(e){for(var t=this.tokens,n=e,r=0;r<t.length;r++){var o=t[r];if(void 0===n||void 0===n[o])return;if(Array.isArray(n))return void n.splice(o,1);r===t.length-1&&delete n[o],n=n[o]}}}],[{key:"parse",value:function(t){return new e(t)}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(18);var o=n(191),i=n(105).NotSupportedError,a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"sign",value:function(e,t,n){var r=o.normalize("sign",e);return r instanceof Error?Promise.reject(new i(e)):r.sign(t,n)}},{key:"verify",value:function(e,t,n,r){var a=o.normalize("verify",e);return a instanceof Error?Promise.reject(new i(e)):a.verify(t,n,r)}},{key:"importKey",value:function(e){return o.normalize("importKey",e.alg).importKey(e)}}]),e}();e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.currentUrl=function(){return window.location.href},t.currentUrlNoParams=function(){return window.location.origin+window.location.pathname},t.navigateTo=function(e){window.location.href=e},t.originOf=function(e){return new URL(e).origin}},function(e,t,n){e.exports=!n(11)&&!n(21)(function(){return 7!=Object.defineProperty(n(49)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(16),o=n(22),i=n(124)(!1),a=n(54)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),s=0,c=[];for(n in u)n!=a&&r(u,n)&&c.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(28);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(39),o=n(5),i=n(77),a=n(15),u=n(23),s=n(130),c=n(40),f=n(79),l=n(2)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,y,v,m){s(n,t,h);var g,b,w,_=function(e){if(!p&&e in E)return E[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",S="values"==y,k=!1,E=e.prototype,O=E[l]||E["@@iterator"]||y&&E[y],A=O||_(y),P=y?S?_("entries"):A:void 0,j="Array"==t&&E.entries||O;if(j&&(w=f(j.call(new e)))!==Object.prototype&&w.next&&(c(w,x,!0),r||"function"==typeof w[l]||a(w,l,d)),S&&O&&"values"!==O.name&&(k=!0,A=function(){return O.call(this)}),r&&!m||!p&&!k&&E[l]||a(E,l,A),u[t]=A,u[x]=d,y)if(g={values:S?A:_("values"),keys:v?A:_("keys"),entries:P},m)for(b in g)b in E||i(E,b,g[b]);else o(o.P+o.F*(p||k),t,g);return g}},function(e,t,n){e.exports=n(15)},function(e,t,n){var r=n(3).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(16),o=n(29),i=n(54)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(6);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(23),o=n(2)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(6),o=n(36),i=n(2)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r,o,i,a=n(20),u=n(138),s=n(78),c=n(49),f=n(3),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,y=f.Dispatch,v=0,m={},g=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},b=function(e){g.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++v]=function(){u("function"==typeof e?e:Function(e),t)},r(v),v},d=function(e){delete m[e]},"process"==n(28)(l)?r=function(e){l.nextTick(a(g,e,1))}:y&&y.now?r=function(e){y.now(a(g,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(e){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:p,clear:d}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(6),o=n(10),i=n(61);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&d())}function d(){if(!f){var e=u(p);f=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||f||u(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(73),o=n(56).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(38),o=n(26),i=n(22),a=n(50),u=n(16),s=n(72),c=Object.getOwnPropertyDescriptor;t.f=n(11)?c:function(e,t){if(e=i(e),t=a(t,!0),s)try{return c(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(64));t.default=function(e,t,n){return t in e?(0,r.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r=n(5),o=n(0),i=n(21);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){e.exports={default:n(168),__esModule:!0}},function(e,t,n){e.exports={default:n(171),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logout=t.currentSession=t.popupLogin=t.login=t.fetch=void 0;var r=p(n(7)),o=p(n(19)),i=p(n(8)),a=(t.login=function(){var e=(0,i.default)(r.default.mark(function e(t,n){var i;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,o.default)({},d(),n),e.next=3,l.login(t,n);case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),t.popupLogin=function(){var e=(0,i.default)(r.default.mark(function e(t){var n,i;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.popupUri){e.next=2;break}throw new Error("Must provide options.popupUri");case 2:return/https?:/.test(t.popupUri)||(t.popupUri=new URL(t.popupUri||"",window.location).toString()),t.callbackUri||(t.callbackUri=t.popupUri),t=(0,o.default)({},d(),t),n=(0,u.openIdpSelector)(t),e.next=8,(0,u.startPopupServer)(t.storage,n,t);case 8:return i=e.sent,e.abrupt("return",i);case 10:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.currentSession=function(){var e=(0,i.default)(r.default.mark(function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,c.defaultStorage)();return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getSession)(n);case 2:if(t=e.sent){e.next=16;break}return e.prev=4,e.next=7,l.currentSession(n);case 7:t=e.sent,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),console.error(e.t0);case 13:if(!t){e.next=16;break}return e.next=16,(0,s.saveSession)(n)(t);case 16:return e.abrupt("return",t);case 17:case"end":return e.stop()}},e,this,[[4,10]])}));return function(){return e.apply(this,arguments)}}(),t.logout=function(){var e=(0,i.default)(r.default.mark(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,c.defaultStorage)();return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getSession)(t);case 2:if(!e.sent){e.next=15;break}return e.prev=4,e.next=7,l.logout(t);case 7:e.next=13;break;case 9:e.prev=9,e.t0=e.catch(4),console.warn("Error logging out:"),console.error(e.t0);case 13:return e.next=15,(0,s.clearSession)(t);case 15:case"end":return e.stop()}},e,this,[[4,9]])}));return function(){return e.apply(this,arguments)}}(),n(173)),u=n(219),s=n(66),c=n(17),f=n(71),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(67));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=(0,f.currentUrlNoParams)();return{callbackUri:e?e.split("#")[0]:null,popupUri:null,storage:(0,c.defaultStorage)()}};t.fetch=function(e,t){return(0,a.authnFetch)((0,c.defaultStorage)())(e,t)}},function(e,t,n){n(174),e.exports=self.fetch.bind(self)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/^[^\u0000-\u001F\u007F()<>@,;:\\"/?={}\[\]\u0020\u0009]+$/,o=t.isToken=function(e){return"string"==typeof e&&r.test(e)};t.isScheme=o,t.quote=function(e){return'"'+e.replace(/"/g,'\\"')+'"'},t.unquote=function(e){return e.substr(1,e.length-2).replace(/\\"/g,'"')}},function(e,t,n){"use strict";(function(t){var r=l(n(35)),o=l(n(65)),i=l(n(12)),a=l(n(33)),u=l(n(13)),s=l(n(14)),c=l(n(43)),f=l(n(44));function l(e){return e&&e.__esModule?e:{default:e}}var p=n(68),d=n(98),h=n(45).URL,y=d.Headers?d.Headers:t.Headers,v=n(4).JSONDocument,m=n(34).JWKSet,g=n(200),b=n(213),w=n(217),_=n(117),x=function(e){function t(){return(0,u.default)(this,t),(0,c.default)(this,(t.__proto__||(0,a.default)(t)).apply(this,arguments))}return(0,f.default)(t,e),(0,s.default)(t,[{key:"discover",value:function(){var e=this;try{var t=this.provider.url;p(t,'RelyingParty provider must define "url"');var n=new h(t);return n.pathname=".well-known/openid-configuration",d(n.toString()).then(_("Error fetching openid configuration")).then(function(t){return t.json().then(function(t){return e.provider.configuration=t})})}catch(e){return i.default.reject(e)}}},{key:"register",value:function(e){var t=this;try{var n=this.provider.configuration;p(n,"OpenID Configuration is not initialized."),p(n.registration_endpoint,"OpenID Configuration is missing registration_endpoint.");var a=n.registration_endpoint,u=new y({"Content-Type":"application/json"}),s=this.defaults.register,c=(0,o.default)((0,r.default)({},s,e));return d(a,{method:"post",headers:u,body:c}).then(_("Error registering client")).then(function(e){return e.json().then(function(e){return t.registration=e})})}catch(e){return i.default.reject(e)}}},{key:"serialize",value:function(){return(0,o.default)(this)}},{key:"jwks",value:function(){var e=this;try{var t=this.provider.configuration;p(t,"OpenID Configuration is not initialized."),p(t.jwks_uri,"OpenID Configuration is missing jwks_uri.");var n=t.jwks_uri;return d(n).then(_("Error resolving provider keys")).then(function(t){return t.json().then(function(e){return m.importKeys(e)}).then(function(t){return e.provider.jwks=t})})}catch(e){return i.default.reject(e)}}},{key:"createRequest",value:function(e,t){return g.create(this,e,t||this.store)}},{key:"validateResponse",value:function(e,t){return t=t||this.store,e=e.match(/^http(s?):\/\//)?{rp:this,redirect:e,session:t}:{rp:this,body:e,session:t},b.validateResponse(e)}},{key:"userinfo",value:function(){try{var e=this.provider.configuration;p(e,"OpenID Configuration is not initialized."),p(e.userinfo_endpoint,"OpenID Configuration is missing userinfo_endpoint.");var t=e.userinfo_endpoint,n=this.store.access_token;p(n,"Missing access token.");var r=new y({"Content-Type":"application/json",Authorization:"Bearer "+n});return d(t,{headers:r}).then(_("Error fetching userinfo")).then(function(e){return e.json()})}catch(e){return i.default.reject(e)}}},{key:"logout",value:function(){var e=void 0;try{p(this.provider,"OpenID Configuration is not initialized."),e=this.provider.configuration,p(e,"OpenID Configuration is not initialized."),p(e.end_session_endpoint,"OpenID Configuration is missing end_session_endpoint.")}catch(e){return i.default.reject(e)}this.clearSession();var t=e.end_session_endpoint;return d(t,{method:"get"}).then(_("Error logging out"))}},{key:"clearSession",value:function(){var e=this.store;e&&delete e[S]}},{key:"popTokenFor",value:function(e,t){return PoPToken.issueFor(e,t,this)}}],[{key:"from",value:function(e){var n=new t(e),r=n.validate();if(!r.valid)return i.default.reject(new Error((0,o.default)(r)));var a=n.provider.jwks;return a?m.importKeys(a).then(function(e){return n.provider.jwks=e,n}):n.jwks().then(function(){return n})}},{key:"register",value:function(e,n,o){var a=new t({provider:{url:e},defaults:(0,r.default)({},o.defaults),store:o.store});return i.default.resolve().then(function(){return a.discover()}).then(function(){return a.jwks()}).then(function(){return a.register(n)}).then(function(){return a})}},{key:"schema",get:function(){return w}}]),t}(v),S="oidc.session.privateKey";x.SESSION_PRIVATE_KEY=S,e.exports=x}).call(this,n(24))},function(e,t){e.exports=fetch},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,i=/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,a=/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,u=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,s=/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,c=/^[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i,f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"register",value:function(e,t){if("string"!=typeof e)throw new Error("Format name must be a string");return"string"==typeof t&&(t=new RegExp(t)),this[e]=t}},{key:"resolve",value:function(e){var t=this[e];if(!t)throw new Error("Unknown JSON Schema format.");return t}},{key:"test",value:function(e,t){return this.resolve(e).test(t)}}],[{key:"initialize",value:function(){var t=new e;return t.register("date-time",o),t.register("uri",i),t.register("email",a),t.register("ipv4",u),t.register("ipv6",s),t.register("hostname",c),t}}]),e}();e.exports=f.initialize()},function(e,t,n){"use strict";var r="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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.assign(this,n||{}),this.root=this.root||this,this.root.depth=this.root.depth||1,this.level>this.root.depth&&(this.root.depth=this.level),this.level=this.level||0,this.schema=t}return o(e,[{key:"compile",value:function(){var e=this.root,t=(this.depth,this.level,""),n="";if(n+=this.default(),n+=this.properties(),n+=this.items(),n+=this.member(),n+=this.item(),e===this){for(var r=1;r<=this.root.depth;r++)t+=this.declaration(r);return"\n options = options || {}\n\n if (options.filter === false) {\n Object.assign(target, JSON.parse(JSON.stringify(source)))\n }\n\n "+t+"\n "+n+"\n "}return n}},{key:"declaration",value:function(e){return"\n var target"+e+"\n var source"+e+"\n var count"+e+"\n "}},{key:"default",value:function(){var e=this.schema,t=this.level,n=this.key,r=this.index,o=e.default,i="";return e.hasOwnProperty("default")&&(n&&(i+="\n target"+t+"['"+n+"'] = "+JSON.stringify(o)+"\n "),r&&(i+="\n target"+t+"["+r+"] = "+JSON.stringify(o)+"\n "),t>1&&(i+="\n count"+t+"++\n "),i="\n if (options.defaults !== false) {\n "+i+"\n }\n "),i}},{key:"member",value:function(){var e=this.schema,t=(this.root,this.level),n=this.key,r=e.properties,o=e.additionalProperties,i=e.items,a=e.additionalItems,u="";return!n||r||o||i||a||(u+="\n target"+t+"['"+n+"'] = source"+t+"['"+n+"']\n ",t>1&&(u+="\n count"+t+"++\n "),u="\n if (source"+t+".hasOwnProperty('"+n+"')) {\n "+u+"\n }\n "),u}},{key:"item",value:function(){var e=this.schema,t=(this.root,this.level),n=this.index,r=e.properties,o=e.additionalProperties,i=e.items,a=e.additionalItems,u="";return!n||r||o||i||a||(u+="\n target"+t+"["+n+"] = source"+t+"["+n+"]\n ",t>1&&(u+="\n count"+t+"++\n "),u="\n if ("+n+" < len) {\n "+u+"\n }\n "),u}},{key:"properties",value:function(){var t=this.schema,n=this.root,r=this.level,o=this.key,i=this.index,a=t.properties,u="";return a&&(Object.keys(a).forEach(function(t){var o=new e(a[t],{key:t,root:n,level:r+1});u+=o.compile()}),n===this?u="\n if (typeof source === 'object' && source !== null && !Array.isArray(source)) {\n if (typeof target !== 'object') {\n throw new Error('?')\n }\n\n source1 = source\n target1 = target\n count1 = 0\n\n "+u+"\n }\n ":(i&&(u="\n if ("+i+" < source"+r+".length || typeof source"+r+"["+i+"] === 'object') {\n\n source"+(r+1)+" = source"+r+"["+i+"] || {}\n count"+(r+1)+" = 0\n\n if ("+i+" < target"+r+".length || typeof target"+r+"["+i+"] !== 'object') {\n target"+(r+1)+" = {}\n if ("+i+" < source"+r+".length) {\n count"+(r+1)+"++\n }\n } else {\n target"+(r+1)+" = target"+r+"["+i+"]\n }\n\n "+u+"\n\n if (count"+(r+1)+" > 0) {\n target"+r+"["+i+"] = target"+(r+1)+"\n count"+r+"++\n }\n\n } else {\n target"+r+"["+i+"] = source"+r+"["+i+"]\n count"+r+"++\n }\n "),o&&(u="\n if ((typeof source"+r+"['"+o+"'] === 'object'\n && source"+r+"['"+o+"'] !== null\n && !Array.isArray(source"+r+"['"+o+"']))\n || !source"+r+".hasOwnProperty('"+o+"')) {\n\n source"+(r+1)+" = source"+r+"['"+o+"'] || {}\n count"+(r+1)+" = 0\n\n if (!target"+r+".hasOwnProperty('"+o+"')\n || typeof target"+r+"['"+o+"'] !== 'object'\n || target"+r+"['"+o+"'] === null\n || Array.isArray(target"+r+"['"+o+"'])) {\n target"+(r+1)+" = {}\n if (source"+r+".hasOwnProperty('"+o+"')) {\n count"+(r+1)+"++\n }\n } else {\n target"+(r+1)+" = target"+r+"['"+o+"']\n count"+(r+1)+"++\n }\n\n "+u+"\n\n if (count"+(r+1)+" > 0) {\n target"+r+"['"+o+"'] = target"+(r+1)+"\n count"+r+"++\n }\n\n } else {\n target"+r+"['"+o+"'] = source"+r+"['"+o+"']\n count"+r+"++\n }\n "))),u}},{key:"additionalProperties",value:function(){}},{key:"items",value:function(){var t=this.schema,n=this.root,o=this.level,i=this.key,a=(this.index,t.items),u="";if(a){if(Array.isArray(a));else if("object"===(void 0===a?"undefined":r(a))&&null!==a){var s="i"+(o+1);u+="\n var sLen = source"+(o+1)+".length || 0\n var tLen = target"+(o+1)+".length || 0\n var len = 0\n\n if (sLen > len) { len = sLen }\n // THIS IS WRONG, CAUSED SIMPLE ARRAY INIT TO FAIL (OVERWRITE\n // EXISTING TARGET VALUES WITH UNDEFINED WHEN SOURCE IS SHORTER THAN\n // TARGET). LEAVING HERE UNTIL WE FINISH TESTING AND SEE WHY IT MIGHT\n // HAVE BEEN HERE IN THE FIRST PLACE.\n //\n // if (tLen > len) { len = tLen }\n\n for (var "+s+" = 0; "+s+" < len; "+s+"++) {\n "+new e(a,{index:s,root:n,level:o+1}).compile()+"\n }\n "}u=n===this?"\n if (Array.isArray(source)) {\n if (!Array.isArray(target)) {\n throw new Error('?')\n }\n\n source1 = source\n target1 = target\n\n "+u+"\n }\n ":"\n if (Array.isArray(source"+o+"['"+i+"']) || !source"+o+".hasOwnProperty('"+i+"')) {\n\n source"+(o+1)+" = source"+o+"['"+i+"'] || []\n count"+(o+1)+" = 0\n\n if (!target"+o+".hasOwnProperty('"+i+"') || !Array.isArray(target"+o+"['"+i+"'])) {\n target"+(o+1)+" = []\n if (source"+o+".hasOwnProperty('"+i+"')) {\n count"+(o+1)+"++\n }\n\n } else {\n target"+(o+1)+" = target"+o+"['"+i+"']\n count"+(o+1)+"++\n }\n\n "+u+"\n\n if (count"+(o+1)+" > 0) {\n target"+o+"['"+i+"'] = target"+(o+1)+"\n count"+o+"++\n }\n\n } else {\n target"+o+"['"+i+"'] = source"+o+"['"+i+"']\n count"+o+"++\n }\n "}return u}},{key:"additionalItems",value:function(){}}],[{key:"compile",value:function(t){var n=new e(t).compile();try{return new Function("target","source","options",n)}catch(e){console.log(e,e.stack)}}}]),e}();e.exports=i},function(e,t,n){"use strict";var r="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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(69),a=["add","remove","replace","move","copy","test"],u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ops=t||[]}return o(e,[{key:"apply",value:function(e){var t=this;this.ops.forEach(function(n){var r=n.op;if(!r)throw new Error('Missing "op" in JSON Patch operation');if(-1===a.indexOf(r))throw new Error('Invalid "op" in JSON Patch operation');if(!n.path)throw new Error('Missing "path" in JSON Patch operation');t[r](n,e)})}},{key:"add",value:function(e,t){if(void 0===e.value)throw new Error('Missing "value" in JSON Patch add operation');new i(e.path,2).add(t,e.value)}},{key:"remove",value:function(e,t){new i(e.path).remove(t)}},{key:"replace",value:function(e,t){if(void 0===e.value)throw new Error('Missing "value" in JSON Patch replace operation');new i(e.path).replace(t,e.value)}},{key:"move",value:function(e,t){if(void 0===e.from)throw new Error('Missing "from" in JSON Patch move operation');if(e.path.match(new RegExp("^"+e.from)))throw new Error('Invalid "from" in JSON Patch move operation');var n=new i(e.path),r=new i(e.from),o=r.get(t);r.remove(t),n.add(t,o)}},{key:"copy",value:function(e,t){if(void 0===e.from)throw new Error('Missing "from" in JSON Patch copy operation');var n=new i(e.path),r=new i(e.from).get(t);n.add(t,r)}},{key:"test",value:function(e,t){if(void 0===e.value)throw new Error('Missing "value" in JSON Patch test operation');var n=new i(e.path).get(t);if(r(e.value),n!==e.value)throw new Error("Mismatching JSON Patch test value")}}]),e}();e.exports=u},function(e,t,n){"use strict";var r="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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(99),a=0,u=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schema=t,Object.assign(this,n),this.address||(this.address=""),!0!==this.require&&(this.require=!1)}return o(e,null,[{key:"compile",value:function(t){var n='\n // "cursor"\n let value = data\n let container\n let stack = []\n let top = -1\n\n // error state\n let valid = true\n let errors = []\n\n // complex schema state\n let initialValidity\n let anyValid\n let notValid\n let countOfValid\n let initialErrorCount\n let accumulatedErrorCount\n\n // validation code\n '+new e(t).compile()+"\n\n // validation result\n return {\n valid,\n errors\n }\n ";return new Function("data",n)}},{key:"counter",get:function(){return a++}}]),o(e,[{key:"compile",value:function(){var e="";return this.require&&(e+=this.required()),e+=this.type(),e+=this.array(),e+=this.number(),e+=this.object(),e+=this.string(),e+=this.enum(),e+=this.anyOf(),e+=this.allOf(),e+=this.not(),e+=this.oneOf()}},{key:"push",value:function(){return"\n stack.push(value)\n container = value\n top++\n "}},{key:"pop",value:function(){return"\n if (stack.length > 1) {\n top--\n stack.pop()\n }\n\n value = container = stack[top]\n "}},{key:"type",value:function(){var e=this.schema.type,t=this.address,n="";e&&(n+="\n // "+t+" type checking\n if (value !== undefined && "+(Array.isArray(e)?e:[e]).map(function(e){return"array"===e?"!Array.isArray(value)":"boolean"===e?"typeof value !== 'boolean'":"integer"===e?"!Number.isInteger(value)":"null"===e?"value !== null":"number"===e?"typeof value !== 'number'":"object"===e?"(typeof value !== 'object' || Array.isArray(value) || value === null)":"string"===e?"typeof value !== 'string'":void 0}).join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'type',\n message: 'invalid type'\n })\n }\n ");return n}},{key:"array",value:function(){var e=this.validations(["additionalItems","items","minItems","maxItems","uniqueItems"]),t="";return e.length>0&&(t+="\n /**\n * Array validations\n */\n if (Array.isArray(value)) {\n "+e+"\n }\n "),t}},{key:"number",value:function(){var e=this.validations(["minimum","maximum","multipleOf"]),t="";return e.length>0&&(t+="\n /**\n * Number validations\n */\n if (typeof value === 'number') {\n "+e+"\n }\n "),t}},{key:"object",value:function(){var e=this.validations(["maxProperties","minProperties","additionalProperties","properties","patternProperties","dependencies","schemaDependencies","propertyDependencies"]),t="";return e.length>0&&(t+="\n /**\n * Object validations\n */\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n "+e+"\n }\n "),t}},{key:"string",value:function(){var e=this.validations(["maxLength","minLength","pattern","format"]),t="";return e.length>0&&(t+="\n /**\n * String validations\n */\n if (typeof value === 'string') {\n "+e+"\n }\n "),t}},{key:"validations",value:function(e){var t=this,n=this.schema,r="";return Object.keys(n).filter(function(t){return-1!==e.indexOf(t)}).forEach(function(e){r+=t[e]()}),r}},{key:"enum",value:function(){var e=this.schema.enum,t=this.address,n=["value !== undefined"],o="";return e&&(e.forEach(function(e){switch(void 0===e?"undefined":r(e)){case"boolean":case"number":n.push("value !== "+e);break;case"string":n.push('value !== "'+e+'"');break;case"object":null===e?n.push("value !== null"):n.push("'"+JSON.stringify(e)+"' !== JSON.stringify(value)");break;default:throw new Error("Things are not well in the land of enum")}}),o+='\n /**\n * Validate "'+t+'" enum\n */\n if ('+n.join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'enum',\n message: JSON.stringify(value) + ' is not an enumerated value'\n })\n }\n "),o}},{key:"anyOf",value:function(){var t=this.schema.anyOf,n=this.address,r="";return Array.isArray(t)&&(r+="\n initialValidity = valid\n initialErrorCount = errors.length\n anyValid = false\n ",t.forEach(function(t){var o=new e(t,{address:n});r+="\n accumulatedErrorCount = errors.length\n "+o.compile()+"\n if (accumulatedErrorCount === errors.length) {\n anyValid = true\n }\n "}),r+="\n if (anyValid === true) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n }\n "),r}},{key:"allOf",value:function(){var t=this.schema.allOf,n=this.address,r="";return Array.isArray(t)&&t.forEach(function(t){var o=new e(t,{address:n});r+="\n "+o.compile()+"\n "}),r}},{key:"oneOf",value:function(){var t=this.schema.oneOf,n=this.address,r="";return Array.isArray(t)&&(r+="\n /**\n * Validate "+n+" oneOf\n */\n initialValidity = valid\n initialErrorCount = errors.length\n countOfValid = 0\n ",t.forEach(function(t){var o=new e(t,{address:n});r+="\n accumulatedErrorCount = errors.length\n "+o.compile()+"\n if (accumulatedErrorCount === errors.length) {\n countOfValid += 1\n }\n "}),r+="\n if (countOfValid === 1) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n } else {\n valid = false\n errors.push({\n keyword: 'oneOf',\n message: 'what is a reasonable error message for this case?'\n })\n }\n "),r}},{key:"not",value:function(){var t=this.schema.not,n=this.address,o="";"object"!==(void 0===t?"undefined":r(t))||null===t||Array.isArray(t)||(o+="\n /**\n * NOT\n */\n if (value !== undefined) {\n initialValidity = valid\n initialErrorCount = errors.length\n notValid = true\n\n accumulatedErrorCount = errors.length\n\n "+new e(t,{address:n}).compile()+"\n\n if (accumulatedErrorCount === errors.length) {\n notValid = false\n }\n\n if (notValid === true) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n } else {\n valid = false\n errors = errors.slice(0, initialErrorCount)\n errors.push({\n keyword: 'not',\n message: 'hmm...'\n })\n }\n }\n ");return o}},{key:"properties",value:function(){var t=this.schema,n=this.address,o=t.properties,i=t.required,a=this.push();return i=Array.isArray(i)?i:[],"object"===(void 0===o?"undefined":r(o))&&Object.keys(o).forEach(function(t){var r=o[t],u=-1!==i.indexOf(t),s=new e(r,{address:[n,t].filter(function(e){return!!e}).join("."),require:u});a+="\n value = container['"+t+"']\n ",a+=s.compile()}),a+=this.pop()}},{key:"otherProperties",value:function(){return"\n /**\n * Validate Other Properties\n */\n "+this.push()+"\n\n for (let key in container) {\n value = container[key]\n matched = false\n\n "+this.patternValidations()+"\n "+this.additionalValidations()+"\n }\n\n "+this.pop()+"\n "}},{key:"patternValidations",value:function(){var t=this.schema.patternProperties,n="";return"object"===(void 0===t?"undefined":r(t))&&Object.keys(t).forEach(function(r){var o=new e(t[r]);n+="\n if (key.match('"+r+"')) {\n matched = true\n "+o.compile()+"\n }\n "}),n}},{key:"additionalValidations",value:function(){var t=this.schema,n=t.properties,o=t.additionalProperties,i=this.address,a="",u=["matched !== true"];if(Object.keys(n||{}).forEach(function(e){u.push("key !== '"+e+"'")}),"object"===(void 0===o?"undefined":r(o))){var s=new e(o,{address:i+"[APKey]"});a+="\n // validate additional properties\n if ("+u.join(" && ")+") {\n "+s.compile()+"\n }\n "}return!1===o&&(a+="\n // validate non-presence of additional properties\n if ("+u.join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'additionalProperties',\n message: key + ' is not a defined property'\n })\n }\n "),a}},{key:"patternProperties",value:function(){var e="";return this.otherPropertiesCalled||(this.otherPropertiesCalled=!0,e+=this.otherProperties()),e}},{key:"additionalProperties",value:function(){var e="";return this.otherPropertiesCalled||(this.otherPropertiesCalled=!0,e+=this.otherProperties()),e}},{key:"minProperties",value:function(){var e=this.schema.minProperties;return"\n // "+this.address+" min properties\n if (Object.keys(value).length < "+e+") {\n valid = false\n errors.push({\n keyword: 'minProperties',\n message: 'too few properties'\n })\n }\n "}},{key:"maxProperties",value:function(){var e=this.schema.maxProperties;return"\n // "+this.address+" max properties\n if (Object.keys(value).length > "+e+") {\n valid = false\n errors.push({\n keyword: 'maxProperties',\n message: 'too many properties'\n })\n }\n "}},{key:"dependencies",value:function(){var t=this.schema.dependencies,n=this.address,o=this.push();return"object"===(void 0===t?"undefined":r(t))&&Object.keys(t).forEach(function(i){var a=t[i],u=[];if(Array.isArray(a))a.forEach(function(e){u.push("container['"+e+"'] === undefined")}),o+="\n if (container['"+i+"'] !== undefined && ("+u.join(" || ")+")) {\n valid = false\n errors.push({\n keyword: 'dependencies',\n message: 'unmet dependencies'\n })\n }\n ";else if("object"===(void 0===a?"undefined":r(a))){var s=new e(a,{address:n});o+="\n if (container['"+i+"'] !== undefined) {\n "+s.compile()+"\n }\n "}}),o+=this.pop()}},{key:"required",value:function(){this.schema.properties;var e="";return e+="\n // validate "+this.address+" presence\n if (value === undefined) {\n valid = false\n errors.push({\n keyword: 'required',\n message: 'is required'\n })\n }\n "}},{key:"additionalItems",value:function(){var t=this.schema,n=t.items,o=t.additionalItems,i=(this.address,"");if(!1===o&&Array.isArray(n)&&(i+="\n // don't allow additional items\n if (value.length > "+n.length+") {\n valid = false\n errors.push({\n keyword: 'additionalItems',\n message: 'additional items not allowed'\n })\n }\n "),"object"===(void 0===o?"undefined":r(o))&&null!==o&&Array.isArray(n)){var a=new e(o),u=e.counter;i+="\n // additional items\n "+this.push()+"\n\n for (var i"+u+" = "+n.length+"; i"+u+" <= container.length; i"+u+"++) {\n value = container[i"+u+"]\n "+a.compile()+"\n }\n\n "+this.pop()+"\n "}return i}},{key:"items",value:function(){var t=this.schema.items,n=this.address,o="";if(Array.isArray(t))o+=this.push(),t.forEach(function(t,r){var i=new e(t,{address:n+"["+r+"]"});o+="\n // item #"+r+"\n value = container["+r+"]\n "+i.compile()+"\n "}),o+=this.pop();else if("object"===(void 0===t?"undefined":r(t))&&null!==t){var i=new e(t),a=e.counter;o+="\n // items\n "+this.push()+"\n\n for (var i"+a+" = 0; i"+a+" < container.length; i"+a+"++) {\n // read array element\n value = container[i"+a+"]\n "+i.compile()+"\n }\n\n "+this.pop()+"\n "}return o}},{key:"minItems",value:function(){var e=this.schema.minItems;return"\n // "+this.address+" min items\n if (value.length < "+e+") {\n valid = false\n errors.push({\n keyword: 'minItems',\n message: 'too few properties'\n })\n }\n "}},{key:"maxItems",value:function(){var e=this.schema.maxItems;return"\n // "+this.address+" max items\n if (value.length > "+e+") {\n valid = false\n errors.push({\n keyword: 'maxItems',\n message: 'too many properties'\n })\n }\n "}},{key:"uniqueItems",value:function(){var e=this.schema.uniqueItems,t=this.address,n="";return!0===e&&(n+="\n // validate "+t+" unique items\n let values = value.map(v => JSON.stringify(v)) // TODO: optimize\n let set = new Set(values)\n if (values.length !== set.size) {\n valid = false\n errors.push({\n keyword: 'uniqueItems',\n message: 'items must be unique'\n })\n }\n "),n}},{key:"minLength",value:function(){var e=this.schema.minLength;return"\n // "+this.address+" validate minLength\n if (Array.from(value).length < "+e+") {\n valid = false\n errors.push({\n keyword: 'minLength',\n message: 'too short'\n })\n }\n "}},{key:"maxLength",value:function(){var e=this.schema.maxLength;return"\n // "+this.address+" validate maxLength\n if (Array.from(value).length > "+e+") {\n valid = false\n errors.push({\n keyword: 'maxLength',\n message: 'too long'\n })\n }\n "}},{key:"pattern",value:function(){var e=this.schema.pattern,t=this.address;if(e)return"\n // "+t+" validate pattern\n if (!value.match(new RegExp('"+e+"'))) {\n valid = false\n errors.push({\n keyword: 'pattern',\n message: 'does not match the required pattern'\n })\n }\n "}},{key:"format",value:function(){var e=this.schema.format,t=this.address,n=i.resolve(e);if(n)return"\n // "+t+" validate format\n if (!value.match("+n+")) {\n valid = false\n errors.push({\n keyword: 'format',\n message: 'is not \""+e+"\" format'\n })\n }\n "}},{key:"minimum",value:function(){var e=this.schema,t=e.minimum,n=e.exclusiveMinimum;return"\n // "+this.address+" validate minimum\n if (value "+(!0===n?"<=":"<")+" "+t+") {\n valid = false\n errors.push({\n keyword: 'minimum',\n message: 'too small'\n })\n }\n "}},{key:"maximum",value:function(){var e=this.schema,t=e.maximum,n=e.exclusiveMaximum;return"\n // "+this.address+" validate maximum\n if (value "+(!0===n?">=":">")+" "+t+") {\n valid = false\n errors.push({\n keyword: 'maximum',\n message: 'too large'\n })\n }\n "}},{key:"multipleOf",value:function(){var e=this.schema.multipleOf,t="";if("number"==typeof e){var n=e.toString().length-e.toFixed(0).length-1,r=n>0?Math.pow(10,n):1;t+="\n if ("+(n>0?"(value * "+r+") % "+e*r+" !== 0":"value % "+e+" !== 0")+") {\n valid = false\n errors.push({\n keyword: 'multipleOf',\n message: 'must be a multiple of "+e+"'\n })\n }\n "}return t}}]),e}();e.exports=u},function(e,t,n){"use strict";(function(t){var r=t.TextEncoder?t.TextEncoder:n(194).TextEncoder;e.exports=r}).call(this,n(24))},function(e,t,n){"use strict";var r=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.message=e+" is not a supported algorithm",n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Error),t}();e.exports=r},function(e,t,n){"use strict";e.exports={DataError:n(106),NotSupportedError:n(104)}},function(e,t,n){"use strict";var r=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Error),t}();e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(4).JSONDocument,i=n(47),a=n(70),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o),r(t,null,[{key:"importKey",value:function(e){return a.importKey(e)}},{key:"schema",get:function(){return i}}]),t}();e.exports=u},function(e,t,n){"use strict";var r=new(0,n(4).JSONSchema)({type:"object",properties:{keys:{type:"array",items:n(47)}}});e.exports=r},function(e,t,n){"use strict";var r=n(110),o=n(111),i=n(112),a=new(0,n(4).JSONSchema)({type:"object",properties:{type:{type:"string",enum:["JWS","JWE"]},segments:{type:"array"},header:i,protected:i,unprotected:i,iv:r,aad:r,ciphertext:r,tag:r,recipients:{type:"array",items:{type:"object",properties:{header:i,encrypted_key:r}}},payload:o,signatures:{type:"array",items:{type:"object",properties:{protected:i,header:i,signature:r,key:{type:"object"}}}},signature:r,verified:{type:"boolean",default:!1},key:{type:"object"},serialization:{type:"string",enum:["compact","json","flattened"],default:"compact"}}});e.exports=a},function(e,t,n){"use strict";var r=new(0,n(4).JSONSchema)({type:"string",format:"base64url"});e.exports=r},function(e,t,n){"use strict";var r=new(0,n(4).JSONSchema)({properties:{iss:{type:"string",format:"StringOrURI"},sub:{type:"string",format:"StringOrURI"},aud:{type:["array","string"],format:"StringOrURI",items:{format:"StringOrURI"}},exp:{type:"number",format:"NumericDate"},nbf:{type:"number",format:"NumericDate"},iat:{type:"number",format:"NumericDate"},jti:{type:"string"}}});e.exports=r},function(e,t,n){"use strict";n(47);var r=new(0,n(4).JSONSchema)({type:"object",properties:{typ:{type:"string"},cty:{type:"string",enum:["JWT"]},alg:{type:"string",format:"StringOrURI"},jku:{type:"string",format:"URI"},kid:{type:"string"},x5u:{type:"string",format:"URI"},x5c:{type:"array",items:{type:"string",format:"base64"}},x5t:{type:"string",format:"base64url"},crit:{type:"array",items:{type:"string"},minItems:1},enc:{type:"string",format:"StringOrURI"},zip:{type:"string"}}});e.exports=r},function(e,t,n){"use strict";var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(18),a=n(70),u=n(105).DataError,s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"sign",value:function(e){var t=i(JSON.stringify(e.payload));if("compact"===e.serialization){var n=e.key,r=e.header.alg,o=i(JSON.stringify(e.header))+"."+t;return a.sign(r,n,o).then(function(e){return o+"."+e})}return e.serialization,e.serialization,Promise.reject(new u("Unsupported serialization"))}},{key:"verify",value:function(e){e.signatures;var t=e.key,n=e.signature,o=e.header.alg;if(e.signature){var i=r(e.segments,2),s=i[0]+"."+i[1];return"none"===o?Promise.reject(new u("Signature provided to verify with alg: none")):a.verify(o,t,n,s).then(function(t){return e.verified=t,t})}if("none"===o){if(!t&&!n)return e.verified=!0,Promise.resolve(!0);if(t)return Promise.reject(new u("Key provided to verify signature with alg: none"))}return Promise.reject(new u("Missing signature(s)"))}}]),e}();e.exports=s},function(e,t,n){e.exports={default:n(201),__esModule:!0}},function(e,t,n){e.exports={default:n(210),__esModule:!0}},function(e,t,n){"use strict";var r=a(n(114)),o=a(n(13)),i=a(n(14));function a(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(){(0,o.default)(this,e)}return(0,i.default)(e,null,[{key:"encode",value:function(e){var t=[];return(0,r.default)(e).forEach(function(n){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]))}),t.join("&")}},{key:"decode",value:function(e){var t={};return e.split("&").forEach(function(e){var n=e.split("="),r=decodeURIComponent(n[0]),o=decodeURIComponent(n[1]);t[r]=o}),t}}]),e}();e.exports=u},function(e,t,n){"use strict";e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fetch error";return function(t){if(t.status>=200&&t.status<300)return t;var n=e+": "+t.status+" "+t.statusText,r=new Error(n);throw r.response=t,r.statusCode=t.status,r}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r={},o=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),i=function(e){var t={};return function(e){return void 0===t[e]&&(t[e]=function(e){return document.querySelector(e)}.call(this,e)),t[e]}}(),a=null,u=0,s=[],c=n(224);function f(e,t){for(var n=0;n<e.length;n++){var o=e[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(v(o.parts[a],t))}else{var u=[];for(a=0;a<o.parts.length;a++)u.push(v(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:u}}}}function l(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],u={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}function p(e,t){var n=i(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=s[s.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),s.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function d(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=s.indexOf(e);t>=0&&s.splice(t,1)}function h(e){var t=document.createElement("style");return e.attrs.type="text/css",y(t,e.attrs),p(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var s=u++;n=a||(a=h(t)),r=g.bind(null,n,s,!1),o=g.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",y(t,e.attrs),p(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),u=e.href;e.href=URL.createObjectURL(a),u&&URL.revokeObjectURL(u)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=l(e,t);return f(n,t),function(e){for(var o=[],i=0;i<n.length;i++){var a=n[i];(u=r[a.id]).refs--,o.push(u)}e&&f(l(e,t),t);for(i=0;i<o.length;i++){var u;if(0===(u=o[i]).refs){for(var s=0;s<u.parts.length;s++)u.parts[s]();delete r[u.id]}}}};var m=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function g(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=m(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t,n){"use strict";var r=y(n(19)),o=y(n(7)),i=y(n(8)),a=function(){var e=(0,i.default)(o.default.mark(function e(){var t,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(window.opener){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,u();case 4:if(!(t=e.sent)){e.next=7;break}return e.abrupt("return",t);case 7:return n=(0,f.client)(window.opener,"*"),e.next=10,n({method:"getAppOrigin",args:[]});case 10:return t=e.sent,e.next=13,m(t);case 13:return e.abrupt("return",t);case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),u=function(){var e=(0,i.default)(o.default.mark(function e(){var t,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.getData)(sessionStorage);case 2:return t=e.sent,n=t.appOrigin,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),s=y(n(31)),c=y(n(31)),f=n(32),l=n(17),p=y(n(165)),d=y(n(221)),h=y(n(225));function y(e){return e&&e.__esModule?e:{default:e}}n(226);var v=[{displayName:"Solid Community",url:"https://solid.community/",iconUrl:"https://solidtest.space/favicon.ico"},{displayName:"Solid Test Space",url:"https://solidtest.space/",iconUrl:"https://solidtest.space/favicon.ico"}];function m(e){return(0,l.updateStorage)(sessionStorage,function(t){return(0,r.default)({},t,{appOrigin:e})})}a().then(function(e){var t=window.location.href.replace(/(\/\/[^/]*\/).*/,"$1"),n=t.replace(/^[^:]+:|\//g,""),r="solid-app".trim()||n,o=void 0;if(e)if(window.location.hash)o=s.default.createElement(p.default,{appOrigin:e,afterLoggedIn:function(){return setTimeout(window.close,750)}});else{var i=[].concat(v);i.some(function(e){return e.url===t})||i.unshift({displayName:n,url:t,iconUrl:t+"favicon.ico"}),o=s.default.createElement(d.default,{idps:i,appOrigin:e,appName:r})}else o=s.default.createElement(h.default,{appName:r});c.default.render(o,document.getElementById("app-container"))})},function(e,t,n){n(122),e.exports=n(0).Object.assign},function(e,t,n){var r=n(5);r(r.S+r.F,"Object",{assign:n(123)})},function(e,t,n){"use strict";var r=n(27),o=n(57),i=n(38),a=n(29),u=n(74),s=Object.assign;e.exports=!s||n(21)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r})?function(e,t){for(var n=a(e),s=arguments.length,c=1,f=o.f,l=i.f;s>c;)for(var p,d=u(arguments[c++]),h=f?r(d).concat(f(d)):r(d),y=h.length,v=0;y>v;)l.call(d,p=h[v++])&&(n[p]=d[p]);return n}:s},function(e,t,n){var r=n(22),o=n(52),i=n(125);e.exports=function(e){return function(t,n,a){var u,s=r(t),c=o(s.length),f=i(a,c);if(e&&n!=n){for(;c>f;)if((u=s[f++])!=u)return!0}else for(;c>f;f++)if((e||f in s)&&s[f]===n)return e||f||0;return!e&&-1}}},function(e,t,n){var r=n(53),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(127),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",c="object"==typeof e,f=t.regeneratorRuntime;if(f)c&&(e.exports=f);else{(f=t.regeneratorRuntime=c?e.exports:{}).wrap=w;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",y={},v={};v[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(R([])));g&&g!==r&&o.call(g,a)&&(v=g);var b=k.prototype=x.prototype=Object.create(v);S.prototype=b.constructor=k,k.constructor=S,k[s]=S.displayName="GeneratorFunction",f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(b),e},f.awrap=function(e){return{__await:e}},E(O.prototype),O.prototype[u]=function(){return this},f.AsyncIterator=O,f.async=function(e,t,n,r){var o=new O(w(e,t,n,r));return f.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},E(b),b[s]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},f.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=R,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,o){return u.type="throw",u.arg=e,t.next=r,o&&(t.method="next",t.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:R(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),y}}}function w(e,t,n,r){var o=t&&t.prototype instanceof x?t:x,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(e,t,n){var r=l;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=_(e,t,n);if("normal"===s.type){if(r=n.done?h:p,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function _(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function x(){}function S(){}function k(){}function E(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function O(e){var t;this._invoke=function(n,r){function i(){return new Promise(function(t,i){!function t(n,r,i,a){var u=_(e[n],e,r);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(c).then(function(e){s.value=e,i(s)},a)}a(u.arg)}(n,r,t,i)})}return t=t?t.then(i,i):i()}}function A(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,A(e,t),"throw"===t.method))return y;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=_(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,y;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,y):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function R(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}return{next:I}}function I(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,n){n(75),n(30),n(41),n(135),n(142),n(143),e.exports=n(0).Promise},function(e,t,n){var r=n(53),o=n(51);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),s=r(n),c=u.length;return s<0||s>=c?e?"":void 0:(i=u.charCodeAt(s))<55296||i>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):i:e?u.slice(s,s+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(58),o=n(26),i=n(40),a={};n(15)(a,n(2)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(9),o=n(6),i=n(27);e.exports=n(11)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,s=0;u>s;)r.f(e,n=a[s++],t[n]);return e}},function(e,t,n){"use strict";var r=n(133),o=n(134),i=n(23),a=n(22);e.exports=n(76)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r,o,i,a,u=n(39),s=n(3),c=n(20),f=n(59),l=n(5),p=n(10),d=n(36),h=n(136),y=n(137),v=n(82),m=n(83).set,g=n(139)(),b=n(61),w=n(84),_=n(85),x=s.TypeError,S=s.process,k=s.Promise,E="process"==f(S),O=function(){},A=o=b.f,P=!!function(){try{var e=k.resolve(1),t=(e.constructor={})[n(2)("species")]=function(e){e(O,O)};return(E||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t}catch(e){}}(),j=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},T=function(e,t){if(!e._n){e._n=!0;var n=e._c;g(function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a,u=o?t.ok:t.fail,s=t.resolve,c=t.reject,f=t.domain;try{u?(o||(2==e._h&&C(e),e._h=1),!0===u?n=r:(f&&f.enter(),n=u(r),f&&(f.exit(),a=!0)),n===t.promise?c(x("Promise-chain cycle")):(i=j(n))?i.call(n,s,c):s(n)):c(r)}catch(e){f&&!a&&f.exit(),c(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&R(e)})}},R=function(e){m.call(s,function(){var t,n,r,o=e._v,i=I(e);if(i&&(t=w(function(){E?S.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),e._h=E||I(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},I=function(e){return 1!==e._h&&0===(e._a||e._c).length},C=function(e){m.call(s,function(){var t;E?S.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},M=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw x("Promise can't be resolved itself");(t=j(e))?g(function(){var r={_w:n,_d:!1};try{t.call(e,c(M,r,1),c(N,r,1))}catch(e){N.call(r,e)}}):(n._v=e,n._s=1,T(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};P||(k=function(e){h(this,k,"Promise","_h"),d(e),r.call(this);try{e(c(M,this,1),c(N,this,1))}catch(e){N.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(140)(k.prototype,{then:function(e,t){var n=A(v(this,k));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=E?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=c(M,e,1),this.reject=c(N,e,1)},b.f=A=function(e){return e===k||e===a?new i(e):o(e)}),l(l.G+l.W+l.F*!P,{Promise:k}),n(40)(k,"Promise"),n(141)("Promise"),a=n(0).Promise,l(l.S+l.F*!P,"Promise",{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(u||!P),"Promise",{resolve:function(e){return _(u&&this===a?k:this,e)}}),l(l.S+l.F*!(P&&n(86)(function(e){k.all(e).catch(O)})),"Promise",{all:function(e){var t=this,n=A(t),r=n.resolve,o=n.reject,i=w(function(){var n=[],i=0,a=1;y(e,!1,function(e){var u=i++,s=!1;n.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,o=w(function(){y(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(20),o=n(80),i=n(81),a=n(6),u=n(52),s=n(60),c={},f={};(t=e.exports=function(e,t,n,l,p){var d,h,y,v,m=p?function(){return e}:s(e),g=r(n,l,t?2:1),b=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(d=u(e.length);d>b;b++)if((v=t?g(a(h=e[b])[0],h[1]):g(e[b]))===c||v===f)return v}else for(y=m.call(e);!(h=y.next()).done;)if((v=o(y,g,h.value,t))===c||v===f)return v}).BREAK=c,t.RETURN=f},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(3),o=n(83).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==n(28)(a);e.exports=function(){var e,t,n,c=function(){var r,o;for(s&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve();n=function(){f.then(c)}}else n=function(){o.call(r,c)};else{var l=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var r=n(15);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:r(e,o,t[o]);return e}},function(e,t,n){"use strict";var r=n(3),o=n(0),i=n(9),a=n(11),u=n(2)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:r[e];a&&t&&!t[u]&&i.f(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(5),o=n(0),i=n(3),a=n(82),u=n(85);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,o.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then(function(){return n})}:e,n?function(n){return u(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){"use strict";var r=n(5),o=n(61),i=n(84);r(r.S,"Promise",{try:function(e){var t=o.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){"use strict";var r=n(145),o=n(146),i=n(147);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,u,s){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,o,i,a,u,s],l=0;(c=new Error(t.replace(/%s/g,function(){return f[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){e.exports={default:n(149),__esModule:!0}},function(e,t,n){n(30),n(41),e.exports=n(62).f("iterator")},function(e,t,n){e.exports={default:n(151),__esModule:!0}},function(e,t,n){n(152),n(75),n(157),n(158),e.exports=n(0).Symbol},function(e,t,n){"use strict";var r=n(3),o=n(16),i=n(11),a=n(5),u=n(77),s=n(153).KEY,c=n(21),f=n(55),l=n(40),p=n(37),d=n(2),h=n(62),y=n(63),v=n(154),m=n(155),g=n(6),b=n(10),w=n(22),_=n(50),x=n(26),S=n(58),k=n(156),E=n(89),O=n(9),A=n(27),P=E.f,j=O.f,T=k.f,R=r.Symbol,I=r.JSON,C=I&&I.stringify,N=d("_hidden"),M=d("toPrimitive"),U={}.propertyIsEnumerable,L=f("symbol-registry"),B=f("symbols"),D=f("op-symbols"),z=Object.prototype,J="function"==typeof R,F=r.QObject,H=!F||!F.prototype||!F.prototype.findChild,q=i&&c(function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(z,t);r&&delete z[t],j(e,t,n),r&&e!==z&&j(z,t,r)}:j,K=function(e){var t=B[e]=S(R.prototype);return t._k=e,t},W=J&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},V=function(e,t,n){return e===z&&V(D,t,n),g(e),t=_(t,!0),g(n),o(B,t)?(n.enumerable?(o(e,N)&&e[N][t]&&(e[N][t]=!1),n=S(n,{enumerable:x(0,!1)})):(o(e,N)||j(e,N,x(1,{})),e[N][t]=!0),q(e,t,n)):j(e,t,n)},Y=function(e,t){g(e);for(var n,r=v(t=w(t)),o=0,i=r.length;i>o;)V(e,n=r[o++],t[n]);return e},G=function(e){var t=U.call(this,e=_(e,!0));return!(this===z&&o(B,e)&&!o(D,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,N)&&this[N][e])||t)},$=function(e,t){if(e=w(e),t=_(t,!0),e!==z||!o(B,t)||o(D,t)){var n=P(e,t);return!n||!o(B,t)||o(e,N)&&e[N][t]||(n.enumerable=!0),n}},X=function(e){for(var t,n=T(w(e)),r=[],i=0;n.length>i;)o(B,t=n[i++])||t==N||t==s||r.push(t);return r},Z=function(e){for(var t,n=e===z,r=T(n?D:w(e)),i=[],a=0;r.length>a;)!o(B,t=r[a++])||n&&!o(z,t)||i.push(B[t]);return i};J||(u((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(D,n),o(this,N)&&o(this[N],e)&&(this[N][e]=!1),q(this,e,x(1,n))};return i&&H&&q(z,e,{configurable:!0,set:t}),K(e)}).prototype,"toString",function(){return this._k}),E.f=$,O.f=V,n(88).f=k.f=X,n(38).f=G,n(57).f=Z,i&&!n(39)&&u(z,"propertyIsEnumerable",G,!0),h.f=function(e){return K(d(e))}),a(a.G+a.W+a.F*!J,{Symbol:R});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)d(Q[ee++]);for(var te=A(d.store),ne=0;te.length>ne;)y(te[ne++]);a(a.S+a.F*!J,"Symbol",{for:function(e){return o(L,e+="")?L[e]:L[e]=R(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in L)if(L[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!J,"Object",{create:function(e,t){return void 0===t?S(e):Y(S(e),t)},defineProperty:V,defineProperties:Y,getOwnPropertyDescriptor:$,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),I&&a(a.S+a.F*(!J||c(function(){var e=R();return"[null]"!=C([e])||"{}"!=C({a:e})||"{}"!=C(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!W(e))return m(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!W(t))return t}),r[1]=t,C.apply(I,r)}}),R.prototype[M]||n(15)(R.prototype,M,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){var r=n(37)("meta"),o=n(10),i=n(16),a=n(9).f,u=0,s=Object.isExtensible||function(){return!0},c=!n(21)(function(){return s(Object.preventExtensions({}))}),f=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";f(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;f(e)}return e[r].w},onFreeze:function(e){return c&&l.NEED&&s(e)&&!i(e,r)&&f(e),e}}},function(e,t,n){var r=n(27),o=n(57),i=n(38);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,u=n(e),s=i.f,c=0;u.length>c;)s.call(e,a=u[c++])&&t.push(a);return t}},function(e,t,n){var r=n(28);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(22),o=n(88).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){n(63)("asyncIterator")},function(e,t,n){n(63)("observable")},function(e,t,n){n(160);var r=n(0).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(5);r(r.S+r.F*!n(11),"Object",{defineProperty:n(9).f})},function(e,t,n){var r=n(162),o=n(163);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]}},function(e,t,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=y(n(7)),o=y(n(8)),i=y(n(33)),a=y(n(13)),u=y(n(14)),s=y(n(43)),c=y(n(44)),f=n(31),l=y(f),p=n(94),d=n(32),h=n(17);function y(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(e){var n=this;(0,a.default)(this,t);var u=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e));return u.state={loggedIn:!1},u.request=(0,d.client)(window.opener,u.props.appOrigin),u.postSession=(0,o.default)(r.default.mark(function e(){var t,o;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,h.postMessageStorage)(window.opener,u.props.appOrigin),e.next=3,(0,p.currentSession)(t);case 3:return o=e.sent,e.abrupt("return",u.request({method:"foundSession",args:[o]}));case 5:case"end":return e.stop()}},e,n)})),u.postSession().then(function(){u.setState({loggedIn:!0})}),u}return(0,c.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return this.state.loggedIn?l.default.createElement(g,null):l.default.createElement(m,null)}},{key:"componentDidUpdate",value:function(){var e=this.props.afterLoggedIn;this.state.loggedIn&&e()}}]),t}(f.Component);t.default=v;var m=function(){return l.default.createElement("h1",{class:"center"},"Logging in...")},g=function(){return l.default.createElement("h1",{className:"center"},"Logged in!")}},function(e,t,n){n(167),e.exports=n(0).Object.getPrototypeOf},function(e,t,n){var r=n(29),o=n(79);n(91)("getPrototypeOf",function(){return function(e){return o(r(e))}})},function(e,t,n){n(169),e.exports=n(0).Object.setPrototypeOf},function(e,t,n){var r=n(5);r(r.S,"Object",{setPrototypeOf:n(170).set})},function(e,t,n){var r=n(10),o=n(6),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(20)(Function.call,n(89).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){n(172);var r=n(0).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(5);r(r.S,"Object",{create:n(58)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(7)),o=s(n(8));t.authnFetch=function(e){var t=this;return function(){var n=(0,o.default)(r.default.mark(function n(o,u){var s,l,p,d;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=u||{},t.next=3,(0,a.getSession)(e);case 3:return s=t.sent,t.next=6,c(e)(o);case 6:if(l=t.sent,!s||!l){t.next=9;break}return t.abrupt("return",f(s,o,u));case 9:return t.next=11,fetch(o,u);case 11:if(401!==(p=t.sent).status){t.next=20;break}return t.next=15,(0,i.updateHostFromResponse)(e)(p);case 15:return t.next=17,c(e)(o);case 17:if(d=t.sent,!s||!d){t.next=20;break}return t.abrupt("return",f(s,o,u));case 20:return t.abrupt("return",p);case 21:case"end":return t.stop()}},n,t)}));return function(e,t){return n.apply(this,arguments)}}()},n(95);var i=n(175),a=n(66),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(67));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=this;return function(){var n=(0,o.default)(r.default.mark(function n(o){var u;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,a.getSession)(e);case 2:if(t.sent){t.next=5;break}return t.abrupt("return",!1);case 5:return t.next=7,(0,i.getHost)(e)(o);case 7:return u=t.sent,t.abrupt("return",null!=u&&u.requiresAuth);case 9:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()}var f=function(){var e=(0,o.default)(r.default.mark(function e(t,n,o){return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u.fetchWithCredentials(t)(n,o));case 1:case"end":return e.stop()}},e,void 0)}));return function(t,n,r){return e.apply(this,arguments)}}()},function(e,t){!function(e){"use strict";if(!e.fetch){var t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(t.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(e){return e&&DataView.prototype.isPrototypeOf(e)},o=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};f.prototype.append=function(e,t){e=u(e),t=s(t);var n=this.map[e];this.map[e]=n?n+","+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=s(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),c(e)},f.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},f.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),c(e)},t.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},y.call(v.prototype),y.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var a=[301,302,303,307,308];g.redirect=function(e,t){if(-1===a.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.Headers=f,e.Request=v,e.Response=g,e.fetch=function(e,n){return new Promise(function(r,o){var i=new v(e,n),a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:function(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;r(new g(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function s(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function f(e){this.map={},e instanceof f?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function d(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&r(e))this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!o(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=h(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}function v(e,t){var n=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=function(e){var t=e.toUpperCase();return i.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function m(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function g(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostNameFromRequestInfo=void 0;var r=f(n(90)),o=f(n(19)),i=f(n(7)),a=f(n(8));t.getHost=function(e){var t=this;return function(){var n=(0,a.default)(i.default.mark(function n(r){var o,a,c,f;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=l(r),t.next=3,(0,u.getSession)(e);case 3:if(!(a=t.sent)||l(a.idp)!==o){t.next=6;break}return t.abrupt("return",{url:o,requiresAuth:!0});case 6:return t.next=8,(0,s.getData)(e);case 8:if(c=t.sent,f=c.hosts){t.next=12;break}return t.abrupt("return",null);case 12:return t.abrupt("return",f[o]||null);case 13:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()},t.saveHost=p,t.updateHostFromResponse=function(e){var t=this;return function(){var n=(0,a.default)(i.default.mark(function n(r){var o;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!c.requiresAuth(r)){t.next=4;break}return o=l(r.url),t.next=4,p(e)({url:o,requiresAuth:!0});case 4:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()};var u=n(66),s=n(17),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(67));function f(e){return e&&e.__esModule?e:{default:e}}var l=t.hostNameFromRequestInfo=function(e){return(e instanceof URL?e:e instanceof Request?new URL(e.url):new URL(e)).host};function p(e){var t=this;return function(){var n=(0,a.default)(i.default.mark(function n(a){var u=a.url,c=a.requiresAuth;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.updateStorage)(e,function(e){return(0,o.default)({},e,{hosts:(0,o.default)({},e.hosts,(0,r.default)({},u,{requiresAuth:c}))})});case 2:case"end":return t.stop()}},n,t)}));return function(e){return n.apply(this,arguments)}}()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.format=void 0;var r=i(n(177)),o=i(n(178));function i(e){return e&&e.__esModule?e:{default:e}}t.format=r.default,t.parse=o.default},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(96);function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var u=function(e){return e.reduce(function(e,t){var n=o(t,2),r=n[0],u=n[1],s=function(e){return function(t){return e+"="+(t&&!(0,i.isToken)(t)?(0,i.quote)(t):t)}}(r);if(!(0,i.isToken)(r))throw new TypeError;return Array.isArray(u)?[].concat(a(e),a(u.map(s))):[].concat(a(e),[s(u)])},[])};t.default=function(e,t,n){var o="string"==typeof e?{scheme:e,token:t,params:n}:e;if("object"!==(void 0===o?"undefined":r(o)))throw new TypeError;if(!(0,i.isScheme)(o.scheme))throw new TypeError("Invalid scheme.");return[o.scheme].concat(a(void 0!==o.token?[o.token]:[]),a(void 0!==o.params?function e(t,n){if(Array.isArray(t))return u(t);if("object"===(void 0===t?"undefined":r(t)))return e(Object.keys(t).map(function(e){return[e,t[e]]}),n);throw new TypeError}(o.params):[])).join(" ")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(96),o=/((?:[a-zA-Z0-9._~+\/-]+=*(?:\s+|$))|[^\u0000-\u001F\u007F()<>@,;:\\"/?={}\[\]\u0020\u0009]+)(?:=([^\\"=\s,]+|"(?:[^"\\]|\\.)*"))?/g,i=function(e,t){var n='"'===t.charAt(0)?(0,r.unquote)(t):t.trim();return Array.isArray(e)?e.concat(n):e?[e,n]:n};t.default=function(e){if("string"!=typeof e)throw new TypeError("Header value must be a string.");var t=e.indexOf(" "),n=e.substr(0,t);if(!(0,r.isScheme)(n))throw new TypeError("Invalid scheme "+n);return function(e,t){for(var n=null,r=null,a={};null!==(n=o.exec(t));)n[2]?a[n[1]]=i(a[n[1]],n[2]):r=i(r,n[1]);return{scheme:e,params:a,token:r}}(n,e.substr(t))}},function(e,t,n){"use strict";e.exports=n(97)},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(u(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<i;s=r[++n])y(s)||!w(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(n,o){if(g(e.process))return function(){return t.deprecate(n,o).apply(this,arguments)};if(!0===r.noDeprecation)return n;var i=!1;return function(){if(!i){if(r.throwDeprecation)throw new Error(o);r.traceDeprecation?console.trace(o):console.error(o),i=!0}return n.apply(this,arguments)}};var i,a={};function u(e,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function f(e,n,r){if(e.customInspect&&n&&S(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return m(o)||(o=f(e,o,r)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(v(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),u=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),x(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(S(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(b(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return l(n)}var c,w="",k=!1,E=["{","}"];(d(n)&&(k=!0,E=["[","]"]),S(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(w=" "+RegExp.prototype.toString.call(n)),_(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+l(n)),0!==a.length||k&&0!=n.length?r<0?b(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=k?function(e,t,n,r,o){for(var i=[],a=0,u=t.length;a<u;++a)A(t,String(a))?i.push(p(e,t,n,r,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(e,t,n,r,o,!0))}),i}(e,n,r,u,a):a.map(function(t){return p(e,n,r,u,t,k)}),e.seen.pop(),function(e,t,n){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,w,E)):E[0]+w+E[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,i){var a,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),A(r,o)||(a="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=y(n)?f(e,s.value,null):f(e,s.value,n-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===k(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===k(e)}function x(e){return w(e)&&("[object Error]"===k(e)||e instanceof Error)}function S(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(i)&&(i=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=r.pid;a[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else a[e]=function(){};return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=b,t.isObject=w,t.isDate=_,t.isError=x,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(181);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",function(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}(),t.format.apply(t,arguments))},t.inherits=n(182),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(24),n(87))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(101),i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initialize(t,n)}return r(e,null,[{key:"schema",get:function(){throw new Error("Schema must be defined by classes extending JSONDocument")}}]),r(e,[{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.constructor.schema.initialize(this,e,t)}},{key:"validate",value:function(e){var t=this.constructor.schema;return(e||t).validate(this)}},{key:"patch",value:function(e){var t=new o(e);t.apply(this)}},{key:"select",value:function(){}},{key:"project",value:function(e){return e.project(this)}}],[{key:"serialize",value:function(e){return JSON.stringify(e)}},{key:"deserialize",value:function(e){try{return JSON.parse(e)}catch(e){throw new Error("Failed to parse JSON")}}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(69),i=1,a=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperty(this,"mapping",{enumerable:!1,value:new Map}),Object.keys(t).forEach(function(e){var r=t[e];n.mapping.set(new o(e,i),new o(r,i))})}return r(e,[{key:"map",value:function(e,t){this.mapping.forEach(function(n,r){r.add(e,n.get(t))})}},{key:"project",value:function(e,t){this.mapping.forEach(function(n,r){n.add(t,r.get(e))})}}]),e}();e.exports=a},function(e,t,n){"use strict";var r="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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(100),u=n(102),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Object.assign(this,t),Object.defineProperties(this,{initialize:{enumerable:!1,writeable:!1,value:a.compile(t)},validate:{enumerable:!1,writeable:!1,value:u.compile(t)}})}return o(e,[{key:"extend",value:function(t){function n(e){return e&&"object"===(void 0===e?"undefined":r(e))&&null!==e&&!Array.isArray(e)}return new e(function e(t,r){var o=Object.assign({},t);return n(t)&&n(r)&&Object.keys(r).forEach(function(a){n(r[a])&&a in t?o[a]=e(t[a],r[a]):Object.assign(o,i({},a,r[a]))}),o}(this,t))}}]),e}();e.exports=s},function(e,t,n){"use strict";(function(e){var r=n(190);function o(t,n){return void 0===n&&(n="utf8"),e.isBuffer(t)?a(t.toString("base64")):a(new e(t,n).toString("base64"))}function i(e){return e=e.toString(),r.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var u=o;u.encode=o,u.decode=function(t,n){return void 0===n&&(n="utf8"),new e(i(t),"base64").toString(n)},u.toBase64=i,u.fromBase64=a,u.toBuffer=function(t){return new e(i(t),"base64")},Object.defineProperty(t,"__esModule",{value:!0}),t.default=u}).call(this,n(25).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),s=0,f=a>0?r-4:r,l=0;l<f;l+=4)t=o[e.charCodeAt(l)]<<18|o[e.charCodeAt(l+1)]<<12|o[e.charCodeAt(l+2)]<<6|o[e.charCodeAt(l+3)],u[s++]=t>>16&255,u[s++]=t>>8&255,u[s++]=255&t;2===a&&(t=o[e.charCodeAt(l)]<<2|o[e.charCodeAt(l+1)]>>4,u[s++]=255&t);1===a&&(t=o[e.charCodeAt(l)]<<10|o[e.charCodeAt(l+1)]<<4|o[e.charCodeAt(l+2)]>>2,u[s++]=t>>8&255,u[s++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,u=n-o;a<u;a+=16383)i.push(l(e,a,a+16383>u?u:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],o[a.charCodeAt(u)]=u;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(f(r));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,u=8*o-r-1,s=(1<<u)-1,c=s>>1,f=-7,l=n?o-1:0,p=n?-1:1,d=e[t+l];for(l+=p,i=d&(1<<-f)-1,d>>=-f,f+=u;f>0;i=256*i+e[t+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[t+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,u,s,c=8*i-o-1,f=(1<<c)-1,l=f>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+l>=1?p/s:p*Math.pow(2,1-l))*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(t*s-1)*Math.pow(2,o),a+=l):(u=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&u,d+=h,u/=256,o-=8);for(a=a<<o|u,c+=o;c>0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var n=t.length,r=n%4;if(!r)return t;var o=n,i=4-r,a=new e(n+i);for(a.write(t);i--;)a.write("=",o++);return a.toString()}}).call(this,n(25).Buffer)},function(e,t,n){"use strict";var r=n(192),o=n(193),i=n(195),a=new(n(196));a.define("HS256","sign",new o({name:"HMAC",hash:{name:"SHA-256"}})),a.define("HS384","sign",new o({name:"HMAC",hash:{name:"SHA-384"}})),a.define("HS512","sign",new o({name:"HMAC",hash:{name:"SHA-512"}})),a.define("RS256","sign",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),a.define("RS384","sign",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),a.define("RS512","sign",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),a.define("none","sign",new r({})),a.define("HS256","verify",new o({name:"HMAC",hash:{name:"SHA-256"}})),a.define("HS384","verify",new o({name:"HMAC",hash:{name:"SHA-384"}})),a.define("HS512","verify",new o({name:"HMAC",hash:{name:"SHA-512"}})),a.define("RS256","verify",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),a.define("RS384","verify",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),a.define("RS512","verify",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),a.define("none","verify",new r({})),a.define("RS256","importKey",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),a.define("RS384","importKey",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),a.define("RS512","importKey",new i({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"sign",value:function(){return Promise.resolve("")}},{key:"verify",value:function(){}}]),e}();e.exports=o},function(e,t,n){"use strict";(function(t){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(18),i=n(46),a=n(103),u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.params=t}return r(e,[{key:"sign",value:function(e,n){var r=this.params;return n=(new a).encode(n),i.subtle.sign(r,e,n).then(function(e){return o(t.from(e))})}},{key:"verify",value:function(e,t,n){var r=this.params;return"string"==typeof t&&(t=Uint8Array.from(o.toBuffer(t))),"string"==typeof n&&(n=(new a).encode(n)),i.subtle.verify(r,e,t,n)}},{key:"assertSufficientKeyLength",value:function(e){if(e.length<this.bitlength)throw new Error("The key is too short.")}}]),e}();e.exports=u}).call(this,n(25).Buffer)},function(e,t){e.exports=TextEncoder},function(e,t,n){"use strict";(function(t){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(18),i=n(46),a=n(103),u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.params=t}return r(e,[{key:"sign",value:function(e,n){var r=this.params;return n=(new a).encode(n),i.subtle.sign(r,e,n).then(function(e){return o(t.from(e))})}},{key:"verify",value:function(e,t,n){var r=this.params;return"string"==typeof t&&(t=Uint8Array.from(o.toBuffer(t))),"string"==typeof n&&(n=(new a).encode(n)),i.subtle.verify(r,e,t,n)}},{key:"importKey",value:function(e){var t=Object.assign({},e),n=this.params,r=e.key_ops||[];return"sig"===e.use&&r.push("verify"),"enc"===e.use?Promise.resolve(e):(e.key_ops&&(r=e.key_ops),i.subtle.importKey("jwk",t,n,!0,r).then(function(e){return Object.defineProperty(t,"cryptoKey",{enumerable:!1,value:e}),t}))}}]),e}();e.exports=u}).call(this,n(25).Buffer)},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(104),i=["sign","verify","encrypt","decrypt","importKey"],a=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i.forEach(function(e){t[e]={}})}return r(e,[{key:"define",value:function(e,t,n){this[t][e]=n}},{key:"normalize",value:function(e,t){var n=this[e];if(!n)return new SyntaxError;var r=n[t];return r||new o(t)}}],[{key:"operations",get:function(){return i}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=n(4).Formats;r.register("StringOrURI",new RegExp),r.register("NumericDate",new RegExp),r.register("URI",new RegExp),r.register("url",new RegExp),r.register("base64",new RegExp),r.register("base64url",new RegExp),r.register("MediaType",new RegExp)},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=n(4).JSONDocument,i=n(108),a=n(107),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o),r(t,null,[{key:"importKeys",value:function(e){var n=this.schema.validate(e);if(!n.valid)return Promise.reject(new Error("Invalid JWKSet: "+JSON.stringify(n,null,2)));if(!e.keys)return Promise.reject(new Error("Cannot import JWKSet: keys property is empty"));var r=void 0,o=void 0;try{r=new t(e),o=e.keys.map(function(e){return a.importKey(e)})}catch(e){return Promise.reject(e)}return Promise.all(o).then(function(e){return r.keys=e,r})}},{key:"schema",get:function(){return i}}]),t}();e.exports=u},function(e,t,n){"use strict";var r="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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(18),a=n(4).JSONDocument,u=n(109),s=n(113),c=n(106),f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a),o(t,[{key:"isJWE",value:function(){return!!this.header.enc}},{key:"resolveKeys",value:function(e){var t=this.header.kid,n=void 0,o=void 0;if(Array.isArray(e)&&(n=e),e.keys&&(n=e.keys),e.keys||"object"!==(void 0===e?"undefined":r(e))||(n=[e]),!n)throw new c("Invalid JWK argument");return!!(o=t?n.find(function(e){return e.kid===t}):n.find(function(e){return"sig"===e.use}))&&(this.key=o.cryptoKey,!0)}},{key:"encode",value:function(){var e=this.validate();if(!e.valid)return Promise.reject(e);return this.isJWE()?JWE.encrypt(this):s.sign(this)}},{key:"verify",value:function(){var e=this.validate();return e.valid?s.verify(this):Promise.reject(e)}}],[{key:"decode",value:function(e){var t=void 0;if("string"!=typeof e)throw new c("JWT must be a string");if(e.startsWith("{")){try{e=JSON.parse(e,function(){})}catch(e){throw new c("Invalid JWT serialization")}e.signatures||e.recipients?e.serialization="json":e.serialization="flattened",t=new this(e,{filter:!1})}else try{var n=e.split("."),r=n.length;if(3!==r&&5!==r)throw new Error("Malformed JWT");var o=JSON.parse(i.decode(n[0]));if(3===r){t=new this({type:"JWS",segments:n,header:o,payload:JSON.parse(i.decode(n[1])),signature:n[2],serialization:"compact"},{filter:!1})}}catch(e){throw new c("Invalid JWT compact serialization")}return t}},{key:"encode",value:function(e,n,r){return new t(e,n).encode(r)}},{key:"verify",value:function(e,n){var r=t.decode(n);return r.key=e,r.verify().then(function(e){return r})}},{key:"schema",get:function(){return u}}]),t}();e.exports=f},function(e,t,n){"use strict";(function(t){var r=l(n(114)),o=l(n(203)),i=l(n(65)),a=l(n(115)),u=l(n(35)),s=l(n(12)),c=l(n(13)),f=l(n(14));function l(e){return e&&e.__esModule?e:{default:e}}var p=n(68),d=n(18),h=n(46),y=n(34).JWT,v=n(116),m=n(45).URL,g=function(){function e(){(0,c.default)(this,e)}return(0,f.default)(e,null,[{key:"create",value:function(n,r,o){var c=n.provider,f=n.defaults,l=n.registration,y=void 0,g=void 0,b=void 0,w=void 0;return s.default.resolve().then(function(){return p(c.configuration,"RelyingParty provider OpenID Configuration is missing"),p(f.authenticate,"RelyingParty default authentication parameters are missing"),p(l,"RelyingParty client registration is missing"),y=c.configuration.issuer,g=c.configuration.authorization_endpoint,b={client_id:l.client_id},w=(0,u.default)(f.authenticate,b,r),p(y,"Missing issuer in provider OpenID Configuration"),p(g,"Missing authorization_endpoint in provider OpenID Configuration"),p(w.scope,"Missing scope parameter in authentication request"),p(w.response_type,"Missing response_type parameter in authentication request"),p(w.client_id,"Missing client_id parameter in authentication request"),p(w.redirect_uri,"Missing redirect_uri parameter in authentication request"),w.state=(0,a.default)(h.getRandomValues(new Uint8Array(16))),w.nonce=(0,a.default)(h.getRandomValues(new Uint8Array(16))),s.default.all([h.subtle.digest({name:"SHA-256"},new Uint8Array(w.state)),h.subtle.digest({name:"SHA-256"},new Uint8Array(w.nonce))])}).then(function(e){var n=d(t.from(e[0])),r=d(t.from(e[1]));o[y+"/requestHistory/"+n]=(0,i.default)(w),w.state=n,w.nonce=r}).then(function(){return e.generateSessionKeys()}).then(function(t){e.storeSessionKeys(t,w,o)}).then(function(){if(c.configuration.request_parameter_supported)return e.encodeRequestParams(w).then(function(e){w=e})}).then(function(){var e=new m(g);return e.search=v.encode(w),e.href})}},{key:"generateSessionKeys",value:function(){return h.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(e){return s.default.all([h.subtle.exportKey("jwk",e.publicKey),h.subtle.exportKey("jwk",e.privateKey)])}).then(function(e){var t=(0,o.default)(e,2);return{public:t[0],private:t[1]}})}},{key:"storeSessionKeys",value:function(e,t,n){n["oidc.session.privateKey"]=(0,i.default)(e.private),t.key=e.public}},{key:"encodeRequestParams",value:function(e){var t=["scope","client_id","response_type","state"],n={};return(0,r.default)(e).filter(function(e){return!t.includes(e)}).forEach(function(t){n[t]=e[t]}),new y({header:{alg:"none"},payload:n},{filter:!1}).encode().then(function(t){return{scope:e.scope,client_id:e.client_id,response_type:e.response_type,request:t,state:e.state}})}}]),e}();e.exports=g}).call(this,n(25).Buffer)},function(e,t,n){n(202),e.exports=n(0).Object.keys},function(e,t,n){var r=n(29),o=n(27);n(91)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(204)),o=i(n(207));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var u,s=(0,o.default)(e);!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){e.exports={default:n(205),__esModule:!0}},function(e,t,n){n(41),n(30),e.exports=n(206)},function(e,t,n){var r=n(59),o=n(2)("iterator"),i=n(23);e.exports=n(0).isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(r(t))}},function(e,t,n){e.exports={default:n(208),__esModule:!0}},function(e,t,n){n(41),n(30),e.exports=n(209)},function(e,t,n){var r=n(6),o=n(60);e.exports=n(0).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){n(30),n(211),e.exports=n(0).Array.from},function(e,t,n){"use strict";var r=n(20),o=n(5),i=n(29),a=n(80),u=n(81),s=n(52),c=n(212),f=n(60);o(o.S+o.F*!n(86)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,l,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,y=h>1?arguments[1]:void 0,v=void 0!==y,m=0,g=f(p);if(v&&(y=r(y,h>2?arguments[2]:void 0,2)),void 0==g||d==Array&&u(g))for(n=new d(t=s(p.length));t>m;m++)c(n,m,v?y(p[m],m):p[m]);else for(l=g.call(p),n=new d;!(o=l.next()).done;m++)c(n,m,v?a(l,y,[o.value,m],!0):o.value);return n.length=m,n}})},function(e,t,n){"use strict";var r=n(9),o=n(26);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){"use strict";(function(t,r){var o=s(n(35)),i=s(n(12)),a=s(n(13)),u=s(n(14));function s(e){return e&&e.__esModule?e:{default:e}}var c=n(45).URL,f=n(68),l=n(46),p=n(18),d=n(98),h=d.Headers?d.Headers:t.Headers,y=n(116),v=n(214),m=n(216),g=n(117),b=function(){function e(){(0,a.default)(this,e)}return(0,u.default)(e,null,[{key:"validateResponse",value:function(e){return i.default.resolve(e).then(this.parseResponse).then(this.matchRequest).then(this.validateStateParam).then(this.errorResponse).then(this.validateResponseMode).then(this.validateResponseParams).then(this.exchangeAuthorizationCode).then(this.validateIDToken).then(m.fromAuthResponse)}},{key:"parseResponse",value:function(e){var t=e.redirect,n=e.body;if(t&&n||!t&&!n)throw new Error("Invalid response mode");if(t){var r=new c(t),o=r.search,i=r.hash;if(o&&i||!o&&!i)throw new Error("Invalid response mode");o&&(e.params=y.decode(o.substring(1)),e.mode="query"),i&&(e.params=y.decode(i.substring(1)),e.mode="fragment")}return n&&(e.params=y.decode(n),e.mode="form_post"),e}},{key:"matchRequest",value:function(e){var t=e.rp,n=e.params,r=e.session,o=n.state,i=t.provider.configuration.issuer;if(!o)throw new Error("Missing state parameter in authentication response");var a=r[i+"/requestHistory/"+o];if(!a)throw new Error("Mismatching state parameter in authentication response");return e.request=JSON.parse(a),e}},{key:"validateStateParam",value:function(e){var t=new Uint8Array(e.request.state),n=e.params.state;return l.subtle.digest({name:"SHA-256"},t).then(function(t){if(n!==p(r.from(t)))throw new Error("Mismatching state parameter in authentication response");return e})}},{key:"errorResponse",value:function(e){var t=e.params.error;return t?i.default.reject(t):i.default.resolve(e)}},{key:"validateResponseMode",value:function(e){if("code"!==e.request.response_type&&"query"===e.mode)throw new Error("Invalid response mode");return e}},{key:"validateResponseParams",value:function(e){var t=e.request,n=e.params,r=t.response_type.split(" ");return r.includes("code")&&f(n.code,"Missing authorization code in authentication response"),r.includes("id_token")&&f(n.id_token,"Missing id_token in authentication response"),r.includes("token")&&(f(n.access_token,"Missing access_token in authentication response"),f(n.token_type,"Missing token_type in authentication response")),e}},{key:"exchangeAuthorizationCode",value:function(e){var t=e.rp,n=e.params,a=e.request,u=n.code;if(!u||"code"!==a.response_type)return i.default.resolve(e);var s=t.provider,c=t.registration,l=c.client_id,p=c.client_secret;if(!p)return i.default.reject(new Error("Client cannot exchange authorization code because it is not a confidential client"));var v=s.configuration.token_endpoint,m=new h({"Content-Type":"application/x-www-form-urlencoded"}),b={grant_type:"authorization_code",code:u,redirect_uri:a.redirect_uri},w=c.token_endpoint_auth_method||"client_secret_basic";if("client_secret_basic"===w){var _=new r(l+":"+p).toString("base64");m.set("Authorization","Basic "+_)}"client_secret_post"===w&&(b.client_id=l,b.client_secret=p);var x=y.encode(b);return d(v,{method:"POST",headers:m,body:x}).then(g("Error exchanging authorization code")).then(function(e){return e.json()}).then(function(t){return f(t.access_token,"Missing access_token in token response"),f(t.token_type,"Missing token_type in token response"),f(t.id_token,"Missing id_token in token response"),e.params=(0,o.default)(e.params,t),e})}},{key:"validateIDToken",value:function(t){return t.params.id_token?i.default.resolve(t).then(e.decryptIDToken).then(e.decodeIDToken).then(e.validateIssuer).then(e.validateAudience).then(e.resolveKeys).then(e.verifySignature).then(e.validateExpires).then(e.verifyNonce).then(e.validateAcr).then(e.validateAuthTime).then(e.validateAccessTokenHash).then(e.validateAuthorizationCodeHash):i.default.resolve(t)}},{key:"decryptIDToken",value:function(e){return i.default.resolve(e)}},{key:"decodeIDToken",value:function(e){var t=e.params.id_token;return t&&(e.decoded=v.decode(t)),e}},{key:"validateIssuer",value:function(e){var t=e.rp.provider.configuration;if(e.decoded.payload.iss!==t.issuer)throw new Error("Mismatching issuer in ID Token");return e}},{key:"validateAudience",value:function(e){var t=e.rp.registration,n=e.decoded.payload,r=n.aud,o=n.azp;if("string"==typeof r&&r!==t.client_id)throw new Error("Mismatching audience in id_token");if(Array.isArray(r)&&!r.includes(t.client_id))throw new Error("Mismatching audience in id_token");if(Array.isArray(r)&&!o)throw new Error("Missing azp claim in id_token");if(o&&o!==t.client_id)throw new Error("Mismatching azp claim in id_token");return e}},{key:"resolveKeys",value:function(e){var t=e.rp,n=t.provider,r=e.decoded;return i.default.resolve(n.jwks).then(function(e){return e||t.jwks()}).then(function(t){if(r.resolveKeys(t))return i.default.resolve(e);throw new Error("Cannot resolve signing key for ID Token")})}},{key:"verifySignature",value:function(e){var t=e.decoded.header.alg,n=e.rp.registration.id_token_signed_response_alg||"RS256";if(t!==n)throw new Error("Expected ID Token to be signed with "+n);return e.decoded.verify().then(function(t){if(!t)throw new Error("Invalid ID Token signature");return e})}},{key:"validateExpires",value:function(e){if(e.decoded.payload.exp<=Math.floor(Date.now()/1e3))throw new Error("Expired ID Token");return e}},{key:"verifyNonce",value:function(e){var t=new Uint8Array(e.request.nonce),n=e.decoded.payload.nonce;if(!n)throw new Error("Missing nonce in ID Token");return l.subtle.digest({name:"SHA-256"},t).then(function(t){if(n!==p(r.from(t)))throw new Error("Mismatching nonce in ID Token");return e})}},{key:"validateAcr",value:function(e){return e}},{key:"validateAuthTime",value:function(e){return e}},{key:"validateAccessTokenHash",value:function(e){return e}},{key:"validateAuthorizationCodeHash",value:function(e){return e}}]),e}();e.exports=b}).call(this,n(24),n(25).Buffer)},function(e,t,n){"use strict";var r=s(n(33)),o=s(n(13)),i=s(n(14)),a=s(n(43)),u=s(n(44));function s(e){return e&&e.__esModule?e:{default:e}}var c=n(34).JWT,f=n(215),l=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,null,[{key:"schema",get:function(){return f}}]),t}(c);e.exports=l},function(e,t,n){"use strict";var r=n(34).JWTSchema.extend({properties:{header:{},payload:{properties:{iss:{type:"string",format:"url"},sub:{type:"string",maxLength:255},auth_time:{type:"integer",format:"NumericDate"},nonce:{type:"string"},acr:{type:"string"},amr:{type:"array",items:{type:"string"}},azp:{type:"string",format:"StringOrURI"}},required:["iss","sub","aud","exp","iat"]}}});e.exports=r},function(e,t,n){"use strict";var r=i(n(13)),o=i(n(14));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){function e(t){(0,r.default)(this,e),this.idp=t.idp,this.clientId=t.clientId,this.sessionKey=t.sessionKey,this.decoded=t.decoded,this.accessToken=t.accessToken,this.idToken=t.idToken}return(0,o.default)(e,null,[{key:"fromAuthResponse",value:function(t){var r=n(97),o=t.decoded.payload,i=t.rp.registration;return new e({sessionKey:t.session[r.SESSION_PRIVATE_KEY],idp:o.iss,clientId:i.client_id,decoded:t.decoded,accessToken:t.params.access_token,idToken:t.params.id_token})}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=new(0,n(4).JSONSchema)({type:"object",properties:{provider:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},configuration:{},jwks:{}},required:["url"]},defaults:{type:"object",properties:{authenticate:{type:"object",properties:{redirect_uri:{type:"string",format:"uri"},response_type:{type:"string",default:"id_token token",enum:["code","token","id_token token","id_token token code"]},display:{type:"string",default:"page",enum:["page","popup"]},scope:{type:["string","array"],default:["openid"]}}},register:{}}},registration:{},store:{type:"object",default:{}}}});e.exports=r},function(e,t,n){"use strict";var r=s(n(33)),o=s(n(92)),i=s(n(93)),a=s(n(42)),u=s(n(64));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,u.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var f=n(45).URL,l=n(34),p=l.JWT,d=l.JWK,h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,a.default)(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o.default?(0,o.default)(e,t):e.__proto__=t)}(t,p),c(t,null,[{key:"issueFor",value:function(e,n){if(!e)throw new Error("Cannot issue PoPToken - missing resource server URI");if(!n.sessionKey)throw new Error("Cannot issue PoPToken - missing session key");if(!n.idToken)throw new Error("Cannot issue PoPToken - missing id token");var r=JSON.parse(n.sessionKey);return d.importKey(r).then(function(r){var o={aud:new f(e).origin,key:r,iss:n.clientId,id_token:n.idToken};return t.issue(o)}).then(function(e){return e.encode()})}},{key:"issue",value:function(e){var n=e.aud,r=e.iss,o=e.key,i=o.alg,a=e.iat||Math.floor(Date.now()/1e3);return new t({header:{alg:i},payload:{iss:r,aud:n,exp:a+(e.max||3600),iat:a,id_token:e.id_token,token_type:"pop"},key:o.cryptoKey},{filter:!1})}}]),t}();e.exports=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openIdpSelector=t.startPopupServer=t.appOriginHandler=t.loginHandler=t.storageHandler=void 0;var r=u(n(12)),o=u(n(220)),i=n(32),a=n(71);function u(e){return e&&e.__esModule?e:{default:e}}var s=t.storageHandler=function(e){return function(t){var n=t.id,r=t.method,i=t.args;switch(r){case"storage/getItem":return e.getItem.apply(e,(0,o.default)(i)).then(function(e){return{id:n,ret:e}});case"storage/setItem":return e.setItem.apply(e,(0,o.default)(i)).then(function(){return{id:n,ret:null}});case"storage/removeItem":return e.removeItem.apply(e,(0,o.default)(i)).then(function(){return{id:n,ret:null}});default:return null}}},c=t.loginHandler=function(e,t){return function(n){var o=n.id,i=n.method,a=n.args;switch(i){case"getLoginOptions":return r.default.resolve({id:o,ret:{popupUri:e.popupUri,callbackUri:e.callbackUri}});case"foundSession":return t(a[0]),r.default.resolve({id:o,ret:null});default:return null}}},f=t.appOriginHandler=function(e){var t=e.id;return"getAppOrigin"===e.method?r.default.resolve({id:t,ret:window.location.origin}):null};t.startPopupServer=function(e,t,n){return new r.default(function(r,o){if(!n.popupUri||!n.callbackUri)return o(new Error('Cannot serve a popup without both "options.popupUri" and "options.callbackUri"'));var u=(0,i.server)(t,(0,a.originOf)(n.popupUri||""))(function(e,t,n){return(0,i.combineHandlers)(s(e),c(t,n),f)}(e,n,function(e){u.stop(),r(e)}));u.start()})},t.openIdpSelector=function(e){if(!e.popupUri||!e.callbackUri)throw new Error('Cannot open IDP select UI. Must provide both "options.popupUri" and "options.callbackUri".');return window.open(e.popupUri,"_blank","width=650,height=400,left="+(window.innerWidth-650)/2+",top="+(window.innerHeight-400)/2)}},function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(115));t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,r.default)(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(7)),o=v(n(19)),i=v(n(8)),a=v(n(33)),u=v(n(13)),s=v(n(14)),c=v(n(43)),f=v(n(44)),l=v(n(12)),p=v(n(31)),d=n(94),h=n(32),y=n(17);function v(e){return e&&e.__esModule?e:{default:e}}n(222);var m=function(e,t){return l.default.race([e,new l.default(function(e,n){return setTimeout(function(){return e(null)},t)})])},g=function(e){function t(){var e,n,s,f,l=this;(0,u.default)(this,t);for(var p=arguments.length,v=Array(p),g=0;g<p;g++)v[g]=arguments[g];return n=s=(0,c.default)(this,(e=t.__proto__||(0,a.default)(t)).call.apply(e,[this].concat(v))),s.state={enteringCustomIdp:!1,customIdp:{url:""},error:null},s.toggleEnteringCustomIdp=function(){return s.setState(function(e){return{enteringCustomIdp:!e.enteringCustomIdp,customIdp:{url:""}}})},s.handleChangeIdp=function(e){s.setState({customIdp:{url:e.target.value}})},s.handleSelectIdp=function(e){return function(){var t=(0,i.default)(r.default.mark(function t(n){var i,a,u;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=s.props.appOrigin,n.preventDefault(),window.opener){t.next=6;break}return console.warn("No parent window"),s.setState({error:"Couldn't find the application window. Try closing this popup window and logging in again."}),t.abrupt("return");case 6:return a=(0,h.client)(window.opener,i),t.next=9,m(a({method:"getLoginOptions",args:[]}),2e3);case 9:if(u=t.sent){t.next=14;break}return console.warn("Cannot log in - have not yet received loginOptions from parent window"),s.setState({error:"Couldn't find the application window. Try closing this popup window and logging in again."}),t.abrupt("return");case 14:return u=(0,o.default)({},u,{storage:(0,y.postMessageStorage)(window.opener,i)}),t.next=17,(0,d.login)(e.url,u);case 17:case"end":return t.stop()}},t,l)}));return function(e){return t.apply(this,arguments)}}()},f=n,(0,c.default)(s,f)}return(0,f.default)(t,e),(0,s.default)(t,[{key:"componentDidUpdate",value:function(){this.idpInput&&this.idpInput.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.appName,r=t.idps,o=this.state,i=o.customIdp,a=o.enteringCustomIdp,u=o.error;return p.default.createElement("div",null,p.default.createElement("h1",{className:"center"},"Log in to ",p.default.createElement("span",{className:"app-name"},n)),u&&p.default.createElement(w,{error:u}),p.default.createElement("p",{className:"copy-gentle center"},"Choose where you log in"),a&&p.default.createElement("form",{className:"form-inline",onSubmit:this.handleSelectIdp(i)},p.default.createElement("input",{ref:function(t){return e.idpInput=t},className:"form-inline__input-text",type:"url",placeholder:"https://my-identity.databox.me/profile/card#me",value:i.url,onChange:this.handleChangeIdp}),p.default.createElement("div",{className:"form-inline__controls"},p.default.createElement("button",{className:"btn",type:"submit"},"Log In"),p.default.createElement("button",{className:"btn",type:"reset",onClick:this.toggleEnteringCustomIdp},"Cancel"))),p.default.createElement("div",{className:"idp-list"},p.default.createElement(b,{idp:{displayName:"custom provider"},handleSelectIdp:this.toggleEnteringCustomIdp}),r.map(function(t){return p.default.createElement(b,{idp:t,handleSelectIdp:e.handleSelectIdp(t),key:t.url})})))}}]),t}(p.default.Component),b=function(e){var t=e.idp,n=e.handleSelectIdp;return p.default.createElement("div",{className:"idp"},p.default.createElement("button",{className:"idp__select",onClick:n},p.default.createElement("span",{className:"idp__copy"},"Log in with ",t.displayName),p.default.createElement("span",{className:"idp__icon-container"},t.iconUrl?p.default.createElement("img",{className:"idp__icon",src:t.iconUrl,alt:""}):p.default.createElement("svg",{width:"32",viewBox:"0 0 100 20",alt:""},p.default.createElement("path",{d:"M41.2,50c0-4.9,4-8.8,8.8-8.8s8.8,4,8.8,8.8c0,4.9-4,8.8-8.8,8.8S41.2,54.9,41.2,50z M80.3,41.2c-4.9,0-8.8,4-8.8,8.8 c0,4.9,4,8.8,8.8,8.8s8.8-4,8.8-8.8C89.2,45.1,85.2,41.2,80.3,41.2z M19.7,41.2c-4.9,0-8.8,4-8.8,8.8c0,4.9,4,8.8,8.8,8.8 s8.8-4,8.8-8.8C28.5,45.1,24.5,41.2,19.7,41.2z"})))))},w=function(e){var t=e.error;return p.default.createElement("div",{className:"error center"},t)};t.default=g},function(e,t,n){var r=n(223);"string"==typeof r&&(r=[[e.i,r,""]]);var o={transform:void 0};n(119)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(118)(!1)).push([e.i,".idp-list{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.idp{flex:1 100%;padding:.5em}@media (min-width:500px){.idp{flex:1 200px}}.idp .idp__select{display:flex;justify-content:space-between;align-items:center;border:none;border-radius:2px;width:100%;padding:4px;background-color:#3d6dd3;transition:background-color .4s,box-shadow .4s}.idp .idp__select:focus,.idp .idp__select:hover{cursor:pointer;background-color:#3761bc;box-shadow:1px 1px #2e5097}.idp .idp__select:active{cursor:pointer;box-shadow:inset 1px 1px #2e5098}.idp .idp__copy{color:#fff;margin-left:4px;font-size:1em}.idp .idp__icon-container{display:flex;height:42px;border-radius:2px;background-color:#fff;margin-left:.25em}.idp .idp__icon{margin:auto}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(31));t.default=function(e){var t=e.appName;return r.default.createElement("div",null,r.default.createElement("p",null,"This window was opened to log you in to"," ",r.default.createElement("span",{className:"app-name"},t),", but that app is no longer open."),r.default.createElement("p",null,"If you're trying to log in to ",r.default.createElement("span",{className:"app-name"},t),", close this window, then go back to the app and log in again."),r.default.createElement("p",null,"If you opened this window by accident, close it."))}},function(e,t,n){var r=n(227);"string"==typeof r&&(r=[[e.i,r,""]]);var o={transform:void 0};n(119)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(118)(!1)).push([e.i,"body,button,input{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:11pt}h1{font-weight:400;padding-bottom:10px}#app-container{max-width:600px;margin:auto}.center{text-align:center}.error{background-color:#ff8e8e;color:#323232;padding:8px;border-radius:2px}.btn{border:1px solid grey;border-radius:2px;padding:4px;margin-left:4px;cursor:pointer}.form-inline{display:flex;flex-wrap:nowrap;justify-content:space-between;margin-bottom:16px}.form-inline .form-inline__input-text{flex-grow:2}.form-inline .form-inline__controls{flex-grow:1;display:flex;justify-content:flex-end}.app-name{font-weight:700}",""])}]);