!function(e,t){for(var s in t)e[s]=t[s]}(self,function(e){var t={};function s(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,s),i.l=!0,i.exports}return s.m=e,s.c=t,s.d=function(e,t,r){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(r,i,function(t){return e[t]}.bind(null,i));return r},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/dist/",s(s.s=157)}({13:function(e,t){function s(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,xhtml:!1},getDefaults:s,changeDefaults:function(t){e.exports.defaults=t}}},14:function(e,t){const s=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>a[e];const o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(o,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const h=/(^|[^\[])\^/g;const p=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const u={},g=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){u[" "+e]||(g.test(e)?u[" "+e]=e+"/":u[" "+e]=y(e,"/",!0));const s=-1===(e=u[" "+e]).indexOf(":");return"//"===t.substring(0,2)?s?t:e.replace(f,"$1")+t:"/"===t.charAt(0)?s?t:e.replace(m,"$1")+t:e+t}function y(e,t,s){const r=e.length;if(0===r)return"";let i=0;for(;i(r=(r=r.source||r).replace(h,"$1"),e=e.replace(t,r),s),getRegex:()=>new RegExp(e,t)};return s},cleanUrl:function(e,t,s){if(e){let e;try{e=decodeURIComponent(c(s)).replace(p,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!d.test(s)&&(s=b(t,s));try{s=encodeURI(s).replace(/%25/g,"%")}catch(e){return null}return s},resolveUrl:b,noopTest:{exec:function(){}},merge:function(e){let t,s,r=1;for(;r{let r=!1,i=t;for(;--i>=0&&"\\"===s[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(s.length>t)s.splice(t);else for(;s.length{for(;t!==s;){const s=t.nextSibling;e.insertBefore(t,r),t=s}},n=(e,t,s=null)=>{for(;t!==s;){const s=t.nextSibling;e.removeChild(t),t=s}},a=`{{lit-${String(Math.random()).slice(2)}}}`,l=`\x3c!--${a}--\x3e`,o=new RegExp(`${a}|${l}`);class c{constructor(e,t){this.parts=[],this.element=t;const s=[],r=[],i=document.createTreeWalker(t.content,133,null,!1);let n=0,l=-1,c=0;const{strings:p,values:{length:g}}=e;for(;c0;){const t=p[c],s=u.exec(t)[2],r=s.toLowerCase()+"$lit$",i=e.getAttribute(r);e.removeAttribute(r);const n=i.split(o);this.parts.push({type:"attribute",index:l,name:s,strings:n}),c+=n.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),i.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(a)>=0){const r=e.parentNode,i=t.split(o),n=i.length-1;for(let t=0;t{const s=e.length-t.length;return s>=0&&e.slice(s)===t},p=e=>-1!==e.index,d=()=>document.createComment(""),u=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function g(e,t){const{element:{content:s},parts:r}=e,i=document.createTreeWalker(s,133,null,!1);let n=m(r),a=r[n],l=-1,o=0;const c=[];let h=null;for(;i.nextNode();){l++;const e=i.currentNode;for(e.previousSibling===h&&(h=null),t.has(e)&&(c.push(e),null===h&&(h=e)),null!==h&&o++;void 0!==a&&a.index===l;)a.index=null!==h?-1:a.index-o,n=m(r,n),a=r[n]}c.forEach(e=>e.parentNode.removeChild(e))}const f=e=>{let t=11===e.nodeType?0:1;const s=document.createTreeWalker(e,133,null,!1);for(;s.nextNode();)t++;return t},m=(e,t=-1)=>{for(let s=t+1;s(...t)=>{const s=e(...t);return b.set(s,!0),s},w=e=>"function"==typeof e&&b.has(e),v={},x={}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ class k{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)void 0!==s&&s.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=r?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let n,a=0,l=0,o=i.nextNode();for(;a-1||s)&&-1===e.indexOf("--\x3e",i+1);const n=u.exec(e);t+=null===n?e+(s?_:l):e.substr(0,n.index)+n[1]+n[2]+"$lit$"+n[3]+a}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ const $=e=>null===e||!("object"==typeof e||"function"==typeof e),T=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class C{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let e=0;e{try{const e={get capture(){return R=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class I{constructor(e,t,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=s,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;w(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=v,e(this)}if(this.__pendingValue===v)return;const e=this.__pendingValue,t=this.value,s=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),r=null!=e&&(null==t||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=L(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=v}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const L=e=>e&&(R?{capture:e.capture,passive:e.passive,once:e.once}:e.capture) /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */;function N(e){let t=M.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},M.set(e.type,t));let s=t.stringsArray.get(e.strings);if(void 0!==s)return s;const r=e.strings.join(a);return s=t.keyString.get(r),void 0===s&&(s=new c(e,e.getTemplateElement()),t.keyString.set(r,s)),t.stringsArray.set(e.strings,s),s}const M=new Map,O=new WeakMap; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const D=new /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ class{handleAttributeExpressions(e,t,s,r){const i=t[0];if("."===i){return new A(e,t.slice(1),s).parts}return"@"===i?[new I(e,t.slice(1),r.eventContext)]:"?"===i?[new U(e,t.slice(1),s)]:new C(e,t,s).parts}handleTextExpression(e){return new z(e)}}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const j=(e,...t)=>new S(e,t,"html",D),V=(e,t)=>`${e}--${t}`;let q=!0;void 0===window.ShadyCSS?q=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),q=!1);const B=e=>t=>{const s=V(t.type,e);let r=M.get(s);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},M.set(s,r));let i=r.stringsArray.get(t.strings);if(void 0!==i)return i;const n=t.strings.join(a);if(i=r.keyString.get(n),void 0===i){const s=t.getTemplateElement();q&&window.ShadyCSS.prepareTemplateDom(s,e),i=new c(t,s),r.keyString.set(n,i)}return r.stringsArray.set(t.strings,i),i},W=["html","svg"],H=new Set,Z=(e,t,s)=>{H.add(e);const r=s?s.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:n}=i;if(0===n)return void window.ShadyCSS.prepareTemplateStyles(r,e);const a=document.createElement("style");for(let e=0;e{W.forEach(t=>{const s=M.get(V(t,e));void 0!==s&&s.keyString.forEach(e=>{const{element:{content:t}}=e,s=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{s.add(e)}),g(e,s)})})})(e);const l=r.content;s?function(e,t,s=null){const{element:{content:r},parts:i}=e;if(null==s)return void r.appendChild(t);const n=document.createTreeWalker(r,133,null,!1);let a=m(i),l=0,o=-1;for(;n.nextNode();){for(o++,n.currentNode===s&&(l=f(t),s.parentNode.insertBefore(t,s));-1!==a&&i[a].index===o;){if(l>0){for(;-1!==a;)i[a].index+=l,a=m(i,a);return}a=m(i,a)}}}(s,a,l.firstChild):l.insertBefore(a,l.firstChild),window.ShadyCSS.prepareTemplateStyles(r,e);const o=l.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==o)t.insertBefore(o.cloneNode(!0),t.firstChild);else if(s){l.insertBefore(a,l.firstChild);const e=new Set;e.add(a),g(s,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const F={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},G=(e,t)=>t!==e&&(t==t||e==e),J={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:G};class Y extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach((t,s)=>{const r=this._attributeNameForProperty(s,t);void 0!==r&&(this._attributeToPropertyMap.set(r,s),e.push(r))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e,t=J){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const s="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,s,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}static getPropertyDescriptor(e,t,s){return{get(){return this[t]},set(s){const r=this[e];this[t]=s,this._requestUpdate(e,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||J}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const s of t)this.createProperty(s,e[s])}}static _attributeNameForProperty(e,t){const s=t.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,s=G){return s(e,t)}static _propertyValueFromAttribute(e,t){const s=t.type,r=t.converter||F,i="function"==typeof r?r:r.fromAttribute;return i?i(e,s):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const s=t.type,r=t.converter;return(r&&r.toAttribute||F.toAttribute)(e,s)}initialize(){this._saveInstanceProperties(),this._requestUpdate()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,s){t!==s&&this._attributeToProperty(e,s)}_propertyToAttribute(e,t,s=J){const r=this.constructor,i=r._attributeNameForProperty(e,s);if(void 0!==i){const e=r._propertyValueToAttribute(t,s);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(i):this.setAttribute(i,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const s=this.constructor,r=s._attributeToPropertyMap.get(e);if(void 0!==r){const e=s.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=s._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}_requestUpdate(e,t){let s=!0;if(void 0!==e){const r=this.constructor,i=r.getPropertyOptions(e);r._valueHasChanged(this[e],t,i.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,i))):s=!1}!this._hasRequestedUpdate&&s&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this._requestUpdate(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}Y.finalized=!0; /** @license Copyright (c) 2019 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const X="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol();class Q{constructor(e,t){if(t!==K)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(X?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const ee=(e,...t)=>{const s=t.reduce((t,s,r)=>t+(e=>{if(e instanceof Q)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(s)+e[r+1],e[0]);return new Q(s,K)}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ (window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const te={};class se extends Y{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(void 0===e)this._styles=[];else if(Array.isArray(e)){const t=(e,s)=>e.reduceRight((e,s)=>Array.isArray(s)?t(s,e):(e.add(s),e),s),s=t(e,new Set),r=[];s.forEach(e=>r.unshift(e)),this._styles=r}else this._styles=[e]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?X?this.renderRoot.adoptedStyleSheets=e.map(e=>e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==te&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return te}}se.finalized=!0,se.render=(e,t,s)=>{if(!s||"object"!=typeof s||!s.scopeName)throw new Error("The `scopeName` option is required.");const r=s.scopeName,i=O.has(t),a=q&&11===t.nodeType&&!!t.host,l=a&&!H.has(r),o=l?document.createDocumentFragment():t;if(((e,t,s)=>{let r=O.get(t);void 0===r&&(n(t,t.firstChild),O.set(t,r=new z(Object.assign({templateFactory:N},s))),r.appendInto(t)),r.setValue(e),r.commit()})(e,o,Object.assign({templateFactory:B(r)},s)),l){const e=O.get(o);O.delete(o);const s=e.value instanceof k?e.value.template:void 0;Z(r,o,s),n(t,t.firstChild),t.appendChild(o),O.set(t,e)}!i&&a&&window.ShadyCSS.styleElement(t.host)}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ const re=new WeakMap,ie=y(e=>t=>{if(!(t instanceof z))throw new Error("unsafeHTML can only be used in text bindings");const s=re.get(t);if(void 0!==s&&$(e)&&e===s.value&&t.value===s.fragment)return;const r=document.createElement("template");r.innerHTML=e;const i=document.importNode(r.content,!0);t.setValue(i),re.set(t,{value:e,fragment:i})}),ne=new WeakMap,ae=y(e=>t=>{if(!(t instanceof z))throw new Error("unsafeSVG can only be used in text bindings");const s=ne.get(t);if(void 0!==s&&$(e)&&e===s.value&&t.value===s.fragment)return;const r=document.createElement("template");r.innerHTML=`${e}`;const n=r.content,a=n.firstChild;n.removeChild(a),i(n,a.firstChild);const l=document.importNode(n,!0);t.setValue(l),ne.set(t,{value:e,fragment:l})}),le=new WeakMap,oe=y(e=>t=>{if(!(t instanceof P)||t instanceof E||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:s}=t,{style:r}=s.element;let i=le.get(t);void 0===i&&(r.cssText=s.strings.join(" "),le.set(t,i=new Set)),i.forEach(t=>{t in e||(i.delete(t),-1===t.indexOf("-")?r[t]=null:r.removeProperty(t))});for(const t in e)i.add(t),-1===t.indexOf("-")?r[t]=e[t]:r.setProperty(t,e[t])});var ce=s(35),he=s.n(ce),pe=s(62),de=s.n(pe),ue=(s(80),s(63)),ge=s.n(ue),fe=s(64),me=s.n(fe),be=s(65),ye=s.n(be),we=s(66),ve=s.n(we),xe=s(67),ke=s.n(xe),_e=s(68),Se=s.n(_e);class $e extends se{constructor(){super(),this.sourceUrl=null,this.pageParams={}}static get properties(){return{pageParams:{type:Object},sourceUrl:{type:String}}}static get styles(){return ee` #logo { max-height: 2.5rem; margin-right: 8px; } .has-allcaps { font-variant-caps: all-small-caps; } `}render(){return j` ${this.sourceUrl?j` `:""===this.sourceUrl?j` `:j``} `}firstUpdated(){this.initRoute()}initRoute(){this.pageParams=new URLSearchParams(window.location.search);let e=this.pageParams.get("state");if(e)try{if(e=JSON.parse(e),e.ids instanceof Array&&e.userId&&"open"===e.action)return this.pageParams.set("source","googledrive://"+e.ids[0]),this.pageParams.delete("state"),void(window.location.search=this.pageParams.toString())}catch(e){console.log(e)}this.sourceUrl=this.pageParams.get("source")||""}onStartLoad(e){if(!e.detail.blobUrl)return this.pageParams.set("source",e.detail.sourceUrl),void(window.location.search=this.pageParams.toString());this.sourceUrl=e.detail.sourceUrl,this.loadInfo=e.detail}onCollLoaded(e){this.loadInfo=null,this.initRoute(),e.detail.sourceUrl!==this.sourceUrl&&(this.pageParams.set("source",e.detail.sourceUrl),window.location.search=this.pageParams.toString())}}class Te extends se{constructor(){super(),this.progress=0,this.total=0,this.percent=0,this.coll="",this.state="waiting",this.loadInfo=null,this.worker=new Worker("./sw.js")}static get properties(){return{sourceUrl:{type:String},loadInfo:{type:Object},state:{type:String},progress:{type:Number},percent:{type:Number},error:{type:String},total:{type:Number},status:{type:String},coll:{type:String}}}firstUpdated(e){this.initMessages(),this.doLoad()}initMessages(){this.worker.addEventListener("message",e=>{switch(e.data.msg_type){case"collProgress":e.data.name===this.coll&&(this.percent=e.data.percent,e.data.error&&(this.error=e.data.error,this.state="errored"));break;case"collAdded":e.data.name===this.coll&&(this.total||(this.total=100),this.progress=this.total,this.percent=100,this.dispatchEvent(new CustomEvent("coll-loaded",{detail:e.data})))}})}async doLoad(){let e=this.sourceUrl,t=null;try{const s=new URL(this.sourceUrl);let r=null;switch(s.host||(r=s.pathname.indexOf("/",2)),s.protocol){case"googledrive:":this.state="googledrive",r<0&&(r=void 0),this.fileId=s.pathname.slice(2,r),t=await this.googledriveInit();break;case"s3:":e=`https://${s.pathname.slice(2,r)}.s3.amazonaws.com${s.pathname.slice(r)}`,t={sourceUrl:e,sourceId:this.sourceUrl,name:this.sourceUrl};break;case"file:":if(!this.loadInfo)return this.state="errored",void(this.error="File URLs are local and can not be shared. You can choose a file to upload from the main page.");t={sourceUrl:this.loadInfo.blobUrl,sourceId:this.loadInfo.name,name:this.loadInfo.name}}}catch(e){}t||(t={sourceUrl:e}),this.state="started";const s={msg_type:"addColl",name:this.coll,skipExisting:!0,file:t};this.worker.postMessage(s)}googledriveInit(){return this._gdWait=new Promise(e=>this._gdResolve=e),this._gdWait}async onLoadReady(e){this._gdResolve&&this._gdResolve(e.detail)}updated(e){e.get("sourceUrl")&&this.doLoad()}static get styles(){return ee` .logo { width: 96px; height: 96px; margin: 1em; } `}render(){return j`

Loading ${this.sourceUrl}...

${this.renderContent()}
`}renderContent(){switch(this.state){case"googledrive":return j``;case"started":return j` `;case"errored":return j`
${this.error}
`;case"waiting":default:return j``}}}class Ce extends se{constructor(){super(),this.colls=[],this.fileDisplayName="",this.file=null}static get properties(){return{colls:{type:Array},fileDisplayName:{type:String}}}firstUpdated(){this.loadColls()}async loadColls(){const e=await fetch("/wabac/api/index"),t=await e.json();this.colls=t.colls}async deleteColl(e){e.preventDefault();const t=Number(e.currentTarget.getAttribute("data-coll-index")),s=this.colls[t];if(!s||s.deleting)return;this.colls[t].deleting=!0;const r=await fetch("/wabac/api/"+s.id,{method:"DELETE"});if(200===r.status){const e=await r.json();this.colls=e.colls}return!1}onChooseFile(e){0!==e.currentTarget.files.length&&(this.file=e.currentTarget.files[0],this.fileDisplayName="file://"+this.file.name,this.requestUpdate())}onStartLoad(e){e.preventDefault();const t={sourceUrl:this.fileDisplayName};return this.file&&(t.blobUrl=URL.createObjectURL(this.file),t.name=this.fileDisplayName),this.dispatchEvent(new CustomEvent("load-start",{detail:t})),!1}onInput(e){this.fileDisplayName=e.currentTarget.value,this.file&&this.fileDisplayName&&this.fileDisplayName.startsWith("file://")&&(this.file=null,this.fileDisplayName="")}static get styles(){return ee` .size { margin-right: 20px; } .extra-padding { padding: 2em; } .no-top-padding { padding-top: 1.0em; } div.field.has-addons { flex: auto; } `}render(){return j`
`}}class Pe extends se{constructor(){super(),this.sourceUrl=null,this.baseApiPrefix="/wabac/api",this.baseReplayPrefix="/wabac",this.apiPrefix="",this.replayPrefix="",this.coll="",this.collInfo=null,this.hasCurated=!1,this.tabData={}}static get properties(){return{sourceUrl:{type:String},loadInfo:{type:Object},collInfo:{type:Object},coll:{type:String},hasCurated:{type:Boolean},tabData:{type:Object}}}firstUpdated(){this.doUpdateInfo(),window.addEventListener("hashchange",e=>this.onHashChange(e))}async sourceToId(e){try{e=new URL(e,window.location.origin).href}catch(e){}return{url:e,coll:"id-"+(await async function(e,t){const s=(new TextEncoder).encode(e),r=await crypto.subtle.digest(t,s);return Array.from(new Uint8Array(r)).map(e=>e.toString(16).padStart(2,"0")).join("")}(e,"SHA-256")).slice(0,12)}}updated(e){if(e.get("sourceUrl")&&this.doUpdateInfo(),e.get("tabData")){if(this.collInfo&&!this.collInfo.coll)return;Object.keys(this.tabData).forEach(e=>!this.tabData[e]&&delete this.tabData[e]),window.location.hash="#"+new URLSearchParams(this.tabData).toString()}}async doUpdateInfo(){const{url:e,coll:t}=await this.sourceToId(this.sourceUrl);this.coll=t;const s=this.baseApiPrefix+"/"+t,r=this.baseReplayPrefix+"/"+t,i=await fetch(s);if(200!=i.status)return this.collInfo={},void(this.hasCurated=!1);const n=await i.json();this.collInfo={apiPrefix:s,replayPrefix:r,coll:t,...n},this.collInfo.title||(this.collInfo.title="Archive from "+this.collInfo.displayName),this.hasCurated=this.collInfo.lists&&this.collInfo.lists.length;const a=window.location.hash;a&&(this.tabData=Object.fromEntries(new URLSearchParams(a.slice(1)).entries())),this.collInfo.coll&&!this.tabData.currTab&&(this.tabData={...this.tabData,currTab:this.hasCurated?"curated":"resources"})}onCollLoaded(e){this.doUpdateInfo(),this.loadInfo=null,this.dispatchEvent(new CustomEvent("coll-loaded",{detail:{sourceUrl:this.sourceUrl}}))}onHashChange(e){const t=window.location.hash;t&&t!==this._lastHash&&(this.tabData=Object.fromEntries(new URLSearchParams(t.slice(1)).entries()),this._lastHash=t)}onTabClick(e){e.preventDefault();const t=e.currentTarget.getAttribute("href");return this.tabData={...this.tabData,currTab:t.slice(1)},!1}onCollTabNav(e){this.tabData={...this.tabData,...e.detail}}static get styles(){return ee` .icon { vertical-align: text-top; } .back fa-icon { width: 1.5em; vertical-align: bottom; line-height: 0.5em; } .is-active { font-weight: bold; } .header-info { font-size: initial; font-weight: initial; margin-right: 20px; } `}render(){return j` ${this.renderColl()} `}renderColl(){return this.collInfo&&!this.collInfo.coll?j``:this.collInfo?j` `:j``}renderCollTabs(){return j` ${"replay"===this.tabData.currTab?j` `:""} `}}class ze extends se{constructor(){super(),this.collInfo=null,this.currList=0,this.curatedPages={},this.offset=0,this.lastST=0,this.clickTime=0}static get properties(){return{collInfo:{type:Object},curatedPages:{type:Object},currList:{type:Number}}}firstUpdated(){this.doLoadCurated()}updated(e){e.get("collInfo")&&this.doLoadCurated()}async doLoadCurated(){const e=await fetch(`${this.collInfo.apiPrefix}/curatedPages?offset=${this.offset}`),t=await e.json();this.total=t.total,this.curatedPages={};for(const e of t.curatedPages)this.curatedPages[e.list]||(this.curatedPages[e.list]=[]),this.curatedPages[e.list].push(e);this.currList&&this.scrollToList(this.currList)}static get styles(){return ee` .column { max-height: calc(100vh - 145px); } #content { margin-top: 10px; max-height: calc(100vh - 155px); } `}render(){return j`

${this.collInfo.title}

${this.collInfo.desc?ie(de()(this.collInfo.desc)):""}
${this.renderContent()}
`}renderContent(){return j` ${this.collInfo.lists.map((e,t)=>j`

${e.title}


${e.desc}
    ${this.curatedPages[e.id]?this.curatedPages[e.id].map(e=>{return j`
  1. `;var t}):j``}
`)} `}onReplay(e){e.preventDefault();const t={replayUrl:e.currentTarget.getAttribute("data-url"),replayTS:e.currentTarget.getAttribute("data-ts"),currTab:"replay"};return this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:t})),!1}onClickScroll(e){return e.preventDefault(),this.scrollToList(e.currentTarget.getAttribute("data-list")),!1}scrollToList(e){this.currList=Number(e),this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{currList:this.currList||void 0}}));this.clickTime=(new Date).getTime(),this.renderRoot.getElementById("list-"+this.currList).scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}onScroll(e){const t=e.currentTarget,s=this.renderRoot.getElementById("list-"+this.currList);if(!s)return;let r=s;const i=t.offsetTop,n=t.scrollTop;if(n>this.lastST)for(;r.nextElementSibling&&r.nextElementSibling.getBoundingClientRect().top=i;)r=r.previousElementSibling;if(this.lastST=n,r&&r!=s&&r.id.startsWith("list-")&&(this.currList=Number(r.id.slice(5)),this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{currList:this.currList}}))),(new Date).getTime()-this.clickTime<1e3)return;const a=this.renderRoot.querySelector(`a[data-list="${this.currList}"]`);if(a){const e={behavior:"smooth",block:"nearest",inline:"nearest"};a.scrollIntoView(e)}}}class Ue extends se{constructor(){super(),this.collInfo=null,this.currMime="text/html,text/xhtml",this.urlSearch="",this.urlSearchType="",this.filteredResults=[],this.results=[],this.tryMore=!1,this.loading=!1,this.filters=[{name:"HTML",filter:"text/html,text/xhtml"},{name:"Images",filter:"image/"},{name:"Audio/Video",filter:"audio/,video/"},{name:"PDF",filter:"application/pdf"},{name:"All",filter:""}]}static get properties(){return{collInfo:{type:Object},currMime:{type:String},urlSearch:{type:String},urlSearchType:{type:String},filteredResults:{type:Array},loading:{type:Boolean}}}firstUpdated(){this.doLoadResources()}async doLoadResources(){this.loading=!0;let e="contains"!==this.urlSearchType?this.urlSearch:"";const t=e&&"prefix"===this.urlSearchType?1:0;e&&!e.startsWith("http")&&(e="https://"+e);const s={urlSearch:this.urlSearch,currMime:this.currMime,urlSearchType:this.urlSearchType},r=new URLSearchParams({mime:this.currMime,url:e,prefix:t,count:100}).toString();let i=await fetch(`${this.collInfo.apiPrefix}/urls?${r}`);i=await i.json(),this.results=i.urls,this.tryMore=100===i.urls.length,this.filter(),this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:s})),this.loading=!1}async doLoadMore(){if(!this.tryMore||!this.results.length)return;if(this.loading)return;this.loading=!0;const e="contains"!==this.urlSearchType?this.urlSearch:"",t=e&&"prefix"===this.urlSearchType?1:0,s=this.results[this.results.length-1],r=new URLSearchParams({mime:this.currMime,url:e,prefix:t,fromMime:s.mime,fromUrl:s.url,fromTs:new Date(s.date).getTime(),count:100}).toString();let i=await fetch(`${this.collInfo.apiPrefix}/urls?${r}`);i=await i.json(),this.results=this.results.concat(i.urls),this.tryMore=100===i.urls.length,this.filter(),this.loading=!1}onChangeTypeSearch(e){this.currMime=e.currentTarget.value,this.doLoadResources()}onChangeUrlSearch(e){this.urlSearch=e.currentTarget.value,this.doLoadResources()}onClickUrlType(e){this.urlSearchType=e.currentTarget.value,this.doLoadResources()}filter(){const e=[],t="contains"===this.urlSearchType?this.urlSearch:"";for(const s of this.results)(!t||s.url.indexOf(t)>=0)&&e.push(s);this.filteredResults=e}onScroll(e){const t=e.currentTarget,s=t.scrollHeight-t.scrollTop-t.clientHeight;this.tryMore&&s<40&&this.doLoadMore()}static get styles(){return ee` :host { display: flex; flex-direction: column; } .notification { width: 100%; } .main-scroll { max-height: calc(100vh - 255px); width: 100vw; } table { table-layout: fixed; word-wrap: break-word; text-overflow: ellipsis; } tbody > tr { display: table; width: 100%; } .col-url { width: 66%; max-width: 66%; min-width: 66%; word-break: break-word; } .col-ts { width: 16%; max-width: 16%; min-width: 16%; word-break: break-word; } td.col-mime { width: 10%; word-break: break-word; } td.col-status { text-align: center; } .loading-cog { width: 100vw; display: flex; } .flex-column { display: flex; flex: auto; max-width: 80%; flex-direction: column; } .flex-auto { flex: auto; } `}render(){return j`
Showing ${this.filteredResults.length} Results
Resource Type:   ${this.filters.map(e=>j` `)}
${this.filteredResults.length?this.filteredResults.map(e=>j` `):j`
No Results Found.
`}
URL Timestamp Mime Status
${e.url} ${new Date(e.date).toLocaleString()} ${e.mime} ${e.status}
`}onReplay(e){e.preventDefault();const t={replayUrl:e.currentTarget.getAttribute("data-url"),replayTS:e.currentTarget.getAttribute("data-ts"),currTab:"replay"};return this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:t})),!1}}class Ae extends se{static get properties(){return{collInfo:{type:Object},replayUrl:{type:String},replayTS:{type:String}}}static get styles(){return ee` host: { display: flex; } iframe { width: 100vw; height: calc(100vh - 150px); } `}render(){return j` `}}class Ee extends se{constructor(){super(),this.manual=!1,this.fileId=""}static get properties(){return{manual:{type:Boolean},fileId:{type:String}}}onLoad(){this.gauth("none",e=>{"immediate_failed"===e.error?this.manual=!0:this.authed(e)})}onClickAuth(){this.gauth(void 0,e=>{e.error||this.authed(e)})}async authed(e){const t=this.fileId,s="https://www.googleapis.com/drive/v3/files/"+t,r={Authorization:"Bearer "+e.access_token},i=await fetch(s+"?fields=name",{headers:r}),n=await i.json(),a="googledrive://"+t,l=n.name,o="Google Drive file: "+n.name,c=s+"?alt=media";this.dispatchEvent(new CustomEvent("load-ready",{detail:{name:l,displayName:o,sourceId:a,sourceUrl:c,headers:r}}))}render(){return j` ${this.script()} ${this.manual?j` `:j`

Connecting to Google Drive...

`}`}script(){const e=document.createElement("script");return e.onload=()=>this.onLoad(),e.src="https://apis.google.com/js/platform.js",e}gauth(e,t){gapi.load("auth2",()=>{gapi.auth2.authorize({client_id:"758792702348-kokjbpv1leqid7ac7tjq7pbp37cg05kq.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.file",prompt:e},t)})}}class Re extends se{constructor(){super(),this.currTab="replay",this.replayTS=""}static get properties(){return{replayUrl:{type:String},replayTS:{type:String},source:{type:String},paramString:{type:String}}}firstUpdated(){this.paramString=new URLSearchParams({replayUrl:this.replayUrl,replayTS:this.replayTS,source:this.source,currTab:this.currTab})}render(){return j` `}}class Ie extends se{constructor(){super(),this.size="1.1em"}static get properties(){return{svg:{type:String},size:{type:String}}}static get styles(){return ee` :host { display: inline-block; padding: 0; margin: 0; } :host svg { fill: var(--fa-icon-fill-color, currentcolor); width: var(--fa-icon-width, 19px); height: var(--fa-icon-height, 19px); } `}render(){if(!this.svg)return j``;const e={width:this.size,height:this.size};return j`${ae(this.svg)}`}}!async function(){const e=function(e="sw.js?replayPrefix=wabac&stats=true",t){const s=window.location;if(console.log("Register SW: "+e),!navigator.serviceWorker){let e=null;return e="http:"===s.protocol?"Service workers only supported when loading via https://, but this site loaded from: "+s.origin:"Sorry, Service workers are not supported in this browser",Promise.reject(e)}(t=t?new URL(t,window.location.href).href:s.origin+s.pathname).endsWith("/")||(t=t.slice(0,t.lastIndexOf("/")+1));let r=new URL(e,t);if(navigator.serviceWorker.controller&&navigator.serviceWorker.controller.scriptURL===r)return Promise.resolve(!1);let i,n,a=!1;const l=new Promise((e,t)=>{i=t=>{a=!0,e(t)},n=e=>{a=!0,t(e)}});return window.fetch(r,{mode:"cors"}).then(e=>(e.url.startsWith(t)||n("Service Worker in wrong scope!"),e.url)).then(e=>(navigator.serviceWorker.addEventListener("error",e=>n(null)),setTimeout(()=>{a||n("Service Worker is not available")},3e4),navigator.serviceWorker.register(e,{scope:t}))).then(e=>{console.log("Service worker registration succeeded:",e),navigator.serviceWorker.controller&&i(!0),navigator.serviceWorker.addEventListener("controllerchange",e=>i(!0))}).catch(e=>{console.log("Service worker registration failed:",e),n(e)}),l}("./sw.js?replayPrefix=wabac&stats=true");await e,customElements.define("app-main",$e),customElements.define("wr-index",Ce),customElements.define("wr-loader",Te),customElements.define("wr-coll",Pe),customElements.define("wr-coll-proxy",Re),customElements.define("wr-coll-resources",Ue),customElements.define("wr-coll-curated",ze),customElements.define("wr-replay-page",Ae),customElements.define("wr-gdrive",Ee),customElements.define("fa-icon",Ie)}()},35:function(e,t,s){"use strict";const r=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],i=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],n=(e,t)=>{let s=e;return"string"==typeof t?s=e.toLocaleString(t):!0===t&&(s=e.toLocaleString()),s};e.exports=(e,t)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const s=(t=Object.assign({bits:!1},t)).bits?i:r;if(t.signed&&0===e)return" 0 "+s[0];const a=e<0,l=a?"-":t.signed?"+":"";if(a&&(e=-e),e<1){return l+n(e,t.locale)+" "+s[0]}const o=Math.min(Math.floor(Math.log10(e)/3),s.length-1);return e=Number((e/Math.pow(1e3,o)).toPrecision(3)),l+n(e,t.locale)+" "+s[o]}},37:function(e,t,s){const{defaults:r}=s(13),{rtrim:i,splitCells:n,escape:a,findClosingBracket:l}=s(14);function o(e,t,s){const r=t.href,i=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?{type:"link",raw:s,href:r,title:i,text:e[1]}:{type:"image",raw:s,text:a(e[1]),href:r,title:i}}e.exports=class{constructor(e){this.options=e||r}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e,t){const s=this.rules.block.code.exec(e);if(s){const e=t[t.length-1];if(e&&"paragraph"===e.type)return t.pop(),e.text+="\n"+s[0].trimRight(),e.raw+="\n"+s[0],e;{const e=s[0].replace(/^ {4}/gm,"");return{type:"code",raw:s[0],codeBlockStyle:"indented",text:this.options.pedantic?e:i(e,"\n")}}}}fences(e){const t=this.rules.block.fences.exec(e);if(t)return{type:"code",raw:t[0],lang:t[2]?t[2].trim():t[2],text:t[3]||""}}heading(e){const t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}}nptable(e){const t=this.rules.block.nptable.exec(e);if(t){const e={type:"table",header:n(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(e.header.length===e.align.length){let t,s=e.align.length;for(t=0;t ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}}list(e){const t=this.rules.block.list.exec(e);if(t){let e=t[0];const s=t[2],r=s.length>1,i={type:"list",raw:e,ordered:r,start:r?+s:"",loose:!1,items:[]},n=t[0].match(this.rules.block.item);let a,l,o,c,h,p,d,u=!1;const g=n.length;for(let t=0;t1?1===o.length:o.length>1||this.options.smartLists&&o!==s)&&(c=n.slice(t+1).join("\n"),i.raw=i.raw.substring(0,i.raw.length-c.length),t=g-1)),h=u||/\n\n(?!\s*$)/.test(a),t!==g-1&&(u="\n"===a.charAt(a.length-1),h||(h=u)),h&&(i.loose=!0),p=/^\[[ xX]\] /.test(a),d=void 0,p&&(d=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),i.items.push({raw:e,task:p,checked:d,loose:h,text:a});return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):a(t[0]):t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:n(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let s,r=e.align.length;for(s=0;s/i.test(r[0])&&(t=!1),!s&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?s=!0:s&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(s=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:s,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):a(r[0]):r[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=l(t[2],"()");if(e>-1){const s=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,s).trim(),t[3]=""}let s=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);e?(s=e[1],r=e[3]):r=""}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim().replace(/^<([\s\S]*)>$/,"$1"),o(t,{href:s?s.replace(this.rules.inline._escapes,"$1"):s,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0])}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){let e=(s[2]||s[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=s[0].charAt(0);return{type:"text",raw:e,text:e}}return o(s,e,s[0])}}strong(e){const t=this.rules.inline.strong.exec(e);if(t)return{type:"strong",raw:t[0],text:t[4]||t[3]||t[2]||t[1]}}em(e){const t=this.rules.inline.em.exec(e);if(t)return{type:"em",raw:t[0],text:t[6]||t[5]||t[4]||t[3]||t[2]||t[1]}}codespan(e){const t=this.rules.inline.code.exec(e);if(t)return{type:"codespan",raw:t[0],text:a(t[2].trim(),!0)}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}}autolink(e,t){const s=this.rules.inline.autolink.exec(e);if(s){let e,r;return"@"===s[2]?(e=a(this.options.mangle?t(s[1]):s[1]),r="mailto:"+e):(e=a(s[1]),r=e),{type:"link",raw:s[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let s;if(s=this.rules.inline.url.exec(e)){let e,r;if("@"===s[2])e=a(this.options.mangle?t(s[0]):s[0]),r="mailto:"+e;else{let t;do{t=s[0],s[0]=this.rules.inline._backpedal.exec(s[0])[0]}while(t!==s[0]);e=a(s[0]),r="www."===s[1]?"http://"+e:e}return{type:"link",raw:s[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t,s){const r=this.rules.inline.text.exec(e);if(r){let e;return e=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):a(r[0]):r[0]:a(this.options.smartypants?s(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}}},38:function(e,t,s){const{defaults:r}=s(13),{cleanUrl:i,escape:n}=s(14);e.exports=class{constructor(e){this.options=e||r}code(e,t,s){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(s=!0,e=t)}return r?'
'+(s?e:n(e,!0))+"
\n":"
"+(s?e:n(e,!0))+"
"}blockquote(e){return"
\n"+e+"
\n"}html(e){return e}heading(e,t,s,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,s){const r=t?"ol":"ul";return"<"+r+(t&&1!==s?' start="'+s+'"':"")+">\n"+e+"\n"}listitem(e){return"
  • "+e+"
  • \n"}checkbox(e){return" "}paragraph(e){return"

    "+e+"

    \n"}table(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return"\n"+e+"\n"}tablecell(e,t){const s=t.header?"th":"td";return(t.align?"<"+s+' align="'+t.align+'">':"<"+s+">")+e+"\n"}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
    ":"
    "}del(e){return""+e+""}link(e,t,s){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return s;let r='",r}image(e,t,s){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return s;let r=''+s+'":">",r}text(e){return e}}},39:function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,s){return""+s}image(e,t,s){return""+s}br(){return""}}},40:function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},62:function(e,t,s){const r=s(77),i=s(79),n=s(37),a=s(38),l=s(39),o=s(40),{merge:c,checkSanitizeDeprecation:h,escape:p}=s(14),{getDefaults:d,changeDefaults:u,defaults:g}=s(13);function f(e,t,s){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(s||"function"==typeof t){s||(s=t,t=null),t=c({},f.defaults,t||{}),h(t);const n=t.highlight;let a,l,o=0;try{a=r.lex(e,t)}catch(e){return s(e)}l=a.length;const p=function(e){if(e)return t.highlight=n,s(e);let r;try{r=i.parse(a,t)}catch(t){e=t}return t.highlight=n,e?s(e):s(null,r)};if(!n||n.length<3)return p();if(delete t.highlight,!l)return p();for(;oAn error occurred:

    "+p(e.message+"",!0)+"
    ";throw e}}f.options=f.setOptions=function(e){return c(f.defaults,e),u(f.defaults),f},f.getDefaults=d,f.defaults=g,f.use=function(e){const t=c({},e);if(e.renderer){const s=f.defaults.renderer||new a;for(const t in e.renderer){const r=s[t];s[t]=(...i)=>{let n=e.renderer[t].apply(s,i);return!1===n&&(n=r.apply(s,i)),n}}t.renderer=s}if(e.tokenizer){const s=f.defaults.tokenizer||new n;for(const t in e.tokenizer){const r=s[t];s[t]=(...i)=>{let n=e.tokenizer[t].apply(s,i);return!1===n&&(n=r.apply(s,i)),n}}t.tokenizer=s}f.setOptions(t)},f.Parser=i,f.parser=i.parse,f.Renderer=a,f.TextRenderer=l,f.Lexer=r,f.lexer=r.lex,f.Tokenizer=n,f.Slugger=o,f.parse=f,e.exports=f},63:function(e,t){e.exports=''},64:function(e,t){e.exports=''},65:function(e,t){e.exports=''},66:function(e,t){e.exports=''},67:function(e,t){e.exports=''},68:function(e,t){e.exports=''},77:function(e,t,s){const r=s(37),{defaults:i}=s(13),{block:n,inline:a}=s(78);function l(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function o(e){let t,s,r="";const i=e.length;for(t=0;t.5&&(s="x"+s.toString(16)),r+="&#"+s+";";return r}e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||i,this.options.tokenizer=this.options.tokenizer||new r,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;const t={block:n.normal,inline:a.normal};this.options.pedantic?(t.block=n.pedantic,t.inline=a.pedantic):this.options.gfm&&(t.block=n.gfm,this.options.breaks?t.inline=a.breaks:t.inline=a.gfm),this.tokenizer.rules=t}static get rules(){return{block:n,inline:a}}static lex(t,s){return new e(s).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens}blockTokens(e,t=[],s=!0){let r,i,n;for(e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],s),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),n=r.items.length,i=0;i ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};a.def=i(a.def).replace("label",a._label).replace("title",a._title).getRegex(),a.bullet=/(?:[*+-]|\d{1,9}\.)/,a.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,a.item=i(a.item,"gm").replace(/bull/g,a.bullet).getRegex(),a.list=i(a.list).replace(/bull/g,a.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+a.def.source+")").getRegex(),a._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",a._comment=//,a.html=i(a.html,"i").replace("comment",a._comment).replace("tag",a._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a.paragraph=i(a._paragraph).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.blockquote=i(a.blockquote).replace("paragraph",a.paragraph).getRegex(),a.normal=n({},a),a.gfm=n({},a.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),a.gfm.nptable=i(a.gfm.nptable).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.gfm.table=i(a.gfm.table).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.pedantic=n({},a.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",a._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:i(a.normal._paragraph).replace("hr",a.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const l={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^_([^\s_<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s*<\[])\*(?!\*)|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~"};l.em=i(l.em).replace(/punctuation/g,l._punctuation).getRegex(),l._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,l._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,l._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,l.autolink=i(l.autolink).replace("scheme",l._scheme).replace("email",l._email).getRegex(),l._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,l.tag=i(l.tag).replace("comment",a._comment).replace("attribute",l._attribute).getRegex(),l._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,l._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,l._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,l.link=i(l.link).replace("label",l._label).replace("href",l._href).replace("title",l._title).getRegex(),l.reflink=i(l.reflink).replace("label",l._label).getRegex(),l.normal=n({},l),l.pedantic=n({},l.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",l._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",l._label).getRegex()}),l.gfm=n({},l.normal,{escape:i(l.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\0&&"text"===b.tokens[0].tokens[0].type&&(b.tokens[0].tokens[0].text=v+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:v}):m+=v),m+=this.parse(b.tokens,f),p+=this.renderer.listitem(m,w,y);x+=this.renderer.list(p,u,g);continue;case"html":x+=this.renderer.html(d.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(p=d.tokens?this.parseInline(d.tokens):d.text;s+1