@vue-skuilder/common-ui 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +10 -0
- package/dist/common-ui.es.js +16404 -0
- package/dist/common-ui.es.js.map +1 -0
- package/dist/common-ui.umd.js +9 -0
- package/dist/common-ui.umd.js.map +1 -0
- package/dist/components/HeatMap.types.d.ts +13 -0
- package/dist/components/PaginatingToolbar.types.d.ts +40 -0
- package/dist/components/SkMouseTrap.types.d.ts +3 -0
- package/dist/components/SkMouseTrapToolTip.types.d.ts +35 -0
- package/dist/components/SnackbarService.d.ts +11 -0
- package/dist/components/StudySession.types.d.ts +6 -0
- package/dist/components/auth/index.d.ts +4 -0
- package/dist/components/cardRendering/MarkdownRendererHelpers.d.ts +22 -0
- package/dist/components/studentInputs/BaseUserInput.d.ts +16 -0
- package/dist/components/studentInputs/RadioMultipleChoice.types.d.ts +5 -0
- package/dist/composables/CompositionViewable.d.ts +33 -0
- package/dist/composables/Displayable.d.ts +47 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/index.d.ts +36 -0
- package/dist/plugins/pinia.d.ts +5 -0
- package/dist/stores/useAuthStore.d.ts +225 -0
- package/dist/stores/useCardPreviewModeStore.d.ts +8 -0
- package/dist/stores/useConfigStore.d.ts +11 -0
- package/dist/utils/SkldrMouseTrap.d.ts +32 -0
- package/package.json +67 -0
- package/src/components/HeatMap.types.ts +15 -0
- package/src/components/HeatMap.vue +354 -0
- package/src/components/PaginatingToolbar.types.ts +48 -0
- package/src/components/PaginatingToolbar.vue +75 -0
- package/src/components/SkMouseTrap.types.ts +3 -0
- package/src/components/SkMouseTrap.vue +70 -0
- package/src/components/SkMouseTrapToolTip.types.ts +41 -0
- package/src/components/SkMouseTrapToolTip.vue +316 -0
- package/src/components/SnackbarService.ts +39 -0
- package/src/components/SnackbarService.vue +71 -0
- package/src/components/StudySession.types.ts +6 -0
- package/src/components/StudySession.vue +670 -0
- package/src/components/StudySessionTimer.vue +121 -0
- package/src/components/auth/UserChip.vue +106 -0
- package/src/components/auth/UserLogin.vue +141 -0
- package/src/components/auth/UserLoginAndRegistrationContainer.vue +85 -0
- package/src/components/auth/UserRegistration.vue +181 -0
- package/src/components/auth/index.ts +4 -0
- package/src/components/cardRendering/AudioAutoPlayer.vue +131 -0
- package/src/components/cardRendering/CardLoader.vue +123 -0
- package/src/components/cardRendering/CardViewer.vue +101 -0
- package/src/components/cardRendering/CodeBlockRenderer.vue +81 -0
- package/src/components/cardRendering/MarkdownRenderer.vue +46 -0
- package/src/components/cardRendering/MarkdownRendererHelpers.ts +114 -0
- package/src/components/cardRendering/MdTokenRenderer.vue +244 -0
- package/src/components/studentInputs/BaseUserInput.ts +71 -0
- package/src/components/studentInputs/MultipleChoiceOption.vue +127 -0
- package/src/components/studentInputs/RadioMultipleChoice.types.ts +6 -0
- package/src/components/studentInputs/RadioMultipleChoice.vue +168 -0
- package/src/components/studentInputs/TrueFalse.vue +27 -0
- package/src/components/studentInputs/UserInputNumber.vue +63 -0
- package/src/components/studentInputs/UserInputString.vue +89 -0
- package/src/components/studentInputs/fillInInput.vue +71 -0
- package/src/composables/CompositionViewable.ts +180 -0
- package/src/composables/Displayable.ts +133 -0
- package/src/composables/index.ts +2 -0
- package/src/index.ts +79 -0
- package/src/plugins/pinia.ts +24 -0
- package/src/stores/useAuthStore.ts +92 -0
- package/src/stores/useCardPreviewModeStore.ts +32 -0
- package/src/stores/useConfigStore.ts +60 -0
- package/src/utils/SkldrMouseTrap.ts +141 -0
- package/src/vue-shims.d.ts +5 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@vue-skuilder/common"),require("@vue-skuilder/db"),require("pinia")):"function"==typeof define&&define.amd?define(["exports","vue","@vue-skuilder/common","@vue-skuilder/db","pinia"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueSkuilderCommonUI={},e.Vue,e.VueSkuilderCommon,e.VueSkuilderDb,e.Pinia)}(this,(function(e,t,n,r,o){"use strict";var i,s,a=Object.defineProperty,l=(e,t,n)=>((e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),c=document.createElement("style");function d(){return i.apply(null,arguments)}function u(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function h(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(p(e,t))return!1;return!0}function m(e){return void 0===e}function f(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function k(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function y(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function b(e,t){for(var n in t)p(t,n)&&(e[n]=t[n]);return p(t,"toString")&&(e.toString=t.toString),p(t,"valueOf")&&(e.valueOf=t.valueOf),e}function w(e,t,n,r){return Yt(e,t,n,r,!0).utc()}function v(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function _(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());return r&&(t=v(e),n=s.call(t.parsedDateParts,(function(e){return null!=e})),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?r:(e._isValid=r,e._isValid)}function x(e){var t=w(NaN);return null!=e?b(v(t),e):v(t).userInvalidated=!0,t}c.textContent=".tooltip[data-v-ca46239a]{background-color:#000c;color:#fff;padding:5px;border-radius:3px;font-size:12px}.sk-mousetrap-tooltip-wrapper[data-v-5d6fb09c]{display:inline-block;position:relative}.sk-mousetrap-tooltip[data-v-5d6fb09c]{position:absolute;background-color:#000c;color:#fff;padding:2px 6px;border-radius:4px;font-size:12px;white-space:nowrap;pointer-events:none;z-index:9999}.sk-mt-tooltip-top[data-v-5d6fb09c]{bottom:100%;margin-bottom:5px;left:50%;transform:translate(-50%)}.sk-mt-tooltip-bottom[data-v-5d6fb09c]{top:100%;margin-top:5px;left:50%;transform:translate(-50%)}.sk-mt-tooltip-left[data-v-5d6fb09c]{right:100%;margin-right:5px;top:50%;transform:translateY(-50%)}.sk-mt-tooltip-right[data-v-5d6fb09c]{left:100%;margin-left:5px;top:50%;transform:translateY(-50%)}.sk-mousetrap-highlight-glow[data-v-5d6fb09c]{box-shadow:0 0 8px 2px #1976d299;transition:box-shadow .25s ease}.sk-mousetrap-highlight-scale[data-v-5d6fb09c]{transform:scale(1.03);transition:transform .25s ease}.sk-mousetrap-highlight-border[data-v-5d6fb09c]{outline:2px solid rgba(25,118,210,.8);outline-offset:2px;border-radius:4px;transition:outline .25s ease,outline-offset .25s ease}.fade-enter-active[data-v-5d6fb09c],.fade-leave-active[data-v-5d6fb09c]{transition:opacity .25s ease}.fade-enter-from[data-v-5d6fb09c],.fade-leave-to[data-v-5d6fb09c]{opacity:0}.pageSelect[data-v-39413af8]{max-width:60px}.timer-container[data-v-5960940a]{display:inline-flex;cursor:pointer}.cardView[data-v-a180fe1c]{padding:15px;border-radius:8px}.component-fade-enter-active[data-v-a180fe1c],.component-fade-leave-active[data-v-a180fe1c]{transition:opacity .3s ease}.component-fade-enter[data-v-a180fe1c],.component-fade-leave-to[data-v-a180fe1c]{opacity:0}.footer-controls[data-v-70e29902]{position:fixed;bottom:0;background-color:var(--v-background);z-index:100}.footer-right[data-v-70e29902]{position:fixed;bottom:0;right:0;background-color:var(--v-background);z-index:100}.correct[data-v-70e29902]{animation:varFade-70e29902 1.25s ease-out}.incorrect[data-v-70e29902]{animation:purpleFade-70e29902 1.25s ease-out}a[data-v-70e29902]{text-decoration:underline}@keyframes varFade-70e29902{0%{box-shadow:rgba(var(--r),var(--g),0,.25) 0 7px 8px -4px,rgba(var(--r),var(--g),0,.25) 0 12px 17px 2px,rgba(var(--r),var(--g),0,.25) 0 5px 22px 4px}to{box-shadow:#00960000 0 0}}@keyframes greenFade-70e29902{0%{box-shadow:#00960040 0 7px 8px -4px,#00960040 0 12px 17px 2px,#00960040 0 5px 22px 4px}to{box-shadow:#00960000 0 0}}@keyframes purpleFade-70e29902{0%{box-shadow:#73004b40 0 7px 8px -4px,#73004b40 0 12px 17px 2px,#73004b40 0 5px 22px 4px}to{box-shadow:#73004b00 0 0}}.choice[data-v-96de7172]{text-align:center;display:inline-block;border-radius:4px;padding:5px 15px;margin:10px;min-width:75px;transition:all .2s ease-in-out}.selected[data-v-96de7172]{transform:translateY(-10px) scale(1.15);z-index:1}.not-selected[data-v-96de7172]{z-index:0}.userInput[data-v-a56dcd1c]{border:none;text-align:center;border-bottom:1px black}.user-input-container[data-v-aa14961f]{display:inline-block;min-width:6em;vertical-align:baseline}.user-input-string[data-v-aa14961f]{display:inline-block;background:transparent;border:none;border-bottom:1px solid currentColor;color:currentColor;font-family:inherit;font-size:inherit;line-height:inherit;padding:0;margin:0;text-align:center;width:100%;outline:none}.user-input-string[data-v-aa14961f]:focus{border-bottom:2px solid currentColor}#input[data-v-486ac035]{display:inline-block;min-width:4em;text-align:center}.underline[data-v-486ac035]{text-decoration:underline;text-decoration-style:solid 14px}.cardView[data-v-9ca53bc4]{padding:15px;border-radius:8px}.component-fade-enter-active[data-v-9ca53bc4],.component-fade-leave-active[data-v-9ca53bc4]{transition:opacity .3s ease}.component-fade-enter[data-v-9ca53bc4],.component-fade-leave-to[data-v-9ca53bc4]{opacity:0}.playing[data-v-e1a0f62c]{animation:.85s ease-in-out infinite alternate pulse-e1a0f62c;z-index:1}@keyframes pulse-e1a0f62c{0%{transform:scale(1)}to{transform:scale(1.15)}}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: GitHub\n Description: Light theme as seen on github.com\n Author: github.com\n Maintainer: @Hirse\n Updated: 2021-05-15\n\n Outdated base version: https://github.com/primer/github-syntax-light\n Current colors taken from GitHub's CSS\n*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-block-wrapper{margin:1rem 0;border-radius:4px;background-color:#f6f8fa;overflow:auto;position:relative}.language-indicator{position:absolute;top:8px;right:10px;padding:2px 8px;font-size:.75rem;color:#666;background-color:#ffffffb3;border-radius:4px;z-index:1;font-family:monospace;text-transform:lowercase}blockquote[data-v-047d0fa4]{border-left:3px teal solid;padding-left:8px}.codespan[data-v-047d0fa4]{padding-left:3px;padding-right:3px;margin-left:1px;margin-right:1px}p[data-v-047d0fa4]{margin-bottom:15px;margin-top:15px}.login[data-v-acfaa2d0]{max-width:650px}.component-fade-enter-active[data-v-e53f877f],.component-fade-leave-active[data-v-e53f877f]{transition:opacity .5s ease}.component-fade-enter[data-v-e53f877f],.component-fade-leave-to[data-v-e53f877f]{opacity:0}\n/*$vite$:1*/",document.head.appendChild(c),s=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var S=d.momentProperties=[],C=!1;function M(e,t){var n,r,o,i=S.length;if(m(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),m(t._i)||(e._i=t._i),m(t._f)||(e._f=t._f),m(t._l)||(e._l=t._l),m(t._strict)||(e._strict=t._strict),m(t._tzm)||(e._tzm=t._tzm),m(t._isUTC)||(e._isUTC=t._isUTC),m(t._offset)||(e._offset=t._offset),m(t._pf)||(e._pf=v(t)),m(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)m(o=t[r=S[n]])||(e[r]=o);return e}function E(e){M(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===C&&(C=!0,d.updateOffset(this),C=!1)}function N(e){return e instanceof E||null!=e&&null!=e._isAMomentObject}function T(e){!1===d.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function R(e,t){var n=!0;return b((function(){if(null!=d.deprecationHandler&&d.deprecationHandler(null,e),n){var r,o,i,s=[],a=arguments.length;for(o=0;o<a;o++){if(r="","object"==typeof arguments[o]){for(i in r+="\n["+o+"] ",arguments[0])p(arguments[0],i)&&(r+=i+": "+arguments[0][i]+", ");r=r.slice(0,-2)}else r=arguments[o];s.push(r)}T(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var D,A={};function O(e,t){null!=d.deprecationHandler&&d.deprecationHandler(e,t),A[e]||(T(t),A[e]=!0)}function B(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e,t){var n,r=b({},e);for(n in t)p(t,n)&&(h(e[n])&&h(t[n])?(r[n]={},b(r[n],e[n]),b(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)p(e,n)&&!p(t,n)&&h(e[n])&&(r[n]=b({},r[n]));return r}function L(e){null!=e&&this.set(e)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)p(e,t)&&n.push(t);return n};function $(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var P=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},z={};function j(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(z[e]=o),t&&(z[t[0]]=function(){return $(o.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=F(t,e.localeData()),Y[t]=Y[t]||function(e){var t,n,r,o=e.match(P);for(t=0,n=o.length;t<n;t++)z[o[t]]?o[t]=z[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=B(o[r])?o[r].call(t,e):o[r];return i}}(t),Y[t](e)):e.localeData().invalidDate()}function F(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(V.lastIndex=0;n>=0&&V.test(e);)e=e.replace(V,r),V.lastIndex=0,n-=1;return e}var H={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function W(e){return"string"==typeof e?H[e]||H[e.toLowerCase()]:void 0}function q(e){var t,n,r={};for(n in e)p(e,n)&&(t=W(n))&&(r[t]=e[n]);return r}var G={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var Z,K=/\d/,Q=/\d\d/,J=/\d{3}/,X=/\d{4}/,ee=/[+-]?\d{6}/,te=/\d\d?/,ne=/\d\d\d\d?/,re=/\d\d\d\d\d\d?/,oe=/\d{1,3}/,ie=/\d{1,4}/,se=/[+-]?\d{1,6}/,ae=/\d+/,le=/[+-]?\d+/,ce=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,he=/^[1-9]\d?/,pe=/^([1-9]\d|\d)/;function ge(e,t,n){Z[e]=B(t)?t:function(e,r){return e&&n?n:t}}function me(e,t){return p(Z,e)?Z[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ke(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ye(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ke(t)),n}Z={};var be={};function we(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),f(t)&&(o=function(e,n){n[t]=ye(e)}),r=e.length,n=0;n<r;n++)be[e[n]]=o}function ve(e,t){we(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function _e(e,t,n){null!=t&&p(be,e)&&be[e](t,n._a,n,e)}function xe(e){return e%4==0&&e%100!=0||e%400==0}var Se=0,Ce=1,Me=2,Ee=3,Ne=4,Te=5,Re=6,De=7,Ae=8;function Oe(e){return xe(e)?366:365}j("Y",0,0,(function(){var e=this.year();return e<=9999?$(e,4):"+"+e})),j(0,["YY",2],0,(function(){return this.year()%100})),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),ge("Y",le),ge("YY",te,Q),ge("YYYY",ie,X),ge("YYYYY",se,ee),ge("YYYYYY",se,ee),we(["YYYYY","YYYYYY"],Se),we("YYYY",(function(e,t){t[Se]=2===e.length?d.parseTwoDigitYear(e):ye(e)})),we("YY",(function(e,t){t[Se]=d.parseTwoDigitYear(e)})),we("Y",(function(e,t){t[Se]=parseInt(e,10)})),d.parseTwoDigitYear=function(e){return ye(e)+(ye(e)>68?1900:2e3)};var Be,Ie=Le("FullYear",!0);function Le(e,t){return function(n){return null!=n?(Pe(this,e,n),d.updateOffset(this,t),this):$e(this,e)}}function $e(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Pe(e,t,n){var r,o,i,s,a;if(e.isValid()&&!isNaN(n)){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}i=n,s=e.month(),a=29!==(a=e.date())||1!==s||xe(i)?a:28,o?r.setUTCFullYear(i,s,a):r.setFullYear(i,s,a)}}function Ve(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?xe(e)?29:28:31-r%7%2}Be=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},j("M",["MM",2],"Mo",(function(){return this.month()+1})),j("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),j("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ge("M",te,he),ge("MM",te,Q),ge("MMM",(function(e,t){return t.monthsShortRegex(e)})),ge("MMMM",(function(e,t){return t.monthsRegex(e)})),we(["M","MM"],(function(e,t){t[Ce]=ye(e)-1})),we(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[Ce]=o:v(n).invalidMonth=e}));var Ye="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ze="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),je=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ue=ue,Fe=ue;function He(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=w([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Be.call(this._shortMonthsParse,s))?o:null:-1!==(o=Be.call(this._longMonthsParse,s))?o:null:"MMM"===t?-1!==(o=Be.call(this._shortMonthsParse,s))||-1!==(o=Be.call(this._longMonthsParse,s))?o:null:-1!==(o=Be.call(this._longMonthsParse,s))||-1!==(o=Be.call(this._shortMonthsParse,s))?o:null}function We(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ye(t);else if(!f(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ve(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function qe(e){return null!=e?(We(this,e),d.updateOffset(this,!0),this):$e(this,"Month")}function Ge(){function e(e,t){return t.length-e.length}var t,n,r,o,i=[],s=[],a=[];for(t=0;t<12;t++)n=w([2e3,t]),r=fe(this.monthsShort(n,"")),o=fe(this.months(n,"")),i.push(r),s.push(o),a.push(o),a.push(r);i.sort(e),s.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ze(e,t,n,r,o,i,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,o,i,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,o,i,s),a}function Ke(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Qe(e,t,n){var r=7+t-n;return-((7+Ke(e,0,r).getUTCDay()-t)%7)+r-1}function Je(e,t,n,r,o){var i,s,a=1+7*(t-1)+(7+n-r)%7+Qe(e,r,o);return a<=0?s=Oe(i=e-1)+a:a>Oe(e)?(i=e+1,s=a-Oe(e)):(i=e,s=a),{year:i,dayOfYear:s}}function Xe(e,t,n){var r,o,i=Qe(e.year(),t,n),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?r=s+et(o=e.year()-1,t,n):s>et(e.year(),t,n)?(r=s-et(e.year(),t,n),o=e.year()+1):(o=e.year(),r=s),{week:r,year:o}}function et(e,t,n){var r=Qe(e,t,n),o=Qe(e+1,t,n);return(Oe(e)-r+o)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ge("w",te,he),ge("ww",te,Q),ge("W",te,he),ge("WW",te,Q),ve(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ye(e)}));function tt(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("d",0,"do","day"),j("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),j("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),j("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ge("d",te),ge("e",te),ge("E",te),ge("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ge("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ge("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:v(n).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,n,r){t[r]=ye(e)}));var nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ot="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),it=ue,st=ue,at=ue;function lt(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=w([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Be.call(this._weekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Be.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=Be.call(this._minWeekdaysParse,s))?o:null:"dddd"===t?-1!==(o=Be.call(this._weekdaysParse,s))||-1!==(o=Be.call(this._shortWeekdaysParse,s))||-1!==(o=Be.call(this._minWeekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Be.call(this._shortWeekdaysParse,s))||-1!==(o=Be.call(this._weekdaysParse,s))||-1!==(o=Be.call(this._minWeekdaysParse,s))?o:null:-1!==(o=Be.call(this._minWeekdaysParse,s))||-1!==(o=Be.call(this._weekdaysParse,s))||-1!==(o=Be.call(this._shortWeekdaysParse,s))?o:null}function ct(){function e(e,t){return t.length-e.length}var t,n,r,o,i,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=w([2e3,1]).day(t),r=fe(this.weekdaysMin(n,"")),o=fe(this.weekdaysShort(n,"")),i=fe(this.weekdays(n,"")),s.push(r),a.push(o),l.push(i),c.push(r),c.push(o),c.push(i);s.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function dt(){return this.hours()%12||12}function ut(e,t){j(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function ht(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,dt),j("k",["kk",2],0,(function(){return this.hours()||24})),j("hmm",0,0,(function(){return""+dt.apply(this)+$(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+dt.apply(this)+$(this.minutes(),2)+$(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+$(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+$(this.minutes(),2)+$(this.seconds(),2)})),ut("a",!0),ut("A",!1),ge("a",ht),ge("A",ht),ge("H",te,pe),ge("h",te,he),ge("k",te,he),ge("HH",te,Q),ge("hh",te,Q),ge("kk",te,Q),ge("hmm",ne),ge("hmmss",re),ge("Hmm",ne),ge("Hmmss",re),we(["H","HH"],Ee),we(["k","kk"],(function(e,t,n){var r=ye(e);t[Ee]=24===r?0:r})),we(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),we(["h","hh"],(function(e,t,n){t[Ee]=ye(e),v(n).bigHour=!0})),we("hmm",(function(e,t,n){var r=e.length-2;t[Ee]=ye(e.substr(0,r)),t[Ne]=ye(e.substr(r)),v(n).bigHour=!0})),we("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ee]=ye(e.substr(0,r)),t[Ne]=ye(e.substr(r,2)),t[Te]=ye(e.substr(o)),v(n).bigHour=!0})),we("Hmm",(function(e,t,n){var r=e.length-2;t[Ee]=ye(e.substr(0,r)),t[Ne]=ye(e.substr(r))})),we("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ee]=ye(e.substr(0,r)),t[Ne]=ye(e.substr(r,2)),t[Te]=ye(e.substr(o))}));var pt=Le("Hours",!0);var gt,mt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ye,monthsShort:ze,week:{dow:0,doy:6},weekdays:nt,weekdaysMin:ot,weekdaysShort:rt,meridiemParse:/[ap]\.?m?\.?/i},ft={},kt={};function yt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function bt(e){return e?e.toLowerCase().replace("_","-"):e}function wt(e){var t=null;if(void 0===ft[e]&&"undefined"!=typeof module&&module&&module.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(e))try{t=gt._abbr,require("./locale/"+e),vt(t)}catch(n){ft[e]=null}return ft[e]}function vt(e,t){var n;return e&&((n=m(t)?xt(e):_t(e,t))?gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),gt._abbr}function _t(e,t){if(null!==t){var n,r=mt;if(t.abbr=e,null!=ft[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ft[e]._config;else if(null!=t.parentLocale)if(null!=ft[t.parentLocale])r=ft[t.parentLocale]._config;else{if(null==(n=wt(t.parentLocale)))return kt[t.parentLocale]||(kt[t.parentLocale]=[]),kt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ft[e]=new L(I(r,t)),kt[e]&&kt[e].forEach((function(e){_t(e.name,e.config)})),vt(e),ft[e]}return delete ft[e],null}function xt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return gt;if(!u(e)){if(t=wt(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=bt(e[i]).split("-")).length,n=(n=bt(e[i+1]))?n.split("-"):null;t>0;){if(r=wt(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&yt(o,n)>=t-1)break;t--}i++}return gt}(e)}function St(e){var t,n=e._a;return n&&-2===v(e).overflow&&(t=n[Ce]<0||n[Ce]>11?Ce:n[Me]<1||n[Me]>Ve(n[Se],n[Ce])?Me:n[Ee]<0||n[Ee]>24||24===n[Ee]&&(0!==n[Ne]||0!==n[Te]||0!==n[Re])?Ee:n[Ne]<0||n[Ne]>59?Ne:n[Te]<0||n[Te]>59?Te:n[Re]<0||n[Re]>999?Re:-1,v(e)._overflowDayOfYear&&(t<Se||t>Me)&&(t=Me),v(e)._overflowWeeks&&-1===t&&(t=De),v(e)._overflowWeekday&&-1===t&&(t=Ae),v(e).overflow=t),e}var Ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Et=/Z|[+-]\d\d(?::?\d\d)?/,Nt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Tt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Rt=/^\/?Date\((-?\d+)/i,Dt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,At={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,r,o,i,s,a=e._i,l=Ct.exec(a)||Mt.exec(a),c=Nt.length,d=Tt.length;if(l){for(v(e).iso=!0,t=0,n=c;t<n;t++)if(Nt[t][1].exec(l[1])){o=Nt[t][0],r=!1!==Nt[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=d;t<n;t++)if(Tt[t][1].exec(l[3])){i=(l[2]||" ")+Tt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Et.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=o+(i||"")+(s||""),Pt(e)}else e._isValid=!1}function Bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function It(e){var t,n,r,o,i,s,a,l,c=Dt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[4],r=c[3],o=c[2],i=c[5],s=c[6],a=c[7],l=[Bt(n),ze.indexOf(r),parseInt(o,10),parseInt(i,10),parseInt(s,10)],a&&l.push(parseInt(a,10)),t=l,!function(e,t,n){return!e||rt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(v(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return At[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(c[8],c[9],c[10]),e._d=Ke.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),v(e).rfc2822=!0}else e._isValid=!1}function Lt(e,t,n){return null!=e?e:null!=t?t:n}function $t(e){var t,n,r,o,i,s=[];if(!e._d){for(r=function(e){var t=new Date(d.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[Me]&&null==e._a[Ce]&&function(e){var t,n,r,o,i,s,a,l,c;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(i=1,s=4,n=Lt(t.GG,e._a[Se],Xe(zt(),1,4).year),r=Lt(t.W,1),((o=Lt(t.E,1))<1||o>7)&&(l=!0)):(i=e._locale._week.dow,s=e._locale._week.doy,c=Xe(zt(),i,s),n=Lt(t.gg,e._a[Se],c.year),r=Lt(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i);r<1||r>et(n,i,s)?v(e)._overflowWeeks=!0:null!=l?v(e)._overflowWeekday=!0:(a=Je(n,r,o,i,s),e._a[Se]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(i=Lt(e._a[Se],r[Se]),(e._dayOfYear>Oe(i)||0===e._dayOfYear)&&(v(e)._overflowDayOfYear=!0),n=Ke(i,0,e._dayOfYear),e._a[Ce]=n.getUTCMonth(),e._a[Me]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ee]&&0===e._a[Ne]&&0===e._a[Te]&&0===e._a[Re]&&(e._nextDay=!0,e._a[Ee]=0),e._d=(e._useUTC?Ke:Ze).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ee]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(v(e).weekdayMismatch=!0)}}function Pt(e){if(e._f!==d.ISO_8601)if(e._f!==d.RFC_2822){e._a=[],v(e).empty=!0;var t,n,r,o,i,s,a,l=""+e._i,c=l.length,u=0;for(a=(r=F(e._f,e._locale).match(P)||[]).length,t=0;t<a;t++)o=r[t],(n=(l.match(me(o,e))||[])[0])&&((i=l.substr(0,l.indexOf(n))).length>0&&v(e).unusedInput.push(i),l=l.slice(l.indexOf(n)+n.length),u+=n.length),z[o]?(n?v(e).empty=!1:v(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&v(e).unusedTokens.push(o);v(e).charsLeftOver=c-u,l.length>0&&v(e).unusedInput.push(l),e._a[Ee]<=12&&!0===v(e).bigHour&&e._a[Ee]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[Ee]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[Ee],e._meridiem),null!==(s=v(e).era)&&(e._a[Se]=e._locale.erasConvertYear(s,e._a[Se])),$t(e),St(e)}else It(e);else Ot(e)}function Vt(e){var t=e._i,n=e._f;return e._locale=e._locale||xt(e._l),null===t||void 0===n&&""===t?x({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),N(t)?new E(St(t)):(k(t)?e._d=t:u(n)?function(e){var t,n,r,o,i,s,a=!1,l=e._f.length;if(0===l)return v(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)i=0,s=!1,t=M({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Pt(t),_(t)&&(s=!0),i+=v(t).charsLeftOver,i+=10*v(t).unusedTokens.length,v(t).score=i,a?i<r&&(r=i,n=t):(null==r||i<r||s)&&(r=i,n=t,s&&(a=!0));b(e,n||t)}(e):n?Pt(e):function(e){var t=e._i;m(t)?e._d=new Date(d.now()):k(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Rt.exec(e._i);null===t?(Ot(e),!1===e._isValid&&(delete e._isValid,It(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:d.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):u(t)?(e._a=y(t.slice(0),(function(e){return parseInt(e,10)})),$t(e)):h(t)?function(e){if(!e._d){var t=q(e._i),n=void 0===t.day?t.date:t.day;e._a=y([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),$t(e)}}(e):f(t)?e._d=new Date(t):d.createFromInputFallback(e)}(e),_(e)||(e._d=null),e))}function Yt(e,t,n,r,o){var i,s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(h(e)&&g(e)||u(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,(i=new E(St(Vt(s))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function zt(e,t,n,r){return Yt(e,t,n,r,!1)}d.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),d.ISO_8601=function(){},d.RFC_2822=function(){};var jt=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=zt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:x()})),Ut=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=zt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:x()}));function Ft(e,t){var n,r;if(1===t.length&&u(t[0])&&(t=t[0]),!t.length)return zt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ht=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Wt(e){var t=q(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,o=Ht.length;for(t in e)if(p(e,t)&&(-1===Be.call(Ht,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[Ht[n]]){if(r)return!1;parseFloat(e[Ht[n]])!==ye(e[Ht[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=xt(),this._bubble()}function qt(e){return e instanceof Wt}function Gt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Zt(e,t){j(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+$(~~(e/60),2)+t+$(~~e%60,2)}))}Zt("Z",":"),Zt("ZZ",""),ge("Z",de),ge("ZZ",de),we(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Qt(de,e)}));var Kt=/([\+\-]|\d\d)/gi;function Qt(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(Kt)||["-",0,0])[1]+ye(n[2]))?0:"+"===n[0]?r:-r}function Jt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(N(e)||k(e)?e.valueOf():zt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),d.updateOffset(n,!1),n):zt(e).local()}function Xt(e){return-Math.round(e._d.getTimezoneOffset())}function en(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}d.updateOffset=function(){};var tn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function rn(e,t){var n,r,o,i=e,s=null;return qt(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:f(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(s=tn.exec(e))?(n="-"===s[1]?-1:1,i={y:0,d:ye(s[Me])*n,h:ye(s[Ee])*n,m:ye(s[Ne])*n,s:ye(s[Te])*n,ms:ye(Gt(1e3*s[Re]))*n}):(s=nn.exec(e))?(n="-"===s[1]?-1:1,i={y:on(s[2],n),M:on(s[3],n),w:on(s[4],n),d:on(s[5],n),h:on(s[6],n),m:on(s[7],n),s:on(s[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Jt(t,e),e.isBefore(t)?n=sn(e,t):((n=sn(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(zt(i.from),zt(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),r=new Wt(i),qt(e)&&p(e,"_locale")&&(r._locale=e._locale),qt(e)&&p(e,"_isValid")&&(r._isValid=e._isValid),r}function on(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function sn(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function an(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),ln(this,rn(n,r),e),this}}function ln(e,t,n,r){var o=t._milliseconds,i=Gt(t._days),s=Gt(t._months);e.isValid()&&(r=null==r||r,s&&We(e,$e(e,"Month")+s*n),i&&Pe(e,"Date",$e(e,"Date")+i*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&d.updateOffset(e,i||s))}rn.fn=Wt.prototype,rn.invalid=function(){return rn(NaN)};var cn=an(1,"add"),dn=an(-1,"subtract");function un(e){return"string"==typeof e||e instanceof String}function hn(e){return N(e)||k(e)||un(e)||f(e)||function(e){var t=u(e),n=!1;t&&(n=0===e.filter((function(t){return!f(t)&&un(e)})).length);return t&&n}(e)||function(e){var t,n,r=h(e)&&!g(e),o=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s=i.length;for(t=0;t<s;t+=1)n=i[t],o=o||p(e,n);return r&&o}(e)||null==e}function pn(e,t){if(e.date()<t.date())return-pn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function gn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=xt(e))&&(this._locale=t),this)}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var mn=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function fn(){return this._locale}var kn=1e3,yn=6e4,bn=36e5,wn=126227808e5;function vn(e,t){return(e%t+t)%t}function _n(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-wn:new Date(e,t,n).valueOf()}function xn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-wn:Date.UTC(e,t,n)}function Sn(e,t){return t.erasAbbrRegex(e)}function Cn(){var e,t,n,r,o,i=[],s=[],a=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)n=fe(c[e].name),r=fe(c[e].abbr),o=fe(c[e].narrow),s.push(n),i.push(r),a.push(o),l.push(n),l.push(r),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Mn(e,t){j(0,[e,e.length],0,t)}function En(e,t,n,r,o){var i;return null==e?Xe(this,r,o).year:(t>(i=et(e,r,o))&&(t=i),Nn.call(this,e,t,n,r,o))}function Nn(e,t,n,r,o){var i=Je(e,t,n,r,o),s=Ke(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),ge("N",Sn),ge("NN",Sn),ge("NNN",Sn),ge("NNNN",(function(e,t){return t.erasNameRegex(e)})),ge("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),we(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?v(n).era=o:v(n).invalidEra=e})),ge("y",ae),ge("yy",ae),ge("yyy",ae),ge("yyyy",ae),ge("yo",(function(e,t){return t._eraYearOrdinalRegex||ae})),we(["y","yy","yyy","yyyy"],Se),we(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Se]=n._locale.eraYearOrdinalParse(e,o):t[Se]=parseInt(e,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Mn("gggg","weekYear"),Mn("ggggg","weekYear"),Mn("GGGG","isoWeekYear"),Mn("GGGGG","isoWeekYear"),ge("G",le),ge("g",le),ge("GG",te,Q),ge("gg",te,Q),ge("GGGG",ie,X),ge("gggg",ie,X),ge("GGGGG",se,ee),ge("ggggg",se,ee),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ye(e)})),ve(["gg","GG"],(function(e,t,n,r){t[r]=d.parseTwoDigitYear(e)})),j("Q",0,"Qo","quarter"),ge("Q",K),we("Q",(function(e,t){t[Ce]=3*(ye(e)-1)})),j("D",["DD",2],"Do","date"),ge("D",te,he),ge("DD",te,Q),ge("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),we(["D","DD"],Me),we("Do",(function(e,t){t[Me]=ye(e.match(te)[0])}));var Tn=Le("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),ge("DDD",oe),ge("DDDD",J),we(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ye(e)})),j("m",["mm",2],0,"minute"),ge("m",te,pe),ge("mm",te,Q),we(["m","mm"],Ne);var Rn=Le("Minutes",!1);j("s",["ss",2],0,"second"),ge("s",te,pe),ge("ss",te,Q),we(["s","ss"],Te);var Dn,An,On=Le("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ge("S",oe,K),ge("SS",oe,Q),ge("SSS",oe,J),Dn="SSSS";Dn.length<=9;Dn+="S")ge(Dn,ae);function Bn(e,t){t[Re]=ye(1e3*("0."+e))}for(Dn="S";Dn.length<=9;Dn+="S")we(Dn,Bn);An=Le("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var In=E.prototype;function Ln(e){return e}In.add=cn,In.calendar=function(e,t){1===arguments.length&&(arguments[0]?hn(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=h(e)&&!g(e),r=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=r||p(e,o[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||zt(),r=Jt(n,this).startOf("day"),o=d.calendarFormat(this,r)||"sameElse",i=t&&(B(t[o])?t[o].call(this,n):t[o]);return this.format(i||this.localeData().calendar(o,this,zt(n)))},In.clone=function(){return new E(this)},In.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Jt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=W(t)){case"year":i=pn(this,r)/12;break;case"month":i=pn(this,r);break;case"quarter":i=pn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:ke(i)},In.endOf=function(e){var t,n;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?xn:_n,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=bn-vn(t+(this._isUTC?0:this.utcOffset()*yn),bn)-1;break;case"minute":t=this._d.valueOf(),t+=yn-vn(t,yn)-1;break;case"second":t=this._d.valueOf(),t+=kn-vn(t,kn)-1}return this._d.setTime(t),d.updateOffset(this,!0),this},In.format=function(e){e||(e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},In.from=function(e,t){return this.isValid()&&(N(e)&&e.isValid()||zt(e).isValid())?rn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},In.fromNow=function(e){return this.from(zt(),e)},In.to=function(e,t){return this.isValid()&&(N(e)&&e.isValid()||zt(e).isValid())?rn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},In.toNow=function(e){return this.to(zt(),e)},In.get=function(e){return B(this[e=W(e)])?this[e]():this},In.invalidAt=function(){return v(this).overflow},In.isAfter=function(e,t){var n=N(e)?e:zt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},In.isBefore=function(e,t){var n=N(e)?e:zt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},In.isBetween=function(e,t,n,r){var o=N(e)?e:zt(e),i=N(t)?t:zt(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n)))},In.isSame=function(e,t){var n,r=N(e)?e:zt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},In.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},In.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},In.isValid=function(){return _(this)},In.lang=mn,In.locale=gn,In.localeData=fn,In.max=Ut,In.min=jt,In.parsingFlags=function(){return b({},v(this))},In.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)p(e,t)&&n.push({unit:t,priority:G[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=q(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(B(this[e=W(e)]))return this[e](t);return this},In.startOf=function(e){var t,n;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?xn:_n,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=vn(t+(this._isUTC?0:this.utcOffset()*yn),bn);break;case"minute":t=this._d.valueOf(),t-=vn(t,yn);break;case"second":t=this._d.valueOf(),t-=vn(t,kn)}return this._d.setTime(t),d.updateOffset(this,!0),this},In.subtract=dn,In.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},In.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},In.toDate=function(){return new Date(this.valueOf())},In.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):B(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},In.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",o="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(In[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),In.toJSON=function(){return this.isValid()?this.toISOString():null},In.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},In.unix=function(){return Math.floor(this.valueOf()/1e3)},In.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},In.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},In.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},In.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},In.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},In.eraYear=function(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-d(o[e].since).year())*n+o[e].offset;return this.year()},In.year=Ie,In.isLeapYear=function(){return xe(this.year())},In.weekYear=function(e){return En.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},In.isoWeekYear=function(e){return En.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},In.quarter=In.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},In.month=qe,In.daysInMonth=function(){return Ve(this.year(),this.month())},In.week=In.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},In.isoWeek=In.isoWeeks=function(e){var t=Xe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},In.weeksInYear=function(){var e=this.localeData()._week;return et(this.year(),e.dow,e.doy)},In.weeksInWeekYear=function(){var e=this.localeData()._week;return et(this.weekYear(),e.dow,e.doy)},In.isoWeeksInYear=function(){return et(this.year(),1,4)},In.isoWeeksInISOWeekYear=function(){return et(this.isoWeekYear(),1,4)},In.date=Tn,In.day=In.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=$e(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},In.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},In.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},In.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},In.hour=In.hours=pt,In.minute=In.minutes=Rn,In.second=In.seconds=On,In.millisecond=In.milliseconds=An,In.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Qt(de,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Xt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?ln(this,rn(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Xt(this)},In.utc=function(e){return this.utcOffset(0,e)},In.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Xt(this),"m")),this},In.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Qt(ce,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},In.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?zt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},In.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},In.isLocal=function(){return!!this.isValid()&&!this._isUTC},In.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},In.isUtc=en,In.isUTC=en,In.zoneAbbr=function(){return this._isUTC?"UTC":""},In.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},In.dates=R("dates accessor is deprecated. Use date instead.",Tn),In.months=R("months accessor is deprecated. Use month instead",qe),In.years=R("years accessor is deprecated. Use year instead",Ie),In.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),In.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e,t={};return M(t,this),(t=Vt(t))._a?(e=t._isUTC?w(t._a):zt(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(n=0;n<r;n++)ye(e[n])!==ye(t[n])&&i++;return i+o}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var $n=L.prototype;function Pn(e,t,n,r){var o=xt(),i=w().set(r,t);return o[n](i,e)}function Vn(e,t,n){if(f(e)&&(t=e,e=void 0),e=e||"",null!=t)return Pn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Pn(e,r,n,"month");return o}function Yn(e,t,n,r){"boolean"==typeof e?(f(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,f(t)&&(n=t,t=void 0),t=t||"");var o,i=xt(),s=e?i._week.dow:0,a=[];if(null!=n)return Pn(t,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=Pn(t,(o+s)%7,r,"day");return a}$n.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return B(r)?r.call(t,n):r},$n.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(P).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},$n.invalidDate=function(){return this._invalidDate},$n.ordinal=function(e){return this._ordinal.replace("%d",e)},$n.preparse=Ln,$n.postformat=Ln,$n.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return B(o)?o(e,t,n,r):o.replace(/%d/i,e)},$n.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return B(n)?n(t):n.replace(/%s/i,t)},$n.set=function(e){var t,n;for(n in e)p(e,n)&&(B(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},$n.eras=function(e,t){var n,r,o,i=this._eras||xt("en")._eras;for(n=0,r=i.length;n<r;++n){if("string"==typeof i[n].since)o=d(i[n].since).startOf("day"),i[n].since=o.valueOf();switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":o=d(i[n].until).startOf("day").valueOf(),i[n].until=o.valueOf()}}return i},$n.erasParse=function(e,t,n){var r,o,i,s,a,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(i=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(i===e)return l[r];break;case"NNNNN":if(a===e)return l[r]}else if([i,s,a].indexOf(e)>=0)return l[r]},$n.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?d(e.since).year():d(e.since).year()+(t-e.offset)*n},$n.erasAbbrRegex=function(e){return p(this,"_erasAbbrRegex")||Cn.call(this),e?this._erasAbbrRegex:this._erasRegex},$n.erasNameRegex=function(e){return p(this,"_erasNameRegex")||Cn.call(this),e?this._erasNameRegex:this._erasRegex},$n.erasNarrowRegex=function(e){return p(this,"_erasNarrowRegex")||Cn.call(this),e?this._erasNarrowRegex:this._erasRegex},$n.months=function(e,t){return e?u(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||je).test(t)?"format":"standalone"][e.month()]:u(this._months)?this._months:this._months.standalone},$n.monthsShort=function(e,t){return e?u(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[je.test(t)?"format":"standalone"][e.month()]:u(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},$n.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return He.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=w([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},$n.monthsRegex=function(e){return this._monthsParseExact?(p(this,"_monthsRegex")||Ge.call(this),e?this._monthsStrictRegex:this._monthsRegex):(p(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},$n.monthsShortRegex=function(e){return this._monthsParseExact?(p(this,"_monthsRegex")||Ge.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(p(this,"_monthsShortRegex")||(this._monthsShortRegex=Ue),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},$n.week=function(e){return Xe(e,this._week.dow,this._week.doy).week},$n.firstDayOfYear=function(){return this._week.doy},$n.firstDayOfWeek=function(){return this._week.dow},$n.weekdays=function(e,t){var n=u(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?tt(n,this._week.dow):e?n[e.day()]:n},$n.weekdaysMin=function(e){return!0===e?tt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},$n.weekdaysShort=function(e){return!0===e?tt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},$n.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return lt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=w([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},$n.weekdaysRegex=function(e){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||ct.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(p(this,"_weekdaysRegex")||(this._weekdaysRegex=it),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},$n.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||ct.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(p(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=st),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},$n.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||ct.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(p(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=at),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},$n.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},$n.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},vt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ye(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),d.lang=R("moment.lang is deprecated. Use moment.locale instead.",vt),d.langData=R("moment.langData is deprecated. Use moment.localeData instead.",xt);var zn=Math.abs;function jn(e,t,n,r){var o=rn(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Un(e){return e<0?Math.floor(e):Math.ceil(e)}function Fn(e){return 4800*e/146097}function Hn(e){return 146097*e/4800}function Wn(e){return function(){return this.as(e)}}var qn=Wn("ms"),Gn=Wn("s"),Zn=Wn("m"),Kn=Wn("h"),Qn=Wn("d"),Jn=Wn("w"),Xn=Wn("M"),er=Wn("Q"),tr=Wn("y"),nr=qn;function rr(e){return function(){return this.isValid()?this._data[e]:NaN}}var or=rr("milliseconds"),ir=rr("seconds"),sr=rr("minutes"),ar=rr("hours"),lr=rr("days"),cr=rr("months"),dr=rr("years");var ur=Math.round,hr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pr(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var gr=Math.abs;function mr(e){return(e>0)-(e<0)||+e}function fr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,s,a,l=gr(this._milliseconds)/1e3,c=gr(this._days),d=gr(this._months),u=this.asSeconds();return u?(e=ke(l/60),t=ke(e/60),l%=60,e%=60,n=ke(d/12),d%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",i=mr(this._months)!==mr(u)?"-":"",s=mr(this._days)!==mr(u)?"-":"",a=mr(this._milliseconds)!==mr(u)?"-":"",o+"P"+(n?i+n+"Y":"")+(d?i+d+"M":"")+(c?s+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var kr=Wt.prototype;kr.isValid=function(){return this._isValid},kr.abs=function(){var e=this._data;return this._milliseconds=zn(this._milliseconds),this._days=zn(this._days),this._months=zn(this._months),e.milliseconds=zn(e.milliseconds),e.seconds=zn(e.seconds),e.minutes=zn(e.minutes),e.hours=zn(e.hours),e.months=zn(e.months),e.years=zn(e.years),this},kr.add=function(e,t){return jn(this,e,t,1)},kr.subtract=function(e,t){return jn(this,e,t,-1)},kr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=W(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Fn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Hn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},kr.asMilliseconds=qn,kr.asSeconds=Gn,kr.asMinutes=Zn,kr.asHours=Kn,kr.asDays=Qn,kr.asWeeks=Jn,kr.asMonths=Xn,kr.asQuarters=er,kr.asYears=tr,kr.valueOf=nr,kr._bubble=function(){var e,t,n,r,o,i=this._milliseconds,s=this._days,a=this._months,l=this._data;return i>=0&&s>=0&&a>=0||i<=0&&s<=0&&a<=0||(i+=864e5*Un(Hn(a)+s),s=0,a=0),l.milliseconds=i%1e3,e=ke(i/1e3),l.seconds=e%60,t=ke(e/60),l.minutes=t%60,n=ke(t/60),l.hours=n%24,s+=ke(n/24),a+=o=ke(Fn(s)),s-=Un(Hn(o)),r=ke(a/12),a%=12,l.days=s,l.months=a,l.years=r,this},kr.clone=function(){return rn(this)},kr.get=function(e){return e=W(e),this.isValid()?this[e+"s"]():NaN},kr.milliseconds=or,kr.seconds=ir,kr.minutes=sr,kr.hours=ar,kr.days=lr,kr.weeks=function(){return ke(this.days()/7)},kr.months=cr,kr.years=dr,kr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,i=hr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(i=Object.assign({},hr,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=function(e,t,n,r){var o=rn(e).abs(),i=ur(o.as("s")),s=ur(o.as("m")),a=ur(o.as("h")),l=ur(o.as("d")),c=ur(o.as("M")),d=ur(o.as("w")),u=ur(o.as("y")),h=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=t,h[3]=+e>0,h[4]=r,pr.apply(null,h)}(this,!o,i,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)},kr.toISOString=fr,kr.toString=fr,kr.toJSON=fr,kr.locale=gn,kr.localeData=fn,kr.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",fr),kr.lang=mn,j("X",0,0,"unix"),j("x",0,0,"valueOf"),ge("x",le),ge("X",/[+-]?\d+(\.\d{1,3})?/),we("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),we("x",(function(e,t,n){n._d=new Date(ye(e))})),
|
|
2
|
+
//! moment.js
|
|
3
|
+
d.version="2.30.1",i=zt,d.fn=In,d.min=function(){return Ft("isBefore",[].slice.call(arguments,0))},d.max=function(){return Ft("isAfter",[].slice.call(arguments,0))},d.now=function(){return Date.now?Date.now():+new Date},d.utc=w,d.unix=function(e){return zt(1e3*e)},d.months=function(e,t){return Vn(e,t,"months")},d.isDate=k,d.locale=vt,d.invalid=x,d.duration=rn,d.isMoment=N,d.weekdays=function(e,t,n){return Yn(e,t,n,"weekdays")},d.parseZone=function(){return zt.apply(null,arguments).parseZone()},d.localeData=xt,d.isDuration=qt,d.monthsShort=function(e,t){return Vn(e,t,"monthsShort")},d.weekdaysMin=function(e,t,n){return Yn(e,t,n,"weekdaysMin")},d.defineLocale=_t,d.updateLocale=function(e,t){if(null!=t){var n,r,o=mt;null!=ft[e]&&null!=ft[e].parentLocale?ft[e].set(I(ft[e]._config,t)):(null!=(r=wt(e))&&(o=r._config),t=I(o,t),null==r&&(t.abbr=e),(n=new L(t)).parentLocale=ft[e],ft[e]=n),vt(e)}else null!=ft[e]&&(null!=ft[e].parentLocale?(ft[e]=ft[e].parentLocale,e===vt()&&vt(e)):null!=ft[e]&&delete ft[e]);return ft[e]},d.locales=function(){return D(ft)},d.weekdaysShort=function(e,t,n){return Yn(e,t,n,"weekdaysShort")},d.normalizeUnits=W,d.relativeTimeRounding=function(e){return void 0===e?ur:"function"==typeof e&&(ur=e,!0)},d.relativeTimeThreshold=function(e,t){return void 0!==hr[e]&&(void 0===t?hr[e]:(hr[e]=t,"s"===e&&(hr.ss=t-1),!0))},d.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},d.prototype=In,d.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const yr=t.defineComponent({name:"HeatMap",props:{activityRecords:{type:Array,default:()=>[]},activityRecordsGetter:{type:Function,default:null},inactiveColor:{type:Object,default:()=>({h:0,s:0,l:.9})},activeColor:{type:Object,default:()=>({h:155,s:1,l:.5})},cellSize:{type:Number,default:12},cellMargin:{type:Number,default:3},enableSeasonalColors:{type:Boolean,default:!0}},data:()=>({isLoading:!1,localActivityRecords:[],heatmapData:{},weeks:[],tooltipData:null,tooltipStyle:{},maxInRange:0}),computed:{width(){return 53*(this.cellSize+this.cellMargin)},height(){return 7*(this.cellSize+this.cellMargin)},effectiveActivityRecords(){const e=Array.isArray(this.localActivityRecords)&&this.localActivityRecords.length>0,t=e?this.localActivityRecords:this.activityRecords||[];return console.log("Using effectiveActivityRecords, count:",t.length,"source:",e?"local":"prop"),t}},watch:{activityRecords:{handler(){this.processRecords(),this.createWeeksData()},immediate:!0}},async created(){if(this.activityRecordsGetter)try{this.isLoading=!0,console.log("Fetching activity records using getter...");let e=await this.activityRecordsGetter();Array.isArray(e)?(this.localActivityRecords=e.filter((e=>{if(!e||!e.timeStamp)return!1;try{const t=d(e.timeStamp);return t.isValid()&&t.year()>2e3&&t.year()<2100}catch(t){return!1}})),console.log(`Received ${e.length} records, ${this.localActivityRecords.length} valid after filtering`),this.processRecords(),this.createWeeksData()):(console.error("Activity records getter did not return an array:",e),this.localActivityRecords=[])}catch(e){console.error("Error fetching activity records:",e),this.localActivityRecords=[]}finally{this.isLoading=!1}else console.log("No activityRecordsGetter provided, using direct activityRecords prop")},methods:{toDateString(e){const t=d(e);return d.months()[t.month()]+" "+t.date()},processRecords(){const e=this.effectiveActivityRecords||[];console.log(`Processing ${e.length} records`);const t={};if(0===e.length)return console.log("No records to process"),void(this.heatmapData=t);const n=new Set,r={};let o=0,i=0;for(let a=0;a<e.length;a++){const l=e[a];if(l&&"object"==typeof l&&l.timeStamp)try{let e;if("string"==typeof l.timeStamp)e=d(l.timeStamp).format("YYYY-MM-DD");else if("number"==typeof l.timeStamp)e=d(new Date(l.timeStamp)).format("YYYY-MM-DD");else{if("object"!=typeof l.timeStamp){i++;continue}e="function"==typeof l.timeStamp.format?l.timeStamp.format("YYYY-MM-DD"):l.timeStamp instanceof Date?d(l.timeStamp).format("YYYY-MM-DD"):d(String(l.timeStamp)).format("YYYY-MM-DD")}if(d(e,"YYYY-MM-DD",!0).isValid()){t[e]=(t[e]||0)+1,n.add(e);const i=e.substring(0,7);r[i]=(r[i]||0)+1,o++}else i++}catch(s){i++}else i++}console.log(`Processed ${o} valid dates, ${i} invalid dates`),console.log(`Found ${n.size} unique dates`),console.log("Date distribution by month:",r),this.heatmapData=t},createWeeksData(){this.weeks=[],this.maxInRange=0;const e=d(),t=e.clone().subtract(52,"weeks"),n=t.clone().startOf("week");console.log("Creating weeks data from",t.format("YYYY-MM-DD"),"to",e.format("YYYY-MM-DD")),0===Object.keys(this.heatmapData).length&&console.log("No heatmap data available to display");const r=Object.keys(this.heatmapData).slice(0,5);for(console.log("Sample dates in heatmap data:",r);n.isSameOrBefore(e);){const e=[];for(let t=0;t<7;t++){const t=n.format("YYYY-MM-DD"),r={date:t,count:this.heatmapData[t]||0};e.push(r),r.count>this.maxInRange&&(this.maxInRange=r.count),n.add(1,"day")}this.weeks.push(e)}console.log("Weeks data created, maxInRange:",this.maxInRange);let o=0,i=0;Object.values(this.heatmapData).forEach((e=>{o++,i+=e})),console.log(`Activity summary: ${i} activities across ${o} days`)},getColor(e){if(0===this.maxInRange)return this.hslToString(this.inactiveColor);const t=0===e?0:Math.min(2*e/this.maxInRange,1);let n=this.activeColor;if(this.enableSeasonalColors){const e=d();11===e.month()&&e.date()>=5?n=Math.random()>.5?{h:350,s:.8,l:.5}:{h:135,s:.8,l:.4}:9===e.month()&&e.date()>=25&&(n=Math.random()>.5?{h:0,s:0,l:0}:Math.random()>.5?{h:30,s:1,l:.5}:{h:270,s:1,l:.5})}const r=n.h,o=this.interpolate(this.inactiveColor.s,n.s,t),i=this.interpolate(this.inactiveColor.l,n.l,t);return this.hslToString({h:r,s:o,l:i})},interpolate:(e,t,n)=>e+(t-e)*n,hslToString:e=>`hsl(${e.h}, ${100*e.s}%, ${100*e.l}%)`,showTooltip(e,t){this.tooltipData=e,this.tooltipStyle={position:"absolute",left:`${t.pageX+10}px`,top:`${t.pageY+10}px`}},hideTooltip(){this.tooltipData=null}}}),br=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},wr=["width","height"],vr=["transform"],_r=["y","width","height","fill","onMouseover"];const xr=br(yr,[["render",function(e,n,r,o,i,s){return t.openBlock(),t.createElementBlock("div",null,[(t.openBlock(),t.createElementBlock("svg",{width:e.width,height:e.height},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,((r,o)=>(t.openBlock(),t.createElementBlock("g",{key:o,transform:`translate(${o*(e.cellSize+e.cellMargin)}, 0)`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r,((r,o)=>(t.openBlock(),t.createElementBlock("rect",{key:r.date,x:0,y:o*(e.cellSize+e.cellMargin),width:e.cellSize,height:e.cellSize,fill:e.getColor(r.count),onMouseover:t=>e.showTooltip(r,t),onMouseout:n[0]||(n[0]=(...t)=>e.hideTooltip&&e.hideTooltip(...t))},null,40,_r)))),128))],8,vr)))),128))],8,wr)),e.tooltipData?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tooltip",style:t.normalizeStyle(e.tooltipStyle)},t.toDisplayString(e.tooltipData.count)+" review"+t.toDisplayString(1!==e.tooltipData.count?"s":"")+" on "+t.toDisplayString(e.toDateString(e.tooltipData.date)),5)):t.createCommentVNode("",!0)])}],["__scopeId","data-v-ca46239a"]]);function Sr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cr,Mr={exports:{}};var Er,Nr=(Cr||(Cr=1,Er=Mr,function(e,t){if(e){for(var n,r={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},s={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},a=1;a<20;++a)r[111+a]="f"+a;for(a=0;a<=9;++a)r[a+96]=a.toString();g.prototype.bind=function(e,t,n){var r=this;return e=e instanceof Array?e:[e],r._bindMultiple.call(r,e,t,n),r},g.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},g.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),n},g.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},g.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(p(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},g.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)},g.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);n=null},g.init=function(){var e=g(t);for(var n in e)"_"!==n.charAt(0)&&(g[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n))},g.init(),e.Mousetrap=g,Er.exports&&(Er.exports=g)}function l(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function c(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return r[e.which]?r[e.which]:o[e.which]?o[e.which]:String.fromCharCode(e.which).toLowerCase()}function d(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function u(e,t,o){return o||(o=function(){if(!n)for(var e in n={},r)e>95&&e<112||r.hasOwnProperty(e)&&(n[r[e]]=e);return n}()[e]?"keydown":"keypress"),"keypress"==o&&t.length&&(o="keydown"),o}function h(e,t){var n,r,o,a=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),o=0;o<n.length;++o)r=n[o],s[r]&&(r=s[r]),t&&"keypress"!=t&&i[r]&&(r=i[r],a.push("shift")),d(r)&&a.push(r);return{key:r,modifiers:a,action:t=u(r,a,t)}}function p(e,n){return null!==e&&e!==t&&(e===n||p(e.parentNode,n))}function g(e){var n=this;if(e=e||t,!(n instanceof g))return new g(e);n.target=e,n._callbacks={},n._directMap={};var r,o={},i=!1,s=!1,a=!1;function u(e){e=e||{};var t,n=!1;for(t in o)e[t]?n=!0:o[t]=0;n||(a=!1)}function p(e,t,r,i,s,a){var l,c,u,h,p=[],g=r.type;if(!n._callbacks[e])return[];for("keyup"==g&&d(e)&&(t=[e]),l=0;l<n._callbacks[e].length;++l)if(c=n._callbacks[e][l],(i||!c.seq||o[c.seq]==c.level)&&g==c.action&&("keypress"==g&&!r.metaKey&&!r.ctrlKey||(u=t,h=c.modifiers,u.sort().join(",")===h.sort().join(",")))){var m=!i&&c.combo==s,f=i&&c.seq==i&&c.level==a;(m||f)&&n._callbacks[e].splice(l,1),p.push(c)}return p}function m(e,t,r,o){n.stopCallback(t,t.target||t.srcElement,r,o)||!1===e(t,r)&&(function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}(t),function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}(t))}function f(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=c(e);t&&("keyup"!=e.type||i!==t?n.handleKey(t,function(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}(e),e):i=!1)}function k(e,t,n,s){function l(t){return function(){a=t,++o[e],clearTimeout(r),r=setTimeout(u,1e3)}}function d(t){m(n,t,e),"keyup"!==s&&(i=c(t)),setTimeout(u,10)}o[e]=0;for(var p=0;p<t.length;++p){var g=p+1===t.length?d:l(s||h(t[p+1]).action);y(t[p],g,s,e,p)}}function y(e,t,r,o,i){n._directMap[e+":"+r]=t;var s,a=(e=e.replace(/\s+/g," ")).split(" ");a.length>1?k(e,a,t,r):(s=h(e,r),n._callbacks[s.key]=n._callbacks[s.key]||[],p(s.key,s.modifiers,{type:s.action},o,e,i),n._callbacks[s.key][o?"unshift":"push"]({callback:t,modifiers:s.modifiers,action:s.action,seq:o,level:i,combo:e}))}n._handleKey=function(e,t,n){var r,o=p(e,t,n),i={},l=0,c=!1;for(r=0;r<o.length;++r)o[r].seq&&(l=Math.max(l,o[r].level));for(r=0;r<o.length;++r)if(o[r].seq){if(o[r].level!=l)continue;c=!0,i[o[r].seq]=1,m(o[r].callback,n,o[r].combo,o[r].seq)}else c||m(o[r].callback,n,o[r].combo);var h="keypress"==n.type&&s;n.type!=a||d(e)||h||u(i),s=c&&"keydown"==n.type},n._bindMultiple=function(e,t,n){for(var r=0;r<e.length;++r)y(e[r],t,n)},l(e,"keypress",f),l(e,"keydown",f),l(e,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)),Mr.exports);const Tr=Sr(Nr);var Rr;Rr||(Rr=1,function(e){if(e){var t={},n=e.prototype.stopCallback;e.prototype.stopCallback=function(e,r,o,i){return!!this.paused||!t[o]&&!t[i]&&n.call(this,e,r,o)},e.prototype.bindGlobal=function(e,n,r){if(this.bind(e,n,r),e instanceof Array)for(var o=0;o<e.length;o++)t[e[o]]=!0;else t[e]=!0},e.init()}}("undefined"!=typeof Mousetrap?Mousetrap:void 0));const Dr=class _SkldrMouseTrap{constructor(){l(this,"mouseTrap"),l(this,"hotkeys"),this.mouseTrap=new Tr,this.hotkeys=[]}static get commands(){return _SkldrMouseTrap.instance().hotkeys.map((e=>({command:e.command,hotkey:e.hotkey})))}static addBinding(e){const t=Array.isArray(e)?e:[e],n=_SkldrMouseTrap.instance();n.hotkeys=[...n.hotkeys,...t],t.forEach((e=>{Tr.bindGlobal(e.hotkey,((t,n)=>{!function(){const e=document.activeElement;return(!(e instanceof HTMLInputElement)||"checkbox"!==e.type&&"radio"!==e.type)&&e instanceof HTMLElement&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||e.isContentEditable)}()?e.callback(t,n):console.log(`Ignoring hotkey ${e.hotkey} while input element is focused`)}))}))}static removeBinding(e){const t=_SkldrMouseTrap.instance(),n=[...t.hotkeys];Array.isArray(e)&&!e.every((e=>"string"==typeof e||"number"==typeof e))?e.forEach((e=>{t.hotkeys=t.hotkeys.filter((t=>JSON.stringify(t.hotkey)!==JSON.stringify(e))),Tr.unbind(e)})):(t.hotkeys=n.filter((t=>JSON.stringify(t.hotkey)!==JSON.stringify(e))),Tr.unbind(e))}static reset(){console.warn("SkldrMouseTrap.reset() may affect hotkeys registered by other components. Consider using removeBinding() with specific hotkeys for better component isolation."),Tr.reset(),_SkldrMouseTrap.instance().mouseTrap.reset(),_SkldrMouseTrap.instance().hotkeys=[]}static instance(){return _SkldrMouseTrap._instance||(_SkldrMouseTrap._instance=new _SkldrMouseTrap),_SkldrMouseTrap._instance}};l(Dr,"_instance");let Ar=Dr;const Or=t.defineComponent({name:"SkMouseTrap",props:{refreshInterval:{type:Number,default:500}},data:()=>({commands:[],display:!1,intervalId:null}),created(){this.intervalId=window.setInterval(this.refreshState,this.refreshInterval)},beforeUnmount(){null!==this.intervalId&&clearInterval(this.intervalId)},methods:{refreshState(){this.commands=Ar.commands,this.display=this.commands.length>0}}}),Br={class:"text-caption ml-2"};const Ir=br(Or,[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-icon"),l=t.resolveComponent("v-btn"),c=t.resolveComponent("v-toolbar-title"),d=t.resolveComponent("v-toolbar"),u=t.resolveComponent("v-spacer"),h=t.resolveComponent("v-list-item"),p=t.resolveComponent("v-list"),g=t.resolveComponent("v-card"),m=t.resolveComponent("v-dialog");return e.display?(t.openBlock(),t.createBlock(m,{key:0,"max-width":"500px",transition:"dialog-transition"},{activator:t.withCtx((({props:e})=>[t.createVNode(l,t.mergeProps({icon:"",color:"primary"},e),{default:t.withCtx((()=>[t.createVNode(a,null,{default:t.withCtx((()=>n[0]||(n[0]=[t.createTextVNode("mdi-keyboard")]))),_:1})])),_:2},1040)])),default:t.withCtx((()=>[t.createVNode(g,null,{default:t.withCtx((()=>[t.createVNode(d,{color:"teal",dark:"",dense:""},{default:t.withCtx((()=>[t.createVNode(c,{class:"text-subtitle-1"},{default:t.withCtx((()=>n[1]||(n[1]=[t.createTextVNode("Shortcut keys:")]))),_:1})])),_:1}),t.createVNode(p,{dense:""},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.commands,(e=>(t.openBlock(),t.createBlock(h,{key:Array.isArray(e.hotkey)?e.hotkey.join(","):e.hotkey,class:"py-1"},{default:t.withCtx((()=>[t.createVNode(l,{variant:"outlined",color:"primary",class:"text-white",size:"small"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(Array.isArray(e.hotkey)?e.hotkey[0]:e.hotkey),1)])),_:2},1024),t.createVNode(u),t.createElementVNode("span",Br,t.toDisplayString(e.command),1)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1})):t.createCommentVNode("",!0)}]]);const Lr=br(t.defineComponent({name:"SkMouseTrapToolTip",props:{hotkey:{type:[String,Array],required:!0},command:{type:String,required:!0},disabled:{type:Boolean,default:!1},position:{type:String,default:"top"},showTooltip:{type:Boolean,default:!0},highlightEffect:{type:String,default:"glow"}},emits:["hotkey-triggered"],setup(e,{emit:n}){const r=t.ref(null),o=t.ref(!1);t.ref(`hotkey-${Math.random().toString(36).substring(2,15)}`);const i=t.computed((()=>{const t=Array.isArray(e.hotkey)?e.hotkey[0]:e.hotkey;return t.includes(" ")?t.toLowerCase().split(" ").map((e=>e.charAt(0)+e.slice(1))).join(", "):t.toLowerCase().split("+").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" + ")}));t.watch((()=>o.value),(t=>{if(!r.value||e.disabled)return;const n=r.value.querySelector('button, a, input[type="button"], [role="button"]');n&&(n.style.transition="all 250ms ease",t&&"none"!==e.highlightEffect?n.style.filter="brightness(1.1)":n.style.filter="")}));const s=e=>{"Control"===e.key&&(o.value=!0)},a=e=>{"Control"===e.key&&(o.value=!1)},l=()=>{if(e.disabled||!r.value)return;let t=r.value.querySelector('button, a, input[type="button"], [role="button"]');if(t||(t=r.value.querySelector("v-list-item, .v-list-item, router-link, .router-link, a, [to]")),t||!r.value.hasAttribute("to")&&"A"!==r.value.tagName&&!r.value.classList.contains("v-list-item")||(t=r.value),!t){const e=r.value.closest("v-list-item, .v-list-item, a, [to]");e&&(t=e)}if(t)if(t.hasAttribute("to")){const r=t.getAttribute("to");if(r&&window.location.pathname!==r){const e=window.$nuxt?.$router||window.$router;e&&"function"==typeof e.push?e.push(r):window.location.pathname=r}n("hotkey-triggered",e.hotkey)}else t.click(),n("hotkey-triggered",e.hotkey);else console.log("No clickable element found for hotkey",e.hotkey),n("hotkey-triggered",e.hotkey)},c=()=>{e.disabled||Ar.addBinding({hotkey:e.hotkey,command:e.command,callback:l})},d=()=>{e.disabled||Ar.removeBinding(e.hotkey)};return t.watch((()=>e.disabled),(e=>{e?d():c()})),t.onMounted((()=>{document.addEventListener("keydown",s),document.addEventListener("keyup",a),c()})),t.onBeforeUnmount((()=>{document.removeEventListener("keydown",s),document.removeEventListener("keyup",a),d()})),{wrapperElement:r,isControlKeyPressed:o,formattedHotkey:i}}}),[["render",function(e,n,r,o,i,s){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["sk-mousetrap-tooltip-wrapper",[e.isControlKeyPressed&&!e.disabled&&"none"!==e.highlightEffect?`sk-mousetrap-highlight-${e.highlightEffect}`:""]]),ref:"wrapperElement"},[t.renderSlot(e.$slots,"default",{},void 0,!0),t.createVNode(t.Transition,{name:"fade"},{default:t.withCtx((()=>[e.showTooltip&&e.isControlKeyPressed&&!e.disabled?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["sk-mousetrap-tooltip",{"sk-mt-tooltip-top":"top"===e.position,"sk-mt-tooltip-bottom":"bottom"===e.position,"sk-mt-tooltip-left":"left"===e.position,"sk-mt-tooltip-right":"right"===e.position}])},t.toDisplayString(e.formattedHotkey),3)):t.createCommentVNode("",!0)])),_:1})],2)}],["__scopeId","data-v-5d6fb09c"]]),$r=(()=>{let e=null;return{setInstance(t){e=t},getInstance:()=>e,alertUser(t){e?e.addSnack(t):console.error("SnackbarService not found")}}})(),{setInstance:Pr,alertUser:Vr}=$r,Yr=t.defineComponent({name:"SnackbarService",data:()=>({snacks:[],show:[]}),mounted(){Pr(this)},methods:{addSnack(e){this.snacks.push(e),this.show.push(!0)},close(){this.show.pop(),this.show.push(!1)},getColor:e=>e.status===n.Status.ok?"success":e.status===n.Status.error?"error":e.status===n.Status.warning?"yellow":void 0}}),zr={class:"d-flex align-center justify-space-between w-100"};const jr=br(Yr,[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-icon"),l=t.resolveComponent("v-btn"),c=t.resolveComponent("v-snackbar");return t.openBlock(),t.createElementBlock("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.snacks,(r=>(t.openBlock(),t.createBlock(c,{key:e.snacks.indexOf(r),modelValue:e.show[e.snacks.indexOf(r)],"onUpdate:modelValue":t=>e.show[e.snacks.indexOf(r)]=t,timeout:r.timeout,location:"bottom right",color:e.getColor(r)},{default:t.withCtx((()=>[t.createElementVNode("div",zr,[t.createElementVNode("span",null,t.toDisplayString(r.text),1),t.createVNode(l,{icon:"",variant:"text",onClick:n[0]||(n[0]=t=>e.close())},{default:t.withCtx((()=>[t.createVNode(a,null,{default:t.withCtx((()=>n[1]||(n[1]=[t.createTextVNode("mdi-close")]))),_:1})])),_:1})])])),_:2},1032,["modelValue","onUpdate:modelValue","timeout","color"])))),128))])}]]),Ur=t.defineComponent({name:"PaginatingToolbar",props:{pages:{type:Array,required:!0},page:{type:Number,required:!0},title:{type:String,required:!1,default:""},subtitle:{type:String,required:!1,default:""}},emits:["first","prev","next","last","set-page"]}),Fr={key:0,class:"ms-2 text-subtitle-2"};const Hr=br(Ur,[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-toolbar-title"),l=t.resolveComponent("v-spacer"),c=t.resolveComponent("v-icon"),d=t.resolveComponent("v-btn"),u=t.resolveComponent("v-select"),h=t.resolveComponent("v-toolbar");return t.openBlock(),t.createBlock(h,{density:"compact"},{default:t.withCtx((()=>[t.createVNode(a,null,{default:t.withCtx((()=>[t.createElementVNode("span",null,t.toDisplayString(e.title),1),e.subtitle?(t.openBlock(),t.createElementBlock("span",Fr,t.toDisplayString(e.subtitle),1)):t.createCommentVNode("",!0)])),_:1}),t.createVNode(l),t.createVNode(d,{variant:"text",icon:"",color:"secondary",disabled:1==e.page,onClick:n[0]||(n[0]=t=>e.$emit("first"))},{default:t.withCtx((()=>[t.createVNode(c,null,{default:t.withCtx((()=>n[5]||(n[5]=[t.createTextVNode("mdi-page-first")]))),_:1})])),_:1},8,["disabled"]),t.createVNode(d,{variant:"text",icon:"",color:"secondary",disabled:1==e.page,onClick:n[1]||(n[1]=t=>e.$emit("prev"))},{default:t.withCtx((()=>[t.createVNode(c,null,{default:t.withCtx((()=>n[6]||(n[6]=[t.createTextVNode("mdi-chevron-left")]))),_:1})])),_:1},8,["disabled"]),t.createVNode(u,{"model-value":e.page,items:e.pages,class:"pageSelect",density:"compact","hide-details":"","return-object":!1,variant:"outlined","onUpdate:modelValue":n[2]||(n[2]=t=>e.$emit("set-page",t))},{selection:t.withCtx((({item:e})=>[t.createTextVNode(t.toDisplayString(e.value),1)])),_:1},8,["model-value","items"]),t.createVNode(d,{variant:"text",icon:"",color:"secondary",disabled:e.page==e.pages.length,onClick:n[3]||(n[3]=t=>e.$emit("next"))},{default:t.withCtx((()=>[t.createVNode(c,null,{default:t.withCtx((()=>n[7]||(n[7]=[t.createTextVNode("mdi-chevron-right")]))),_:1})])),_:1},8,["disabled"]),t.createVNode(d,{variant:"text",icon:"",color:"secondary",disabled:e.page==e.pages.length,onClick:n[4]||(n[4]=t=>e.$emit("last"))},{default:t.withCtx((()=>[t.createVNode(c,null,{default:t.withCtx((()=>n[8]||(n[8]=[t.createTextVNode("mdi-page-last")]))),_:1})])),_:1},8,["disabled"])])),_:1})}],["__scopeId","data-v-39413af8"]]);function Wr(e){return"submitAnswer"in e&&"priorAttempts"in e}class Displayable{constructor(e){if(0===e.length)throw new Error("\nDisplayable Constructor was called with no view Data.\n ");!function(e,t){for(let r=0;r<e.length;r++)e[r].fields.forEach(((e,o)=>{console.log(`[Displayable] shape[${r}].field[${o}]:\n ${JSON.stringify(e)}`),void 0===t[r][e.name]&&e.type!==n.FieldType.MEDIA_UPLOADS&&console.warn("[Displayable] missing data")}))}(this.dataShapes(),e)}}l(Displayable,"dataShapes"),l(Displayable,"views"),l(Displayable,"seedData"),l(Displayable,"acceptsUserData",!0);const qr=br(t.defineComponent({name:"StudySessionTimer",props:{timeRemaining:{type:Number,required:!0},sessionTimeLimit:{type:Number,required:!0,default:5}},emits:["add-time"],setup:(e,{emit:n})=>({hovered:t.ref(!1),formattedTimeRemaining:t.computed((()=>{let t="";const n=e.timeRemaining;n>60&&(t=Math.floor(n/60).toString()+":");const r=n%60;return t+=r>=10?r:"0"+r,n<=60&&(t+=" seconds"),t+=" left!",t})),percentageRemaining:t.computed((()=>e.timeRemaining>60?e.timeRemaining/(60*e.sessionTimeLimit)*100:e.timeRemaining/60*100)),timerColor:t.computed((()=>e.timeRemaining>60?"primary":"orange darken-3")),addSessionTime:()=>{n("add-time")}})}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-icon"),l=t.resolveComponent("v-btn"),c=t.resolveComponent("v-progress-circular"),d=t.resolveComponent("v-tooltip");return t.openBlock(),t.createBlock(d,{location:"right","open-delay":0,"close-delay":200,color:"secondary",class:"text-subtitle-1"},{activator:t.withCtx((({props:r})=>[t.createElementVNode("div",t.mergeProps({class:"timer-container"},r,{onMouseenter:n[0]||(n[0]=t=>e.hovered=!0),onMouseleave:n[1]||(n[1]=t=>e.hovered=!1)}),[t.createVNode(c,{alt:"Time remaining in study session",size:"64",width:"8",rotate:"0",color:e.timerColor,"model-value":e.percentageRemaining},{default:t.withCtx((()=>[e.timeRemaining>0&&e.hovered?(t.openBlock(),t.createBlock(l,{key:0,icon:"",color:"transparent",location:"bottom left",onClick:e.addSessionTime},{default:t.withCtx((()=>[t.createVNode(a,{size:"large"},{default:t.withCtx((()=>n[2]||(n[2]=[t.createTextVNode("mdi-plus")]))),_:1})])),_:1},8,["onClick"])):t.createCommentVNode("",!0)])),_:1},8,["color","model-value"])],16)])),default:t.withCtx((()=>[t.createTextVNode(" "+t.toDisplayString(e.formattedTimeRemaining),1)])),_:1})}],["__scopeId","data-v-5960940a"]]);const Gr=br(t.defineComponent({name:"CardViewer",ref:{},props:{sessionOrder:{type:Number,required:!1,default:0},card_id:{type:String,required:!0,default:""},course_id:{type:String,required:!0,default:""},view:{type:[Function,Object],required:!0},data:{type:Array,required:!0},user_elo:{type:Object,default:()=>({global:{score:1e3,count:0},tags:{},misc:{}})},card_elo:{type:Number,default:1e3}},emits:["emitResponse"],methods:{processResponse(e){console.log(`\n Card was displayed at ${e.timeStamp}\n User spent ${e.timeSpent} milliseconds with the card.\n `),this.$emit("emitResponse",e)}}}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-card");return t.openBlock(),t.createBlock(a,{elevation:"12"},{default:t.withCtx((()=>[t.createVNode(t.Transition,{name:"component-fade",mode:"out-in"},{default:t.withCtx((()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.view),{ref:"activeView",key:e.course_id+"-"+e.card_id+"-"+e.sessionOrder,data:e.data,"modify-difficulty":e.user_elo.global.score-e.card_elo,class:"cardView ma-2 pa-2",onEmitResponse:n[0]||(n[0]=t=>e.processResponse(t))},null,40,["data","modify-difficulty"]))])),_:1})])),_:1})}],["__scopeId","data-v-a180fe1c"]]);var Zr={};!function e(t,n,r,o){var i=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),s="function"==typeof Path2D&&"function"==typeof DOMMatrix;function a(){}function l(e){var r=n.exports.Promise,o=void 0!==r?r:t.Promise;return"function"==typeof o?new o(e):(e(a,a),null)}var c,d,u,h,p,g,m=function(e,t){return{transform:function(n){if(e)return n;if(t.has(n))return t.get(n);var r=new OffscreenCanvas(n.width,n.height);return r.getContext("2d").drawImage(n,0,0),t.set(n,r),r},clear:function(){t.clear()}}}(function(){if(!t.OffscreenCanvas)return!1;var e=new OffscreenCanvas(1,1),n=e.getContext("2d");n.fillRect(0,0,1,1);var r=e.transferToImageBitmap();try{n.createPattern(r,"no-repeat")}catch(o){return!1}return!0}(),new Map),f=(u=Math.floor(1e3/60),h={},p=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(c=function(e){var t=Math.random();return h[t]=requestAnimationFrame((function n(r){p===r||p+u-1<r?(p=r,delete h[t],e()):h[t]=requestAnimationFrame(n)})),t},d=function(e){h[e]&&cancelAnimationFrame(h[e])}):(c=function(e){return setTimeout(e,u)},d=function(e){return clearTimeout(e)}),{frame:c,cancel:d}),k=function(){var t,n,o={};return function(){if(t)return t;if(!r&&i){var s=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{t=new Worker(URL.createObjectURL(new Blob([s])))}catch(a){return void 0!==typeof console&&"function"==typeof console.warn&&console.warn("🎊 Could not load worker",a),null}!function(e){function t(t,n){e.postMessage({options:t||{},callback:n})}e.init=function(t){var n=t.transferControlToOffscreen();e.postMessage({canvas:n},[n])},e.fire=function(r,i,s){if(n)return t(r,null),n;var a=Math.random().toString(36).slice(2);return n=l((function(i){function l(t){t.data.callback===a&&(delete o[a],e.removeEventListener("message",l),n=null,m.clear(),s(),i())}e.addEventListener("message",l),t(r,a),o[a]=l.bind(null,{data:{callback:a}})}))},e.reset=function(){for(var t in e.postMessage({reset:!0}),o)o[t](),delete o[t]}}(t)}return t}}(),y={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function b(e,t,n){return function(e,t){return t?t(e):e}(e&&null!=e[t]?e[t]:y[t],n)}function w(e){return e<0?0:Math.floor(e)}function v(e){return parseInt(e,16)}function _(e){return e.map(x)}function x(e){var t=String(e).replace(/[^0-9a-f]/gi,"");return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:v(t.substring(0,2)),g:v(t.substring(2,4)),b:v(t.substring(4,6))}}function S(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function C(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function M(e,t){t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);var n=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,o=t.y+t.random*t.tiltSin,i=t.wobbleX+t.random*t.tiltCos,a=t.wobbleY+t.random*t.tiltSin;if(e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-n)+")",e.beginPath(),s&&"path"===t.shape.type&&"string"==typeof t.shape.path&&Array.isArray(t.shape.matrix))e.fill(function(e,t,n,r,o,i,s){var a=new Path2D(e),l=new Path2D;l.addPath(a,new DOMMatrix(t));var c=new Path2D;return c.addPath(l,new DOMMatrix([Math.cos(s)*o,Math.sin(s)*o,-Math.sin(s)*i,Math.cos(s)*i,n,r])),c}(t.shape.path,t.shape.matrix,t.x,t.y,.1*Math.abs(i-r),.1*Math.abs(a-o),Math.PI/10*t.wobble));else if("bitmap"===t.shape.type){var l=Math.PI/10*t.wobble,c=.1*Math.abs(i-r),d=.1*Math.abs(a-o),u=t.shape.bitmap.width*t.scalar,h=t.shape.bitmap.height*t.scalar,p=new DOMMatrix([Math.cos(l)*c,Math.sin(l)*c,-Math.sin(l)*d,Math.cos(l)*d,t.x,t.y]);p.multiplySelf(new DOMMatrix(t.shape.matrix));var g=e.createPattern(m.transform(t.shape.bitmap),"no-repeat");g.setTransform(p),e.globalAlpha=1-n,e.fillStyle=g,e.fillRect(t.x-u/2,t.y-h/2,u,h),e.globalAlpha=1}else if("circle"===t.shape)e.ellipse?e.ellipse(t.x,t.y,Math.abs(i-r)*t.ovalScalar,Math.abs(a-o)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):function(e,t,n,r,o,i,s,a,l){e.save(),e.translate(t,n),e.rotate(i),e.scale(r,o),e.arc(0,0,1,s,a,l),e.restore()}(e,t.x,t.y,Math.abs(i-r)*t.ovalScalar,Math.abs(a-o)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI);else if("star"===t.shape)for(var f=Math.PI/2*3,k=4*t.scalar,y=8*t.scalar,b=t.x,w=t.y,v=5,_=Math.PI/v;v--;)b=t.x+Math.cos(f)*y,w=t.y+Math.sin(f)*y,e.lineTo(b,w),f+=_,b=t.x+Math.cos(f)*k,w=t.y+Math.sin(f)*k,e.lineTo(b,w),f+=_;else e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(o)),e.lineTo(Math.floor(i),Math.floor(a)),e.lineTo(Math.floor(r),Math.floor(t.wobbleY));return e.closePath(),e.fill(),t.tick<t.totalTicks}function E(e,n){var s,a=!e,c=!!b(n||{},"resize"),d=!1,u=b(n,"disableForReducedMotion",Boolean),h=i&&!!b(n||{},"useWorker")?k():null,p=a?S:C,g=!(!e||!h)&&!!e.__confetti_initialized,y="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function v(t,n,i){for(var a,c,d,u,h,g=b(t,"particleCount",w),k=b(t,"angle",Number),y=b(t,"spread",Number),v=b(t,"startVelocity",Number),x=b(t,"decay",Number),S=b(t,"gravity",Number),C=b(t,"drift",Number),E=b(t,"colors",_),N=b(t,"ticks",Number),T=b(t,"shapes"),R=b(t,"scalar"),D=!!b(t,"flat"),A=function(e){var t=b(e,"origin",Object);return t.x=b(t,"x",Number),t.y=b(t,"y",Number),t}(t),O=g,B=[],I=e.width*A.x,L=e.height*A.y;O--;)B.push((a={x:I,y:L,angle:k,spread:y,startVelocity:v,color:E[O%E.length],shape:T[(u=0,h=T.length,Math.floor(Math.random()*(h-u))+u)],ticks:N,decay:x,gravity:S,drift:C,scalar:R,flat:D},c=void 0,d=void 0,c=a.angle*(Math.PI/180),d=a.spread*(Math.PI/180),{x:a.x,y:a.y,wobble:10*Math.random(),wobbleSpeed:Math.min(.11,.1*Math.random()+.05),velocity:.5*a.startVelocity+Math.random()*a.startVelocity,angle2D:-c+(.5*d-Math.random()*d),tiltAngle:(.5*Math.random()+.25)*Math.PI,color:a.color,shape:a.shape,tick:0,totalTicks:a.ticks,decay:a.decay,drift:a.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*a.gravity,ovalScalar:.6,scalar:a.scalar,flat:a.flat}));return s?s.addFettis(B):(s=function(e,t,n,i,s){var a,c,d=t.slice(),u=e.getContext("2d"),h=l((function(t){function l(){a=c=null,u.clearRect(0,0,i.width,i.height),m.clear(),s(),t()}a=f.frame((function t(){!r||i.width===o.width&&i.height===o.height||(i.width=e.width=o.width,i.height=e.height=o.height),i.width||i.height||(n(e),i.width=e.width,i.height=e.height),u.clearRect(0,0,i.width,i.height),(d=d.filter((function(e){return M(u,e)}))).length?a=f.frame(t):l()})),c=l}));return{addFettis:function(e){return d=d.concat(e),h},canvas:e,promise:h,reset:function(){a&&f.cancel(a),c&&c()}}}(e,B,p,n,i),s.promise)}function x(n){var r=u||b(n,"disableForReducedMotion",Boolean),o=b(n,"zIndex",Number);if(r&&y)return l((function(e){e()}));a&&s?e=s.canvas:a&&!e&&(e=function(e){var t=document.createElement("canvas");return t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.pointerEvents="none",t.style.zIndex=e,t}(o),document.body.appendChild(e)),c&&!g&&p(e);var i={width:e.width,height:e.height};function m(){if(h){var t={getBoundingClientRect:function(){if(!a)return e.getBoundingClientRect()}};return p(t),void h.postMessage({resize:{width:t.width,height:t.height}})}i.width=i.height=null}function f(){s=null,c&&(d=!1,t.removeEventListener("resize",m)),a&&e&&(document.body.contains(e)&&document.body.removeChild(e),e=null,g=!1)}return h&&!g&&h.init(e),g=!0,h&&(e.__confetti_initialized=!0),c&&!d&&(d=!0,t.addEventListener("resize",m,!1)),h?h.fire(n,i,f):v(n,i,f)}return x.reset=function(){h&&h.reset(),s&&s.reset()},x}function N(){return g||(g=E(null,{useWorker:!0,resize:!0})),g}n.exports=function(){return N().apply(this,arguments)},n.exports.reset=function(){N().reset()},n.exports.create=E,n.exports.shapeFromPath=function(e){if(!s)throw new Error("path confetti are not supported in this browser");var t,n;"string"==typeof e?t=e:(t=e.path,n=e.matrix);var r=new Path2D(t),o=document.createElement("canvas").getContext("2d");if(!n){for(var i,a,l=1e3,c=l,d=l,u=0,h=0,p=0;p<l;p+=2)for(var g=0;g<l;g+=2)o.isPointInPath(r,p,g,"nonzero")&&(c=Math.min(c,p),d=Math.min(d,g),u=Math.max(u,p),h=Math.max(h,g));i=u-c,a=h-d;var m=Math.min(10/i,10/a);n=[m,0,0,m,-Math.round(i/2+c)*m,-Math.round(a/2+d)*m]}return{type:"path",path:t,matrix:n}},n.exports.shapeFromText=function(e){var t,n=1,r="#000000",o='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';"string"==typeof e?t=e:(t=e.text,n="scalar"in e?e.scalar:n,o="fontFamily"in e?e.fontFamily:o,r="color"in e?e.color:r);var i=10*n,s=i+"px "+o,a=new OffscreenCanvas(i,i),l=a.getContext("2d");l.font=s;var c=l.measureText(t),d=Math.ceil(c.actualBoundingBoxRight+c.actualBoundingBoxLeft),u=Math.ceil(c.actualBoundingBoxAscent+c.actualBoundingBoxDescent),h=c.actualBoundingBoxLeft+2,p=c.actualBoundingBoxAscent+2;d+=4,u+=4,(l=(a=new OffscreenCanvas(d,u)).getContext("2d")).font=s,l.fillStyle=r,l.fillText(t,h,p);var g=1/n;return{type:"bitmap",bitmap:a.transferToImageBitmap(),matrix:[g,0,0,g,-d*g/2,-u*g/2]}}}(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:this||{}}(),Zr,!1);const Kr=Zr.exports;Zr.exports.create;const Qr=t.defineComponent({name:"StudySession",ref:{},components:{CardViewer:Gr,StudySessionTimer:qr,SkMouseTrap:Ir,HeatMap:xr},props:{sessionTimeLimit:{type:Number,required:!0},contentSources:{type:Array,required:!0},user:{type:Object,required:!0},dataLayer:{type:Object,required:!0},sessionConfig:{type:Object,default:()=>({likesConfetti:!1})},getViewComponent:{type:Function,required:!0}},emits:["session-finished","session-started","card-loaded","card-response","time-changed","session-prepared","session-error"],data:()=>({cardID:"",view:null,data:[],courseID:"",card_elo:1e3,courseNames:{},cardCount:1,sessionController:null,sessionPrepared:!1,sessionFinished:!1,sessionRecord:[],percentageRemaining:100,timerIsActive:!0,loading:!1,userCourseRegDoc:null,sessionContentSources:[],timeRemaining:300,intervalHandler:null,cardType:""}),computed:{currentCard(){return this.sessionRecord[this.sessionRecord.length-1]}},async created(){this.userCourseRegDoc=await this.user.getCourseRegistrationsDoc(),console.log("[StudySession] Created lifecycle hook - starting initSession"),await this.initSession(),console.log("[StudySession] InitSession completed in created hook")},methods:{user_elo(e){const t=this.userCourseRegDoc.courses.find((t=>t.courseID===e));return t?n.toCourseElo(t.elo):n.toCourseElo(void 0)},handleClassroomMessage(){return e=>(Vr({text:this.user?.getUsername()||"[Unknown user]",status:n.Status.ok}),console.log("[StudySession] There was a change in the classroom DB:"),console.log(`[StudySession] change: ${e}`),console.log(`[StudySession] Stringified change: ${JSON.stringify(e)}`),{})},incrementSessionClock(){const e=60*this.sessionTimeLimit-this.timeRemaining;this.sessionController.addTime(Math.min(e,60)),this.tick()},tick(){this.timeRemaining=this.sessionController.secondsRemaining,this.percentageRemaining=this.timeRemaining>60?this.timeRemaining/(60*this.sessionTimeLimit)*100:this.timeRemaining/60*100,this.$emit("time-changed",this.timeRemaining),0===this.timeRemaining&&clearInterval(this.intervalHandler)},async initSession(){let e=[];try{console.log(`[StudySession] starting study session w/ sources: ${JSON.stringify(this.contentSources)}`),console.log("[StudySession] Beginning preparation process"),this.sessionContentSources=(await Promise.all(this.contentSources.map((async e=>{try{return await r.getStudySource(e,this.user)}catch(t){return console.error(`Failed to load study source: ${e.type}/${e.id}`,t),null}})))).filter((e=>null!==e)),this.timeRemaining=60*this.sessionTimeLimit,e=await Promise.all(this.contentSources.filter((e=>"classroom"===e.type)).map((async e=>await this.dataLayer.getClassroomDB(e.id,"student")))),e.forEach((e=>{})),this.sessionController=new r.SessionController(this.sessionContentSources,60*this.sessionTimeLimit),this.sessionController.sessionRecord=this.sessionRecord,await this.sessionController.prepareSession(),this.intervalHandler=setInterval(this.tick,1e3),this.sessionPrepared=!0,console.log("[StudySession] Session preparation complete, emitting session-prepared event"),this.$emit("session-prepared"),console.log("[StudySession] Event emission completed")}catch(t){console.error("[StudySession] Error during session preparation:",t),this.$emit("session-error",{message:"Failed to prepare study session",error:t})}try{this.contentSources.filter((e=>"course"===e.type)).forEach((async e=>this.courseNames[e.id]=(await this.dataLayer.getCoursesDB().getCourseConfig(e.id)).name)),console.log(`[StudySession] Session created:\n ${this.sessionController?.toString()||"Session controller not initialized"}\n User courses: ${this.contentSources.filter((e=>"course"===e.type)).map((e=>e.id)).toString()}\n User classrooms: ${e.map((e=>e._id)).toString()||"No classrooms"}\n `)}catch(t){console.error("[StudySession] Error during final session setup:",t)}if(this.sessionController)try{this.$emit("session-started"),this.loadCard(this.sessionController.nextCard())}catch(t){console.error("[StudySession] Error loading next card:",t),this.$emit("session-error",{message:"Failed to load study card",error:t})}else console.error("[StudySession] Cannot load card: session controller not initialized"),this.$emit("session-error",{message:"Study session initialization failed"})},countCardViews(e,t){return this.sessionRecord.filter((n=>n.card.course_id===e&&n.card.card_id===t)).length},async processResponse(e){this.$emit("card-response",e),this.timerIsActive=!0,e.cardID=this.cardID,e.courseID=this.courseID,this.currentCard.records.push(e),console.log("[StudySession] StudySession.processResponse is running...");const t=this.logCardRecord(e);if(r.isQuestionRecord(e))if(console.log(`[StudySession] Question is ${e.isCorrect?"":"in"}correct`),e.isCorrect){try{this.$refs.shadowWrapper&&(this.$refs.shadowWrapper.setAttribute("style",`--r: ${255*(1-e.performance)}; --g:255`),this.$refs.shadowWrapper.classList.add("correct"))}catch(n){console.warn(`[StudySession] Error setting shadowWrapper style: ${n}`)}if(this.sessionConfig.likesConfetti&&Kr({origin:{y:1,x:.25+.5*Math.random()},disableForReducedMotion:!0,angle:60+60*Math.random()}),0===e.priorAttemps){const n={...this.currentCard.item};this.loadCard(this.sessionController.nextCard("dismiss-success")),t.then((t=>{if(this.scheduleReview(t,n),1===t.records.length)this.updateUserAndCardElo(.5+e.performance/2,this.courseID,this.cardID);else{const n=Math.ceil(32/t.records.length);this.updateUserAndCardElo(.5+e.performance/2,this.courseID,this.cardID,n)}}))}else this.loadCard(this.sessionController.nextCard("marked-failed"))}else{try{this.$refs.shadowWrapper&&this.$refs.shadowWrapper.classList.add("incorrect")}catch(n){console.warn(`[StudySession] Error setting shadowWrapper style: ${n}`)}if(t.then((t=>{1!==t.records.length&&0===e.priorAttemps&&this.updateUserAndCardElo(0,this.courseID,this.cardID)})),Wr(this.$refs.cardViewer?.$refs.activeView)){const e=this.$refs.cardViewer.$refs.activeView;if(this.currentCard.records.length>=e.maxAttemptsPerView){this.countCardViews(this.courseID,this.cardID)>=e.maxSessionViews?(this.loadCard(this.sessionController.nextCard("dismiss-failed")),this.updateUserAndCardElo(0,this.courseID,this.cardID)):this.loadCard(this.sessionController.nextCard("marked-failed"))}}}else this.loadCard(this.sessionController.nextCard("dismiss-success"));this.clearFeedbackShadow()},async updateUserAndCardElo(e,t,r,o){o&&console.warn("k value interpretation not currently implemented");const i=this.dataLayer.getCourseDB(this.currentCard.card.course_id),s=n.toCourseElo(this.userCourseRegDoc.courses.find((e=>e.courseID===t)).elo),a=(await i.getCardEloData([this.currentCard.card.card_id]))[0];if(a&&s){const o=n.adjustCourseScores(s,a,e);this.userCourseRegDoc.courses.find((e=>e.courseID===t)).elo=o.userElo,Promise.all([this.user.updateUserElo(t,o.userElo),i.updateCardElo(r,o.cardElo)]).then((e=>{const t=e[0],n=e[1];t.ok&&n&&n.ok&&console.log(`[StudySession] Updated ELOS:\n \tUser: ${JSON.stringify(o.userElo)})\n \tCard: ${JSON.stringify(o.cardElo)})\n `)}))}},clearFeedbackShadow(){setTimeout((()=>{try{this.$refs.shadowWrapper&&this.$refs.shadowWrapper.classList.remove("correct","incorrect")}catch(e){console.warn(`[StudySession] Error clearing shadowWrapper style: ${e}`)}}),1250)},async logCardRecord(e){return await this.user.putCardRecord(e)},async scheduleReview(e,t){const n=r.newInterval(this.$props.user,e),o=d.utc().add(n,"seconds");r.isReview(t)&&(console.log(`[StudySession] Removing previously scheduled review for: ${t.cardID}`),this.user.removeScheduledCardReview(t.reviewID)),this.user.scheduleCardReview({user:this.user.getUsername(),course_id:e.courseID,card_id:e.cardID,time:o,scheduledFor:t.contentSourceType,schedulingAgentId:t.contentSourceID})},async loadCard(e){if(this.loading)return void console.warn("Attempted to load card while loading another...");if(console.log(`[StudySession] loading: ${JSON.stringify(e)}`),null===e)return this.sessionFinished=!0,void this.$emit("session-finished",this.sessionRecord);this.cardType=e.status;const t=e.qualifiedID;this.loading=!0;const[o,i]=t.split("-");console.log(`[StudySession] Now displaying: ${t}`);try{const t=await this.dataLayer.getCourseDB(o).getCourseDoc(i);n.isCourseElo(t.elo)||(t.elo=n.toCourseElo(t.elo));const r=this.getViewComponent(t.id_view),s=t.id_displayable_data.map((e=>this.dataLayer.getCourseDB(o).getCourseDoc(e,{attachments:!0,binary:!0}))),a=[];for(const e of s){const t=await e;a.unshift(n.displayableDataToViewData(t))}this.cardCount++,this.data=a,this.view=r,this.cardID=i,this.courseID=o,this.card_elo=t.elo.global.score,this.sessionRecord.push({card:{course_id:o,card_id:i,card_elo:t.elo.global.score},item:e,records:[]}),this.$emit("card-loaded",{courseID:o,cardID:i,cardCount:this.cardCount})}catch(s){console.warn(`[StudySession] Error loading card ${JSON.stringify(e)}:\n\t${JSON.stringify(s)}, ${s}`),this.loading=!1;const n=s;r.docIsDeleted(n)&&r.isReview(e)&&(console.warn(`Card was deleted: ${t}`),this.user.removeScheduledCardReview(e.reviewID)),this.loadCard(this.sessionController.nextCard("dismiss-error"))}finally{this.loading=!1}}}}),Jr={key:0,class:"StudySession"},Xr={class:"text-h3"},eo={key:0,class:"text-h4"},to={key:0},no={key:1,ref:"shadowWrapper"},ro={key:2};const oo=br(Qr,[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-progress-circular"),l=t.resolveComponent("v-spacer"),c=t.resolveComponent("v-col"),d=t.resolveComponent("v-row"),u=t.resolveComponent("router-link"),h=t.resolveComponent("heat-map"),p=t.resolveComponent("card-viewer"),g=t.resolveComponent("StudySessionTimer"),m=t.resolveComponent("SkMouseTrap");return e.sessionPrepared?(t.openBlock(),t.createElementBlock("div",Jr,[t.createVNode(d,{align:"center"},{default:t.withCtx((()=>[t.createVNode(c,null,{default:t.withCtx((()=>[t.createElementVNode("h1",Xr,[t.createTextVNode(t.toDisplayString(e.courseNames[e.courseID])+": ",1),e.loading?(t.openBlock(),t.createBlock(a,{key:0,color:"primary",indeterminate:"",size:"32",width:"4"})):t.createCommentVNode("",!0)]),t.createVNode(l)])),_:1})])),_:1}),n[7]||(n[7]=t.createElementVNode("br",null,null,-1)),e.sessionFinished?(t.openBlock(),t.createElementBlock("div",eo,[n[6]||(n[6]=t.createElementVNode("p",null,"Study session finished! Great job!",-1)),e.sessionController?(t.openBlock(),t.createElementBlock("p",to,t.toDisplayString(e.sessionController.report),1)):t.createCommentVNode("",!0),t.createElementVNode("p",null,[n[3]||(n[3]=t.createTextVNode(" Start ")),t.createElementVNode("a",{onClick:n[0]||(n[0]=t=>e.$emit("session-finished"))},"another study session"),n[4]||(n[4]=t.createTextVNode(", or try ")),t.createVNode(u,{to:`/edit/${e.courseID}`},{default:t.withCtx((()=>n[2]||(n[2]=[t.createTextVNode("adding some new content")]))),_:1},8,["to"]),n[5]||(n[5]=t.createTextVNode(" to challenge yourself and others! "))]),t.createVNode(h,{"activity-records-getter":()=>e.user.getActivityRecords()},null,8,["activity-records-getter"])])):(t.openBlock(),t.createElementBlock("div",no,[t.createVNode(p,{ref:"cardViewer",class:t.normalizeClass(e.loading?"muted":""),view:e.view,data:e.data,card_id:e.cardID,course_id:e.courseID,"session-order":e.cardCount,user_elo:e.user_elo(e.courseID),card_elo:e.card_elo,onEmitResponse:n[1]||(n[1]=t=>e.processResponse(t))},null,8,["class","view","data","card_id","course_id","session-order","user_elo","card_elo"])],512)),n[8]||(n[8]=t.createElementVNode("br",null,null,-1)),e.sessionController?(t.openBlock(),t.createElementBlock("div",ro,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.sessionController.failedCount,(e=>(t.openBlock(),t.createElementBlock("span",{key:e,class:"text-h5"},"•")))),128))])):t.createCommentVNode("",!0),t.createVNode(d,{align:"center",class:"footer-controls pa-5"},{default:t.withCtx((()=>[t.createVNode(c,{cols:"auto",class:"d-flex flex-grow-0 mr-auto"},{default:t.withCtx((()=>[t.createVNode(g,{"time-remaining":e.timeRemaining,"session-time-limit":e.sessionTimeLimit,onAddTime:e.incrementSessionClock},null,8,["time-remaining","session-time-limit","onAddTime"])])),_:1}),t.createVNode(l),t.createVNode(c,{cols:"auto",class:"footer-right"},{default:t.withCtx((()=>[t.createVNode(m)])),_:1})])),_:1})])):t.createCommentVNode("",!0)}],["__scopeId","data-v-70e29902"]]);let io=null;const so=()=>io,ao={install(e,t){const n=t?.pinia;n&&(e=>{io=e})(n)}},lo=()=>{const e=so();return e&&o.setActivePinia(e),o.defineStore("previewMode",{state:()=>({previewMode:!1}),actions:{setPreviewMode(e){this.previewMode=e}},getters:{isPreviewMode(){return this.previewMode}}})()},co=t.defineComponent({name:"UserInput",data:()=>({answer:"",previewModeStore:null}),mounted(){this.previewModeStore=lo()},computed:{autofocus(){return!this.previewModeStore?.previewMode},autoFocus(){return this.autofocus}},methods:{submitAnswer(e){return this.submit(e)},submit(e){return this.getQuestionViewAncestor().submitAnswer(e,this.$options.name??"UserInput")},getQuestionViewAncestor(){let e=this.$parent,t=0;for(;e&&!Wr(e);){const r=e.$parent;if(!r){const e="\nUserInput.submit() has failed.\nThe input element has no QuestionView ancestor element.";throw n.log(e),new Error(e)}if(e=r,t++,t>100){const e="\nUserInput.submit() has failed.\nExceeded maximum ancestor lookup depth.";throw n.log(e),new Error(e)}}if(!e)throw new Error("No QuestionView ancestor found");return e}}});const uo=br(t.defineComponent({name:"MultipleChoiceOption",components:{MarkdownRenderer:t.defineAsyncComponent((()=>Promise.resolve().then((()=>ea))))},props:{content:{type:String,required:!0},selected:{type:Boolean,required:!0},number:{type:Number,required:!0},setSelection:{type:Function,required:!0},submit:{type:Function,required:!0},markedWrong:{type:Boolean,required:!0}},computed:{className(){let e;switch(this.number){case 0:e="bg-red";break;case 1:e="bg-purple";break;case 2:e="bg-indigo";break;case 3:e="bg-light-blue";break;case 4:e="bg-teal";break;case 5:e="bg-deep-orange";break;default:e="bg-grey"}if(this.selected&&!this.markedWrong)return`choice selected ${e} lighten-3 elevation-8`;if(this.selected||this.markedWrong){if(this.selected&&this.markedWrong)return"choice selected grey lighten-2 elevation-8";if(!this.selected&&this.markedWrong)return"choice not-selected grey lighten-2 elevation-0";throw new Error("'selected' and 'markedWrong' props in MultipleChoiceOption are in an impossible configuration.")}return`choice not-selected ${e} lighten-4 elevation-1`}},methods:{select(){this.setSelection(this.number)},submitThisOption(){this.markedWrong||(this.select(),this.submit())}}}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("markdown-renderer"),l=t.resolveComponent("v-card");return t.openBlock(),t.createBlock(l,{class:t.normalizeClass(`${e.className}`),onMouseover:e.select,onClick:e.submitThisOption},{default:t.withCtx((()=>[t.createVNode(a,{md:e.content},null,8,["md"])])),_:1},8,["class","onMouseover","onClick"])}],["__scopeId","data-v-96de7172"]]),ho=t.defineComponent({name:"RadioMultipleChoice",components:{MultipleChoiceOption:uo},extends:co,props:{choiceList:{type:Array,required:!0}},data:()=>({currentSelection:-1,incorrectSelections:[],containerRef:null,_registeredHotkeys:[]}),watch:{choiceList:{immediate:!0,handler(e){e?.length&&this.bindKeys()}}},mounted(){this.containerRef&&this.containerRef.focus()},unmounted(){this.unbindKeys()},methods:{forwardSelection(){if(!this.choiceIsWrong(this.choiceList[this.currentSelection])&&-1!==this.currentSelection){const e={choiceList:this.choiceList,selection:this.currentSelection};this.submitAnswer(e).isCorrect||this.incorrectSelections.push(this.currentSelection)}},setSelection(e){e<this.choiceList.length&&(this.currentSelection=e)},incrementSelection(){-1===this.currentSelection?this.currentSelection=Math.ceil(this.choiceList.length/2):this.currentSelection=Math.min(this.choiceList.length-1,this.currentSelection+1)},decrementSelection(){-1===this.currentSelection?this.currentSelection=Math.floor(this.choiceList.length/2-1):this.currentSelection=Math.max(0,this.currentSelection-1)},choiceIsWrong(e){let t=!1;return this.incorrectSelections.forEach((n=>{this.choiceList[n]===e&&(t=!0)})),t},bindKeys(){const e=[{hotkey:"left",callback:this.decrementSelection,command:"Move selection left"},{hotkey:"right",callback:this.incrementSelection,command:"Move selection right"},{hotkey:"enter",callback:this.forwardSelection,command:"Submit selection"},...Array.from({length:this.choiceList.length},((e,t)=>({hotkey:(t+1).toString(),callback:()=>this.setSelection(t),command:`Select ${(e=>{switch(e){case 0:return"first";case 1:return"second";case 2:return"third";case 3:return"fourth";case 4:return"fifth";case 5:return"sixth";default:return`${e+1}th`}})(t)} option`})))];Ar.addBinding(e),this._registeredHotkeys=e.map((e=>e.hotkey))},unbindKeys(){this._registeredHotkeys&&this._registeredHotkeys.forEach((e=>{Ar.removeBinding(e)}))}}}),po={ref:"containerRef",class:"multipleChoice"};const go=br(ho,[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("MultipleChoiceOption");return t.openBlock(),t.createElementBlock("div",po,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.choiceList,((n,r)=>(t.openBlock(),t.createBlock(a,{key:r,content:n,selected:e.choiceList.indexOf(n)===e.currentSelection,number:e.choiceList.indexOf(n),"set-selection":e.setSelection,submit:e.forwardSelection,"marked-wrong":e.choiceIsWrong(n)},null,8,["content","selected","number","set-selection","submit","marked-wrong"])))),128))],512)}]]),mo=t.defineComponent({name:"TrueFalse",components:{RadioMultipleChoice:go},props:{MouseTrap:{type:Object,required:!0},submit:{type:Function,required:!0}}}),fo={"data-viewable":"TrueFalse"};const ko=br(mo,[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("RadioMultipleChoice");return t.openBlock(),t.createElementBlock("div",fo,[t.createVNode(a,{"choice-list":["True","False"],MouseTrap:e.MouseTrap,submit:e.submit},null,8,["MouseTrap","submit"])])}]]);const yo=br(t.defineComponent({name:"UserInputNumber",ref:{},extends:co,methods:{mounted(){this.$refs.input.focus()},isNumeric:e=>!isNaN(Number.parseFloat(e)),makeNumeric(e){if("string"==typeof e)return Number.parseFloat(e);throw new Error("Expected a string, got "+typeof e)}}}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-text-field"),l=t.resolveComponent("v-container");return t.openBlock(),t.createBlock(l,{class:"pa-0"},{default:t.withCtx((()=>[t.createVNode(a,{ref:"input",modelValue:e.answer,"onUpdate:modelValue":n[0]||(n[0]=t=>e.answer=t),"prepend-icon":"edit",autofocus:e.autofocus,"row-height":"24","toggle-keys":"[13,32]",class:"text-h5",rules:[e.isNumeric],onKeyup:n[1]||(n[1]=t.withKeys((t=>e.submitAnswer(e.makeNumeric(e.answer))),["enter"]))},null,8,["modelValue","autofocus","rules"])])),_:1})}],["__scopeId","data-v-a56dcd1c"]]),bo=t.defineComponent({name:"UserInputString",extends:co,props:{icon:{type:Boolean,required:!1}},computed:{prependIcon(){return this.icon?"edit":""}},mounted(){this.$refs.input?.focus()},methods:{}}),wo={class:"user-input-container"},vo=["autofocus"];const _o=br(bo,[["render",function(e,n,r,o,i,s){return t.openBlock(),t.createElementBlock("span",wo,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=t=>e.answer=t),autofocus:e.autofocus,type:"text",class:"user-input-string",ref:"input",onKeyup:n[1]||(n[1]=t.withKeys((t=>e.submitAnswer(e.answer)),["enter"]))},null,40,vo),[[t.vModelText,e.answer]])])}],["__scopeId","data-v-aa14961f"]]),xo=t.defineComponent({name:"FillInInput",components:{UserInputString:_o},props:{text:{type:String,required:!0}},setup(e){const n=t.ref("text"),r=t.ref(""),o=t.computed((()=>e.text.split("||").length>1));return t.onMounted((()=>{console.log(`fillinCreated w/ text: ${e.text}`),r.value=e.text.substring(2,e.text.length-2),console.log(`fillin text trimmed to: ${r.value}`);r.value.split("||").length>1&&(n.value="radio")})),{inputType:n,radioType:o,processedText:r}}}),So={key:0,class:"text-h5 underline"};const Co=br(xo,[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("user-input-string");return e.radioType?(t.openBlock(),t.createElementBlock("span",So," ")):(t.openBlock(),t.createBlock(a,{key:1,id:"input",icon:!1,type:"text",value:e.processedText},null,8,["value"]))}],["__scopeId","data-v-486ac035"]]);const Mo=br(t.defineComponent({name:"CardLoader",components:{CardViewer:Gr},props:{sessionOrder:{type:Number,required:!1,default:0},qualified_id:{type:String,required:!0},viewLookup:{type:Function,required:!0}},data:()=>({loading:!0,view:null,data:[],courseID:"",cardID:""}),created(){this.loadCard()},methods:{processResponse(e){n.log(`\n Card was displayed at ${e.timeStamp}\n User spent ${e.timeSpent} milliseconds with the card.\n `),this.$emit("emitResponse",e)},async loadCard(){const e=this.qualified_id;console.log(`Card Loader displaying: ${e}`),this.loading=!0;const t=e.split("-")[0],o=e.split("-")[1],i=r.getDataLayer().getCourseDB(t);try{const e=await i.getCourseDoc(o),r=this.viewLookup(e.id_view),s=e.id_displayable_data.map((e=>i.getCourseDoc(e,{attachments:!0,binary:!0}))),a=[];for(const t of s){const e=await t;a.unshift(n.displayableDataToViewData(e))}this.data=a,this.view=r,this.cardID=o,this.courseID=t}catch(s){throw new Error(`[CardLoader] Error loading card: ${JSON.stringify(s)}, ${s}`)}finally{this.loading=!1,this.$emit("card-loaded")}}}}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("card-viewer");return e.loading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(a,{key:0,class:t.normalizeClass(["ma-2",e.loading?"muted":""]),view:e.view,data:e.data,card_id:e.cardID,course_id:e.courseID,"session-order":e.sessionOrder,onEmitResponse:n[0]||(n[0]=t=>e.processResponse(t))},null,8,["class","view","data","card_id","course_id","session-order"]))}],["__scopeId","data-v-9ca53bc4"]]);function Eo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let No={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function To(e){No=e}const Ro={exec:()=>null};function Do(e,t=""){let n="string"==typeof e?e:e.source;const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(Ao.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}const Ao={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Oo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Bo=/(?:[*+-]|\d{1,9}[.)])/,Io=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Lo=Do(Io).replace(/bull/g,Bo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),$o=Do(Io).replace(/bull/g,Bo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Po=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Vo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Yo=Do(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zo=Do(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bo).getRegex(),jo="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Uo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fo=Do("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Uo).replace("tag",jo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ho=Do(Po).replace("hr",Oo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jo).getRegex(),Wo={blockquote:Do(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ho).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Yo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Oo,html:Fo,lheading:Lo,list:zo,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Ho,table:Ro,text:/^[^\n]+/},qo=Do("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Oo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jo).getRegex(),Go={...Wo,lheading:$o,table:qo,paragraph:Do(Po).replace("hr",Oo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jo).getRegex()},Zo={...Wo,html:Do("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Uo).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ro,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Do(Po).replace("hr",Oo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Lo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ko=/^( {2,}|\\)\n(?!\s*$)/,Qo=/[\p{P}\p{S}]/u,Jo=/[\s\p{P}\p{S}]/u,Xo=/[^\s\p{P}\p{S}]/u,ei=Do(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Jo).getRegex(),ti=/(?!~)[\p{P}\p{S}]/u,ni=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ri=Do(ni,"u").replace(/punct/g,Qo).getRegex(),oi=Do(ni,"u").replace(/punct/g,ti).getRegex(),ii="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",si=Do(ii,"gu").replace(/notPunctSpace/g,Xo).replace(/punctSpace/g,Jo).replace(/punct/g,Qo).getRegex(),ai=Do(ii,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,ti).getRegex(),li=Do("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xo).replace(/punctSpace/g,Jo).replace(/punct/g,Qo).getRegex(),ci=Do(/\\(punct)/,"gu").replace(/punct/g,Qo).getRegex(),di=Do(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),ui=Do(Uo).replace("(?:--\x3e|$)","--\x3e").getRegex(),hi=Do("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ui).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,gi=Do(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",pi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mi=Do(/^!?\[(label)\]\[(ref)\]/).replace("label",pi).replace("ref",Vo).getRegex(),fi=Do(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vo).getRegex(),ki={_backpedal:Ro,anyPunctuation:ci,autolink:di,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:Ko,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Ro,emStrongLDelim:ri,emStrongRDelimAst:si,emStrongRDelimUnd:li,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:gi,nolink:fi,punctuation:ei,reflink:mi,reflinkSearch:Do("reflink|nolink(?!\\()","g").replace("reflink",mi).replace("nolink",fi).getRegex(),tag:hi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Ro},yi={...ki,link:Do(/^!?\[(label)\]\((.*?)\)/).replace("label",pi).getRegex(),reflink:Do(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pi).getRegex()},bi={...ki,emStrongRDelimAst:ai,emStrongLDelim:oi,url:Do(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},wi={...bi,br:Do(Ko).replace("{2,}","*").getRegex(),text:Do(bi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vi={normal:Wo,gfm:Go,pedantic:Zo},_i={normal:ki,gfm:bi,breaks:wi,pedantic:yi},xi={"&":"&","<":"<",">":">",'"':""","'":"'"},Si=e=>xi[e];function Ci(e,t){if(t){if(Ao.escapeTest.test(e))return e.replace(Ao.escapeReplace,Si)}else if(Ao.escapeTestNoEncode.test(e))return e.replace(Ao.escapeReplaceNoEncode,Si);return e}function Mi(e){try{e=encodeURI(e).replace(Ao.percentDecode,"%")}catch{return null}return e}function Ei(e,t){const n=e.replace(Ao.findPipe,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(Ao.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Ao.slashPipe,"|");return n}function Ni(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){if(e.charAt(r-o-1)!==t)break;o++}return e.slice(0,r-o)}function Ti(e,t,n,r,o){const i=t.href,s=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:s,text:a}}class _Tokenizer{constructor(e){l(this,"options"),l(this,"rules"),l(this,"lexer"),this.options=e||No}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Ni(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(null===r)return t;const o=r[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=Ni(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ni(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=Ni(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const i=[];let s;for(s=0;s<e.length;s++)if(this.rules.other.blockquoteStart.test(e[s]))i.push(e[s]),t=!0;else{if(t)break;i.push(e[s])}e=e.slice(s);const a=i.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;const d=o.at(-1);if("code"===d?.type)break;if("blockquote"===d?.type){const t=d,i=t.raw+"\n"+e.join("\n"),s=this.blockquote(i);o[o.length-1]=s,n=n.substring(0,n.length-t.raw.length)+s.raw,r=r.substring(0,r.length-t.text.length)+s.text;break}if("list"!==d?.type);else{const t=d,i=t.raw+"\n"+e.join("\n"),s=this.list(i);o[o.length-1]=s,n=n.substring(0,n.length-d.raw.length)+s.raw,r=r.substring(0,r.length-t.raw.length)+s.raw,e=i.substring(o.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let s=!1;for(;e;){let n=!1,r="",a="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],d=!l.trim(),u=0;if(this.options.pedantic?(u=2,a=l.trimStart()):d?u=t[1].length+1:(u=t[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,a=l.slice(u),u+=t[1].length),d&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(u),n=this.rules.other.hrRegex(u),o=this.rules.other.fencesBeginRegex(u),i=this.rules.other.headingBeginRegex(u),s=this.rules.other.htmlBeginRegex(u);for(;e;){const h=e.split("\n",1)[0];let p;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),p=c):p=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(s.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(this.rules.other.nonSpaceChar)>=u||!c.trim())a+="\n"+p.slice(u);else{if(d)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(l))break;if(i.test(l))break;if(n.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),r+=h+"\n",e=e.substring(h.length+1),l=p.slice(u)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let h,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(a),p&&(h="[ ] "!==p[0],a=a.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:a,tokens:[]}),o.raw+=r}const a=o.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const n=Ei(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of o)i.rows.push(Ei(e,i.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=Ni(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Ti(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Ti(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,i,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=[...o].length,r[3]||r[4]){s+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+a);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}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[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class _Lexer{constructor(e){l(this,"tokens"),l(this,"options"),l(this,"state"),l(this,"tokenizer"),l(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||No,this.options.tokenizer=this.options.tokenizer||new _Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:Ao,block:vi.normal,inline:_i.normal};this.options.pedantic?(t.block=vi.pedantic,t.inline=_i.pedantic):this.options.gfm&&(t.block=vi.gfm,this.options.breaks?t.inline=_i.breaks:t.inline=_i.gfm),this.tokenizer.rules=t}static get rules(){return{block:vi,inline:_i}}static lex(e,t){return new _Lexer(t).lex(e)}static lexInline(e,t){return new _Lexer(t).inlineTokens(e)}lex(e){e=e.replace(Ao.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Ao.tabCharGlobal," ").replace(Ao.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);const n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){const i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+="\n"+r.raw,i.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=o.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o=!1,i="";for(;e;){let r;if(o||(i=""),o=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);const n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,i)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(s)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(i=r.raw.slice(-1)),o=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class _Renderer{constructor(e){l(this,"options"),l(this,"parser"),this.options=e||No}space(e){return""}code({text:e,lang:t,escaped:n}){const r=(t||"").match(Ao.notSpaceStart)?.[0],o=e.replace(Ao.endingNewline,"")+"\n";return r?'<pre><code class="language-'+Ci(r)+'">'+(n?o:Ci(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:Ci(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let i=0;i<e.items.length;i++){const t=e.items[i];r+=this.listitem(t)}const o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+o+">\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+Ci(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let r="";for(let o=0;o<e.rows.length;o++){const t=e.rows[o];n="";for(let e=0;e<t.length;e++)n+=this.tablecell(t[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ci(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),o=Mi(e);if(null===o)return r;let i='<a href="'+(e=o)+'"';return t&&(i+=' title="'+Ci(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n}){const r=Mi(e);if(null===r)return Ci(n);let o=`<img src="${e=r}" alt="${n}"`;return t&&(o+=` title="${Ci(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ci(e.text)}}class _TextRenderer{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class _Parser{constructor(e){l(this,"options"),l(this,"renderer"),l(this,"textRenderer"),this.options=e||No,this.options.renderer=this.options.renderer||new _Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _TextRenderer}static parse(e,t){return new _Parser(t).parse(e)}static parseInline(e,t){return new _Parser(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const e=o,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}const i=o;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let o=i,s=this.renderer.text(o);for(;r+1<e.length&&"text"===e[r+1].type;)o=e[++r],s+="\n"+this.renderer.text(o);n+=t?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const e=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=e||"";continue}}const i=o;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class _Hooks{constructor(e){l(this,"options"),l(this,"block"),this.options=e||No}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?_Lexer.lex:_Lexer.lexInline}provideParser(){return this.block?_Parser.parse:_Parser.parseInline}}l(_Hooks,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));const Ri=new class Marked{constructor(...e){l(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),l(this,"options",this.setOptions),l(this,"parse",this.parseMarkdown(!0)),l(this,"parseInline",this.parseMarkdown(!1)),l(this,"Parser",_Parser),l(this,"Renderer",_Renderer),l(this,"TextRenderer",_TextRenderer),l(this,"Lexer",_Lexer),l(this,"Tokenizer",_Tokenizer),l(this,"Hooks",_Hooks),this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new _Renderer(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,o=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new _Hooks;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,o=e.hooks[r],i=t[r];_Hooks.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const n=o.call(t,e);return i.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _Lexer.lex(e,t??this.defaults)}parser(e,t){return _Parser.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const r={...n},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const s=o.hooks?o.hooks.provideLexer():e?_Lexer.lex:_Lexer.lexInline,a=o.hooks?o.hooks.provideParser():e?_Parser.parse:_Parser.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>s(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>a(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let e=s(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=a(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(l){return i(l)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Ci(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Di(e,t){return Ri.parse(e,t)}Di.options=Di.setOptions=function(e){return Ri.setOptions(e),Di.defaults=Ri.defaults,To(Di.defaults),Di},Di.getDefaults=Eo,Di.defaults=No,Di.use=function(...e){return Ri.use(...e),Di.defaults=Ri.defaults,To(Di.defaults),Di},Di.walkTokens=function(e,t){return Ri.walkTokens(e,t)},Di.parseInline=Ri.parseInline,Di.Parser=_Parser,Di.parser=_Parser.parse,Di.Renderer=_Renderer,Di.TextRenderer=_TextRenderer,Di.Lexer=_Lexer,Di.lexer=_Lexer.lex,Di.Tokenizer=_Tokenizer,Di.Hooks=_Hooks,Di.parse=Di,Di.options,Di.setOptions,Di.use,Di.walkTokens,Di.parseInline,_Parser.parse;const Ai=_Lexer.lex;function Oi(e,t,n){if(0===e.length)return[];let r=[];const o=e.indexOf(t),i=e.indexOf(n,o);return o>=0&&i>o?(r.push(e.substring(0,o)),r.push(e.substring(o,i+n.length)),r=r.concat(Oi(e.substring(i+n.length),t,n)),r):[e]}function Bi(e){if(Li(e)){const t=Oi(e.text,"{{","}}"),n=Oi(e.raw,"{{","}}");if(t.length===n.length)return t.map(((e,r)=>({type:"text",text:t[r],raw:n[r]})));throw new Error("Error parsing markdown")}return[e]}function Ii(e){let t=[];if(Li(e)){const n=Oi(e.text,"{{","}}"),r=Oi(e.raw,"{{","}}");if(n.length===r.length){for(let e=0;e<n.length;e++){const o={type:"text",text:n[e],raw:r[e]};$i(o)?t.push(o):Ai(r[e]).forEach((e=>{"paragraph"===e.type?t=t.concat(e.tokens):t.push(e)}))}return t}throw new Error("Error parsing Markdown")}return t.push(e),t}function Li(e){if("text"===e.type||"paragraph"===e.type){const t=e.raw.indexOf("{{"),n=e.raw.indexOf("}}");return-1!==t&&-1!==n&&n>t}return!1}function $i(e){return"text"===e.type&&e.text.startsWith("{{")&&e.text.endsWith("}}")}const Pi=br(t.defineComponent({__name:"AudioAutoPlayer",props:{src:{}},setup(e){const n=e,r=t.ref([]),o=t.ref([]),i=t.ref(!1);let s=null;const a=e=>{if((e=>{try{return!isNaN(r.value[e].duration)}catch(t){throw new Error("AudioPlayer does not have an element at this index:",t)}})(e))if(r.value[e].play(),e+1<r.value.length){const t=1e3*(r.value[e].duration+.7);o.value.push(setTimeout((()=>{i.value&&a(e+1)}),t))}else setTimeout((()=>{i.value=!1}),1e3*r.value[e].duration),setTimeout((()=>{s=null}),1e3*r.value[e].duration+500);else setTimeout(a,100,e)},l=()=>{null===s||s===t.getCurrentInstance()?(s=t.getCurrentInstance(),i.value=!0,a(0)):setTimeout(l,100)};return t.onMounted((()=>{s=null,"string"==typeof n.src?r.value.push(new Audio(n.src)):n.src.forEach((e=>{r.value.push(new Audio(e))}));const e=[{hotkey:"up",callback:l,command:"Replay Audio"}];Ar.addBinding(e),l()})),t.onBeforeUnmount((()=>{Ar.removeBinding("up"),i.value=!1,setTimeout((()=>{s=null}),500),o.value.forEach(clearTimeout),console.log("Audio stopping..."),r.value.forEach((e=>{e.paused||(e.pause(),e.currentTime=0)}))})),(e,n)=>{const r=t.resolveComponent("v-icon"),o=t.resolveComponent("v-btn");return t.openBlock(),t.createBlock(o,{size:"large",icon:"",color:i.value?"primary lighten-3":"primary",class:t.normalizeClass({playing:i.value}),onClick:l},{default:t.withCtx((()=>[t.createVNode(r,null,{default:t.withCtx((()=>n[0]||(n[0]=[t.createTextVNode("mdi-volume-high")]))),_:1})])),_:1},8,["color","class"])}}}),[["__scopeId","data-v-e1a0f62c"]]);var Vi,Yi;function zi(){if(Yi)return Vi;function e(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{const r=t[n],o=typeof r;"object"!==o&&"function"!==o||Object.isFrozen(r)||e(r)})),t}Yi=1;class Response{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function t(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function n(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const r=e=>!!e.scope;class HTMLRenderer{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=t(e)}openNode(e){if(!r(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const o=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class TokenTree{constructor(){this.rootNode=o(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=o({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{TokenTree._collapse(e)})))}}class TokenTreeEmitter extends TokenTree{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function i(e){return e?"string"==typeof e?e:e.source:null}function s(e){return c("(?=",e,")")}function a(e){return c("(?:",e,")*")}function l(e){return c("(?:",e,")?")}function c(...e){return e.map((e=>i(e))).join("")}function d(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>i(e))).join("|")+")"}function u(e){return new RegExp(e.toString()+"|").exec("").length-1}const h=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function p(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=i(e),o="";for(;r.length>0;){const e=h.exec(r);if(!e){o+=r;break}o+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o})).map((e=>`(${e})`)).join(t)}const g="[a-zA-Z]\\w*",m="[a-zA-Z_]\\w*",f="\\b\\d+(\\.\\d+)?",k="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",y="\\b(0b[01]+)",b={begin:"\\\\[\\s\\S]",relevance:0},w={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[b]},v={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[b]},_=function(e,t,r={}){const o=n({scope:"comment",begin:e,end:t,contains:[]},r);o.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=d("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return o.contains.push({begin:c(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),o},x=_("//","$"),S=_("/\\*","\\*/"),C=_("#","$"),M={scope:"number",begin:f,relevance:0},E={scope:"number",begin:k,relevance:0},N={scope:"number",begin:y,relevance:0},T={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[b,{begin:/\[/,end:/\]/,relevance:0,contains:[b]}]},R={scope:"title",begin:g,relevance:0},D={scope:"title",begin:m,relevance:0},A={begin:"\\.\\s*"+m,relevance:0};var O=Object.freeze({__proto__:null,APOS_STRING_MODE:w,BACKSLASH_ESCAPE:b,BINARY_NUMBER_MODE:N,BINARY_NUMBER_RE:y,COMMENT:_,C_BLOCK_COMMENT_MODE:S,C_LINE_COMMENT_MODE:x,C_NUMBER_MODE:E,C_NUMBER_RE:k,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:C,IDENT_RE:g,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:A,NUMBER_MODE:M,NUMBER_RE:f,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:v,REGEXP_MODE:T,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=c(t,/.*\b/,e.binary,/\b.*/)),n({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:R,UNDERSCORE_IDENT_RE:m,UNDERSCORE_TITLE_MODE:D});function B(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function I(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function L(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=B,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function $(e,t){Array.isArray(e.illegal)&&(e.illegal=d(...e.illegal))}function P(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function V(e,t){void 0===e.relevance&&(e.relevance=1)}const Y=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=c(n.beforeMatch,s(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},z=["of","and","for","in","not","or","if","then","parent","list","value"];function j(e,t,n="keyword"){const r=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach((function(n){Object.assign(r,j(e[n],t,n))})),r;function o(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){return t?Number(t):function(e){return z.includes(e.toLowerCase())}(e)?0:1}const F={},H=e=>{console.error(e)},W=(e,...t)=>{console.log(`WARN: ${e}`,...t)},q=(e,t)=>{F[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),F[`${e}/${t}`]=!0)},G=new Error;function Z(e,t,{key:n}){let r=0;const o=e[n],i={},s={};for(let a=1;a<=t.length;a++)s[a+r]=o[a],i[a+r]=!0,r+=u(t[a-1]);e[n]=s,e[n]._emit=i,e[n]._multi=!0}function K(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw H("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),G;if("object"!=typeof e.beginScope||null===e.beginScope)throw H("beginScope must be object"),G;Z(e,e.begin,{key:"beginScope"}),e.begin=p(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw H("skip, excludeEnd, returnEnd not compatible with endScope: {}"),G;if("object"!=typeof e.endScope||null===e.endScope)throw H("endScope must be object"),G;Z(e,e.end,{key:"endScope"}),e.end=p(e.end,{joinWith:""})}}(e)}function Q(e){function t(t,n){return new RegExp(i(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=u(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(p(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new MultiRegex;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=n(e.classNameAliases||{}),function r(o,s){const a=o;if(o.isCompiled)return a;[I,P,K,Y].forEach((e=>e(o,s))),e.compilerExtensions.forEach((e=>e(o,s))),o.__beforeBegin=null,[L,$,V].forEach((e=>e(o,s))),o.isCompiled=!0;let l=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),l=o.keywords.$pattern,delete o.keywords.$pattern),l=l||/\w+/,o.keywords&&(o.keywords=j(o.keywords,e.case_insensitive)),a.keywordPatternRe=t(l,!0),s&&(o.begin||(o.begin=/\B|\b/),a.beginRe=t(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(a.endRe=t(a.end)),a.terminatorEnd=i(a.end)||"",o.endsWithParent&&s.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(a.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return n(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(J(e))return n(e,{starts:e.starts?n(e.starts):null});if(Object.isFrozen(e))return n(e);return e}("self"===e?o:e)}))),o.contains.forEach((function(e){r(e,a)})),o.starts&&r(o.starts,s),a.matcher=function(e){const t=new ResumableMultiRegex;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function J(e){return!!e&&(e.endsWithParent||J(e.starts))}class HTMLInjectionError extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const X=t,ee=n,te=Symbol("nomatch"),ne=function(t){const n=Object.create(null),r=Object.create(null),o=[];let i=!0;const u="Could not find the language '{}', did you forget to load/include a language module?",h={disableAutodetect:!0,name:"Plain text",contains:[]};let p={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:TokenTreeEmitter};function g(e){return p.noHighlightRe.test(e)}function m(e,t,n){let r="",o="";"object"==typeof t?(r=e,n=t.ignoreIllegals,o=t.language):(q("10.7.0","highlight(lang, code, ...args) has been deprecated."),q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,r=t),void 0===n&&(n=!0);const i={code:r,language:o};S("before:highlight",i);const s=i.result?i.result:f(i.language,i.code,n);return s.code=i.code,S("after:highlight",s),s}function f(e,t,r,o){const s=Object.create(null);function a(){if(!C.keywords)return void E.addText(N);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(N),n="";for(;t;){n+=N.substring(e,t.index);const o=_.case_insensitive?t[0].toLowerCase():t[0],i=(r=o,C.keywords[r]);if(i){const[e,r]=i;if(E.addText(n),n="",s[o]=(s[o]||0)+1,s[o]<=7&&(T+=r),e.startsWith("_"))n+=t[0];else{const n=_.classNameAliases[e]||e;c(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(N)}var r;n+=N.substring(e),E.addText(n)}function l(){null!=C.subLanguage?function(){if(""===N)return;let e=null;if("string"==typeof C.subLanguage){if(!n[C.subLanguage])return void E.addText(N);e=f(C.subLanguage,N,!0,M[C.subLanguage]),M[C.subLanguage]=e._top}else e=k(N,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(T+=e.relevance),E.__addSublanguage(e._emitter,e.language)}():a(),N=""}function c(e,t){""!==e&&(E.startScope(t),E.addText(e),E.endScope())}function d(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=_.classNameAliases[e[n]]||e[n],o=t[n];r?c(o,r):(N=o,a(),N=""),n++}}function h(e,t){return e.scope&&"string"==typeof e.scope&&E.openNode(_.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(c(N,_.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=""):e.beginScope._multi&&(d(e.beginScope,t),N="")),C=Object.create(e,{parent:{value:C}}),C}function g(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new Response(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function m(e){return 0===C.matcher.regexIndex?(N+=e[0],1):(A=!0,0)}function y(e){const n=e[0],r=t.substring(e.index),o=g(C,e,r);if(!o)return te;const i=C;C.endScope&&C.endScope._wrap?(l(),c(n,C.endScope._wrap)):C.endScope&&C.endScope._multi?(l(),d(C.endScope,e)):i.skip?N+=n:(i.returnEnd||i.excludeEnd||(N+=n),l(),i.excludeEnd&&(N=n));do{C.scope&&E.closeNode(),C.skip||C.subLanguage||(T+=C.relevance),C=C.parent}while(C!==o.parent);return o.starts&&h(o.starts,e),i.returnEnd?0:n.length}let b={};function w(n,o){const s=o&&o[0];if(N+=n,null==s)return l(),0;if("begin"===b.type&&"end"===o.type&&b.index===o.index&&""===s){if(N+=t.slice(o.index,o.index+1),!i){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=b.rule,t}return 1}if(b=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new Response(n),o=[n.__beforeBegin,n["on:begin"]];for(const i of o)if(i&&(i(e,r),r.isMatchIgnored))return m(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),l(),n.returnBegin||n.excludeBegin||(N=t)),h(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=y(o);if(e!==te)return e}if("illegal"===o.type&&""===s)return N+="\n",1;if(D>1e5&&D>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return N+=s,s.length}const _=v(e);if(!_)throw H(u.replace("{}",e)),new Error('Unknown language: "'+e+'"');const x=Q(_);let S="",C=o||x;const M={},E=new p.__emitter(p);!function(){const e=[];for(let t=C;t!==_;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>E.openNode(e)))}();let N="",T=0,R=0,D=0,A=!1;try{if(_.__emitTokens)_.__emitTokens(t,E);else{for(C.matcher.considerAll();;){D++,A?A=!1:C.matcher.considerAll(),C.matcher.lastIndex=R;const e=C.matcher.exec(t);if(!e)break;const n=w(t.substring(R,e.index),e);R=e.index+n}w(t.substring(R))}return E.finalize(),S=E.toHTML(),{language:e,value:S,relevance:T,illegal:!1,_emitter:E,_top:C}}catch(O){if(O.message&&O.message.includes("Illegal"))return{language:e,value:X(t),illegal:!0,relevance:0,_illegalBy:{message:O.message,index:R,context:t.slice(R-100,R+100),mode:O.mode,resultSoFar:S},_emitter:E};if(i)return{language:e,value:X(t),illegal:!1,relevance:0,errorRaised:O,_emitter:E,_top:C};throw O}}function k(e,t){t=t||p.languages||Object.keys(n);const r=function(e){const t={value:X(e),illegal:!1,relevance:0,_top:h,_emitter:new p.__emitter(p)};return t._emitter.addText(e),t}(e),o=t.filter(v).filter(x).map((t=>f(t,e,!1)));o.unshift(r);const i=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(v(e.language).supersetOf===t.language)return 1;if(v(t.language).supersetOf===e.language)return-1}return 0})),[s,a]=i,l=s;return l.secondBest=a,l}function y(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=p.languageDetectRe.exec(t);if(n){const t=v(n[1]);return t||(W(u.replace("{}",n[1])),W("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>g(e)||v(e)))}(e);if(g(n))return;if(S("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(p.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),p.throwUnescapedHTML)){throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,i=n?m(o,{language:n,ignoreIllegals:!0}):k(o);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,n){const o=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),S("after:highlightElement",{el:e,result:i,text:o})}let b=!1;function w(){if("loading"===document.readyState)return b||window.addEventListener("DOMContentLoaded",(function(){w()}),!1),void(b=!0);document.querySelectorAll(p.cssSelector).forEach(y)}function v(e){return e=(e||"").toLowerCase(),n[e]||n[r[e]]}function _(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=t}))}function x(e){const t=v(e);return t&&!t.disableAutodetect}function S(e,t){const n=e;o.forEach((function(e){e[n]&&e[n](t)}))}Object.assign(t,{highlight:m,highlightAuto:k,highlightAll:w,highlightElement:y,highlightBlock:function(e){return q("10.7.0","highlightBlock will be removed entirely in v12.0"),q("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){p=ee(p,e)},initHighlighting:()=>{w(),q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){w(),q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,r){let o=null;try{o=r(t)}catch(s){if(H("Language definition for '{}' could not be registered.".replace("{}",e)),!i)throw s;H(s),o=h}o.name||(o.name=e),n[e]=o,o.rawDefinition=r.bind(null,t),o.aliases&&_(o.aliases,{languageName:e})},unregisterLanguage:function(e){delete n[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(n)},getLanguage:v,registerAliases:_,autoDetection:x,inherit:ee,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},removePlugin:function(e){const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}),t.debugMode=function(){i=!1},t.safeMode=function(){i=!0},t.versionString="11.11.1",t.regex={concat:c,lookahead:s,either:d,optional:l,anyNumberOfTimes:a};for(const s in O)"object"==typeof O[s]&&e(O[s]);return Object.assign(t,O),t},re=ne({});return re.newInstance=()=>ne({}),Vi=re,re.HighlightJS=re,re.default=re,Vi}const ji=Sr(zi());var Ui={component:t.defineComponent({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(e){var n=t.ref(e.language);t.watch((function(){return e.language}),(function(e){n.value=e}));var r=t.computed((function(){return e.autodetect||!n.value})),o=t.computed((function(){return!r.value&&!ji.getLanguage(n.value)}));return{className:t.computed((function(){return o.value?"":"hljs "+n.value})),highlightedCode:t.computed((function(){var t;if(o.value)return console.warn('The language "'+n.value+'" you specified could not be found.'),e.code.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");if(r.value){var i=ji.highlightAuto(e.code);return n.value=null!==(t=i.language)&&void 0!==t?t:"",i.value}return(i=ji.highlight(e.code,{language:n.value,ignoreIllegals:e.ignoreIllegals})).value}))}},render:function(){return t.h("pre",{},[t.h("code",{class:this.className,innerHTML:this.highlightedCode,tabindex:"0"})])}})};const Fi="[A-Za-z$_][0-9A-Za-z$_]*",Hi=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Wi=["true","false","null","undefined","NaN","Infinity"],qi=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Gi=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Zi=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ki=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Qi=[].concat(Zi,qi,Gi);function Ji(e){const t=e.regex,n=Fi,r="<>",o="</>",i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let o;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const i=e.input.substring(n);((o=i.match(/^\s*=/))||(o=i.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},s={$pattern:Fi,keyword:Hi,literal:Wi,built_in:Qi,"variable.language":Ki},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},h={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,g,m,{match:/\$\d+/},d];u.contains=k.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(k)});const y=[].concat(f,u.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(y)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...qi,...Gi]}},x={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/};const S={match:t.concat(/\b/,(C=[...Zi,"super","import"].map((e=>`${e}\\s*\\(`)),t.concat("(?!",C.join("|"),")")),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0};var C;const M={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",T={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,g,m,f,{match:/\$\d+/},d,_,{scope:"attr",match:n+t.lookahead(":"),relevance:0},T,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},S,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,E,{match:/\$[(.]/}]}}const Xi="[A-Za-z$_][0-9A-Za-z$_]*",es=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],ts=["true","false","null","undefined","NaN","Infinity"],ns=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],rs=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],os=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],is=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ss=[].concat(os,ns,rs);function as(e){const t=e.regex,n=function(e){const t=e.regex,n=Xi,r="<>",o="</>",i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let o;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const i=e.input.substring(n);((o=i.match(/^\s*=/))||(o=i.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},s={$pattern:Xi,keyword:es,literal:ts,built_in:ss,"variable.language":is},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},h={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,g,m,{match:/\$\d+/},d];u.contains=k.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(k)});const y=[].concat(f,u.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(y)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},v={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ns,...rs]}},x={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(C=[...os,"super","import"].map((e=>`${e}\\s*\\(`)),t.concat("(?!",C.join("|"),")")),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0};var C;const M={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},E={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",T={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,g,m,f,{match:/\$\d+/},d,_,{scope:"attr",match:n+t.lookahead(":"),relevance:0},T,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},S,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},v,E,{match:/\$[(.]/}]}}(e),r=Xi,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},a={$pattern:Xi,keyword:es.concat(["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"]),literal:ts,built_in:ss.concat(o),"variable.language":is},l={className:"meta",begin:"@"+r},c=(e,t,n)=>{const r=e.contains.findIndex((e=>e.label===t));if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)};Object.assign(n.keywords,a),n.exports.PARAMS_CONTAINS.push(l);const d=n.contains.find((e=>"attr"===e.scope)),u=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,u]),n.contains=n.contains.concat([l,i,s,u]),c(n,"shebang",e.SHEBANG()),c(n,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});return n.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}const ls=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],cs=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),ds=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),us=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),hs=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function ps(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),r=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+ds.join("|")+")"},{begin:":(:)?("+us.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hs.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:cs.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ls.join("|")+")\\b"}]}}function gs(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(o,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,a,s,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,i,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ms(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(a);const l={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},c=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),d={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[c,e.SHEBANG(),d,l,i,s,{match:/(\/[a-z._-]+)+/},a,{match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},n]}}function fs(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function ks(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function ys(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},i={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,i,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,u=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${u})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${c})[jJ](?=${u})`}]},p={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},g={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",i,h,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,h,i],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[i,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},l,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[g]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,g,l]}]}}const bs={class:"code-block-wrapper pa-2"},ws={key:0,class:"language-indicator"},vs=t.defineComponent({__name:"CodeBlockRenderer",props:{code:{type:String,required:!0},language:{type:String,default:""}},setup(e){ji.registerLanguage("js",Ji),ji.registerLanguage("javascript",Ji),ji.registerLanguage("ts",as),ji.registerLanguage("typescript",as),ji.registerLanguage("css",ps),ji.registerLanguage("html",gs),ji.registerLanguage("bash",ms),ji.registerLanguage("sh",ms),ji.registerLanguage("json",fs),ji.registerLanguage("go",ks),ji.registerLanguage("golang",ks),ji.registerLanguage("python",ys);const n=t.getCurrentInstance();return n&&n.appContext.app.component("highlightjs",Ui.component),(n,r)=>{const o=t.resolveComponent("highlightjs");return t.openBlock(),t.createElementBlock("div",bs,[e.language?(t.openBlock(),t.createElementBlock("div",ws,t.toDisplayString(e.language),1)):t.createCommentVNode("",!0),t.createVNode(o,{language:e.language,code:e.code},null,8,["language","code"])])}}}),_s={key:0},xs={key:0},Ss={key:0},Cs={key:1},Ms={key:2},Es={key:1},Ns={key:1},Ts={key:0,class:"text-h2"},Rs={key:1,class:"text-h3"},Ds={key:2,class:"text-h4"},As={key:3},Os={key:4},Bs={key:5},Is={key:2},Ls={key:3,class:"text-h5"},$s={key:0},Ps=["href","title"],Vs={key:5},Ys={key:6},zs={key:7},js=["src","alt"],Us={key:9},Fs={key:10},Hs={key:11},Ws=["align"],qs=["innerHTML"],Gs=["innerHTML"],Zs={key:16},Ks={key:17},Qs={key:18},Js=br(t.defineComponent({__name:"MdTokenRenderer",props:{token:{type:Object,required:!0},last:{type:Boolean,required:!1,default:!1}},setup(e,{expose:n}){const r={fillIn:t.markRaw(Co)};function o(e){return $i(e)}function i(e){return Li(e)}function s(e){return Bi(e)}function a(e){return Ii(e)}function l(e){let t="";return"text"in e&&"string"==typeof e.text?t=e.text:"raw"in e&&"string"==typeof e.raw&&(t=e.raw),{is:"fillIn",text:t}}function c(e){return r[e]}function d(e){return e.replace(/'/g,"'").replace(/"/g,'"').replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function u(e){return void 0===e.inLink&&"text"===e.type}return n({isComponent:o,containsComponent:i,splitTextToken:s,splitParagraphToken:a,parsedComponent:l,decodeBasicEntities:d,isText:u,components:r,getComponent:c}),(n,r)=>{const h=t.resolveComponent("md-token-renderer",!0);return u(e.token)?(t.openBlock(),t.createElementBlock("span",_s,[e.token.tokens&&0!==e.token.tokens.length?e.token.tokens&&0!==e.token.tokens.length?(t.openBlock(),t.createElementBlock("span",Es,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",xs,[o(e.token)?(t.openBlock(),t.createElementBlock("span",Ss,[e.last?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c(l(e.token).is)),{key:0,text:l(e.token).text},null,8,["text"]))])):i(e.token)?(t.openBlock(),t.createElementBlock("span",Cs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s(e.token),((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):(t.openBlock(),t.createElementBlock("span",Ms,t.toDisplayString(d(e.token.text)),1))]))])):"heading"===e.token.type?(t.openBlock(),t.createElementBlock("span",Ns,[1===e.token.depth?(t.openBlock(),t.createElementBlock("h1",Ts,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):2===e.token.depth?(t.openBlock(),t.createElementBlock("h2",Rs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):3===e.token.depth?(t.openBlock(),t.createElementBlock("h3",Ds,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):4===e.token.depth?(t.openBlock(),t.createElementBlock("h4",As,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):5===e.token.depth?(t.openBlock(),t.createElementBlock("h5",Os,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):6===e.token.depth?(t.openBlock(),t.createElementBlock("h6",Bs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):t.createCommentVNode("",!0)])):"strong"===e.token.type?(t.openBlock(),t.createElementBlock("strong",Is,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):"paragraph"===e.token.type?(t.openBlock(),t.createElementBlock("p",Ls,[i(e.token)?(t.openBlock(),t.createElementBlock("span",$s,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a(e.token),((n,r)=>(t.openBlock(),t.createBlock(h,{key:r,token:n,last:e.last&&1===e.token.tokens.length&&r===a(e.token).length-1},null,8,["token","last"])))),128))])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.token.tokens,((n,r)=>(t.openBlock(),t.createBlock(h,{key:r,token:n,last:e.last&&1===e.token.tokens.length},null,8,["token","last"])))),128))])):"link"===e.token.type?(t.openBlock(),t.createElementBlock("a",{key:4,href:e.token.href,title:e.token.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))],8,Ps)):"list"===e.token.type&&!1===e.token.ordered?(t.openBlock(),t.createElementBlock("ul",Vs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.items,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):"list"===e.token.type&&!0===e.token.ordered?(t.openBlock(),t.createElementBlock("ol",Ys,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.items,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):"list_item"===e.token.type?(t.openBlock(),t.createElementBlock("li",zs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):"image"===e.token.type?(t.openBlock(),t.createElementBlock("img",{key:8,src:e.token.href,alt:e.token.title},null,8,js)):"hr"===e.token.type?(t.openBlock(),t.createElementBlock("hr",Us)):"br"===e.token.type?(t.openBlock(),t.createElementBlock("br",Fs)):"del"===e.token.type?(t.openBlock(),t.createElementBlock("del",Hs)):"table"===e.token.type?(t.openBlock(),t.createElementBlock("table",{key:12,align:e.token.align},[t.createElementVNode("thead",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.header,((e,n)=>(t.openBlock(),t.createElementBlock("th",{key:n},t.toDisplayString(e.text),1)))),128))]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.rows,((e,n)=>(t.openBlock(),t.createElementBlock("tr",{key:n},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e,((e,n)=>(t.openBlock(),t.createElementBlock("td",{key:n},t.toDisplayString(e.text),1)))),128))])))),128))])],8,Ws)):"html"===e.token.type?(t.openBlock(),t.createElementBlock("span",{key:13,innerHTML:e.token.raw},null,8,qs)):"code"===e.token.type?(t.openBlock(),t.createBlock(vs,{key:14,code:e.token.text,language:e.token.lang},null,8,["code","language"])):"codespan"===e.token.type?(t.openBlock(),t.createElementBlock("code",{key:15,class:"codespan",innerHTML:e.token.text},null,8,Gs)):"blockquote"===e.token.type?(t.openBlock(),t.createElementBlock("blockquote",Zs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):"escape"===e.token.type?(t.openBlock(),t.createElementBlock("span",Ks,t.toDisplayString(e.token.text),1)):"em"===e.token.type?(t.openBlock(),t.createElementBlock("em",Qs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.token.tokens,((e,n)=>(t.openBlock(),t.createBlock(h,{key:n,token:e},null,8,["token"])))),128))])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-047d0fa4"]]);const Xs=br(t.defineComponent({name:"MarkdownRenderer",components:{MdTokenRenderer:Js,AudioAutoPlayer:Pi},props:{md:{type:String,required:!0}},computed:{tokens(){return Ai(this.md)}}}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("md-token-renderer"),l=t.resolveComponent("audio-auto-player");return t.openBlock(),t.createElementBlock("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tokens,((n,r)=>(t.openBlock(),t.createElementBlock("span",{key:r},[n.type?(t.openBlock(),t.createBlock(a,{key:0,token:n,last:r===e.tokens.length-1},null,8,["token","last"])):n.audio?(t.openBlock(),t.createBlock(l,{key:1,src:n.audio},null,8,["src"])):t.createCommentVNode("",!0)])))),128))])}]]),ea=Object.freeze(Object.defineProperty({__proto__:null,default:Xs},Symbol.toStringTag,{value:"Module"}));async function ta(){const e=na();if(!e.onLoadComplete){let t=200;const n=50;for(;!e.onLoadComplete&&t>0;)await new Promise((e=>setTimeout(e,n))),t--;if(!e.onLoadComplete)throw new Error("User initialization timed out")}return r.getDataLayer().getUserDB()}const na=()=>{const e=so();return e&&o.setActivePinia(e),o.defineStore("auth",{state:()=>({_user:void 0,loginAndRegistration:{init:!1,loggedIn:!1,regDialogOpen:!1,loginDialogOpen:!1},onLoadComplete:!1}),actions:{async init(){try{this._user=r.getDataLayer().getUserDB(),this.loginAndRegistration.loggedIn=this._user.isLoggedIn(),this.onLoadComplete=!0,this.loginAndRegistration.init=!0}catch(e){console.error("Failed to initialize auth store:",e)}},setLoginDialog(e){this.loginAndRegistration.loginDialogOpen=e},setRegDialog(e){this.loginAndRegistration.regDialogOpen=e}},getters:{currentUser:async()=>ta(),isLoggedIn:e=>e.loginAndRegistration.loggedIn,isInitialized:e=>e.loginAndRegistration.init,status:e=>({loggedIn:e.loginAndRegistration.loggedIn,init:e.loginAndRegistration.init,user:e._user})}})()},ra=()=>{const e=so();return e&&o.setActivePinia(e),o.defineStore("config",{state:()=>({config:{darkMode:!1,likesConfetti:!1}}),actions:{updateConfig(e){this.config=e},async updateDarkMode(e){this.config.darkMode=e;const t=await ta();await t.setConfig({darkMode:e})},async updateLikesConfetti(e){this.config.likesConfetti=e;const t=await ta();await t.setConfig({likesConfetti:e})},async hydrate(){const e=await ta(),t=await e.getConfig();console.log(`user config: ${JSON.stringify(t)}`),this.updateConfig(t)},async init(){await this.hydrate()},resetDefaults(){this.config={darkMode:!1,likesConfetti:!1}}}})()};const oa=br(t.defineComponent({name:"UserChip",data:()=>({username:"",items:[],checked:!1,authStore:na(),configStore:ra()}),computed:{hasNewItems(){return this.items.length>0}},created(){ta().then((e=>{this.username=e.getUsername()}))},methods:{async gotoSettings(){this.$router.push(`/u/${(await ta()).getUsername()}`)},async gotoStats(){this.$router.push(`/u/${(await ta()).getUsername()}/stats`)},dismiss(e){const t=this.items.indexOf(e);this.items.splice(t,1)},async logout(){(await this.authStore._user.logout()).ok&&(this.authStore.loginAndRegistration={init:!0,loggedIn:!1,regDialogOpen:!1,loginDialogOpen:!1},this.configStore.resetDefaults(),this.$router.push("/home"))}}}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-icon"),l=t.resolveComponent("v-avatar"),c=t.resolveComponent("v-chip"),d=t.resolveComponent("v-list-item-title"),u=t.resolveComponent("v-list-item"),h=t.resolveComponent("v-divider"),p=t.resolveComponent("v-list"),g=t.resolveComponent("v-menu"),m=t.resolveComponent("v-badge");return t.openBlock(),t.createBlock(m,{content:e.items.length,"model-value":e.hasNewItems,color:"accent",location:"end top"},{default:t.withCtx((()=>[t.createVNode(g,{location:"bottom end",transition:"scale-transition"},{activator:t.withCtx((({props:r})=>[t.createVNode(c,t.mergeProps(r,{class:"ma-2"}),{default:t.withCtx((()=>[t.createVNode(l,{start:"",class:"bg-primary"},{default:t.withCtx((()=>[t.createVNode(a,null,{default:t.withCtx((()=>n[0]||(n[0]=[t.createTextVNode("mdi-school")]))),_:1})])),_:1}),t.createTextVNode(" "+t.toDisplayString(e.username),1)])),_:2},1040)])),default:t.withCtx((()=>[t.createVNode(p,null,{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(n=>(t.openBlock(),t.createBlock(u,{key:n,onClick:t=>e.dismiss(n)},{default:t.withCtx((()=>[t.createVNode(d,null,{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128)),e.items.length?(t.openBlock(),t.createBlock(h,{key:0})):t.createCommentVNode("",!0),t.createVNode(u,{onClick:e.gotoStats},{prepend:t.withCtx((()=>[t.createVNode(a,null,{default:t.withCtx((()=>n[1]||(n[1]=[t.createTextVNode("mdi-trending-up")]))),_:1})])),default:t.withCtx((()=>[t.createVNode(d,null,{default:t.withCtx((()=>n[2]||(n[2]=[t.createTextVNode("Stats")]))),_:1})])),_:1},8,["onClick"]),t.createVNode(u,{onClick:e.gotoSettings},{prepend:t.withCtx((()=>[t.createVNode(a,null,{default:t.withCtx((()=>n[3]||(n[3]=[t.createTextVNode("mdi-cog")]))),_:1})])),default:t.withCtx((()=>[t.createVNode(d,null,{default:t.withCtx((()=>n[4]||(n[4]=[t.createTextVNode("Settings")]))),_:1})])),_:1},8,["onClick"]),t.createVNode(u,{onClick:e.logout},{prepend:t.withCtx((()=>[t.createVNode(a,null,{default:t.withCtx((()=>n[5]||(n[5]=[t.createTextVNode("mdi-logout")]))),_:1})])),default:t.withCtx((()=>[t.createVNode(d,null,{default:t.withCtx((()=>n[6]||(n[6]=[t.createTextVNode("Log out")]))),_:1})])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1},8,["content","model-value"])}]]);
|
|
4
|
+
/*!
|
|
5
|
+
* vue-router v4.5.0
|
|
6
|
+
* (c) 2024 Eduardo San Martin Morote
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/var ia,sa,aa,la,ca,da;(sa=ia||(ia={})).pop="pop",sa.push="push",(la=aa||(aa={})).back="back",la.forward="forward",la.unknown="",Symbol("production"!==process.env.NODE_ENV?"navigation failure":""),(da=ca||(ca={}))[da.aborted=4]="aborted",da[da.cancelled=8]="cancelled",da[da.duplicated=16]="duplicated",Symbol("production"!==process.env.NODE_ENV?"router view location matched":""),Symbol("production"!==process.env.NODE_ENV?"router view depth":"");const ua=Symbol("production"!==process.env.NODE_ENV?"router":""),ha=Symbol("production"!==process.env.NODE_ENV?"route location":"");function pa(e){return t.inject(ha)}Symbol("production"!==process.env.NODE_ENV?"router view location":"");const ga=br(t.defineComponent({__name:"UserLogin",emits:["toggle"],setup(e,{emit:r}){const o=t.inject(ua),i=pa(),s=na(),a=ra(),l=t.ref(""),c=t.ref(""),d=t.ref(!1),u=t.ref(!1),h=t.ref(!1),p=t.ref(7e3),g=t.ref(void 0),m=t.computed((()=>"login"===i.name)),f=t.computed((()=>({color:h.value?"error":"success",text:h.value?"Try again":"Log In"}))),k=async()=>{u.value=!0,n.log("Starting login attempt"),n.log(`Login attempt for username: ${l.value}`);try{n.log("Attempting to get User instance"),g.value=await ta(),n.log("Got User instance, attempting login"),await g.value.login(l.value,c.value),n.log("Login successful"),n.log("Initializing user config"),a.init(),n.log("User config initialized"),n.log("Setting authentication state"),s.loginAndRegistration.loggedIn=!0,n.log("Authentication state set, redirecting to study page"),o.push("/study"),n.log("Login and redirect complete")}catch(e){n.log("Login attempt failed"),n.log(`Login error details: ${JSON.stringify(e)}`),console.log(`login error: ${JSON.stringify(e)}`),n.log("Initiating bad login feedback"),h.value=!0,Vr({text:"Username or password was incorrect.",status:n.Status.error,timeout:p.value}),setTimeout((()=>{h.value=!1}),p.value)}n.log("Resetting awaiting response state"),u.value=!1},y=r,b=()=>{n.log("Toggling registration / login forms."),y("toggle")};return(e,n)=>{const r=t.resolveComponent("v-card-title"),o=t.resolveComponent("v-text-field"),i=t.resolveComponent("v-btn"),s=t.resolveComponent("v-snackbar"),a=t.resolveComponent("v-icon"),g=t.resolveComponent("router-link"),y=t.resolveComponent("v-form"),w=t.resolveComponent("v-card-text"),v=t.resolveComponent("v-card");return t.openBlock(),t.createBlock(v,null,{default:t.withCtx((()=>[m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,class:"text-h5 bg-grey-lighten-2"},{default:t.withCtx((()=>n[5]||(n[5]=[t.createTextVNode("Log In")]))),_:1})),t.createVNode(w,null,{default:t.withCtx((()=>[t.createVNode(y,{onsubmit:"return false;",onSubmit:t.withModifiers(k,["prevent"])},{default:t.withCtx((()=>[t.createVNode(o,{id:"",modelValue:l.value,"onUpdate:modelValue":n[0]||(n[0]=e=>l.value=e),autofocus:"",name:"username",label:"Username","prepend-icon":"mdi-account-circle"},null,8,["modelValue"]),t.createVNode(o,{modelValue:c.value,"onUpdate:modelValue":n[1]||(n[1]=e=>c.value=e),"prepend-icon":"mdi-lock",name:"password",hover:"Show password input",label:"Enter your password",hint:"",min:"0","append-icon":d.value?"mdi-eye-off":"mdi-eye",type:d.value?"text":"password","onClick:append":n[2]||(n[2]=()=>d.value=!d.value)},null,8,["modelValue","append-icon","type"]),t.createVNode(s,{modelValue:h.value,"onUpdate:modelValue":n[4]||(n[4]=e=>h.value=e),location:"bottom right",timeout:p.value},{default:t.withCtx((()=>[n[7]||(n[7]=t.createTextVNode(" Username or password was incorrect. ")),t.createVNode(i,{color:"pink",variant:"text",onClick:n[3]||(n[3]=e=>h.value=!1)},{default:t.withCtx((()=>n[6]||(n[6]=[t.createTextVNode("Close")]))),_:1})])),_:1},8,["modelValue","timeout"]),t.createVNode(i,{class:"mr-2",type:"submit",loading:u.value,color:f.value.color},{default:t.withCtx((()=>[t.createVNode(a,{start:""},{default:t.withCtx((()=>n[8]||(n[8]=[t.createTextVNode("mdi-lock-open")]))),_:1}),n[9]||(n[9]=t.createTextVNode(" Log In "))])),_:1},8,["loading","color"]),m.value?(t.openBlock(),t.createBlock(g,{key:0,to:"signup"},{default:t.withCtx((()=>[t.createVNode(i,{variant:"text"},{default:t.withCtx((()=>n[10]||(n[10]=[t.createTextVNode("Create New Account")]))),_:1})])),_:1})):(t.openBlock(),t.createBlock(i,{key:1,variant:"text",onClick:b},{default:t.withCtx((()=>n[11]||(n[11]=[t.createTextVNode("Create New Account")]))),_:1}))])),_:1})])),_:1})])),_:1})}}}),[["__scopeId","data-v-acfaa2d0"]]);const ma=br(t.defineComponent({name:"UserRegistration",emits:["toggle"],data:()=>({username:"",password:"",retypedPassword:"",passwordVisible:!1,usernameValidationInProgress:!1,usernameError:!1,usernameHint:"",awaitingResponse:!1,badLoginAttempt:!1,userSecret:"",secret:"goons",user:null,roles:["Student","Teacher","Author"],student:!0,teacher:!1,author:!1,authStore:na()}),computed:{registrationRoute(){return"string"==typeof this.$route.name&&"signup"===this.$route.name.toLowerCase()},buttonStatus(){return{color:this.badLoginAttempt?"error":"success",text:this.badLoginAttempt?"Try again":"Log In"}}},async created(){this.user=await ta()},methods:{toggle(){n.log("Toggling registration / login forms."),this.$emit("toggle")},validateUsername(){this.usernameError=!1},async createUser(){if(this.awaitingResponse=!0,n.log(`\nUser creation\n-------------\n\nName: ${this.username}\nStudent: ${this.student}\nTeacher: ${this.teacher}\nAuthor: ${this.author}\n`),this.password===this.retypedPassword){if(!this.user)return;this.user.createAccount(this.username,this.password).then((async e=>{e.status===n.Status.ok?(this.authStore.loginAndRegistration.loggedIn=!0,this.authStore.loginAndRegistration.init=!1,this.authStore.loginAndRegistration.init=!0,this.$router.push(`/u/${(await ta()).getUsername()}/new`)):"This username is taken!"===e.error?(this.usernameError=!0,this.usernameHint="Try a different name.",this.$refs.userNameTextField.focus(),Vr({text:`The name ${this.username} is taken!`,status:e.status})):Vr({text:e.error,status:e.status})})).catch((e=>{e&&Vr({text:JSON.stringify(e),status:n.Status.error})})),this.awaitingResponse=!1}else Vr({text:"Passwords do not match.",status:n.Status.error}),this.awaitingResponse=!1}}}),[["render",function(e,n,r,o,i,s){const a=t.resolveComponent("v-card-title"),l=t.resolveComponent("v-text-field"),c=t.resolveComponent("v-btn"),d=t.resolveComponent("v-snackbar"),u=t.resolveComponent("v-icon"),h=t.resolveComponent("router-link"),p=t.resolveComponent("v-form"),g=t.resolveComponent("v-card-text"),m=t.resolveComponent("v-card");return t.openBlock(),t.createBlock(m,null,{default:t.withCtx((()=>[e.registrationRoute?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(a,{key:0,class:"text-h5 bg-grey-lighten-2"},{default:t.withCtx((()=>n[6]||(n[6]=[t.createTextVNode(" Create an Account ")]))),_:1})),t.createVNode(g,null,{default:t.withCtx((()=>[t.createVNode(p,{onSubmit:t.withModifiers(e.createUser,["prevent"])},{default:t.withCtx((()=>[t.createVNode(l,{id:"",ref:"userNameTextField",modelValue:e.username,"onUpdate:modelValue":n[0]||(n[0]=t=>e.username=t),autofocus:"",name:"username",label:"Choose a Username","prepend-icon":"mdi-account-circle",error:e.usernameError,hint:e.usernameHint,onBlur:e.validateUsername},null,8,["modelValue","error","hint","onBlur"]),t.createVNode(l,{modelValue:e.password,"onUpdate:modelValue":n[1]||(n[1]=t=>e.password=t),"prepend-icon":"mdi-lock",name:"password",hover:"Show password",label:"Create a password",hint:"",min:"4","append-icon":e.passwordVisible?"mdi-eye-off":"mdi-eye",type:e.passwordVisible?"text":"password","onClick:append":n[2]||(n[2]=()=>e.passwordVisible=!e.passwordVisible)},null,8,["modelValue","append-icon","type"]),t.createVNode(l,{modelValue:e.retypedPassword,"onUpdate:modelValue":n[3]||(n[3]=t=>e.retypedPassword=t),"prepend-icon":"mdi-lock",name:"retypedPassword",hover:"Show password",label:"Retype your password",hint:"",min:"4",type:e.passwordVisible?"text":"password"},null,8,["modelValue","type"]),t.createVNode(d,{modelValue:e.badLoginAttempt,"onUpdate:modelValue":n[5]||(n[5]=t=>e.badLoginAttempt=t),location:"bottom right",timeout:5e3},{default:t.withCtx((()=>[n[8]||(n[8]=t.createTextVNode(" Username or password was incorrect. ")),t.createVNode(c,{color:"pink",variant:"text",onClick:n[4]||(n[4]=t=>e.badLoginAttempt=!1)},{default:t.withCtx((()=>n[7]||(n[7]=[t.createTextVNode(" Close ")]))),_:1})])),_:1},8,["modelValue"]),t.createVNode(c,{class:"mr-2",type:"submit",loading:e.awaitingResponse,color:e.buttonStatus.color},{default:t.withCtx((()=>[t.createVNode(u,{start:""},{default:t.withCtx((()=>n[9]||(n[9]=[t.createTextVNode("mdi-lock-open")]))),_:1}),n[10]||(n[10]=t.createTextVNode(" Create Account "))])),_:1},8,["loading","color"]),e.registrationRoute?(t.openBlock(),t.createBlock(h,{key:0,to:"login"},{default:t.withCtx((()=>[t.createVNode(c,{variant:"text"},{default:t.withCtx((()=>n[11]||(n[11]=[t.createTextVNode("Log In")]))),_:1})])),_:1})):(t.openBlock(),t.createBlock(c,{key:1,variant:"text",onClick:e.toggle},{default:t.withCtx((()=>n[12]||(n[12]=[t.createTextVNode(" Log In ")]))),_:1},8,["onClick"]))])),_:1},8,["onSubmit"])])),_:1})])),_:1})}]]),fa={key:0},ka=br(t.defineComponent({__name:"UserLoginAndRegistrationContainer",setup(e){const n=pa(),o=na(),i=t.computed((()=>{if(!n.name||"string"!=typeof n.name)return!0;const e=n.name.toLowerCase();return!("login"===e||"signup"===e)})),s=t.computed((()=>o.onLoadComplete)),a=t.computed((()=>o._user?o._user.getUsername().startsWith(r.GuestUsername):!o.loginAndRegistration.loggedIn)),l=t.computed({get:()=>o.loginAndRegistration.regDialogOpen,set:e=>{o.loginAndRegistration.regDialogOpen=e}}),c=t.computed({get:()=>o.loginAndRegistration.loginDialogOpen,set:e=>{o.loginAndRegistration.loginDialogOpen=e}}),d=()=>{if(l.value&&c.value)throw new Error("Registration / Login dialogs both activated.");if(l.value===c.value)throw new Error("Registration / Login dialogs toggled while both were dormant.");l.value=!l.value,c.value=!c.value};return(e,n)=>{const r=t.resolveComponent("v-btn"),o=t.resolveComponent("v-dialog");return s.value&&i.value?(t.openBlock(),t.createBlock(t.Transition,{key:0,name:"component-fade",mode:"out-in"},{default:t.withCtx((()=>[a.value?(t.openBlock(),t.createElementBlock("div",fa,[t.createVNode(o,{modelValue:l.value,"onUpdate:modelValue":n[0]||(n[0]=e=>l.value=e),width:"500px"},{activator:t.withCtx((({props:e})=>[t.createVNode(r,t.mergeProps({class:"mr-2",size:"small",color:"success"},e),{default:t.withCtx((()=>n[2]||(n[2]=[t.createTextVNode("Sign Up")]))),_:2},1040)])),default:t.withCtx((()=>[t.createVNode(ma,{onToggle:d})])),_:1},8,["modelValue"]),t.createVNode(o,{modelValue:c.value,"onUpdate:modelValue":n[1]||(n[1]=e=>c.value=e),width:"500px"},{activator:t.withCtx((({props:e})=>[t.createVNode(r,t.mergeProps({size:"small",color:"success"},e),{default:t.withCtx((()=>n[3]||(n[3]=[t.createTextVNode("Log In")]))),_:2},1040)])),default:t.withCtx((()=>[t.createVNode(ga,{onToggle:d})])),_:1},8,["modelValue"])])):(t.openBlock(),t.createBlock(oa,{key:1}))])),_:1})):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-e53f877f"]]);e.AudioAutoPlayer=Pi,e.CardLoader=Mo,e.CardViewer=Gr,e.CodeBlockRenderer=vs,e.Displayable=Displayable,e.FillInInput=Co,e.HeatMap=xr,e.MarkdownRenderer=Xs,e.MdTokenRenderer=Js,e.MultipleChoiceOption=uo,e.PaginatingToolbar=Hr,e.Question=class Question extends Displayable{displayedSkill(e,t){console.warn("Question is running the reference implementation of displayedSkill.\n Consider overriding!");const n=5e3,r=Math.min(t,5e4),o=r/n,i=r>n?Math.pow(.8,o):1;let s=this.isCorrect(e)?1:0;return s*=i,Math.min(s,1)}evaluate(e,t){return{isCorrect:this.isCorrect(e),performance:this.displayedSkill(e,t)}}},e.RadioMultipleChoice=go,e.SkMouseTrap=Ir,e.SkMouseTrapToolTip=Lr,e.SkldrMouseTrap=Ar,e.SnackbarService=jr,e.StudySession=oo,e.StudySessionTimer=qr,e.TFSelect=ko,e.UserChip=oa,e.UserInputNumber=yo,e.UserInputString=_o,e.UserLogin=ga,e.UserLoginAndRegistrationContainer=ka,e.UserRegistration=ma,e.alertUser=Vr,e.containsComponent=Li,e.getCurrentUser=ta,e.isComponent=$i,e.isDefineComponent=function(e){return void 0!==e.__isFragment},e.isQuestionView=Wr,e.piniaPlugin=ao,e.splitByDelimiters=Oi,e.splitParagraphToken=Ii,e.splitTextToken=Bi,e.useAuthStore=na,e.useCardPreviewModeStore=lo,e.useConfigStore=ra,e.useQuestionView=function(e){const n=t.ref(0),r=t.ref(0),o=t.ref([]),i=t.ref(3),s=t.ref(1),a=t.ref();return{priorSessionViews:n,priorAttempts:r,priorAnswers:o,maxAttemptsPerView:i,maxSessionViews:s,question:a,submitAnswer:(t,n)=>{if(e.logger.log("submitAnswer called..."),!a.value)throw new Error("Question not initialized");o.value.push([t,n??""]);const i=a.value.evaluate(t,e.timeSpent.value);e.logger.log(`evaluation of answer ${t}:`,i);const s={...i,priorAttemps:r.value,courseID:"",cardID:"",timeSpent:e.timeSpent.value,timeStamp:e.startTime.value,userAnswer:t};return i.isCorrect||r.value++,e.emitResponse(s),s}}},e.useViewable=function(e,n,r){const o=t.ref(d.utc()),i=t.ref([]),s={log:(e,...t)=>console.log(`[${r}]: `,e,...t),error:(e,...t)=>console.error(`[${r}]: `,e,...t),warn:(e,...t)=>console.warn(`[${r}]: `,e,...t)},a=t.computed((()=>Math.abs(d.utc().diff(o.value,"milliseconds"))));return{startTime:o,hotKeys:i,timeSpent:a,logger:s,getURL:(t,n=0)=>{try{if(e.data[n]?.[t])return URL.createObjectURL(e.data[n][t])}catch(r){s.error("Error creating URL for item:",t,r)}return""},emitResponse:e=>{n("emitResponse",e)}}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
9
|
+
//# sourceMappingURL=common-ui.umd.js.map
|