diff --git a/package-lock.json b/package-lock.json
index fa63d56..9cbc2e1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@bonartm/quizdown",
- "version": "0.2.4",
+ "version": "0.2.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@bonartm/quizdown",
- "version": "0.2.4",
+ "version": "0.2.5",
"license": "MIT",
"dependencies": {
"auto-bind": "^4.0.0",
diff --git a/package.json b/package.json
index 706073f..67cfb59 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@bonartm/quizdown",
- "version": "0.2.4",
+ "version": "0.2.5",
"description": "Markdown for generating interactive quiz apps in the browser.",
"private": false,
"type": "module",
diff --git a/public/build/quizdown.js b/public/build/quizdown.js
index 0193046..8b7cf71 100644
--- a/public/build/quizdown.js
+++ b/public/build/quizdown.js
@@ -1,4 +1,4 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).quizdown={})}(this,(function(e){"use strict";function t(){}const n=e=>e;function r(e,t){for(const n in t)e[n]=t[n];return e}function i(e){return e()}function o(){return Object.create(null)}function a(e){e.forEach(i)}function s(e){return"function"==typeof e}function u(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(e){let t;return l(e,(e=>t=e))(),t}function f(e,t,n){e.$$.on_destroy.push(l(t,n))}function h(e,t,n,i){return e[1]&&i?r(n.ctx.slice(),e[1](i(t))):n.ctx}function p(e,t,n,r,i,o,a){const s=function(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;r "+e+"
\n":"'+(n?e:ne(e,!0))+"
\n"},t.blockquote=function(e){return""+(n?e:ne(e,!0))+"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+""+r+">\n"},t.listitem=function(e){return"\n\n"+e+"\n"+t+"
\n"},t.tablerow=function(e){return"\n"+e+" \n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+"
"},t.br=function(){return this.options.xhtml?"
":"
"},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"+n+""},t.image=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r='":">"},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),oe=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),ae=a.defaults,se=N.unescape,ue=function(){function e(e){this.options=e||ae,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new oe}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,u,l,c,f,h,p,d,g,m,v,y,b,D="",w=e.length;for(n=0;n
"+fe(e.message+"",!0)+"";throw e}}return ge.options=ge.setOptions=function(e){return le(ge.defaults,e),pe(ge.defaults),ge},ge.getDefaults=he,ge.defaults=de,ge.use=function(e){var t=le({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new re,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;aAn error occurred:
"+fe(e.message+"",!0)+"";throw e}},ge.Parser=ue,ge.parser=ue.parse,ge.Renderer=re,ge.TextRenderer=ie,ge.Lexer=Q,ge.lexer=Q.lex,ge.Tokenizer=j,ge.Slugger=oe,ge.parse=ge,ge}()})),ri=ti((function(e,t){e.exports=function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t
'+(n?e:ne(e,!0))+"
\n":""+(n?e:ne(e,!0))+"
\n"},t.blockquote=function(e){return"\n"+e+"\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"
"+e+"
\n"},t.table=function(e,t){return t&&(t=""+t+""),""+e+"
"},t.br=function(){return this.options.xhtml?""+fe(e.message+"",!0)+"";throw e}}return ge.options=ge.setOptions=function(e){return le(ge.defaults,e),pe(ge.defaults),ge},ge.getDefaults=he,ge.defaults=de,ge.use=function(e){var t=le({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new re,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;aAn error occurred:
"+fe(e.message+"",!0)+"";throw e}},ge.Parser=ue,ge.parser=ue.parse,ge.Renderer=re,ge.TextRenderer=ie,ge.Lexer=Q,ge.lexer=Q.lex,ge.Tokenizer=j,ge.Slugger=oe,ge.parse=ge,ge}()}));function mi(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||mi(n)})),e}var vi=mi,yi=mi;vi.default=yi;class bi{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Di(e){return e.replace(/&/g,"&").replace(/
\n {@html $_('results_text', {\n values: {\n points: `${quiz.points}`,\n total: `${quiz.counter.max}`,\n },\n })}\n
\n\n{@html current.explanation}
\n {/if}\n💡 {@html current.hint}
\n{/if}\n\n\n\n\n","import { writable } from '../store/index.mjs';\nimport { now, loop, assign } from '../internal/index.mjs';\nimport { linear } from '../easing/index.mjs';\n\nfunction is_date(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Date]';\n}\n\nfunction tick_spring(ctx, last_value, current_value, target_value) {\n\tif (typeof current_value === 'number' || is_date(current_value)) {\n\t\t// @ts-ignore\n\t\tconst delta = target_value - current_value;\n\t\t// @ts-ignore\n\t\tconst velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0\n\t\tconst spring = ctx.opts.stiffness * delta;\n\t\tconst damper = ctx.opts.damping * velocity;\n\t\tconst acceleration = (spring - damper) * ctx.inv_mass;\n\t\tconst d = (velocity + acceleration) * ctx.dt;\n\n\t\tif (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) {\n\t\t\treturn target_value; // settled\n\t\t} else {\n\t\t\tctx.settled = false; // signal loop to keep ticking\n\t\t\t// @ts-ignore\n\t\t\treturn is_date(current_value) ?\n\t\t\t\tnew Date(current_value.getTime() + d) : current_value + d;\n\t\t}\n\t} else if (Array.isArray(current_value)) {\n\t\t// @ts-ignore\n\t\treturn current_value.map((_, i) =>\n\t\t\ttick_spring(ctx, last_value[i], current_value[i], target_value[i]));\n\t} else if (typeof current_value === 'object') {\n\t\tconst next_value = {};\n\t\tfor (const k in current_value) {\n\t\t\t// @ts-ignore\n\t\t\tnext_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]);\n\t\t}\n\t\t// @ts-ignore\n\t\treturn next_value;\n\t} else {\n\t\tthrow new Error(`Cannot spring ${typeof current_value} values`);\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction spring(value, opts = {}) {\n\tconst store = writable(value);\n\tconst { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;\n\n\tlet last_time;\n\tlet task;\n\tlet current_token;\n\tlet last_value = value;\n\tlet target_value = value;\n\n\tlet inv_mass = 1;\n\tlet inv_mass_recovery_rate = 0;\n\tlet cancel_task = false;\n\n\tfunction set(new_value, opts = {}) {\n\t\ttarget_value = new_value;\n\t\tconst token = current_token = {};\n\n\t\tif (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) {\n\t\t\tcancel_task = true; // cancel any running animation\n\t\t\tlast_time = now();\n\t\t\tlast_value = new_value;\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t} else if (opts.soft) {\n\t\t\tconst rate = opts.soft === true ? .5 : +opts.soft;\n\t\t\tinv_mass_recovery_rate = 1 / (rate * 60);\n\t\t\tinv_mass = 0; // infinite mass, unaffected by spring forces\n\t\t}\n\n\t\tif (!task) {\n\t\t\tlast_time = now();\n\t\t\tcancel_task = false;\n\n\t\t\ttask = loop(now => {\n\n\t\t\t\tif (cancel_task) {\n\t\t\t\t\tcancel_task = false;\n\t\t\t\t\ttask = null;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tinv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1);\n\n\t\t\t\tconst ctx = {\n\t\t\t\t\tinv_mass,\n\t\t\t\t\topts: spring,\n\t\t\t\t\tsettled: true, // tick_spring may signal false\n\t\t\t\t\tdt: (now - last_time) * 60 / 1000\n\t\t\t\t};\n\t\t\t\tconst next_value = tick_spring(ctx, last_value, value, target_value);\n\n\t\t\t\tlast_time = now;\n\t\t\t\tlast_value = value;\n\t\t\t\tstore.set(value = next_value);\n\n\t\t\t\tif (ctx.settled) {\n\t\t\t\t\ttask = null;\n\t\t\t\t}\n\t\t\t\treturn !ctx.settled;\n\t\t\t});\n\t\t}\n\n\t\treturn new Promise(fulfil => {\n\t\t\ttask.promise.then(() => {\n\t\t\t\tif (token === current_token) fulfil();\n\t\t\t});\n\t\t});\n\t}\n\n\tconst spring = {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe,\n\t\tstiffness,\n\t\tdamping,\n\t\tprecision\n\t};\n\n\treturn spring;\n}\n\nfunction get_interpolator(a, b) {\n\tif (a === b || a !== a) return () => a;\n\n\tconst type = typeof a;\n\n\tif (type !== typeof b || Array.isArray(a) !== Array.isArray(b)) {\n\t\tthrow new Error('Cannot interpolate values of different type');\n\t}\n\n\tif (Array.isArray(a)) {\n\t\tconst arr = b.map((bi, i) => {\n\t\t\treturn get_interpolator(a[i], bi);\n\t\t});\n\n\t\treturn t => arr.map(fn => fn(t));\n\t}\n\n\tif (type === 'object') {\n\t\tif (!a || !b) throw new Error('Object cannot be null');\n\n\t\tif (is_date(a) && is_date(b)) {\n\t\t\ta = a.getTime();\n\t\t\tb = b.getTime();\n\t\t\tconst delta = b - a;\n\t\t\treturn t => new Date(a + t * delta);\n\t\t}\n\n\t\tconst keys = Object.keys(b);\n\t\tconst interpolators = {};\n\n\t\tkeys.forEach(key => {\n\t\t\tinterpolators[key] = get_interpolator(a[key], b[key]);\n\t\t});\n\n\t\treturn t => {\n\t\t\tconst result = {};\n\t\t\tkeys.forEach(key => {\n\t\t\t\tresult[key] = interpolators[key](t);\n\t\t\t});\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tif (type === 'number') {\n\t\tconst delta = b - a;\n\t\treturn t => a + t * delta;\n\t}\n\n\tthrow new Error(`Cannot interpolate ${type} values`);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction tweened(value, defaults = {}) {\n\tconst store = writable(value);\n\n\tlet task;\n\tlet target_value = value;\n\n\tfunction set(new_value, opts) {\n\t\tif (value == null) {\n\t\t\tstore.set(value = new_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\ttarget_value = new_value;\n\n\t\tlet previous_task = task;\n\t\tlet started = false;\n\n\t\tlet {\n\t\t\tdelay = 0,\n\t\t\tduration = 400,\n\t\t\teasing = linear,\n\t\t\tinterpolate = get_interpolator\n\t\t} = assign(assign({}, defaults), opts);\n\n\t\tif (duration === 0) {\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tconst start = now() + delay;\n\t\tlet fn;\n\n\t\ttask = loop(now => {\n\t\t\tif (now < start) return true;\n\n\t\t\tif (!started) {\n\t\t\t\tfn = interpolate(value, new_value);\n\t\t\t\tif (typeof duration === 'function') duration = duration(value, new_value);\n\t\t\t\tstarted = true;\n\t\t\t}\n\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tconst elapsed = now - start;\n\n\t\t\tif (elapsed > duration) {\n\t\t\t\tstore.set(value = new_value);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// @ts-ignore\n\t\t\tstore.set(value = fn(easing(elapsed / duration)));\n\t\t\treturn true;\n\t\t});\n\n\t\treturn task.promise;\n\t}\n\n\treturn {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe\n\t};\n}\n\nexport { spring, tweened };\n","\n\n' + (escaped ? _code : escape$1(_code, true)) + '
\\n';\n }\n\n return '' + (escaped ? _code : escape$1(_code, true)) + '
\\n';\n };\n\n _proto.blockquote = function blockquote(quote) {\n return '\\n' + quote + '\\n';\n };\n\n _proto.html = function html(_html) {\n return _html;\n };\n\n _proto.heading = function heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n return '
' + text + '
\\n';\n };\n\n _proto.table = function table(header, body) {\n if (body) body = '' + body + '';\n return '' + text + '
';\n };\n\n _proto.br = function br() {\n return this.options.xhtml ? 'An error occurred:
' + escape(e.message + '', true) + '';\n }\n\n throw e;\n }\n }\n /**\n * Options\n */\n\n\n marked.options = marked.setOptions = function (opt) {\n merge(marked.defaults, opt);\n changeDefaults(marked.defaults);\n return marked;\n };\n\n marked.getDefaults = getDefaults;\n marked.defaults = defaults;\n /**\n * Use Extension\n */\n\n marked.use = function (extension) {\n var opts = merge({}, extension);\n\n if (extension.renderer) {\n (function () {\n var renderer = marked.defaults.renderer || new Renderer_1();\n\n var _loop = function _loop(prop) {\n var prevRenderer = renderer[prop];\n\n renderer[prop] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var ret = extension.renderer[prop].apply(renderer, args);\n\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.renderer) {\n _loop(prop);\n }\n\n opts.renderer = renderer;\n })();\n }\n\n if (extension.tokenizer) {\n (function () {\n var tokenizer = marked.defaults.tokenizer || new Tokenizer_1();\n\n var _loop2 = function _loop2(prop) {\n var prevTokenizer = tokenizer[prop];\n\n tokenizer[prop] = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var ret = extension.tokenizer[prop].apply(tokenizer, args);\n\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.tokenizer) {\n _loop2(prop);\n }\n\n opts.tokenizer = tokenizer;\n })();\n }\n\n if (extension.walkTokens) {\n var walkTokens = marked.defaults.walkTokens;\n\n opts.walkTokens = function (token) {\n extension.walkTokens(token);\n\n if (walkTokens) {\n walkTokens(token);\n }\n };\n }\n\n marked.setOptions(opts);\n };\n /**\n * Run callback for every token\n */\n\n\n marked.walkTokens = function (tokens, callback) {\n for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {\n var token = _step.value;\n callback(token);\n\n switch (token.type) {\n case 'table':\n {\n for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) {\n var cell = _step2.value;\n marked.walkTokens(cell, callback);\n }\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) {\n var row = _step3.value;\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {\n var _cell = _step4.value;\n marked.walkTokens(_cell, callback);\n }\n }\n\n break;\n }\n\n case 'list':\n {\n marked.walkTokens(token.items, callback);\n break;\n }\n\n default:\n {\n if (token.tokens) {\n marked.walkTokens(token.tokens, callback);\n }\n }\n }\n }\n };\n /**\n * Parse Inline\n */\n\n\n marked.parseInline = function (src, opt) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked.parseInline(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked.parseInline(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n opt = merge({}, marked.defaults, opt || {});\n checkSanitizeDeprecation(opt);\n\n try {\n var tokens = Lexer_1.lexInline(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n\n return Parser_1.parseInline(tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '
An error occurred:
' + escape(e.message + '', true) + '';\n }\n\n throw e;\n }\n };\n /**\n * Expose\n */\n\n\n marked.Parser = Parser_1;\n marked.parser = Parser_1.parse;\n marked.Renderer = Renderer_1;\n marked.TextRenderer = TextRenderer_1;\n marked.Lexer = Lexer_1;\n marked.lexer = Lexer_1.lex;\n marked.Tokenizer = Tokenizer_1;\n marked.Slugger = Slugger_1;\n marked.parse = marked;\n var marked_1 = marked;\n\n return marked_1;\n\n})));\n","/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.DOMPurify = factory());\n}(this, function () { 'use strict';\n\n function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n\n var regExpTest = unapply(RegExp.prototype.test);\n\n var typeErrorCreate = unconstruct(TypeError);\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n\n /* Add properties to a lookup table */\n function addToSet(set, array) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = stringToLowerCase(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n\n /* Shallow clone an object */\n function clone(object) {\n var newObject = create(null);\n\n var property = void 0;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n\n var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\n var text = freeze(['#text']);\n\n var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n\n var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n\n var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n var MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n var ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html$$1) {\n return html$$1;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '2.2.8';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n Text = window.Text,\n Comment = window.Comment,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n\n\n var ElementPrototype = Element.prototype;\n\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';\n\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment;\n var importNode = originalDocument.importNode;\n\n\n var documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\n var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,\n ERB_EXPR$$1 = ERB_EXPR,\n DATA_ATTR$$1 = DATA_ATTR,\n ARIA_ATTR$$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n * `Node` is imported into the current `Document`. If this flag is not enabled the\n * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n * DOMPurify.\n *\n * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`\n * might cause XSS from attacks hidden in closed shadowroots in case the browser\n * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/\n */\n var RETURN_DOM_IMPORT = true;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n var RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks? */\n var SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);\n\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n var NAMESPACE = HTML_NAMESPACE;\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n NAMESPACE = cfg.NAMESPACE || NAMESPACE;\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html);\n addToSet(ALLOWED_ATTR, html$1);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl);\n addToSet(ALLOWED_ATTR, mathMl$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n var ALL_SVG_TAGS = addToSet({}, svg);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n\n var ALL_MATHML_TAGS = addToSet({}, mathMl);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via
`\n };\n\n const VuePlugin = {\n install(Vue) {\n Vue.component('highlightjs', Component);\n }\n };\n\n return { Component, VuePlugin };\n}\n\n/* plugin itself */\n\n/** @type {HLJSPlugin} */\nconst mergeHTMLPlugin = {\n \"after:highlightElement\": ({ el, result, text }) => {\n const originalStream = nodeStream(el);\n if (!originalStream.length) return;\n\n const resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n};\n\n/* Stream merging support functions */\n\n/**\n * @typedef Event\n * @property {'start'|'stop'} event\n * @property {number} offset\n * @property {Node} node\n */\n\n/**\n * @param {Node} node\n */\nfunction tag(node) {\n return node.nodeName.toLowerCase();\n}\n\n/**\n * @param {Node} node\n */\nfunction nodeStream(node) {\n /** @type Event[] */\n const result = [];\n (function _nodeStream(node, offset) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3) {\n offset += child.nodeValue.length;\n } else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n}\n\n/**\n * @param {any} original - the original stream\n * @param {any} highlighted - stream of the highlighted source\n * @param {string} value - the original source itself\n */\nfunction mergeStreams(original, highlighted, value) {\n let processed = 0;\n let result = '';\n const nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n /**\n * @param {Node} node\n */\n function open(node) {\n /** @param {Attr} attr */\n function attributeString(attr) {\n return ' ' + attr.nodeName + '=\"' + escapeHTML(attr.value) + '\"';\n }\n // @ts-ignore\n result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';\n }\n\n /**\n * @param {Node} node\n */\n function close(node) {\n result += '' + tag(node) + '>';\n }\n\n /**\n * @param {Event} event\n */\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n let stream = selectStream();\n result += escapeHTML(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escapeHTML(value.substr(processed));\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record blocks on a page\n *\n * @type {Function & {called?: boolean}}\n */\n // TODO: remove v12, deprecated\n const initHighlighting = () => {\n if (initHighlighting.called) return;\n initHighlighting.called = true;\n\n deprecated(\"10.6.0\", \"initHighlighting() is deprecated. Use highlightAll() instead.\");\n\n const blocks = document.querySelectorAll('pre code');\n blocks.forEach(highlightElement);\n };\n\n // Higlights all when DOMContentLoaded fires\n // TODO: remove v12, deprecated\n function initHighlightingOnLoad() {\n deprecated(\"10.6.0\", \"initHighlightingOnLoad() is deprecated. Use highlightAll() instead.\");\n wantsHighlight = true;\n }\n\n let wantsHighlight = false;\n\n /**\n * auto-highlights all pre>code elements on the page\n */\n function highlightAll() {\n // if we are called too early in the loading process\n if (document.readyState === \"loading\") {\n wantsHighlight = true;\n return;\n }\n\n const blocks = document.querySelectorAll('pre code');\n blocks.forEach(highlightElement);\n }\n\n function boot() {\n // if a highlight was requested before DOM was loaded, do now\n if (wantsHighlight) highlightAll();\n }\n\n // make sure we are in the browser environment\n if (typeof window !== 'undefined' && window.addEventListener) {\n window.addEventListener('DOMContentLoaded', boot, false);\n }\n\n /**\n * Register a language grammar module\n *\n * @param {string} languageName\n * @param {LanguageFn} languageDefinition\n */\n function registerLanguage(languageName, languageDefinition) {\n let lang = null;\n try {\n lang = languageDefinition(hljs);\n } catch (error$1) {\n error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n // hard or soft error\n if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n // languages that have serious errors are replaced with essentially a\n // \"plaintext\" stand-in so that the code blocks will still get normal\n // css classes applied to them - and one bad language won't break the\n // entire highlighter\n lang = PLAINTEXT_LANGUAGE;\n }\n // give it a temporary name if it doesn't have one in the meta-data\n if (!lang.name) lang.name = languageName;\n languages[languageName] = lang;\n lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n if (lang.aliases) {\n registerAliases(lang.aliases, { languageName });\n }\n }\n\n /**\n * Remove a language grammar module\n *\n * @param {string} languageName\n */\n function unregisterLanguage(languageName) {\n delete languages[languageName];\n for (const alias of Object.keys(aliases)) {\n if (aliases[alias] === languageName) {\n delete aliases[alias];\n }\n }\n }\n\n /**\n * @returns {string[]} List of language internal names\n */\n function listLanguages() {\n return Object.keys(languages);\n }\n\n /**\n intended usage: When one language truly requires another\n\n Unlike `getLanguage`, this will throw when the requested language\n is not available.\n\n @param {string} name - name of the language to fetch/require\n @returns {Language | never}\n */\n function requireLanguage(name) {\n deprecated(\"10.4.0\", \"requireLanguage will be removed entirely in v11.\");\n deprecated(\"10.4.0\", \"Please see https://github.com/highlightjs/highlight.js/pull/2844\");\n\n const lang = getLanguage(name);\n if (lang) { return lang; }\n\n const err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}', name));\n throw err;\n }\n\n /**\n * @param {string} name - name of the language to retrieve\n * @returns {Language | undefined}\n */\n function getLanguage(name) {\n name = (name || '').toLowerCase();\n return languages[name] || languages[aliases[name]];\n }\n\n /**\n *\n * @param {string|string[]} aliasList - single alias or list of aliases\n * @param {{languageName: string}} opts\n */\n function registerAliases(aliasList, { languageName }) {\n if (typeof aliasList === 'string') {\n aliasList = [aliasList];\n }\n aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n }\n\n /**\n * Determines if a given language has auto-detection enabled\n * @param {string} name - name of the language\n */\n function autoDetection(name) {\n const lang = getLanguage(name);\n return lang && !lang.disableAutodetect;\n }\n\n /**\n * Upgrades the old highlightBlock plugins to the new\n * highlightElement API\n * @param {HLJSPlugin} plugin\n */\n function upgradePluginAPI(plugin) {\n // TODO: remove with v12\n if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n plugin[\"before:highlightElement\"] = (data) => {\n plugin[\"before:highlightBlock\"](\n Object.assign({ block: data.el }, data)\n );\n };\n }\n if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n plugin[\"after:highlightElement\"] = (data) => {\n plugin[\"after:highlightBlock\"](\n Object.assign({ block: data.el }, data)\n );\n };\n }\n }\n\n /**\n * @param {HLJSPlugin} plugin\n */\n function addPlugin(plugin) {\n upgradePluginAPI(plugin);\n plugins.push(plugin);\n }\n\n /**\n *\n * @param {PluginEvent} event\n * @param {any} args\n */\n function fire(event, args) {\n const cb = event;\n plugins.forEach(function(plugin) {\n if (plugin[cb]) {\n plugin[cb](args);\n }\n });\n }\n\n /**\n Note: fixMarkup is deprecated and will be removed entirely in v11\n\n @param {string} arg\n @returns {string}\n */\n function deprecateFixMarkup(arg) {\n deprecated(\"10.2.0\", \"fixMarkup will be removed entirely in v11.0\");\n deprecated(\"10.2.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2534\");\n\n return fixMarkup(arg);\n }\n\n /**\n *\n * @param {HighlightedHTMLElement} el\n */\n function deprecateHighlightBlock(el) {\n deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n return highlightElement(el);\n }\n\n /* Interface definition */\n Object.assign(hljs, {\n highlight,\n highlightAuto,\n highlightAll,\n fixMarkup: deprecateFixMarkup,\n highlightElement,\n // TODO: Remove with v12 API\n highlightBlock: deprecateHighlightBlock,\n configure,\n initHighlighting,\n initHighlightingOnLoad,\n registerLanguage,\n unregisterLanguage,\n listLanguages,\n getLanguage,\n registerAliases,\n requireLanguage,\n autoDetection,\n inherit: inherit$1,\n addPlugin,\n // plugins for frameworks\n vuePlugin: BuildVuePlugin(hljs).VuePlugin\n });\n\n hljs.debugMode = function() { SAFE_MODE = false; };\n hljs.safeMode = function() { SAFE_MODE = true; };\n hljs.versionString = version;\n\n for (const key in MODES) {\n // @ts-ignore\n if (typeof MODES[key] === \"object\") {\n // @ts-ignore\n deepFreezeEs6(MODES[key]);\n }\n }\n\n // merge all the modes/regexs into our main object\n Object.assign(hljs, MODES);\n\n // built-in plugins, likely to be moved out of core in the future\n hljs.addPlugin(brPlugin); // slated to be removed in v11\n hljs.addPlugin(mergeHTMLPlugin);\n hljs.addPlugin(tabReplacePlugin);\n return hljs;\n};\n\n// export an \"instance\" of the highlighter\nvar highlight = HLJS({});\n\nmodule.exports = highlight;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n return concat('(?=', re, ')');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/*\nLanguage: Python\nDescription: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.\nWebsite: https://www.python.org\nCategory: common\n*/\n\nfunction python(hljs) {\n const RESERVED_WORDS = [\n 'and',\n 'as',\n 'assert',\n 'async',\n 'await',\n 'break',\n 'class',\n 'continue',\n 'def',\n 'del',\n 'elif',\n 'else',\n 'except',\n 'finally',\n 'for',\n 'from',\n 'global',\n 'if',\n 'import',\n 'in',\n 'is',\n 'lambda',\n 'nonlocal|10',\n 'not',\n 'or',\n 'pass',\n 'raise',\n 'return',\n 'try',\n 'while',\n 'with',\n 'yield'\n ];\n\n const BUILT_INS = [\n '__import__',\n 'abs',\n 'all',\n 'any',\n 'ascii',\n 'bin',\n 'bool',\n 'breakpoint',\n 'bytearray',\n 'bytes',\n 'callable',\n 'chr',\n 'classmethod',\n 'compile',\n 'complex',\n 'delattr',\n 'dict',\n 'dir',\n 'divmod',\n 'enumerate',\n 'eval',\n 'exec',\n 'filter',\n 'float',\n 'format',\n 'frozenset',\n 'getattr',\n 'globals',\n 'hasattr',\n 'hash',\n 'help',\n 'hex',\n 'id',\n 'input',\n 'int',\n 'isinstance',\n 'issubclass',\n 'iter',\n 'len',\n 'list',\n 'locals',\n 'map',\n 'max',\n 'memoryview',\n 'min',\n 'next',\n 'object',\n 'oct',\n 'open',\n 'ord',\n 'pow',\n 'print',\n 'property',\n 'range',\n 'repr',\n 'reversed',\n 'round',\n 'set',\n 'setattr',\n 'slice',\n 'sorted',\n 'staticmethod',\n 'str',\n 'sum',\n 'super',\n 'tuple',\n 'type',\n 'vars',\n 'zip'\n ];\n\n const LITERALS = [\n '__debug__',\n 'Ellipsis',\n 'False',\n 'None',\n 'NotImplemented',\n 'True'\n ];\n\n // https://docs.python.org/3/library/typing.html\n // TODO: Could these be supplemented by a CamelCase matcher in certain\n // contexts, leaving these remaining only for relevance hinting?\n const TYPES = [\n \"Any\",\n \"Callable\",\n \"Coroutine\",\n \"Dict\",\n \"List\",\n \"Literal\",\n \"Generic\",\n \"Optional\",\n \"Sequence\",\n \"Set\",\n \"Tuple\",\n \"Type\",\n \"Union\"\n ];\n\n const KEYWORDS = {\n $pattern: /[A-Za-z]\\w+|__\\w+__/,\n keyword: RESERVED_WORDS,\n built_in: BUILT_INS,\n literal: LITERALS,\n type: TYPES\n };\n\n const PROMPT = {\n className: 'meta',\n begin: /^(>>>|\\.\\.\\.) /\n };\n\n const SUBST = {\n className: 'subst',\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS,\n illegal: /#/\n };\n\n const LITERAL_BRACKET = {\n begin: /\\{\\{/,\n relevance: 0\n };\n\n const STRING = {\n className: 'string',\n contains: [ hljs.BACKSLASH_ESCAPE ],\n variants: [\n {\n begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,\n end: /'''/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT\n ],\n relevance: 10\n },\n {\n begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?\"\"\"/,\n end: /\"\"\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT\n ],\n relevance: 10\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])'''/,\n end: /'''/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])\"\"\"/,\n end: /\"\"\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n {\n begin: /([uU]|[rR])'/,\n end: /'/,\n relevance: 10\n },\n {\n begin: /([uU]|[rR])\"/,\n end: /\"/,\n relevance: 10\n },\n {\n begin: /([bB]|[bB][rR]|[rR][bB])'/,\n end: /'/\n },\n {\n begin: /([bB]|[bB][rR]|[rR][bB])\"/,\n end: /\"/\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])'/,\n end: /'/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])\"/,\n end: /\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE\n ]\n };\n\n // https://docs.python.org/3.9/reference/lexical_analysis.html#numeric-literals\n const digitpart = '[0-9](_?[0-9])*';\n const pointfloat = `(\\\\b(${digitpart}))?\\\\.(${digitpart})|\\\\b(${digitpart})\\\\.`;\n const NUMBER = {\n className: 'number',\n relevance: 0,\n variants: [\n // exponentfloat, pointfloat\n // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals\n // optionally imaginary\n // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n // Note: no leading \\b because floats can start with a decimal point\n // and we don't want to mishandle e.g. `fn(.5)`,\n // no trailing \\b for pointfloat because it can end with a decimal point\n // and we don't want to mishandle e.g. `0..hex()`; this should be safe\n // because both MUST contain a decimal point and so cannot be confused with\n // the interior part of an identifier\n {\n begin: `(\\\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?\\\\b`\n },\n {\n begin: `(${pointfloat})[jJ]?`\n },\n\n // decinteger, bininteger, octinteger, hexinteger\n // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals\n // optionally \"long\" in Python 2\n // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals\n // decinteger is optionally imaginary\n // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n {\n begin: '\\\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\\\b'\n },\n {\n begin: '\\\\b0[bB](_?[01])+[lL]?\\\\b'\n },\n {\n begin: '\\\\b0[oO](_?[0-7])+[lL]?\\\\b'\n },\n {\n begin: '\\\\b0[xX](_?[0-9a-fA-F])+[lL]?\\\\b'\n },\n\n // imagnumber (digitpart-based)\n // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n {\n begin: `\\\\b(${digitpart})[jJ]\\\\b`\n }\n ]\n };\n const COMMENT_TYPE = {\n className: \"comment\",\n begin: lookahead(/# type:/),\n end: /$/,\n keywords: KEYWORDS,\n contains: [\n { // prevent keywords from coloring `type`\n begin: /# type:/\n },\n // comment within a datatype comment includes no keywords\n {\n begin: /#/,\n end: /\\b\\B/,\n endsWithParent: true\n }\n ]\n };\n const PARAMS = {\n className: 'params',\n variants: [\n // Exclude params in functions without params\n {\n className: \"\",\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n contains: [\n 'self',\n PROMPT,\n NUMBER,\n STRING,\n hljs.HASH_COMMENT_MODE\n ]\n }\n ]\n };\n SUBST.contains = [\n STRING,\n NUMBER,\n PROMPT\n ];\n\n return {\n name: 'Python',\n aliases: [\n 'py',\n 'gyp',\n 'ipython'\n ],\n keywords: KEYWORDS,\n illegal: /(<\\/|->|\\?)|=>/,\n contains: [\n PROMPT,\n NUMBER,\n {\n // very common convention\n begin: /\\bself\\b/\n },\n {\n // eat \"if\" prior to string so that it won't accidentally be\n // labeled as an f-string\n beginKeywords: \"if\",\n relevance: 0\n },\n STRING,\n COMMENT_TYPE,\n hljs.HASH_COMMENT_MODE,\n {\n variants: [\n {\n className: 'function',\n beginKeywords: 'def'\n },\n {\n className: 'class',\n beginKeywords: 'class'\n }\n ],\n end: /:/,\n illegal: /[${=;\\n,]/,\n contains: [\n hljs.UNDERSCORE_TITLE_MODE,\n PARAMS,\n {\n begin: /->/,\n endsWithParent: true,\n keywords: KEYWORDS\n }\n ]\n },\n {\n className: 'meta',\n begin: /^[\\t ]*@/,\n end: /(?=#)|$/,\n contains: [\n NUMBER,\n PARAMS,\n STRING\n ]\n }\n ]\n };\n}\n\nmodule.exports = python;\n","/*\nLanguage: Plain text\nAuthor: Egor Rogov (e.rogov@postgrespro.ru)\nDescription: Plain text without any highlighting.\nCategory: common\n*/\n\nfunction plaintext(hljs) {\n return {\n name: 'Plain text',\n aliases: [\n 'text',\n 'txt'\n ],\n disableAutodetect: true\n };\n}\n\nmodule.exports = plaintext;\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toArray(arr) {\n return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function () {};\n\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = o[Symbol.iterator]();\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nvar Char = {\n ANCHOR: '&',\n COMMENT: '#',\n TAG: '!',\n DIRECTIVES_END: '-',\n DOCUMENT_END: '.'\n};\nvar Type = {\n ALIAS: 'ALIAS',\n BLANK_LINE: 'BLANK_LINE',\n BLOCK_FOLDED: 'BLOCK_FOLDED',\n BLOCK_LITERAL: 'BLOCK_LITERAL',\n COMMENT: 'COMMENT',\n DIRECTIVE: 'DIRECTIVE',\n DOCUMENT: 'DOCUMENT',\n FLOW_MAP: 'FLOW_MAP',\n FLOW_SEQ: 'FLOW_SEQ',\n MAP: 'MAP',\n MAP_KEY: 'MAP_KEY',\n MAP_VALUE: 'MAP_VALUE',\n PLAIN: 'PLAIN',\n QUOTE_DOUBLE: 'QUOTE_DOUBLE',\n QUOTE_SINGLE: 'QUOTE_SINGLE',\n SEQ: 'SEQ',\n SEQ_ITEM: 'SEQ_ITEM'\n};\nvar defaultTagPrefix = 'tag:yaml.org,2002:';\nvar defaultTags = {\n MAP: 'tag:yaml.org,2002:map',\n SEQ: 'tag:yaml.org,2002:seq',\n STR: 'tag:yaml.org,2002:str'\n};\n\nfunction findLineStarts(src) {\n var ls = [0];\n var offset = src.indexOf('\\n');\n\n while (offset !== -1) {\n offset += 1;\n ls.push(offset);\n offset = src.indexOf('\\n', offset);\n }\n\n return ls;\n}\n\nfunction getSrcInfo(cst) {\n var lineStarts, src;\n\n if (typeof cst === 'string') {\n lineStarts = findLineStarts(cst);\n src = cst;\n } else {\n if (Array.isArray(cst)) cst = cst[0];\n\n if (cst && cst.context) {\n if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src);\n lineStarts = cst.lineStarts;\n src = cst.context.src;\n }\n }\n\n return {\n lineStarts: lineStarts,\n src: src\n };\n}\n/**\n * @typedef {Object} LinePos - One-indexed position in the source\n * @property {number} line\n * @property {number} col\n */\n\n/**\n * Determine the line/col position matching a character offset.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns a one-indexed `{ line, col }` location if found, or\n * `undefined` otherwise.\n *\n * @param {number} offset\n * @param {string|Document|Document[]} cst\n * @returns {?LinePos}\n */\n\n\nfunction getLinePos(offset, cst) {\n if (typeof offset !== 'number' || offset < 0) return null;\n\n var _getSrcInfo = getSrcInfo(cst),\n lineStarts = _getSrcInfo.lineStarts,\n src = _getSrcInfo.src;\n\n if (!lineStarts || !src || offset > src.length) return null;\n\n for (var i = 0; i < lineStarts.length; ++i) {\n var start = lineStarts[i];\n\n if (offset < start) {\n return {\n line: i,\n col: offset - lineStarts[i - 1] + 1\n };\n }\n\n if (offset === start) return {\n line: i + 1,\n col: 1\n };\n }\n\n var line = lineStarts.length;\n return {\n line: line,\n col: offset - lineStarts[line - 1] + 1\n };\n}\n/**\n * Get a specified line from the source.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns the line as a string if found, or `null` otherwise.\n *\n * @param {number} line One-indexed line number\n * @param {string|Document|Document[]} cst\n * @returns {?string}\n */\n\nfunction getLine(line, cst) {\n var _getSrcInfo2 = getSrcInfo(cst),\n lineStarts = _getSrcInfo2.lineStarts,\n src = _getSrcInfo2.src;\n\n if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;\n var start = lineStarts[line - 1];\n var end = lineStarts[line]; // undefined for last line; that's ok for slice()\n\n while (end && end > start && src[end - 1] === '\\n') {\n --end;\n }\n\n return src.slice(start, end);\n}\n/**\n * Pretty-print the starting line from the source indicated by the range `pos`\n *\n * Trims output to `maxWidth` chars while keeping the starting column visible,\n * using `…` at either end to indicate dropped characters.\n *\n * Returns a two-line string (or `null`) with `\\n` as separator; the second line\n * will hold appropriately indented `^` marks indicating the column range.\n *\n * @param {Object} pos\n * @param {LinePos} pos.start\n * @param {LinePos} [pos.end]\n * @param {string|Document|Document[]*} cst\n * @param {number} [maxWidth=80]\n * @returns {?string}\n */\n\nfunction getPrettyContext(_ref, cst) {\n var start = _ref.start,\n end = _ref.end;\n var maxWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 80;\n var src = getLine(start.line, cst);\n if (!src) return null;\n var col = start.col;\n\n if (src.length > maxWidth) {\n if (col <= maxWidth - 10) {\n src = src.substr(0, maxWidth - 1) + '…';\n } else {\n var halfWidth = Math.round(maxWidth / 2);\n if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + '…';\n col -= src.length - maxWidth;\n src = '…' + src.substr(1 - maxWidth);\n }\n }\n\n var errLen = 1;\n var errEnd = '';\n\n if (end) {\n if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) {\n errLen = end.col - start.col;\n } else {\n errLen = Math.min(src.length + 1, maxWidth) - col;\n errEnd = '…';\n }\n }\n\n var offset = col > 1 ? ' '.repeat(col - 1) : '';\n var err = '^'.repeat(errLen);\n return \"\".concat(src, \"\\n\").concat(offset).concat(err).concat(errEnd);\n}\n\nvar Range = /*#__PURE__*/function () {\n function Range(start, end) {\n _classCallCheck(this, Range);\n\n this.start = start;\n this.end = end || start;\n }\n\n _createClass(Range, [{\n key: \"isEmpty\",\n value: function isEmpty() {\n return typeof this.start !== 'number' || !this.end || this.end <= this.start;\n }\n /**\n * Set `origStart` and `origEnd` to point to the original source range for\n * this node, which may differ due to dropped CR characters.\n *\n * @param {number[]} cr - Positions of dropped CR characters\n * @param {number} offset - Starting index of `cr` from the last call\n * @returns {number} - The next offset, matching the one found for `origStart`\n */\n\n }, {\n key: \"setOrigRange\",\n value: function setOrigRange(cr, offset) {\n var start = this.start,\n end = this.end;\n\n if (cr.length === 0 || end <= cr[0]) {\n this.origStart = start;\n this.origEnd = end;\n return offset;\n }\n\n var i = offset;\n\n while (i < cr.length) {\n if (cr[i] > start) break;else ++i;\n }\n\n this.origStart = start + i;\n var nextOffset = i;\n\n while (i < cr.length) {\n // if end was at \\n, it should now be at \\r\n if (cr[i] >= end) break;else ++i;\n }\n\n this.origEnd = end + i;\n return nextOffset;\n }\n }], [{\n key: \"copy\",\n value: function copy(orig) {\n return new Range(orig.start, orig.end);\n }\n }]);\n\n return Range;\n}();\n\n/** Root class of all nodes */\n\nvar Node = /*#__PURE__*/function () {\n function Node(type, props, context) {\n _classCallCheck(this, Node);\n\n Object.defineProperty(this, 'context', {\n value: context || null,\n writable: true\n });\n this.error = null;\n this.range = null;\n this.valueRange = null;\n this.props = props || [];\n this.type = type;\n this.value = null;\n }\n\n _createClass(Node, [{\n key: \"getPropValue\",\n value: function getPropValue(idx, key, skipKey) {\n if (!this.context) return null;\n var src = this.context.src;\n var prop = this.props[idx];\n return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;\n }\n }, {\n key: \"anchor\",\n get: function get() {\n for (var i = 0; i < this.props.length; ++i) {\n var anchor = this.getPropValue(i, Char.ANCHOR, true);\n if (anchor != null) return anchor;\n }\n\n return null;\n }\n }, {\n key: \"comment\",\n get: function get() {\n var comments = [];\n\n for (var i = 0; i < this.props.length; ++i) {\n var comment = this.getPropValue(i, Char.COMMENT, true);\n if (comment != null) comments.push(comment);\n }\n\n return comments.length > 0 ? comments.join('\\n') : null;\n }\n }, {\n key: \"commentHasRequiredWhitespace\",\n value: function commentHasRequiredWhitespace(start) {\n var src = this.context.src;\n if (this.header && start === this.header.end) return false;\n if (!this.valueRange) return false;\n var end = this.valueRange.end;\n return start !== end || Node.atBlank(src, end - 1);\n }\n }, {\n key: \"hasComment\",\n get: function get() {\n if (this.context) {\n var src = this.context.src;\n\n for (var i = 0; i < this.props.length; ++i) {\n if (src[this.props[i].start] === Char.COMMENT) return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"hasProps\",\n get: function get() {\n if (this.context) {\n var src = this.context.src;\n\n for (var i = 0; i < this.props.length; ++i) {\n if (src[this.props[i].start] !== Char.COMMENT) return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"includesTrailingLines\",\n get: function get() {\n return false;\n }\n }, {\n key: \"jsonLike\",\n get: function get() {\n var jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE];\n return jsonLikeTypes.indexOf(this.type) !== -1;\n }\n }, {\n key: \"rangeAsLinePos\",\n get: function get() {\n if (!this.range || !this.context) return undefined;\n var start = getLinePos(this.range.start, this.context.root);\n if (!start) return undefined;\n var end = getLinePos(this.range.end, this.context.root);\n return {\n start: start,\n end: end\n };\n }\n }, {\n key: \"rawValue\",\n get: function get() {\n if (!this.valueRange || !this.context) return null;\n var _this$valueRange = this.valueRange,\n start = _this$valueRange.start,\n end = _this$valueRange.end;\n return this.context.src.slice(start, end);\n }\n }, {\n key: \"tag\",\n get: function get() {\n for (var i = 0; i < this.props.length; ++i) {\n var tag = this.getPropValue(i, Char.TAG, false);\n\n if (tag != null) {\n if (tag[1] === '<') {\n return {\n verbatim: tag.slice(2, -1)\n };\n } else {\n // eslint-disable-next-line no-unused-vars\n var _tag$match = tag.match(/^(.*!)([^!]*)$/),\n _tag$match2 = _slicedToArray(_tag$match, 3);\n _tag$match2[0];\n var handle = _tag$match2[1],\n suffix = _tag$match2[2];\n\n return {\n handle: handle,\n suffix: suffix\n };\n }\n }\n }\n\n return null;\n }\n }, {\n key: \"valueRangeContainsNewline\",\n get: function get() {\n if (!this.valueRange || !this.context) return false;\n var _this$valueRange2 = this.valueRange,\n start = _this$valueRange2.start,\n end = _this$valueRange2.end;\n var src = this.context.src;\n\n for (var i = start; i < end; ++i) {\n if (src[i] === '\\n') return true;\n }\n\n return false;\n }\n }, {\n key: \"parseComment\",\n value: function parseComment(start) {\n var src = this.context.src;\n\n if (src[start] === Char.COMMENT) {\n var end = Node.endOfLine(src, start + 1);\n var commentRange = new Range(start, end);\n this.props.push(commentRange);\n return end;\n }\n\n return start;\n }\n /**\n * Populates the `origStart` and `origEnd` values of all ranges for this\n * node. Extended by child classes to handle descendant nodes.\n *\n * @param {number[]} cr - Positions of dropped CR characters\n * @param {number} offset - Starting index of `cr` from the last call\n * @returns {number} - The next offset, matching the one found for `origStart`\n */\n\n }, {\n key: \"setOrigRanges\",\n value: function setOrigRanges(cr, offset) {\n if (this.range) offset = this.range.setOrigRange(cr, offset);\n if (this.valueRange) this.valueRange.setOrigRange(cr, offset);\n this.props.forEach(function (prop) {\n return prop.setOrigRange(cr, offset);\n });\n return offset;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var src = this.context.src,\n range = this.range,\n value = this.value;\n if (value != null) return value;\n var str = src.slice(range.start, range.end);\n return Node.addStringTerminator(src, range.end, str);\n }\n }], [{\n key: \"addStringTerminator\",\n value: function addStringTerminator(src, offset, str) {\n if (str[str.length - 1] === '\\n') return str;\n var next = Node.endOfWhiteSpace(src, offset);\n return next >= src.length || src[next] === '\\n' ? str + '\\n' : str;\n } // ^(---|...)\n\n }, {\n key: \"atDocumentBoundary\",\n value: function atDocumentBoundary(src, offset, sep) {\n var ch0 = src[offset];\n if (!ch0) return true;\n var prev = src[offset - 1];\n if (prev && prev !== '\\n') return false;\n\n if (sep) {\n if (ch0 !== sep) return false;\n } else {\n if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false;\n }\n\n var ch1 = src[offset + 1];\n var ch2 = src[offset + 2];\n if (ch1 !== ch0 || ch2 !== ch0) return false;\n var ch3 = src[offset + 3];\n return !ch3 || ch3 === '\\n' || ch3 === '\\t' || ch3 === ' ';\n }\n }, {\n key: \"endOfIdentifier\",\n value: function endOfIdentifier(src, offset) {\n var ch = src[offset];\n var isVerbatim = ch === '<';\n var notOk = isVerbatim ? ['\\n', '\\t', ' ', '>'] : ['\\n', '\\t', ' ', '[', ']', '{', '}', ','];\n\n while (ch && notOk.indexOf(ch) === -1) {\n ch = src[offset += 1];\n }\n\n if (isVerbatim && ch === '>') offset += 1;\n return offset;\n }\n }, {\n key: \"endOfIndent\",\n value: function endOfIndent(src, offset) {\n var ch = src[offset];\n\n while (ch === ' ') {\n ch = src[offset += 1];\n }\n\n return offset;\n }\n }, {\n key: \"endOfLine\",\n value: function endOfLine(src, offset) {\n var ch = src[offset];\n\n while (ch && ch !== '\\n') {\n ch = src[offset += 1];\n }\n\n return offset;\n }\n }, {\n key: \"endOfWhiteSpace\",\n value: function endOfWhiteSpace(src, offset) {\n var ch = src[offset];\n\n while (ch === '\\t' || ch === ' ') {\n ch = src[offset += 1];\n }\n\n return offset;\n }\n }, {\n key: \"startOfLine\",\n value: function startOfLine(src, offset) {\n var ch = src[offset - 1];\n if (ch === '\\n') return offset;\n\n while (ch && ch !== '\\n') {\n ch = src[offset -= 1];\n }\n\n return offset + 1;\n }\n /**\n * End of indentation, or null if the line's indent level is not more\n * than `indent`\n *\n * @param {string} src\n * @param {number} indent\n * @param {number} lineStart\n * @returns {?number}\n */\n\n }, {\n key: \"endOfBlockIndent\",\n value: function endOfBlockIndent(src, indent, lineStart) {\n var inEnd = Node.endOfIndent(src, lineStart);\n\n if (inEnd > lineStart + indent) {\n return inEnd;\n } else {\n var wsEnd = Node.endOfWhiteSpace(src, inEnd);\n var ch = src[wsEnd];\n if (!ch || ch === '\\n') return wsEnd;\n }\n\n return null;\n }\n }, {\n key: \"atBlank\",\n value: function atBlank(src, offset, endAsBlank) {\n var ch = src[offset];\n return ch === '\\n' || ch === '\\t' || ch === ' ' || endAsBlank && !ch;\n }\n }, {\n key: \"nextNodeIsIndented\",\n value: function nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) {\n if (!ch || indentDiff < 0) return false;\n if (indentDiff > 0) return true;\n return indicatorAsIndent && ch === '-';\n } // should be at line or string end, or at next non-whitespace char\n\n }, {\n key: \"normalizeOffset\",\n value: function normalizeOffset(src, offset) {\n var ch = src[offset];\n return !ch ? offset : ch !== '\\n' && src[offset - 1] === '\\n' ? offset - 1 : Node.endOfWhiteSpace(src, offset);\n } // fold single newline into space, multiple newlines to N - 1 newlines\n // presumes src[offset] === '\\n'\n\n }, {\n key: \"foldNewline\",\n value: function foldNewline(src, offset, indent) {\n var inCount = 0;\n var error = false;\n var fold = '';\n var ch = src[offset + 1];\n\n while (ch === ' ' || ch === '\\t' || ch === '\\n') {\n switch (ch) {\n case '\\n':\n inCount = 0;\n offset += 1;\n fold += '\\n';\n break;\n\n case '\\t':\n if (inCount <= indent) error = true;\n offset = Node.endOfWhiteSpace(src, offset + 2) - 1;\n break;\n\n case ' ':\n inCount += 1;\n offset += 1;\n break;\n }\n\n ch = src[offset + 1];\n }\n\n if (!fold) fold = ' ';\n if (ch && inCount <= indent) error = true;\n return {\n fold: fold,\n offset: offset,\n error: error\n };\n }\n }]);\n\n return Node;\n}();\n\nvar YAMLError = /*#__PURE__*/function (_Error) {\n _inherits(YAMLError, _Error);\n\n var _super = _createSuper(YAMLError);\n\n function YAMLError(name, source, message) {\n var _this;\n\n _classCallCheck(this, YAMLError);\n\n if (!message || !(source instanceof Node)) throw new Error(\"Invalid arguments for new \".concat(name));\n _this = _super.call(this);\n _this.name = name;\n _this.message = message;\n _this.source = source;\n return _this;\n }\n\n _createClass(YAMLError, [{\n key: \"makePretty\",\n value: function makePretty() {\n if (!this.source) return;\n this.nodeType = this.source.type;\n var cst = this.source.context && this.source.context.root;\n\n if (typeof this.offset === 'number') {\n this.range = new Range(this.offset, this.offset + 1);\n var start = cst && getLinePos(this.offset, cst);\n\n if (start) {\n var end = {\n line: start.line,\n col: start.col + 1\n };\n this.linePos = {\n start: start,\n end: end\n };\n }\n\n delete this.offset;\n } else {\n this.range = this.source.range;\n this.linePos = this.source.rangeAsLinePos;\n }\n\n if (this.linePos) {\n var _this$linePos$start = this.linePos.start,\n line = _this$linePos$start.line,\n col = _this$linePos$start.col;\n this.message += \" at line \".concat(line, \", column \").concat(col);\n var ctx = cst && getPrettyContext(this.linePos, cst);\n if (ctx) this.message += \":\\n\\n\".concat(ctx, \"\\n\");\n }\n\n delete this.source;\n }\n }]);\n\n return YAMLError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nvar YAMLReferenceError = /*#__PURE__*/function (_YAMLError) {\n _inherits(YAMLReferenceError, _YAMLError);\n\n var _super2 = _createSuper(YAMLReferenceError);\n\n function YAMLReferenceError(source, message) {\n _classCallCheck(this, YAMLReferenceError);\n\n return _super2.call(this, 'YAMLReferenceError', source, message);\n }\n\n return YAMLReferenceError;\n}(YAMLError);\nvar YAMLSemanticError = /*#__PURE__*/function (_YAMLError2) {\n _inherits(YAMLSemanticError, _YAMLError2);\n\n var _super3 = _createSuper(YAMLSemanticError);\n\n function YAMLSemanticError(source, message) {\n _classCallCheck(this, YAMLSemanticError);\n\n return _super3.call(this, 'YAMLSemanticError', source, message);\n }\n\n return YAMLSemanticError;\n}(YAMLError);\nvar YAMLSyntaxError = /*#__PURE__*/function (_YAMLError3) {\n _inherits(YAMLSyntaxError, _YAMLError3);\n\n var _super4 = _createSuper(YAMLSyntaxError);\n\n function YAMLSyntaxError(source, message) {\n _classCallCheck(this, YAMLSyntaxError);\n\n return _super4.call(this, 'YAMLSyntaxError', source, message);\n }\n\n return YAMLSyntaxError;\n}(YAMLError);\nvar YAMLWarning = /*#__PURE__*/function (_YAMLError4) {\n _inherits(YAMLWarning, _YAMLError4);\n\n var _super5 = _createSuper(YAMLWarning);\n\n function YAMLWarning(source, message) {\n _classCallCheck(this, YAMLWarning);\n\n return _super5.call(this, 'YAMLWarning', source, message);\n }\n\n return YAMLWarning;\n}(YAMLError);\n\nvar PlainValue = /*#__PURE__*/function (_Node) {\n _inherits(PlainValue, _Node);\n\n var _super = _createSuper(PlainValue);\n\n function PlainValue() {\n _classCallCheck(this, PlainValue);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PlainValue, [{\n key: \"strValue\",\n get: function get() {\n if (!this.valueRange || !this.context) return null;\n var _this$valueRange = this.valueRange,\n start = _this$valueRange.start,\n end = _this$valueRange.end;\n var src = this.context.src;\n var ch = src[end - 1];\n\n while (start < end && (ch === '\\n' || ch === '\\t' || ch === ' ')) {\n ch = src[--end - 1];\n }\n\n var str = '';\n\n for (var i = start; i < end; ++i) {\n var _ch = src[i];\n\n if (_ch === '\\n') {\n var _Node$foldNewline = Node.foldNewline(src, i, -1),\n fold = _Node$foldNewline.fold,\n offset = _Node$foldNewline.offset;\n\n str += fold;\n i = offset;\n } else if (_ch === ' ' || _ch === '\\t') {\n // trim trailing whitespace\n var wsStart = i;\n var next = src[i + 1];\n\n while (i < end && (next === ' ' || next === '\\t')) {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : _ch;\n } else {\n str += _ch;\n }\n }\n\n var ch0 = src[start];\n\n switch (ch0) {\n case '\\t':\n {\n var msg = 'Plain value cannot start with a tab character';\n var errors = [new YAMLSemanticError(this, msg)];\n return {\n errors: errors,\n str: str\n };\n }\n\n case '@':\n case '`':\n {\n var _msg = \"Plain value cannot start with reserved character \".concat(ch0);\n\n var _errors = [new YAMLSemanticError(this, _msg)];\n return {\n errors: _errors,\n str: str\n };\n }\n\n default:\n return str;\n }\n }\n }, {\n key: \"parseBlockValue\",\n value: function parseBlockValue(start) {\n var _this$context = this.context,\n indent = _this$context.indent,\n inFlow = _this$context.inFlow,\n src = _this$context.src;\n var offset = start;\n var valueEnd = start;\n\n for (var ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n if (Node.atDocumentBoundary(src, offset + 1)) break;\n var end = Node.endOfBlockIndent(src, indent, offset + 1);\n if (end === null || src[end] === '#') break;\n\n if (src[end] === '\\n') {\n offset = end;\n } else {\n valueEnd = PlainValue.endOfLine(src, end, inFlow);\n offset = valueEnd;\n }\n }\n\n if (this.valueRange.isEmpty()) this.valueRange.start = start;\n this.valueRange.end = valueEnd;\n return valueEnd;\n }\n /**\n * Parses a plain value from the source\n *\n * Accepted forms are:\n * ```\n * #comment\n *\n * first line\n *\n * first line #comment\n *\n * first line\n * block\n * lines\n *\n * #comment\n * block\n * lines\n * ```\n * where block lines are empty or have an indent level greater than `indent`.\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar, may be `\\n`\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var inFlow = context.inFlow,\n src = context.src;\n var offset = start;\n var ch = src[offset];\n\n if (ch && ch !== '#' && ch !== '\\n') {\n offset = PlainValue.endOfLine(src, start, inFlow);\n }\n\n this.valueRange = new Range(start, offset);\n offset = Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n\n if (!this.hasComment || this.valueRange.isEmpty()) {\n offset = this.parseBlockValue(offset);\n }\n\n return offset;\n }\n }], [{\n key: \"endOfLine\",\n value: function endOfLine(src, start, inFlow) {\n var ch = src[start];\n var offset = start;\n\n while (ch && ch !== '\\n') {\n if (inFlow && (ch === '[' || ch === ']' || ch === '{' || ch === '}' || ch === ',')) break;\n var next = src[offset + 1];\n if (ch === ':' && (!next || next === '\\n' || next === '\\t' || next === ' ' || inFlow && next === ',')) break;\n if ((ch === ' ' || ch === '\\t') && next === '#') break;\n offset += 1;\n ch = next;\n }\n\n return offset;\n }\n }]);\n\n return PlainValue;\n}(Node);\n\nexport { Char as C, Node as N, PlainValue as P, Range as R, Type as T, YAMLSyntaxError as Y, _createForOfIteratorHelper as _, _typeof as a, _createClass as b, _classCallCheck as c, defaultTagPrefix as d, _defineProperty as e, YAMLWarning as f, YAMLSemanticError as g, _slicedToArray as h, YAMLError as i, _inherits as j, _createSuper as k, _get as l, _getPrototypeOf as m, defaultTags as n, YAMLReferenceError as o, _assertThisInitialized as p, _toArray as q, _possibleConstructorReturn as r };\n","import { j as _inherits, k as _createSuper, c as _classCallCheck, T as Type, b as _createClass, R as Range, N as Node, g as YAMLSemanticError, l as _get, m as _getPrototypeOf, Y as YAMLSyntaxError, C as Char, e as _defineProperty, P as PlainValue } from './PlainValue-b8036b75.js';\n\nvar BlankLine = /*#__PURE__*/function (_Node) {\n _inherits(BlankLine, _Node);\n\n var _super = _createSuper(BlankLine);\n\n function BlankLine() {\n _classCallCheck(this, BlankLine);\n\n return _super.call(this, Type.BLANK_LINE);\n }\n /* istanbul ignore next */\n\n\n _createClass(BlankLine, [{\n key: \"includesTrailingLines\",\n get: function get() {\n // This is never called from anywhere, but if it were,\n // this is the value it should return.\n return true;\n }\n /**\n * Parses a blank line from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first \\n character\n * @returns {number} - Index of the character after this\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n this.range = new Range(start, start + 1);\n return start + 1;\n }\n }]);\n\n return BlankLine;\n}(Node);\n\nvar CollectionItem = /*#__PURE__*/function (_Node) {\n _inherits(CollectionItem, _Node);\n\n var _super = _createSuper(CollectionItem);\n\n function CollectionItem(type, props) {\n var _this;\n\n _classCallCheck(this, CollectionItem);\n\n _this = _super.call(this, type, props);\n _this.node = null;\n return _this;\n }\n\n _createClass(CollectionItem, [{\n key: \"includesTrailingLines\",\n get: function get() {\n return !!this.node && this.node.includesTrailingLines;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var parseNode = context.parseNode,\n src = context.src;\n var atLineStart = context.atLineStart,\n lineStart = context.lineStart;\n if (!atLineStart && this.type === Type.SEQ_ITEM) this.error = new YAMLSemanticError(this, 'Sequence items must not have preceding content on the same line');\n var indent = atLineStart ? start - lineStart : context.indent;\n var offset = Node.endOfWhiteSpace(src, start + 1);\n var ch = src[offset];\n var inlineComment = ch === '#';\n var comments = [];\n var blankLine = null;\n\n while (ch === '\\n' || ch === '#') {\n if (ch === '#') {\n var _end = Node.endOfLine(src, offset + 1);\n\n comments.push(new Range(offset, _end));\n offset = _end;\n } else {\n atLineStart = true;\n lineStart = offset + 1;\n var wsEnd = Node.endOfWhiteSpace(src, lineStart);\n\n if (src[wsEnd] === '\\n' && comments.length === 0) {\n blankLine = new BlankLine();\n lineStart = blankLine.parse({\n src: src\n }, lineStart);\n }\n\n offset = Node.endOfIndent(src, lineStart);\n }\n\n ch = src[offset];\n }\n\n if (Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== Type.SEQ_ITEM)) {\n this.node = parseNode({\n atLineStart: atLineStart,\n inCollection: false,\n indent: indent,\n lineStart: lineStart,\n parent: this\n }, offset);\n } else if (ch && lineStart > start + 1) {\n offset = lineStart - 1;\n }\n\n if (this.node) {\n if (blankLine) {\n // Only blank lines preceding non-empty nodes are captured. Note that\n // this means that collection item range start indices do not always\n // increase monotonically. -- eemeli/yaml#126\n var items = context.parent.items || context.parent.contents;\n if (items) items.push(blankLine);\n }\n\n if (comments.length) Array.prototype.push.apply(this.props, comments);\n offset = this.node.range.end;\n } else {\n if (inlineComment) {\n var c = comments[0];\n this.props.push(c);\n offset = c.end;\n } else {\n offset = Node.endOfLine(src, start + 1);\n }\n }\n\n var end = this.node ? this.node.valueRange.end : offset;\n this.valueRange = new Range(start, end);\n return offset;\n }\n }, {\n key: \"setOrigRanges\",\n value: function setOrigRanges(cr, offset) {\n offset = _get(_getPrototypeOf(CollectionItem.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n return this.node ? this.node.setOrigRanges(cr, offset) : offset;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var src = this.context.src,\n node = this.node,\n range = this.range,\n value = this.value;\n if (value != null) return value;\n var str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end);\n return Node.addStringTerminator(src, range.end, str);\n }\n }]);\n\n return CollectionItem;\n}(Node);\n\nvar Comment = /*#__PURE__*/function (_Node) {\n _inherits(Comment, _Node);\n\n var _super = _createSuper(Comment);\n\n function Comment() {\n _classCallCheck(this, Comment);\n\n return _super.call(this, Type.COMMENT);\n }\n /**\n * Parses a comment line from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n\n _createClass(Comment, [{\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var offset = this.parseComment(start);\n this.range = new Range(start, offset);\n return offset;\n }\n }]);\n\n return Comment;\n}(Node);\n\nfunction grabCollectionEndComments(node) {\n var cnode = node;\n\n while (cnode instanceof CollectionItem) {\n cnode = cnode.node;\n }\n\n if (!(cnode instanceof Collection)) return null;\n var len = cnode.items.length;\n var ci = -1;\n\n for (var i = len - 1; i >= 0; --i) {\n var n = cnode.items[i];\n\n if (n.type === Type.COMMENT) {\n // Keep sufficiently indented comments with preceding node\n var _n$context = n.context,\n indent = _n$context.indent,\n lineStart = _n$context.lineStart;\n if (indent > 0 && n.range.start >= lineStart + indent) break;\n ci = i;\n } else if (n.type === Type.BLANK_LINE) ci = i;else break;\n }\n\n if (ci === -1) return null;\n var ca = cnode.items.splice(ci, len - ci);\n var prevEnd = ca[0].range.start;\n\n while (true) {\n cnode.range.end = prevEnd;\n if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd;\n if (cnode === node) break;\n cnode = cnode.context.parent;\n }\n\n return ca;\n}\nvar Collection = /*#__PURE__*/function (_Node) {\n _inherits(Collection, _Node);\n\n var _super = _createSuper(Collection);\n\n function Collection(firstItem) {\n var _this;\n\n _classCallCheck(this, Collection);\n\n _this = _super.call(this, firstItem.type === Type.SEQ_ITEM ? Type.SEQ : Type.MAP);\n\n for (var i = firstItem.props.length - 1; i >= 0; --i) {\n if (firstItem.props[i].start < firstItem.context.lineStart) {\n // props on previous line are assumed by the collection\n _this.props = firstItem.props.slice(0, i + 1);\n firstItem.props = firstItem.props.slice(i + 1);\n var itemRange = firstItem.props[0] || firstItem.valueRange;\n firstItem.range.start = itemRange.start;\n break;\n }\n }\n\n _this.items = [firstItem];\n var ec = grabCollectionEndComments(firstItem);\n if (ec) Array.prototype.push.apply(_this.items, ec);\n return _this;\n }\n\n _createClass(Collection, [{\n key: \"includesTrailingLines\",\n get: function get() {\n return this.items.length > 0;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var parseNode = context.parseNode,\n src = context.src; // It's easier to recalculate lineStart here rather than tracking down the\n // last context from which to read it -- eemeli/yaml#2\n\n var lineStart = Node.startOfLine(src, start);\n var firstItem = this.items[0]; // First-item context needs to be correct for later comment handling\n // -- eemeli/yaml#17\n\n firstItem.context.parent = this;\n this.valueRange = Range.copy(firstItem.valueRange);\n var indent = firstItem.range.start - firstItem.context.lineStart;\n var offset = start;\n offset = Node.normalizeOffset(src, offset);\n var ch = src[offset];\n var atLineStart = Node.endOfWhiteSpace(src, lineStart) === offset;\n var prevIncludesTrailingLines = false;\n\n while (ch) {\n while (ch === '\\n' || ch === '#') {\n if (atLineStart && ch === '\\n' && !prevIncludesTrailingLines) {\n var blankLine = new BlankLine();\n offset = blankLine.parse({\n src: src\n }, offset);\n this.valueRange.end = offset;\n\n if (offset >= src.length) {\n ch = null;\n break;\n }\n\n this.items.push(blankLine);\n offset -= 1; // blankLine.parse() consumes terminal newline\n } else if (ch === '#') {\n if (offset < lineStart + indent && !Collection.nextContentHasIndent(src, offset, indent)) {\n return offset;\n }\n\n var comment = new Comment();\n offset = comment.parse({\n indent: indent,\n lineStart: lineStart,\n src: src\n }, offset);\n this.items.push(comment);\n this.valueRange.end = offset;\n\n if (offset >= src.length) {\n ch = null;\n break;\n }\n }\n\n lineStart = offset + 1;\n offset = Node.endOfIndent(src, lineStart);\n\n if (Node.atBlank(src, offset)) {\n var wsEnd = Node.endOfWhiteSpace(src, offset);\n var next = src[wsEnd];\n\n if (!next || next === '\\n' || next === '#') {\n offset = wsEnd;\n }\n }\n\n ch = src[offset];\n atLineStart = true;\n }\n\n if (!ch) {\n break;\n }\n\n if (offset !== lineStart + indent && (atLineStart || ch !== ':')) {\n if (offset < lineStart + indent) {\n if (lineStart > start) offset = lineStart;\n break;\n } else if (!this.error) {\n var msg = 'All collection items must start at the same column';\n this.error = new YAMLSyntaxError(this, msg);\n }\n }\n\n if (firstItem.type === Type.SEQ_ITEM) {\n if (ch !== '-') {\n if (lineStart > start) offset = lineStart;\n break;\n }\n } else if (ch === '-' && !this.error) {\n // map key may start with -, as long as it's followed by a non-whitespace char\n var _next = src[offset + 1];\n\n if (!_next || _next === '\\n' || _next === '\\t' || _next === ' ') {\n var _msg = 'A collection cannot be both a mapping and a sequence';\n this.error = new YAMLSyntaxError(this, _msg);\n }\n }\n\n var node = parseNode({\n atLineStart: atLineStart,\n inCollection: true,\n indent: indent,\n lineStart: lineStart,\n parent: this\n }, offset);\n if (!node) return offset; // at next document start\n\n this.items.push(node);\n this.valueRange.end = node.valueRange.end;\n offset = Node.normalizeOffset(src, node.range.end);\n ch = src[offset];\n atLineStart = false;\n prevIncludesTrailingLines = node.includesTrailingLines; // Need to reset lineStart and atLineStart here if preceding node's range\n // has advanced to check the current line's indentation level\n // -- eemeli/yaml#10 & eemeli/yaml#38\n\n if (ch) {\n var ls = offset - 1;\n var prev = src[ls];\n\n while (prev === ' ' || prev === '\\t') {\n prev = src[--ls];\n }\n\n if (prev === '\\n') {\n lineStart = ls + 1;\n atLineStart = true;\n }\n }\n\n var ec = grabCollectionEndComments(node);\n if (ec) Array.prototype.push.apply(this.items, ec);\n }\n\n return offset;\n }\n }, {\n key: \"setOrigRanges\",\n value: function setOrigRanges(cr, offset) {\n offset = _get(_getPrototypeOf(Collection.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n this.items.forEach(function (node) {\n offset = node.setOrigRanges(cr, offset);\n });\n return offset;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var src = this.context.src,\n items = this.items,\n range = this.range,\n value = this.value;\n if (value != null) return value;\n var str = src.slice(range.start, items[0].range.start) + String(items[0]);\n\n for (var i = 1; i < items.length; ++i) {\n var item = items[i];\n var _item$context = item.context,\n atLineStart = _item$context.atLineStart,\n indent = _item$context.indent;\n if (atLineStart) for (var _i = 0; _i < indent; ++_i) {\n str += ' ';\n }\n str += String(item);\n }\n\n return Node.addStringTerminator(src, range.end, str);\n }\n }], [{\n key: \"nextContentHasIndent\",\n value: function nextContentHasIndent(src, offset, indent) {\n var lineStart = Node.endOfLine(src, offset) + 1;\n offset = Node.endOfWhiteSpace(src, lineStart);\n var ch = src[offset];\n if (!ch) return false;\n if (offset >= lineStart + indent) return true;\n if (ch !== '#' && ch !== '\\n') return false;\n return Collection.nextContentHasIndent(src, offset, indent);\n }\n }]);\n\n return Collection;\n}(Node);\n\nvar Directive = /*#__PURE__*/function (_Node) {\n _inherits(Directive, _Node);\n\n var _super = _createSuper(Directive);\n\n function Directive() {\n var _this;\n\n _classCallCheck(this, Directive);\n\n _this = _super.call(this, Type.DIRECTIVE);\n _this.name = null;\n return _this;\n }\n\n _createClass(Directive, [{\n key: \"parameters\",\n get: function get() {\n var raw = this.rawValue;\n return raw ? raw.trim().split(/[ \\t]+/) : [];\n }\n }, {\n key: \"parseName\",\n value: function parseName(start) {\n var src = this.context.src;\n var offset = start;\n var ch = src[offset];\n\n while (ch && ch !== '\\n' && ch !== '\\t' && ch !== ' ') {\n ch = src[offset += 1];\n }\n\n this.name = src.slice(start, offset);\n return offset;\n }\n }, {\n key: \"parseParameters\",\n value: function parseParameters(start) {\n var src = this.context.src;\n var offset = start;\n var ch = src[offset];\n\n while (ch && ch !== '\\n' && ch !== '#') {\n ch = src[offset += 1];\n }\n\n this.valueRange = new Range(start, offset);\n return offset;\n }\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var offset = this.parseName(start + 1);\n offset = this.parseParameters(offset);\n offset = this.parseComment(offset);\n this.range = new Range(start, offset);\n return offset;\n }\n }]);\n\n return Directive;\n}(Node);\n\nvar Document = /*#__PURE__*/function (_Node) {\n _inherits(Document, _Node);\n\n var _super = _createSuper(Document);\n\n function Document() {\n var _this;\n\n _classCallCheck(this, Document);\n\n _this = _super.call(this, Type.DOCUMENT);\n _this.directives = null;\n _this.contents = null;\n _this.directivesEndMarker = null;\n _this.documentEndMarker = null;\n return _this;\n }\n\n _createClass(Document, [{\n key: \"parseDirectives\",\n value: function parseDirectives(start) {\n var src = this.context.src;\n this.directives = [];\n var atLineStart = true;\n var hasDirectives = false;\n var offset = start;\n\n while (!Node.atDocumentBoundary(src, offset, Char.DIRECTIVES_END)) {\n offset = Document.startCommentOrEndBlankLine(src, offset);\n\n switch (src[offset]) {\n case '\\n':\n if (atLineStart) {\n var blankLine = new BlankLine();\n offset = blankLine.parse({\n src: src\n }, offset);\n\n if (offset < src.length) {\n this.directives.push(blankLine);\n }\n } else {\n offset += 1;\n atLineStart = true;\n }\n\n break;\n\n case '#':\n {\n var comment = new Comment();\n offset = comment.parse({\n src: src\n }, offset);\n this.directives.push(comment);\n atLineStart = false;\n }\n break;\n\n case '%':\n {\n var directive = new Directive();\n offset = directive.parse({\n parent: this,\n src: src\n }, offset);\n this.directives.push(directive);\n hasDirectives = true;\n atLineStart = false;\n }\n break;\n\n default:\n if (hasDirectives) {\n this.error = new YAMLSemanticError(this, 'Missing directives-end indicator line');\n } else if (this.directives.length > 0) {\n this.contents = this.directives;\n this.directives = [];\n }\n\n return offset;\n }\n }\n\n if (src[offset]) {\n this.directivesEndMarker = new Range(offset, offset + 3);\n return offset + 3;\n }\n\n if (hasDirectives) {\n this.error = new YAMLSemanticError(this, 'Missing directives-end indicator line');\n } else if (this.directives.length > 0) {\n this.contents = this.directives;\n this.directives = [];\n }\n\n return offset;\n }\n }, {\n key: \"parseContents\",\n value: function parseContents(start) {\n var _this$context = this.context,\n parseNode = _this$context.parseNode,\n src = _this$context.src;\n if (!this.contents) this.contents = [];\n var lineStart = start;\n\n while (src[lineStart - 1] === '-') {\n lineStart -= 1;\n }\n\n var offset = Node.endOfWhiteSpace(src, start);\n var atLineStart = lineStart === start;\n this.valueRange = new Range(offset);\n\n while (!Node.atDocumentBoundary(src, offset, Char.DOCUMENT_END)) {\n switch (src[offset]) {\n case '\\n':\n if (atLineStart) {\n var blankLine = new BlankLine();\n offset = blankLine.parse({\n src: src\n }, offset);\n\n if (offset < src.length) {\n this.contents.push(blankLine);\n }\n } else {\n offset += 1;\n atLineStart = true;\n }\n\n lineStart = offset;\n break;\n\n case '#':\n {\n var comment = new Comment();\n offset = comment.parse({\n src: src\n }, offset);\n this.contents.push(comment);\n atLineStart = false;\n }\n break;\n\n default:\n {\n var iEnd = Node.endOfIndent(src, offset);\n var context = {\n atLineStart: atLineStart,\n indent: -1,\n inFlow: false,\n inCollection: false,\n lineStart: lineStart,\n parent: this\n };\n var node = parseNode(context, iEnd);\n if (!node) return this.valueRange.end = iEnd; // at next document start\n\n this.contents.push(node);\n offset = node.range.end;\n atLineStart = false;\n var ec = grabCollectionEndComments(node);\n if (ec) Array.prototype.push.apply(this.contents, ec);\n }\n }\n\n offset = Document.startCommentOrEndBlankLine(src, offset);\n }\n\n this.valueRange.end = offset;\n\n if (src[offset]) {\n this.documentEndMarker = new Range(offset, offset + 3);\n offset += 3;\n\n if (src[offset]) {\n offset = Node.endOfWhiteSpace(src, offset);\n\n if (src[offset] === '#') {\n var _comment = new Comment();\n\n offset = _comment.parse({\n src: src\n }, offset);\n this.contents.push(_comment);\n }\n\n switch (src[offset]) {\n case '\\n':\n offset += 1;\n break;\n\n case undefined:\n break;\n\n default:\n this.error = new YAMLSyntaxError(this, 'Document end marker line cannot have a non-comment suffix');\n }\n }\n }\n\n return offset;\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n context.root = this;\n this.context = context;\n var src = context.src;\n var offset = src.charCodeAt(start) === 0xfeff ? start + 1 : start; // skip BOM\n\n offset = this.parseDirectives(offset);\n offset = this.parseContents(offset);\n return offset;\n }\n }, {\n key: \"setOrigRanges\",\n value: function setOrigRanges(cr, offset) {\n offset = _get(_getPrototypeOf(Document.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n this.directives.forEach(function (node) {\n offset = node.setOrigRanges(cr, offset);\n });\n if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset);\n this.contents.forEach(function (node) {\n offset = node.setOrigRanges(cr, offset);\n });\n if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset);\n return offset;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var contents = this.contents,\n directives = this.directives,\n value = this.value;\n if (value != null) return value;\n var str = directives.join('');\n\n if (contents.length > 0) {\n if (directives.length > 0 || contents[0].type === Type.COMMENT) str += '---\\n';\n str += contents.join('');\n }\n\n if (str[str.length - 1] !== '\\n') str += '\\n';\n return str;\n }\n }], [{\n key: \"startCommentOrEndBlankLine\",\n value: function startCommentOrEndBlankLine(src, start) {\n var offset = Node.endOfWhiteSpace(src, start);\n var ch = src[offset];\n return ch === '#' || ch === '\\n' ? offset : start;\n }\n }]);\n\n return Document;\n}(Node);\n\nvar Alias = /*#__PURE__*/function (_Node) {\n _inherits(Alias, _Node);\n\n var _super = _createSuper(Alias);\n\n function Alias() {\n _classCallCheck(this, Alias);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Alias, [{\n key: \"parse\",\n value:\n /**\n * Parses an *alias from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n function parse(context, start) {\n this.context = context;\n var src = context.src;\n var offset = Node.endOfIdentifier(src, start + 1);\n this.valueRange = new Range(start + 1, offset);\n offset = Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n }]);\n\n return Alias;\n}(Node);\n\nvar Chomp = {\n CLIP: 'CLIP',\n KEEP: 'KEEP',\n STRIP: 'STRIP'\n};\nvar BlockValue = /*#__PURE__*/function (_Node) {\n _inherits(BlockValue, _Node);\n\n var _super = _createSuper(BlockValue);\n\n function BlockValue(type, props) {\n var _this;\n\n _classCallCheck(this, BlockValue);\n\n _this = _super.call(this, type, props);\n _this.blockIndent = null;\n _this.chomping = Chomp.CLIP;\n _this.header = null;\n return _this;\n }\n\n _createClass(BlockValue, [{\n key: \"includesTrailingLines\",\n get: function get() {\n return this.chomping === Chomp.KEEP;\n }\n }, {\n key: \"strValue\",\n get: function get() {\n if (!this.valueRange || !this.context) return null;\n var _this$valueRange = this.valueRange,\n start = _this$valueRange.start,\n end = _this$valueRange.end;\n var _this$context = this.context,\n indent = _this$context.indent,\n src = _this$context.src;\n if (this.valueRange.isEmpty()) return '';\n var lastNewLine = null;\n var ch = src[end - 1];\n\n while (ch === '\\n' || ch === '\\t' || ch === ' ') {\n end -= 1;\n\n if (end <= start) {\n if (this.chomping === Chomp.KEEP) break;else return ''; // probably never happens\n }\n\n if (ch === '\\n') lastNewLine = end;\n ch = src[end - 1];\n }\n\n var keepStart = end + 1;\n\n if (lastNewLine) {\n if (this.chomping === Chomp.KEEP) {\n keepStart = lastNewLine;\n end = this.valueRange.end;\n } else {\n end = lastNewLine;\n }\n }\n\n var bi = indent + this.blockIndent;\n var folded = this.type === Type.BLOCK_FOLDED;\n var atStart = true;\n var str = '';\n var sep = '';\n var prevMoreIndented = false;\n\n for (var i = start; i < end; ++i) {\n for (var j = 0; j < bi; ++j) {\n if (src[i] !== ' ') break;\n i += 1;\n }\n\n var _ch = src[i];\n\n if (_ch === '\\n') {\n if (sep === '\\n') str += '\\n';else sep = '\\n';\n } else {\n var lineEnd = Node.endOfLine(src, i);\n var line = src.slice(i, lineEnd);\n i = lineEnd;\n\n if (folded && (_ch === ' ' || _ch === '\\t') && i < keepStart) {\n if (sep === ' ') sep = '\\n';else if (!prevMoreIndented && !atStart && sep === '\\n') sep = '\\n\\n';\n str += sep + line; //+ ((lineEnd < end && src[lineEnd]) || '')\n\n sep = lineEnd < end && src[lineEnd] || '';\n prevMoreIndented = true;\n } else {\n str += sep + line;\n sep = folded && i < keepStart ? ' ' : '\\n';\n prevMoreIndented = false;\n }\n\n if (atStart && line !== '') atStart = false;\n }\n }\n\n return this.chomping === Chomp.STRIP ? str : str + '\\n';\n }\n }, {\n key: \"parseBlockHeader\",\n value: function parseBlockHeader(start) {\n var src = this.context.src;\n var offset = start + 1;\n var bi = '';\n\n while (true) {\n var ch = src[offset];\n\n switch (ch) {\n case '-':\n this.chomping = Chomp.STRIP;\n break;\n\n case '+':\n this.chomping = Chomp.KEEP;\n break;\n\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n bi += ch;\n break;\n\n default:\n this.blockIndent = Number(bi) || null;\n this.header = new Range(start, offset);\n return offset;\n }\n\n offset += 1;\n }\n }\n }, {\n key: \"parseBlockValue\",\n value: function parseBlockValue(start) {\n var _this$context2 = this.context,\n indent = _this$context2.indent,\n src = _this$context2.src;\n var explicit = !!this.blockIndent;\n var offset = start;\n var valueEnd = start;\n var minBlockIndent = 1;\n\n for (var ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n offset += 1;\n if (Node.atDocumentBoundary(src, offset)) break;\n var end = Node.endOfBlockIndent(src, indent, offset); // should not include tab?\n\n if (end === null) break;\n var _ch2 = src[end];\n var lineIndent = end - (offset + indent);\n\n if (!this.blockIndent) {\n // no explicit block indent, none yet detected\n if (src[end] !== '\\n') {\n // first line with non-whitespace content\n if (lineIndent < minBlockIndent) {\n var msg = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n this.error = new YAMLSemanticError(this, msg);\n }\n\n this.blockIndent = lineIndent;\n } else if (lineIndent > minBlockIndent) {\n // empty line with more whitespace\n minBlockIndent = lineIndent;\n }\n } else if (_ch2 && _ch2 !== '\\n' && lineIndent < this.blockIndent) {\n if (src[end] === '#') break;\n\n if (!this.error) {\n var _src = explicit ? 'explicit indentation indicator' : 'first line';\n\n var _msg = \"Block scalars must not be less indented than their \".concat(_src);\n\n this.error = new YAMLSemanticError(this, _msg);\n }\n }\n\n if (src[end] === '\\n') {\n offset = end;\n } else {\n offset = valueEnd = Node.endOfLine(src, end);\n }\n }\n\n if (this.chomping !== Chomp.KEEP) {\n offset = src[valueEnd] ? valueEnd + 1 : valueEnd;\n }\n\n this.valueRange = new Range(start + 1, offset);\n return offset;\n }\n /**\n * Parses a block value from the source\n *\n * Accepted forms are:\n * ```\n * BS\n * block\n * lines\n *\n * BS #comment\n * block\n * lines\n * ```\n * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines\n * are empty or have an indent level greater than `indent`.\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this block\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var src = context.src;\n var offset = this.parseBlockHeader(start);\n offset = Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n offset = this.parseBlockValue(offset);\n return offset;\n }\n }, {\n key: \"setOrigRanges\",\n value: function setOrigRanges(cr, offset) {\n offset = _get(_getPrototypeOf(BlockValue.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n return this.header ? this.header.setOrigRange(cr, offset) : offset;\n }\n }]);\n\n return BlockValue;\n}(Node);\n\nvar FlowCollection = /*#__PURE__*/function (_Node) {\n _inherits(FlowCollection, _Node);\n\n var _super = _createSuper(FlowCollection);\n\n function FlowCollection(type, props) {\n var _this;\n\n _classCallCheck(this, FlowCollection);\n\n _this = _super.call(this, type, props);\n _this.items = null;\n return _this;\n }\n\n _createClass(FlowCollection, [{\n key: \"prevNodeIsJsonLike\",\n value: function prevNodeIsJsonLike() {\n var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.items.length;\n var node = this.items[idx - 1];\n return !!node && (node.jsonLike || node.type === Type.COMMENT && this.prevNodeIsJsonLike(idx - 1));\n }\n /**\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var parseNode = context.parseNode,\n src = context.src;\n var indent = context.indent,\n lineStart = context.lineStart;\n var char = src[start]; // { or [\n\n this.items = [{\n char: char,\n offset: start\n }];\n var offset = Node.endOfWhiteSpace(src, start + 1);\n char = src[offset];\n\n while (char && char !== ']' && char !== '}') {\n switch (char) {\n case '\\n':\n {\n lineStart = offset + 1;\n var wsEnd = Node.endOfWhiteSpace(src, lineStart);\n\n if (src[wsEnd] === '\\n') {\n var blankLine = new BlankLine();\n lineStart = blankLine.parse({\n src: src\n }, lineStart);\n this.items.push(blankLine);\n }\n\n offset = Node.endOfIndent(src, lineStart);\n\n if (offset <= lineStart + indent) {\n char = src[offset];\n\n if (offset < lineStart + indent || char !== ']' && char !== '}') {\n var msg = 'Insufficient indentation in flow collection';\n this.error = new YAMLSemanticError(this, msg);\n }\n }\n }\n break;\n\n case ',':\n {\n this.items.push({\n char: char,\n offset: offset\n });\n offset += 1;\n }\n break;\n\n case '#':\n {\n var comment = new Comment();\n offset = comment.parse({\n src: src\n }, offset);\n this.items.push(comment);\n }\n break;\n\n case '?':\n case ':':\n {\n var next = src[offset + 1];\n\n if (next === '\\n' || next === '\\t' || next === ' ' || next === ',' || // in-flow : after JSON-like key does not need to be followed by whitespace\n char === ':' && this.prevNodeIsJsonLike()) {\n this.items.push({\n char: char,\n offset: offset\n });\n offset += 1;\n break;\n }\n }\n // fallthrough\n\n default:\n {\n var node = parseNode({\n atLineStart: false,\n inCollection: false,\n inFlow: true,\n indent: -1,\n lineStart: lineStart,\n parent: this\n }, offset);\n\n if (!node) {\n // at next document start\n this.valueRange = new Range(start, offset);\n return offset;\n }\n\n this.items.push(node);\n offset = Node.normalizeOffset(src, node.range.end);\n }\n }\n\n offset = Node.endOfWhiteSpace(src, offset);\n char = src[offset];\n }\n\n this.valueRange = new Range(start, offset + 1);\n\n if (char) {\n this.items.push({\n char: char,\n offset: offset\n });\n offset = Node.endOfWhiteSpace(src, offset + 1);\n offset = this.parseComment(offset);\n }\n\n return offset;\n }\n }, {\n key: \"setOrigRanges\",\n value: function setOrigRanges(cr, offset) {\n offset = _get(_getPrototypeOf(FlowCollection.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n this.items.forEach(function (node) {\n if (node instanceof Node) {\n offset = node.setOrigRanges(cr, offset);\n } else if (cr.length === 0) {\n node.origOffset = node.offset;\n } else {\n var i = offset;\n\n while (i < cr.length) {\n if (cr[i] > node.offset) break;else ++i;\n }\n\n node.origOffset = node.offset + i;\n offset = i;\n }\n });\n return offset;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var src = this.context.src,\n items = this.items,\n range = this.range,\n value = this.value;\n if (value != null) return value;\n var nodes = items.filter(function (item) {\n return item instanceof Node;\n });\n var str = '';\n var prevEnd = range.start;\n nodes.forEach(function (node) {\n var prefix = src.slice(prevEnd, node.range.start);\n prevEnd = node.range.end;\n str += prefix + String(node);\n\n if (str[str.length - 1] === '\\n' && src[prevEnd - 1] !== '\\n' && src[prevEnd] === '\\n') {\n // Comment range does not include the terminal newline, but its\n // stringified value does. Without this fix, newlines at comment ends\n // get duplicated.\n prevEnd += 1;\n }\n });\n str += src.slice(prevEnd, range.end);\n return Node.addStringTerminator(src, range.end, str);\n }\n }]);\n\n return FlowCollection;\n}(Node);\n\nvar QuoteDouble = /*#__PURE__*/function (_Node) {\n _inherits(QuoteDouble, _Node);\n\n var _super = _createSuper(QuoteDouble);\n\n function QuoteDouble() {\n _classCallCheck(this, QuoteDouble);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(QuoteDouble, [{\n key: \"strValue\",\n get:\n /**\n * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n */\n function get() {\n if (!this.valueRange || !this.context) return null;\n var errors = [];\n var _this$valueRange = this.valueRange,\n start = _this$valueRange.start,\n end = _this$valueRange.end;\n var _this$context = this.context,\n indent = _this$context.indent,\n src = _this$context.src;\n if (src[end - 1] !== '\"') errors.push(new YAMLSyntaxError(this, 'Missing closing \"quote')); // Using String#replace is too painful with escaped newlines preceded by\n // escaped backslashes; also, this should be faster.\n\n var str = '';\n\n for (var i = start + 1; i < end - 1; ++i) {\n var ch = src[i];\n\n if (ch === '\\n') {\n if (Node.atDocumentBoundary(src, i + 1)) errors.push(new YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n\n var _Node$foldNewline = Node.foldNewline(src, i, indent),\n fold = _Node$foldNewline.fold,\n offset = _Node$foldNewline.offset,\n error = _Node$foldNewline.error;\n\n str += fold;\n i = offset;\n if (error) errors.push(new YAMLSemanticError(this, 'Multi-line double-quoted string needs to be sufficiently indented'));\n } else if (ch === '\\\\') {\n i += 1;\n\n switch (src[i]) {\n case '0':\n str += '\\0';\n break;\n // null character\n\n case 'a':\n str += '\\x07';\n break;\n // bell character\n\n case 'b':\n str += '\\b';\n break;\n // backspace\n\n case 'e':\n str += '\\x1b';\n break;\n // escape character\n\n case 'f':\n str += '\\f';\n break;\n // form feed\n\n case 'n':\n str += '\\n';\n break;\n // line feed\n\n case 'r':\n str += '\\r';\n break;\n // carriage return\n\n case 't':\n str += '\\t';\n break;\n // horizontal tab\n\n case 'v':\n str += '\\v';\n break;\n // vertical tab\n\n case 'N':\n str += \"\\x85\";\n break;\n // Unicode next line\n\n case '_':\n str += \"\\xA0\";\n break;\n // Unicode non-breaking space\n\n case 'L':\n str += \"\\u2028\";\n break;\n // Unicode line separator\n\n case 'P':\n str += \"\\u2029\";\n break;\n // Unicode paragraph separator\n\n case ' ':\n str += ' ';\n break;\n\n case '\"':\n str += '\"';\n break;\n\n case '/':\n str += '/';\n break;\n\n case '\\\\':\n str += '\\\\';\n break;\n\n case '\\t':\n str += '\\t';\n break;\n\n case 'x':\n str += this.parseCharCode(i + 1, 2, errors);\n i += 2;\n break;\n\n case 'u':\n str += this.parseCharCode(i + 1, 4, errors);\n i += 4;\n break;\n\n case 'U':\n str += this.parseCharCode(i + 1, 8, errors);\n i += 8;\n break;\n\n case '\\n':\n // skip escaped newlines, but still trim the following line\n while (src[i + 1] === ' ' || src[i + 1] === '\\t') {\n i += 1;\n }\n\n break;\n\n default:\n errors.push(new YAMLSyntaxError(this, \"Invalid escape sequence \".concat(src.substr(i - 1, 2))));\n str += '\\\\' + src[i];\n }\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n var wsStart = i;\n var next = src[i + 1];\n\n while (next === ' ' || next === '\\t') {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n return errors.length > 0 ? {\n errors: errors,\n str: str\n } : str;\n }\n }, {\n key: \"parseCharCode\",\n value: function parseCharCode(offset, length, errors) {\n var src = this.context.src;\n var cc = src.substr(offset, length);\n var ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n var code = ok ? parseInt(cc, 16) : NaN;\n\n if (isNaN(code)) {\n errors.push(new YAMLSyntaxError(this, \"Invalid escape sequence \".concat(src.substr(offset - 2, length + 2))));\n return src.substr(offset - 2, length + 2);\n }\n\n return String.fromCodePoint(code);\n }\n /**\n * Parses a \"double quoted\" value from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var src = context.src;\n var offset = QuoteDouble.endOfQuote(src, start + 1);\n this.valueRange = new Range(start, offset);\n offset = Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n }], [{\n key: \"endOfQuote\",\n value: function endOfQuote(src, offset) {\n var ch = src[offset];\n\n while (ch && ch !== '\"') {\n offset += ch === '\\\\' ? 2 : 1;\n ch = src[offset];\n }\n\n return offset + 1;\n }\n }]);\n\n return QuoteDouble;\n}(Node);\n\nvar QuoteSingle = /*#__PURE__*/function (_Node) {\n _inherits(QuoteSingle, _Node);\n\n var _super = _createSuper(QuoteSingle);\n\n function QuoteSingle() {\n _classCallCheck(this, QuoteSingle);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(QuoteSingle, [{\n key: \"strValue\",\n get:\n /**\n * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n */\n function get() {\n if (!this.valueRange || !this.context) return null;\n var errors = [];\n var _this$valueRange = this.valueRange,\n start = _this$valueRange.start,\n end = _this$valueRange.end;\n var _this$context = this.context,\n indent = _this$context.indent,\n src = _this$context.src;\n if (src[end - 1] !== \"'\") errors.push(new YAMLSyntaxError(this, \"Missing closing 'quote\"));\n var str = '';\n\n for (var i = start + 1; i < end - 1; ++i) {\n var ch = src[i];\n\n if (ch === '\\n') {\n if (Node.atDocumentBoundary(src, i + 1)) errors.push(new YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n\n var _Node$foldNewline = Node.foldNewline(src, i, indent),\n fold = _Node$foldNewline.fold,\n offset = _Node$foldNewline.offset,\n error = _Node$foldNewline.error;\n\n str += fold;\n i = offset;\n if (error) errors.push(new YAMLSemanticError(this, 'Multi-line single-quoted string needs to be sufficiently indented'));\n } else if (ch === \"'\") {\n str += ch;\n i += 1;\n if (src[i] !== \"'\") errors.push(new YAMLSyntaxError(this, 'Unescaped single quote? This should not happen.'));\n } else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n var wsStart = i;\n var next = src[i + 1];\n\n while (next === ' ' || next === '\\t') {\n i += 1;\n next = src[i + 1];\n }\n\n if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n } else {\n str += ch;\n }\n }\n\n return errors.length > 0 ? {\n errors: errors,\n str: str\n } : str;\n }\n /**\n * Parses a 'single quoted' value from the source\n *\n * @param {ParseContext} context\n * @param {number} start - Index of first character\n * @returns {number} - Index of the character after this scalar\n */\n\n }, {\n key: \"parse\",\n value: function parse(context, start) {\n this.context = context;\n var src = context.src;\n var offset = QuoteSingle.endOfQuote(src, start + 1);\n this.valueRange = new Range(start, offset);\n offset = Node.endOfWhiteSpace(src, offset);\n offset = this.parseComment(offset);\n return offset;\n }\n }], [{\n key: \"endOfQuote\",\n value: function endOfQuote(src, offset) {\n var ch = src[offset];\n\n while (ch) {\n if (ch === \"'\") {\n if (src[offset + 1] !== \"'\") break;\n ch = src[offset += 2];\n } else {\n ch = src[offset += 1];\n }\n }\n\n return offset + 1;\n }\n }]);\n\n return QuoteSingle;\n}(Node);\n\nfunction createNewNode(type, props) {\n switch (type) {\n case Type.ALIAS:\n return new Alias(type, props);\n\n case Type.BLOCK_FOLDED:\n case Type.BLOCK_LITERAL:\n return new BlockValue(type, props);\n\n case Type.FLOW_MAP:\n case Type.FLOW_SEQ:\n return new FlowCollection(type, props);\n\n case Type.MAP_KEY:\n case Type.MAP_VALUE:\n case Type.SEQ_ITEM:\n return new CollectionItem(type, props);\n\n case Type.COMMENT:\n case Type.PLAIN:\n return new PlainValue(type, props);\n\n case Type.QUOTE_DOUBLE:\n return new QuoteDouble(type, props);\n\n case Type.QUOTE_SINGLE:\n return new QuoteSingle(type, props);\n\n /* istanbul ignore next */\n\n default:\n return null;\n // should never happen\n }\n}\n/**\n * @param {boolean} atLineStart - Node starts at beginning of line\n * @param {boolean} inFlow - true if currently in a flow context\n * @param {boolean} inCollection - true if currently in a collection context\n * @param {number} indent - Current level of indentation\n * @param {number} lineStart - Start of the current line\n * @param {Node} parent - The parent of the node\n * @param {string} src - Source of the YAML document\n */\n\n\nvar ParseContext = /*#__PURE__*/function () {\n function ParseContext() {\n var _this = this;\n\n var orig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n atLineStart = _ref.atLineStart,\n inCollection = _ref.inCollection,\n inFlow = _ref.inFlow,\n indent = _ref.indent,\n lineStart = _ref.lineStart,\n parent = _ref.parent;\n\n _classCallCheck(this, ParseContext);\n\n _defineProperty(this, \"parseNode\", function (overlay, start) {\n if (Node.atDocumentBoundary(_this.src, start)) return null;\n var context = new ParseContext(_this, overlay);\n\n var _context$parseProps = context.parseProps(start),\n props = _context$parseProps.props,\n type = _context$parseProps.type,\n valueStart = _context$parseProps.valueStart;\n\n var node = createNewNode(type, props);\n var offset = node.parse(context, valueStart);\n node.range = new Range(start, offset);\n /* istanbul ignore if */\n\n if (offset <= start) {\n // This should never happen, but if it does, let's make sure to at least\n // step one character forward to avoid a busy loop.\n node.error = new Error(\"Node#parse consumed no characters\");\n node.error.parseEnd = offset;\n node.error.source = node;\n node.range.end = start + 1;\n }\n\n if (context.nodeStartsCollection(node)) {\n if (!node.error && !context.atLineStart && context.parent.type === Type.DOCUMENT) {\n node.error = new YAMLSyntaxError(node, 'Block collection must not have preceding content here (e.g. directives-end indicator)');\n }\n\n var collection = new Collection(node);\n offset = collection.parse(new ParseContext(context), offset);\n collection.range = new Range(start, offset);\n return collection;\n }\n\n return node;\n });\n\n this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false;\n this.inCollection = inCollection != null ? inCollection : orig.inCollection || false;\n this.inFlow = inFlow != null ? inFlow : orig.inFlow || false;\n this.indent = indent != null ? indent : orig.indent;\n this.lineStart = lineStart != null ? lineStart : orig.lineStart;\n this.parent = parent != null ? parent : orig.parent || {};\n this.root = orig.root;\n this.src = orig.src;\n }\n\n _createClass(ParseContext, [{\n key: \"nodeStartsCollection\",\n value: function nodeStartsCollection(node) {\n var inCollection = this.inCollection,\n inFlow = this.inFlow,\n src = this.src;\n if (inCollection || inFlow) return false;\n if (node instanceof CollectionItem) return true; // check for implicit key\n\n var offset = node.range.end;\n if (src[offset] === '\\n' || src[offset - 1] === '\\n') return false;\n offset = Node.endOfWhiteSpace(src, offset);\n return src[offset] === ':';\n } // Anchor and tag are before type, which determines the node implementation\n // class; hence this intermediate step.\n\n }, {\n key: \"parseProps\",\n value: function parseProps(offset) {\n var inFlow = this.inFlow,\n parent = this.parent,\n src = this.src;\n var props = [];\n var lineHasProps = false;\n offset = this.atLineStart ? Node.endOfIndent(src, offset) : Node.endOfWhiteSpace(src, offset);\n var ch = src[offset];\n\n while (ch === Char.ANCHOR || ch === Char.COMMENT || ch === Char.TAG || ch === '\\n') {\n if (ch === '\\n') {\n var inEnd = offset;\n var lineStart = void 0;\n\n do {\n lineStart = inEnd + 1;\n inEnd = Node.endOfIndent(src, lineStart);\n } while (src[inEnd] === '\\n');\n\n var indentDiff = inEnd - (lineStart + this.indent);\n var noIndicatorAsIndent = parent.type === Type.SEQ_ITEM && parent.context.atLineStart;\n if (src[inEnd] !== '#' && !Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n this.atLineStart = true;\n this.lineStart = lineStart;\n lineHasProps = false;\n offset = inEnd;\n } else if (ch === Char.COMMENT) {\n var end = Node.endOfLine(src, offset + 1);\n props.push(new Range(offset, end));\n offset = end;\n } else {\n var _end = Node.endOfIdentifier(src, offset + 1);\n\n if (ch === Char.TAG && src[_end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, _end + 13))) {\n // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n // than an empty but 'foo.bar' private-tagged node in a flow collection\n // followed without whitespace by a plain string starting with a year\n // or date divided by something.\n _end = Node.endOfIdentifier(src, _end + 5);\n }\n\n props.push(new Range(offset, _end));\n lineHasProps = true;\n offset = Node.endOfWhiteSpace(src, _end);\n }\n\n ch = src[offset];\n } // '- &a : b' has an anchor on an empty node\n\n\n if (lineHasProps && ch === ':' && Node.atBlank(src, offset + 1, true)) offset -= 1;\n var type = ParseContext.parseType(src, offset, inFlow);\n return {\n props: props,\n type: type,\n valueStart: offset\n };\n }\n /**\n * Parses a node from the source\n * @param {ParseContext} overlay\n * @param {number} start - Index of first non-whitespace character for the node\n * @returns {?Node} - null if at a document boundary\n */\n\n }], [{\n key: \"parseType\",\n value: function parseType(src, offset, inFlow) {\n switch (src[offset]) {\n case '*':\n return Type.ALIAS;\n\n case '>':\n return Type.BLOCK_FOLDED;\n\n case '|':\n return Type.BLOCK_LITERAL;\n\n case '{':\n return Type.FLOW_MAP;\n\n case '[':\n return Type.FLOW_SEQ;\n\n case '?':\n return !inFlow && Node.atBlank(src, offset + 1, true) ? Type.MAP_KEY : Type.PLAIN;\n\n case ':':\n return !inFlow && Node.atBlank(src, offset + 1, true) ? Type.MAP_VALUE : Type.PLAIN;\n\n case '-':\n return !inFlow && Node.atBlank(src, offset + 1, true) ? Type.SEQ_ITEM : Type.PLAIN;\n\n case '\"':\n return Type.QUOTE_DOUBLE;\n\n case \"'\":\n return Type.QUOTE_SINGLE;\n\n default:\n return Type.PLAIN;\n }\n }\n }]);\n\n return ParseContext;\n}();\n\n// Published as 'yaml/parse-cst'\nfunction parse(src) {\n var cr = [];\n\n if (src.indexOf('\\r') !== -1) {\n src = src.replace(/\\r\\n?/g, function (match, offset) {\n if (match.length > 1) cr.push(offset);\n return '\\n';\n });\n }\n\n var documents = [];\n var offset = 0;\n\n do {\n var doc = new Document();\n var context = new ParseContext({\n src: src\n });\n offset = doc.parse(context, offset);\n documents.push(doc);\n } while (offset < src.length);\n\n documents.setOrigRanges = function () {\n if (cr.length === 0) return false;\n\n for (var i = 1; i < cr.length; ++i) {\n cr[i] -= i;\n }\n\n var crOffset = 0;\n\n for (var _i = 0; _i < documents.length; ++_i) {\n crOffset = documents[_i].setOrigRanges(cr, crOffset);\n }\n\n cr.splice(0, cr.length);\n return true;\n };\n\n documents.toString = function () {\n return documents.join('...\\n');\n };\n\n return documents;\n}\n\nexport { parse };\n","import { c as _classCallCheck, j as _inherits, k as _createSuper, b as _createClass, e as _defineProperty, p as _assertThisInitialized, a as _typeof, q as _toArray, T as Type, _ as _createForOfIteratorHelper, l as _get, m as _getPrototypeOf, o as YAMLReferenceError, r as _possibleConstructorReturn, h as _slicedToArray, g as YAMLSemanticError, n as defaultTags, f as YAMLWarning, C as Char, Y as YAMLSyntaxError, P as PlainValue } from './PlainValue-b8036b75.js';\n\nfunction addCommentBefore(str, indent, comment) {\n if (!comment) return str;\n var cc = comment.replace(/[\\s\\S]^/gm, \"$&\".concat(indent, \"#\"));\n return \"#\".concat(cc, \"\\n\").concat(indent).concat(str);\n}\nfunction addComment(str, indent, comment) {\n return !comment ? str : comment.indexOf('\\n') === -1 ? \"\".concat(str, \" #\").concat(comment) : \"\".concat(str, \"\\n\") + comment.replace(/^/gm, \"\".concat(indent || '', \"#\"));\n}\n\nvar Node = function Node() {\n _classCallCheck(this, Node);\n};\n\nfunction toJSON(value, arg, ctx) {\n if (Array.isArray(value)) return value.map(function (v, i) {\n return toJSON(v, String(i), ctx);\n });\n\n if (value && typeof value.toJSON === 'function') {\n var anchor = ctx && ctx.anchors && ctx.anchors.get(value);\n if (anchor) ctx.onCreate = function (res) {\n anchor.res = res;\n delete ctx.onCreate;\n };\n var res = value.toJSON(arg, ctx);\n if (anchor && ctx.onCreate) ctx.onCreate(res);\n return res;\n }\n\n if ((!ctx || !ctx.keep) && typeof value === 'bigint') return Number(value);\n return value;\n}\n\nvar Scalar = /*#__PURE__*/function (_Node) {\n _inherits(Scalar, _Node);\n\n var _super = _createSuper(Scalar);\n\n function Scalar(value) {\n var _this;\n\n _classCallCheck(this, Scalar);\n\n _this = _super.call(this);\n _this.value = value;\n return _this;\n }\n\n _createClass(Scalar, [{\n key: \"toJSON\",\n value: function toJSON$1(arg, ctx) {\n return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx);\n }\n }, {\n key: \"toString\",\n value: function toString() {\n return String(this.value);\n }\n }]);\n\n return Scalar;\n}(Node);\n\nfunction collectionFromPath(schema, path, value) {\n var v = value;\n\n for (var i = path.length - 1; i >= 0; --i) {\n var k = path[i];\n\n if (Number.isInteger(k) && k >= 0) {\n var a = [];\n a[k] = v;\n v = a;\n } else {\n var o = {};\n Object.defineProperty(o, k, {\n value: v,\n writable: true,\n enumerable: true,\n configurable: true\n });\n v = o;\n }\n }\n\n return schema.createNode(v, false);\n} // null, undefined, or an empty non-string iterable (e.g. [])\n\n\nvar isEmptyPath = function isEmptyPath(path) {\n return path == null || _typeof(path) === 'object' && path[Symbol.iterator]().next().done;\n};\nvar Collection = /*#__PURE__*/function (_Node) {\n _inherits(Collection, _Node);\n\n var _super = _createSuper(Collection);\n\n function Collection(schema) {\n var _this;\n\n _classCallCheck(this, Collection);\n\n _this = _super.call(this);\n\n _defineProperty(_assertThisInitialized(_this), \"items\", []);\n\n _this.schema = schema;\n return _this;\n }\n\n _createClass(Collection, [{\n key: \"addIn\",\n value: function addIn(path, value) {\n if (isEmptyPath(path)) this.add(value);else {\n var _path = _toArray(path),\n key = _path[0],\n rest = _path.slice(1);\n\n var node = this.get(key, true);\n if (node instanceof Collection) node.addIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(\"Expected YAML collection at \".concat(key, \". Remaining path: \").concat(rest));\n }\n }\n }, {\n key: \"deleteIn\",\n value: function deleteIn(_ref) {\n var _ref2 = _toArray(_ref),\n key = _ref2[0],\n rest = _ref2.slice(1);\n\n if (rest.length === 0) return this.delete(key);\n var node = this.get(key, true);\n if (node instanceof Collection) return node.deleteIn(rest);else throw new Error(\"Expected YAML collection at \".concat(key, \". Remaining path: \").concat(rest));\n }\n }, {\n key: \"getIn\",\n value: function getIn(_ref3, keepScalar) {\n var _ref4 = _toArray(_ref3),\n key = _ref4[0],\n rest = _ref4.slice(1);\n\n var node = this.get(key, true);\n if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node;else return node instanceof Collection ? node.getIn(rest, keepScalar) : undefined;\n }\n }, {\n key: \"hasAllNullValues\",\n value: function hasAllNullValues() {\n return this.items.every(function (node) {\n if (!node || node.type !== 'PAIR') return false;\n var n = node.value;\n return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag;\n });\n }\n }, {\n key: \"hasIn\",\n value: function hasIn(_ref5) {\n var _ref6 = _toArray(_ref5),\n key = _ref6[0],\n rest = _ref6.slice(1);\n\n if (rest.length === 0) return this.has(key);\n var node = this.get(key, true);\n return node instanceof Collection ? node.hasIn(rest) : false;\n }\n }, {\n key: \"setIn\",\n value: function setIn(_ref7, value) {\n var _ref8 = _toArray(_ref7),\n key = _ref8[0],\n rest = _ref8.slice(1);\n\n if (rest.length === 0) {\n this.set(key, value);\n } else {\n var node = this.get(key, true);\n if (node instanceof Collection) node.setIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(\"Expected YAML collection at \".concat(key, \". Remaining path: \").concat(rest));\n }\n } // overridden in implementations\n\n /* istanbul ignore next */\n\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return null;\n }\n }, {\n key: \"toString\",\n value: function toString(ctx, _ref9, onComment, onChompKeep) {\n var _this2 = this;\n\n var blockItem = _ref9.blockItem,\n flowChars = _ref9.flowChars,\n isMap = _ref9.isMap,\n itemIndent = _ref9.itemIndent;\n var _ctx = ctx,\n indent = _ctx.indent,\n indentStep = _ctx.indentStep,\n stringify = _ctx.stringify;\n var inFlow = this.type === Type.FLOW_MAP || this.type === Type.FLOW_SEQ || ctx.inFlow;\n if (inFlow) itemIndent += indentStep;\n var allNullValues = isMap && this.hasAllNullValues();\n ctx = Object.assign({}, ctx, {\n allNullValues: allNullValues,\n indent: itemIndent,\n inFlow: inFlow,\n type: null\n });\n var chompKeep = false;\n var hasItemWithNewLine = false;\n var nodes = this.items.reduce(function (nodes, item, i) {\n var comment;\n\n if (item) {\n if (!chompKeep && item.spaceBefore) nodes.push({\n type: 'comment',\n str: ''\n });\n if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach(function (line) {\n nodes.push({\n type: 'comment',\n str: \"#\".concat(line)\n });\n });\n if (item.comment) comment = item.comment;\n if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true;\n }\n\n chompKeep = false;\n var str = stringify(item, ctx, function () {\n return comment = null;\n }, function () {\n return chompKeep = true;\n });\n if (inFlow && !hasItemWithNewLine && str.includes('\\n')) hasItemWithNewLine = true;\n if (inFlow && i < _this2.items.length - 1) str += ',';\n str = addComment(str, itemIndent, comment);\n if (chompKeep && (comment || inFlow)) chompKeep = false;\n nodes.push({\n type: 'item',\n str: str\n });\n return nodes;\n }, []);\n var str;\n\n if (nodes.length === 0) {\n str = flowChars.start + flowChars.end;\n } else if (inFlow) {\n var start = flowChars.start,\n end = flowChars.end;\n var strings = nodes.map(function (n) {\n return n.str;\n });\n\n if (hasItemWithNewLine || strings.reduce(function (sum, str) {\n return sum + str.length + 2;\n }, 2) > Collection.maxFlowStringSingleLineLength) {\n str = start;\n\n var _iterator = _createForOfIteratorHelper(strings),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var s = _step.value;\n str += s ? \"\\n\".concat(indentStep).concat(indent).concat(s) : '\\n';\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n str += \"\\n\".concat(indent).concat(end);\n } else {\n str = \"\".concat(start, \" \").concat(strings.join(' '), \" \").concat(end);\n }\n } else {\n var _strings = nodes.map(blockItem);\n\n str = _strings.shift();\n\n var _iterator2 = _createForOfIteratorHelper(_strings),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _s = _step2.value;\n str += _s ? \"\\n\".concat(indent).concat(_s) : '\\n';\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n\n if (this.comment) {\n str += '\\n' + this.comment.replace(/^/gm, \"\".concat(indent, \"#\"));\n if (onComment) onComment();\n } else if (chompKeep && onChompKeep) onChompKeep();\n\n return str;\n }\n }]);\n\n return Collection;\n}(Node);\n\n_defineProperty(Collection, \"maxFlowStringSingleLineLength\", 60);\n\nfunction asItemIndex(key) {\n var idx = key instanceof Scalar ? key.value : key;\n if (idx && typeof idx === 'string') idx = Number(idx);\n return Number.isInteger(idx) && idx >= 0 ? idx : null;\n}\n\nvar YAMLSeq = /*#__PURE__*/function (_Collection) {\n _inherits(YAMLSeq, _Collection);\n\n var _super = _createSuper(YAMLSeq);\n\n function YAMLSeq() {\n _classCallCheck(this, YAMLSeq);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(YAMLSeq, [{\n key: \"add\",\n value: function add(value) {\n this.items.push(value);\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n var idx = asItemIndex(key);\n if (typeof idx !== 'number') return false;\n var del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n }, {\n key: \"get\",\n value: function get(key, keepScalar) {\n var idx = asItemIndex(key);\n if (typeof idx !== 'number') return undefined;\n var it = this.items[idx];\n return !keepScalar && it instanceof Scalar ? it.value : it;\n }\n }, {\n key: \"has\",\n value: function has(key) {\n var idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n }, {\n key: \"set\",\n value: function set(key, value) {\n var idx = asItemIndex(key);\n if (typeof idx !== 'number') throw new Error(\"Expected a valid index, not \".concat(key, \".\"));\n this.items[idx] = value;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON$1(_, ctx) {\n var seq = [];\n if (ctx && ctx.onCreate) ctx.onCreate(seq);\n var i = 0;\n\n var _iterator = _createForOfIteratorHelper(this.items),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n seq.push(toJSON(item, String(i++), ctx));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return seq;\n }\n }, {\n key: \"toString\",\n value: function toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n return _get(_getPrototypeOf(YAMLSeq.prototype), \"toString\", this).call(this, ctx, {\n blockItem: function blockItem(n) {\n return n.type === 'comment' ? n.str : \"- \".concat(n.str);\n },\n flowChars: {\n start: '[',\n end: ']'\n },\n isMap: false,\n itemIndent: (ctx.indent || '') + ' '\n }, onComment, onChompKeep);\n }\n }]);\n\n return YAMLSeq;\n}(Collection);\n\nvar stringifyKey = function stringifyKey(key, jsKey, ctx) {\n if (jsKey === null) return '';\n if (_typeof(jsKey) !== 'object') return String(jsKey);\n if (key instanceof Node && ctx && ctx.doc) return key.toString({\n anchors: Object.create(null),\n doc: ctx.doc,\n indent: '',\n indentStep: ctx.indentStep,\n inFlow: true,\n inStringifyKey: true,\n stringify: ctx.stringify\n });\n return JSON.stringify(jsKey);\n};\n\nvar Pair = /*#__PURE__*/function (_Node) {\n _inherits(Pair, _Node);\n\n var _super = _createSuper(Pair);\n\n function Pair(key) {\n var _this;\n\n var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _classCallCheck(this, Pair);\n\n _this = _super.call(this);\n _this.key = key;\n _this.value = value;\n _this.type = Pair.Type.PAIR;\n return _this;\n }\n\n _createClass(Pair, [{\n key: \"commentBefore\",\n get: function get() {\n return this.key instanceof Node ? this.key.commentBefore : undefined;\n },\n set: function set(cb) {\n if (this.key == null) this.key = new Scalar(null);\n if (this.key instanceof Node) this.key.commentBefore = cb;else {\n var msg = 'Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.';\n throw new Error(msg);\n }\n }\n }, {\n key: \"addToJSMap\",\n value: function addToJSMap(ctx, map) {\n var key = toJSON(this.key, '', ctx);\n\n if (map instanceof Map) {\n var value = toJSON(this.value, key, ctx);\n map.set(key, value);\n } else if (map instanceof Set) {\n map.add(key);\n } else {\n var stringKey = stringifyKey(this.key, key, ctx);\n\n var _value = toJSON(this.value, stringKey, ctx);\n\n if (stringKey in map) Object.defineProperty(map, stringKey, {\n value: _value,\n writable: true,\n enumerable: true,\n configurable: true\n });else map[stringKey] = _value;\n }\n\n return map;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON(_, ctx) {\n var pair = ctx && ctx.mapAsMap ? new Map() : {};\n return this.addToJSMap(ctx, pair);\n }\n }, {\n key: \"toString\",\n value: function toString(ctx, onComment, onChompKeep) {\n if (!ctx || !ctx.doc) return JSON.stringify(this);\n var _ctx$doc$options = ctx.doc.options,\n indentSize = _ctx$doc$options.indent,\n indentSeq = _ctx$doc$options.indentSeq,\n simpleKeys = _ctx$doc$options.simpleKeys;\n var key = this.key,\n value = this.value;\n var keyComment = key instanceof Node && key.comment;\n\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n\n if (key instanceof Collection) {\n var msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n\n var explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === Type.BLOCK_FOLDED || key.type === Type.BLOCK_LITERAL : _typeof(key) === 'object'));\n var _ctx = ctx,\n doc = _ctx.doc,\n indent = _ctx.indent,\n indentStep = _ctx.indentStep,\n stringify = _ctx.stringify;\n ctx = Object.assign({}, ctx, {\n implicitKey: !explicitKey,\n indent: indent + indentStep\n });\n var chompKeep = false;\n var str = stringify(key, ctx, function () {\n return keyComment = null;\n }, function () {\n return chompKeep = true;\n });\n str = addComment(str, ctx.indent, keyComment);\n\n if (!explicitKey && str.length > 1024) {\n if (simpleKeys) throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n\n if (ctx.allNullValues && !simpleKeys) {\n if (this.comment) {\n str = addComment(str, ctx.indent, this.comment);\n if (onComment) onComment();\n } else if (chompKeep && !keyComment && onChompKeep) onChompKeep();\n\n return ctx.inFlow && !explicitKey ? str : \"? \".concat(str);\n }\n\n str = explicitKey ? \"? \".concat(str, \"\\n\").concat(indent, \":\") : \"\".concat(str, \":\");\n\n if (this.comment) {\n // expected (but not strictly required) to be a single-line comment\n str = addComment(str, ctx.indent, this.comment);\n if (onComment) onComment();\n }\n\n var vcb = '';\n var valueComment = null;\n\n if (value instanceof Node) {\n if (value.spaceBefore) vcb = '\\n';\n\n if (value.commentBefore) {\n var cs = value.commentBefore.replace(/^/gm, \"\".concat(ctx.indent, \"#\"));\n vcb += \"\\n\".concat(cs);\n }\n\n valueComment = value.comment;\n } else if (value && _typeof(value) === 'object') {\n value = doc.schema.createNode(value, true);\n }\n\n ctx.implicitKey = false;\n if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n\n if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substr(2);\n }\n\n var valueStr = stringify(value, ctx, function () {\n return valueComment = null;\n }, function () {\n return chompKeep = true;\n });\n var ws = ' ';\n\n if (vcb || this.comment) {\n ws = \"\".concat(vcb, \"\\n\").concat(ctx.indent);\n } else if (!explicitKey && value instanceof Collection) {\n var flow = valueStr[0] === '[' || valueStr[0] === '{';\n if (!flow || valueStr.includes('\\n')) ws = \"\\n\".concat(ctx.indent);\n } else if (valueStr[0] === '\\n') ws = '';\n\n if (chompKeep && !valueComment && onChompKeep) onChompKeep();\n return addComment(str + ws + valueStr, ctx.indent, valueComment);\n }\n }]);\n\n return Pair;\n}(Node);\n\n_defineProperty(Pair, \"Type\", {\n PAIR: 'PAIR',\n MERGE_PAIR: 'MERGE_PAIR'\n});\n\nvar getAliasCount = function getAliasCount(node, anchors) {\n if (node instanceof Alias) {\n var anchor = anchors.get(node.source);\n return anchor.count * anchor.aliasCount;\n } else if (node instanceof Collection) {\n var count = 0;\n\n var _iterator = _createForOfIteratorHelper(node.items),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n var c = getAliasCount(item, anchors);\n if (c > count) count = c;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return count;\n } else if (node instanceof Pair) {\n var kc = getAliasCount(node.key, anchors);\n var vc = getAliasCount(node.value, anchors);\n return Math.max(kc, vc);\n }\n\n return 1;\n};\n\nvar Alias = /*#__PURE__*/function (_Node) {\n _inherits(Alias, _Node);\n\n var _super = _createSuper(Alias);\n\n function Alias(source) {\n var _this;\n\n _classCallCheck(this, Alias);\n\n _this = _super.call(this);\n _this.source = source;\n _this.type = Type.ALIAS;\n return _this;\n }\n\n _createClass(Alias, [{\n key: \"tag\",\n set: function set(t) {\n throw new Error('Alias nodes cannot have tags');\n }\n }, {\n key: \"toJSON\",\n value: function toJSON$1(arg, ctx) {\n if (!ctx) return toJSON(this.source, arg, ctx);\n var anchors = ctx.anchors,\n maxAliasCount = ctx.maxAliasCount;\n var anchor = anchors.get(this.source);\n /* istanbul ignore if */\n\n if (!anchor || anchor.res === undefined) {\n var msg = 'This should not happen: Alias anchor was not resolved?';\n if (this.cstNode) throw new YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);\n }\n\n if (maxAliasCount >= 0) {\n anchor.count += 1;\n if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors);\n\n if (anchor.count * anchor.aliasCount > maxAliasCount) {\n var _msg = 'Excessive alias count indicates a resource exhaustion attack';\n if (this.cstNode) throw new YAMLReferenceError(this.cstNode, _msg);else throw new ReferenceError(_msg);\n }\n }\n\n return anchor.res;\n } // Only called when stringifying an alias mapping key while constructing\n // Object output.\n\n }, {\n key: \"toString\",\n value: function toString(ctx) {\n return Alias.stringify(this, ctx);\n }\n }], [{\n key: \"stringify\",\n value: function stringify(_ref, _ref2) {\n var range = _ref.range,\n source = _ref.source;\n var anchors = _ref2.anchors,\n doc = _ref2.doc,\n implicitKey = _ref2.implicitKey,\n inStringifyKey = _ref2.inStringifyKey;\n var anchor = Object.keys(anchors).find(function (a) {\n return anchors[a] === source;\n });\n if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName();\n if (anchor) return \"*\".concat(anchor).concat(implicitKey ? ' ' : '');\n var msg = doc.anchors.getName(source) ? 'Alias node must be after source node' : 'Source node not found for alias node';\n throw new Error(\"\".concat(msg, \" [\").concat(range, \"]\"));\n }\n }]);\n\n return Alias;\n}(Node);\n\n_defineProperty(Alias, \"default\", true);\n\nfunction findPair(items, key) {\n var k = key instanceof Scalar ? key.value : key;\n\n var _iterator = _createForOfIteratorHelper(items),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var it = _step.value;\n\n if (it instanceof Pair) {\n if (it.key === key || it.key === k) return it;\n if (it.key && it.key.value === k) return it;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return undefined;\n}\nvar YAMLMap = /*#__PURE__*/function (_Collection) {\n _inherits(YAMLMap, _Collection);\n\n var _super = _createSuper(YAMLMap);\n\n function YAMLMap() {\n _classCallCheck(this, YAMLMap);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(YAMLMap, [{\n key: \"add\",\n value: function add(pair, overwrite) {\n if (!pair) pair = new Pair(pair);else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value);\n var prev = findPair(this.items, pair.key);\n var sortEntries = this.schema && this.schema.sortMapEntries;\n\n if (prev) {\n if (overwrite) prev.value = pair.value;else throw new Error(\"Key \".concat(pair.key, \" already set\"));\n } else if (sortEntries) {\n var i = this.items.findIndex(function (item) {\n return sortEntries(pair, item) < 0;\n });\n if (i === -1) this.items.push(pair);else this.items.splice(i, 0, pair);\n } else {\n this.items.push(pair);\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n var it = findPair(this.items, key);\n if (!it) return false;\n var del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n }, {\n key: \"get\",\n value: function get(key, keepScalar) {\n var it = findPair(this.items, key);\n var node = it && it.value;\n return !keepScalar && node instanceof Scalar ? node.value : node;\n }\n }, {\n key: \"has\",\n value: function has(key) {\n return !!findPair(this.items, key);\n }\n }, {\n key: \"set\",\n value: function set(key, value) {\n this.add(new Pair(key, value), true);\n }\n /**\n * @param {*} arg ignored\n * @param {*} ctx Conversion context, originally set in Document#toJSON()\n * @param {Class} Type If set, forces the returned collection type\n * @returns {*} Instance of Type, Map, or Object\n */\n\n }, {\n key: \"toJSON\",\n value: function toJSON(_, ctx, Type) {\n var map = Type ? new Type() : ctx && ctx.mapAsMap ? new Map() : {};\n if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n var _iterator2 = _createForOfIteratorHelper(this.items),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var item = _step2.value;\n item.addToJSMap(ctx, map);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return map;\n }\n }, {\n key: \"toString\",\n value: function toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n\n var _iterator3 = _createForOfIteratorHelper(this.items),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var item = _step3.value;\n if (!(item instanceof Pair)) throw new Error(\"Map items must all be pairs; found \".concat(JSON.stringify(item), \" instead\"));\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return _get(_getPrototypeOf(YAMLMap.prototype), \"toString\", this).call(this, ctx, {\n blockItem: function blockItem(n) {\n return n.str;\n },\n flowChars: {\n start: '{',\n end: '}'\n },\n isMap: true,\n itemIndent: ctx.indent || ''\n }, onComment, onChompKeep);\n }\n }]);\n\n return YAMLMap;\n}(Collection);\n\nvar MERGE_KEY = '<<';\nvar Merge = /*#__PURE__*/function (_Pair) {\n _inherits(Merge, _Pair);\n\n var _super = _createSuper(Merge);\n\n function Merge(pair) {\n var _this;\n\n _classCallCheck(this, Merge);\n\n if (pair instanceof Pair) {\n var seq = pair.value;\n\n if (!(seq instanceof YAMLSeq)) {\n seq = new YAMLSeq();\n seq.items.push(pair.value);\n seq.range = pair.value.range;\n }\n\n _this = _super.call(this, pair.key, seq);\n _this.range = pair.range;\n } else {\n _this = _super.call(this, new Scalar(MERGE_KEY), new YAMLSeq());\n }\n\n _this.type = Pair.Type.MERGE_PAIR;\n return _possibleConstructorReturn(_this);\n } // If the value associated with a merge key is a single mapping node, each of\n // its key/value pairs is inserted into the current mapping, unless the key\n // already exists in it. If the value associated with the merge key is a\n // sequence, then this sequence is expected to contain mapping nodes and each\n // of these nodes is merged in turn according to its order in the sequence.\n // Keys in mapping nodes earlier in the sequence override keys specified in\n // later mapping nodes. -- http://yaml.org/type/merge.html\n\n\n _createClass(Merge, [{\n key: \"addToJSMap\",\n value: function addToJSMap(ctx, map) {\n var _iterator = _createForOfIteratorHelper(this.value.items),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var source = _step.value.source;\n if (!(source instanceof YAMLMap)) throw new Error('Merge sources must be maps');\n var srcMap = source.toJSON(null, ctx, Map);\n\n var _iterator2 = _createForOfIteratorHelper(srcMap),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _step2$value = _slicedToArray(_step2.value, 2),\n key = _step2$value[0],\n value = _step2$value[1];\n\n if (map instanceof Map) {\n if (!map.has(key)) map.set(key, value);\n } else if (map instanceof Set) {\n map.add(key);\n } else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value: value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return map;\n }\n }, {\n key: \"toString\",\n value: function toString(ctx, onComment) {\n var seq = this.value;\n if (seq.items.length > 1) return _get(_getPrototypeOf(Merge.prototype), \"toString\", this).call(this, ctx, onComment);\n this.value = seq.items[0];\n\n var str = _get(_getPrototypeOf(Merge.prototype), \"toString\", this).call(this, ctx, onComment);\n\n this.value = seq;\n return str;\n }\n }]);\n\n return Merge;\n}(Pair);\n\nvar binaryOptions = {\n defaultType: Type.BLOCK_LITERAL,\n lineWidth: 76\n};\nvar boolOptions = {\n trueStr: 'true',\n falseStr: 'false'\n};\nvar intOptions = {\n asBigInt: false\n};\nvar nullOptions = {\n nullStr: 'null'\n};\nvar strOptions = {\n defaultType: Type.PLAIN,\n doubleQuoted: {\n jsonEncoding: false,\n minMultiLineLength: 40\n },\n fold: {\n lineWidth: 80,\n minContentWidth: 20\n }\n};\n\nfunction resolveScalar(str, tags, scalarFallback) {\n var _iterator = _createForOfIteratorHelper(tags),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _step.value,\n format = _step$value.format,\n test = _step$value.test,\n resolve = _step$value.resolve;\n\n if (test) {\n var match = str.match(test);\n\n if (match) {\n var res = resolve.apply(null, match);\n if (!(res instanceof Scalar)) res = new Scalar(res);\n if (format) res.format = format;\n return res;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (scalarFallback) str = scalarFallback(str);\n return new Scalar(str);\n}\n\nvar FOLD_FLOW = 'flow';\nvar FOLD_BLOCK = 'block';\nvar FOLD_QUOTED = 'quoted'; // presumes i+1 is at the start of a line\n// returns index of last newline in more-indented block\n\nvar consumeMoreIndentedLines = function consumeMoreIndentedLines(text, i) {\n var ch = text[i + 1];\n\n while (ch === ' ' || ch === '\\t') {\n do {\n ch = text[i += 1];\n } while (ch && ch !== '\\n');\n\n ch = text[i + 1];\n }\n\n return i;\n};\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n *\n * @param {string} text\n * @param {string} indent\n * @param {string} [mode='flow'] `'block'` prevents more-indented lines\n * from being folded; `'quoted'` allows for `\\` escapes, including escaped\n * newlines\n * @param {Object} options\n * @param {number} [options.indentAtStart] Accounts for leading contents on\n * the first line, defaulting to `indent.length`\n * @param {number} [options.lineWidth=80]\n * @param {number} [options.minContentWidth=20] Allow highly indented lines to\n * stretch the line width or indent content from the start\n * @param {function} options.onFold Called once if the text is folded\n * @param {function} options.onFold Called once if any line of text exceeds\n * lineWidth characters\n */\n\n\nfunction foldFlowLines(text, indent, mode, _ref) {\n var indentAtStart = _ref.indentAtStart,\n _ref$lineWidth = _ref.lineWidth,\n lineWidth = _ref$lineWidth === void 0 ? 80 : _ref$lineWidth,\n _ref$minContentWidth = _ref.minContentWidth,\n minContentWidth = _ref$minContentWidth === void 0 ? 20 : _ref$minContentWidth,\n onFold = _ref.onFold,\n onOverflow = _ref.onOverflow;\n if (!lineWidth || lineWidth < 0) return text;\n var endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep) return text;\n var folds = [];\n var escapedFolds = {};\n var end = lineWidth - indent.length;\n\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);else end = lineWidth - indentAtStart;\n }\n\n var split = undefined;\n var prev = undefined;\n var overflow = false;\n var i = -1;\n var escStart = -1;\n var escEnd = -1;\n\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i);\n if (i !== -1) end = i + endStep;\n }\n\n for (var ch; ch = text[i += 1];) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n\n case 'u':\n i += 5;\n break;\n\n case 'U':\n i += 9;\n break;\n\n default:\n i += 1;\n }\n\n escEnd = i;\n }\n\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i);\n end = i + endStep;\n split = undefined;\n } else {\n if (ch === ' ' && prev && prev !== ' ' && prev !== '\\n' && prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n var next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t') split = i;\n }\n\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n } else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[i += 1];\n overflow = true;\n } // Account for newline escape, but don't break preceding escape\n\n\n var j = i > escEnd + 1 ? i - 2 : escStart - 1; // Bail out if lineWidth & minContentWidth are shorter than an escape string\n\n if (escapedFolds[j]) return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n } else {\n overflow = true;\n }\n }\n }\n\n prev = ch;\n }\n\n if (overflow && onOverflow) onOverflow();\n if (folds.length === 0) return text;\n if (onFold) onFold();\n var res = text.slice(0, folds[0]);\n\n for (var _i = 0; _i < folds.length; ++_i) {\n var fold = folds[_i];\n\n var _end = folds[_i + 1] || text.length;\n\n if (fold === 0) res = \"\\n\".concat(indent).concat(text.slice(0, _end));else {\n if (mode === FOLD_QUOTED && escapedFolds[fold]) res += \"\".concat(text[fold], \"\\\\\");\n res += \"\\n\".concat(indent).concat(text.slice(fold + 1, _end));\n }\n }\n\n return res;\n}\n\nvar getFoldOptions = function getFoldOptions(_ref) {\n var indentAtStart = _ref.indentAtStart;\n return indentAtStart ? Object.assign({\n indentAtStart: indentAtStart\n }, strOptions.fold) : strOptions.fold;\n}; // Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\n\n\nvar containsDocumentMarker = function containsDocumentMarker(str) {\n return /^(%|---|\\.\\.\\.)/m.test(str);\n};\n\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0) return false;\n var limit = lineWidth - indentLength;\n var strLen = str.length;\n if (strLen <= limit) return false;\n\n for (var i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit) return true;\n start = i + 1;\n if (strLen - start <= limit) return false;\n }\n }\n\n return true;\n}\n\nfunction doubleQuotedString(value, ctx) {\n var implicitKey = ctx.implicitKey;\n var _strOptions$doubleQuo = strOptions.doubleQuoted,\n jsonEncoding = _strOptions$doubleQuo.jsonEncoding,\n minMultiLineLength = _strOptions$doubleQuo.minMultiLineLength;\n var json = JSON.stringify(value);\n if (jsonEncoding) return json;\n var indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n var str = '';\n var start = 0;\n\n for (var i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n\n if (ch === '\\\\') switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n var code = json.substr(i + 2, 4);\n\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n\n case '0007':\n str += '\\\\a';\n break;\n\n case '000b':\n str += '\\\\v';\n break;\n\n case '001b':\n str += '\\\\e';\n break;\n\n case '0085':\n str += '\\\\N';\n break;\n\n case '00a0':\n str += '\\\\_';\n break;\n\n case '2028':\n str += '\\\\L';\n break;\n\n case '2029':\n str += '\\\\P';\n break;\n\n default:\n if (code.substr(0, 2) === '00') str += '\\\\x' + code.substr(2);else str += json.substr(i, 6);\n }\n\n i += 5;\n start = i + 1;\n }\n break;\n\n case 'n':\n if (implicitKey || json[i + 2] === '\"' || json.length < minMultiLineLength) {\n i += 1;\n } else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n\n while (json[i + 2] === '\\\\' && json[i + 3] === 'n' && json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n\n str += indent; // space after newline needs to be escaped to not be folded\n\n if (json[i + 2] === ' ') str += '\\\\';\n i += 1;\n start = i + 1;\n }\n\n break;\n\n default:\n i += 1;\n }\n }\n\n str = start ? str + json.slice(start) : json;\n return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx));\n}\n\nfunction singleQuotedString(value, ctx) {\n if (ctx.implicitKey) {\n if (/\\n/.test(value)) return doubleQuotedString(value, ctx);\n } else {\n // single quoted string can't have leading or trailing whitespace around newline\n if (/[ \\t]\\n|\\n[ \\t]/.test(value)) return doubleQuotedString(value, ctx);\n }\n\n var indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n var res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, \"$&\\n\".concat(indent)) + \"'\";\n return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx));\n}\n\nfunction blockString(_ref2, ctx, onComment, onChompKeep) {\n var comment = _ref2.comment,\n type = _ref2.type,\n value = _ref2.value;\n\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (/\\n[\\t ]+$/.test(value) || /^\\s*$/.test(value)) {\n return doubleQuotedString(value, ctx);\n }\n\n var indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n var indentSize = indent ? '2' : '1'; // root is at -1\n\n var literal = type === Type.BLOCK_FOLDED ? false : type === Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth, indent.length);\n var header = literal ? '|' : '>';\n if (!value) return header + '\\n';\n var wsStart = '';\n var wsEnd = '';\n value = value.replace(/[\\n\\t ]*$/, function (ws) {\n var n = ws.indexOf('\\n');\n\n if (n === -1) {\n header += '-'; // strip\n } else if (value === ws || n !== ws.length - 1) {\n header += '+'; // keep\n\n if (onChompKeep) onChompKeep();\n }\n\n wsEnd = ws.replace(/\\n$/, '');\n return '';\n }).replace(/^[\\n ]*/, function (ws) {\n if (ws.indexOf(' ') !== -1) header += indentSize;\n var m = ws.match(/ +$/);\n\n if (m) {\n wsStart = ws.slice(0, -m[0].length);\n return m[0];\n } else {\n wsStart = ws;\n return '';\n }\n });\n if (wsEnd) wsEnd = wsEnd.replace(/\\n+(?!\\n|$)/g, \"$&\".concat(indent));\n if (wsStart) wsStart = wsStart.replace(/\\n+/g, \"$&\".concat(indent));\n\n if (comment) {\n header += ' #' + comment.replace(/ ?[\\r\\n]+/g, ' ');\n if (onComment) onComment();\n }\n\n if (!value) return \"\".concat(header).concat(indentSize, \"\\n\").concat(indent).concat(wsEnd);\n\n if (literal) {\n value = value.replace(/\\n+/g, \"$&\".concat(indent));\n return \"\".concat(header, \"\\n\").concat(indent).concat(wsStart).concat(value).concat(wsEnd);\n }\n\n value = value.replace(/\\n+/g, '\\n$&').replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ ind.line ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, \"$&\".concat(indent));\n var body = foldFlowLines(\"\".concat(wsStart).concat(value).concat(wsEnd), indent, FOLD_BLOCK, strOptions.fold);\n return \"\".concat(header, \"\\n\").concat(indent).concat(body);\n}\n\nfunction plainString(item, ctx, onComment, onChompKeep) {\n var comment = item.comment,\n type = item.type,\n value = item.value;\n var actualString = ctx.actualString,\n implicitKey = ctx.implicitKey,\n indent = ctx.indent,\n inFlow = ctx.inFlow;\n\n if (implicitKey && /[\\n[\\]{},]/.test(value) || inFlow && /[[\\]{},]/.test(value)) {\n return doubleQuotedString(value, ctx);\n }\n\n if (!value || /^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - empty string, '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || value.indexOf('\\n') === -1 ? value.indexOf('\"') !== -1 && value.indexOf(\"'\") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);\n }\n\n if (!implicitKey && !inFlow && type !== Type.PLAIN && value.indexOf('\\n') !== -1) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n\n if (indent === '' && containsDocumentMarker(value)) {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n\n var str = value.replace(/\\n+/g, \"$&\\n\".concat(indent)); // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n\n if (actualString) {\n var tags = ctx.doc.schema.tags;\n var resolved = resolveScalar(str, tags, tags.scalarFallback).value;\n if (typeof resolved !== 'string') return doubleQuotedString(value, ctx);\n }\n\n var body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx));\n\n if (comment && !inFlow && (body.indexOf('\\n') !== -1 || comment.indexOf('\\n') !== -1)) {\n if (onComment) onComment();\n return addCommentBefore(body, indent, comment);\n }\n\n return body;\n}\n\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n var defaultType = strOptions.defaultType;\n var implicitKey = ctx.implicitKey,\n inFlow = ctx.inFlow;\n var _item = item,\n type = _item.type,\n value = _item.value;\n\n if (typeof value !== 'string') {\n value = String(value);\n item = Object.assign({}, item, {\n value: value\n });\n }\n\n var _stringify = function _stringify(_type) {\n switch (_type) {\n case Type.BLOCK_FOLDED:\n case Type.BLOCK_LITERAL:\n return blockString(item, ctx, onComment, onChompKeep);\n\n case Type.QUOTE_DOUBLE:\n return doubleQuotedString(value, ctx);\n\n case Type.QUOTE_SINGLE:\n return singleQuotedString(value, ctx);\n\n case Type.PLAIN:\n return plainString(item, ctx, onComment, onChompKeep);\n\n default:\n return null;\n }\n };\n\n if (type !== Type.QUOTE_DOUBLE && /[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/.test(value)) {\n // force double quotes on control characters\n type = Type.QUOTE_DOUBLE;\n } else if ((implicitKey || inFlow) && (type === Type.BLOCK_FOLDED || type === Type.BLOCK_LITERAL)) {\n // should not happen; blocks are not valid inside flow containers\n type = Type.QUOTE_DOUBLE;\n }\n\n var res = _stringify(type);\n\n if (res === null) {\n res = _stringify(defaultType);\n if (res === null) throw new Error(\"Unsupported default string type \".concat(defaultType));\n }\n\n return res;\n}\n\nfunction stringifyNumber(_ref) {\n var format = _ref.format,\n minFractionDigits = _ref.minFractionDigits,\n tag = _ref.tag,\n value = _ref.value;\n if (typeof value === 'bigint') return String(value);\n if (!isFinite(value)) return isNaN(value) ? '.nan' : value < 0 ? '-.inf' : '.inf';\n var n = JSON.stringify(value);\n\n if (!format && minFractionDigits && (!tag || tag === 'tag:yaml.org,2002:float') && /^\\d/.test(n)) {\n var i = n.indexOf('.');\n\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n\n var d = minFractionDigits - (n.length - i - 1);\n\n while (d-- > 0) {\n n += '0';\n }\n }\n\n return n;\n}\n\nfunction checkFlowCollectionEnd(errors, cst) {\n var char, name;\n\n switch (cst.type) {\n case Type.FLOW_MAP:\n char = '}';\n name = 'flow map';\n break;\n\n case Type.FLOW_SEQ:\n char = ']';\n name = 'flow sequence';\n break;\n\n default:\n errors.push(new YAMLSemanticError(cst, 'Not a flow collection!?'));\n return;\n }\n\n var lastItem;\n\n for (var i = cst.items.length - 1; i >= 0; --i) {\n var item = cst.items[i];\n\n if (!item || item.type !== Type.COMMENT) {\n lastItem = item;\n break;\n }\n }\n\n if (lastItem && lastItem.char !== char) {\n var msg = \"Expected \".concat(name, \" to end with \").concat(char);\n var err;\n\n if (typeof lastItem.offset === 'number') {\n err = new YAMLSemanticError(cst, msg);\n err.offset = lastItem.offset + 1;\n } else {\n err = new YAMLSemanticError(lastItem, msg);\n if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start;\n }\n\n errors.push(err);\n }\n}\nfunction checkFlowCommentSpace(errors, comment) {\n var prev = comment.context.src[comment.range.start - 1];\n\n if (prev !== '\\n' && prev !== '\\t' && prev !== ' ') {\n var msg = 'Comments must be separated from other tokens by white space characters';\n errors.push(new YAMLSemanticError(comment, msg));\n }\n}\nfunction getLongKeyError(source, key) {\n var sk = String(key);\n var k = sk.substr(0, 8) + '...' + sk.substr(-8);\n return new YAMLSemanticError(source, \"The \\\"\".concat(k, \"\\\" key is too long\"));\n}\nfunction resolveComments(collection, comments) {\n var _iterator = _createForOfIteratorHelper(comments),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _step.value,\n afterKey = _step$value.afterKey,\n before = _step$value.before,\n comment = _step$value.comment;\n var item = collection.items[before];\n\n if (!item) {\n if (comment !== undefined) {\n if (collection.comment) collection.comment += '\\n' + comment;else collection.comment = comment;\n }\n } else {\n if (afterKey && item.value) item = item.value;\n\n if (comment === undefined) {\n if (afterKey || !item.commentBefore) item.spaceBefore = true;\n } else {\n if (item.commentBefore) item.commentBefore += '\\n' + comment;else item.commentBefore = comment;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n}\n\n// on error, will return { str: string, errors: Error[] }\nfunction resolveString(doc, node) {\n var res = node.strValue;\n if (!res) return '';\n if (typeof res === 'string') return res;\n res.errors.forEach(function (error) {\n if (!error.source) error.source = node;\n doc.errors.push(error);\n });\n return res.str;\n}\n\nfunction resolveTagHandle(doc, node) {\n var _node$tag = node.tag,\n handle = _node$tag.handle,\n suffix = _node$tag.suffix;\n var prefix = doc.tagPrefixes.find(function (p) {\n return p.handle === handle;\n });\n\n if (!prefix) {\n var dtp = doc.getDefaults().tagPrefixes;\n if (dtp) prefix = dtp.find(function (p) {\n return p.handle === handle;\n });\n if (!prefix) throw new YAMLSemanticError(node, \"The \".concat(handle, \" tag handle is non-default and was not declared.\"));\n }\n\n if (!suffix) throw new YAMLSemanticError(node, \"The \".concat(handle, \" tag has no suffix.\"));\n\n if (handle === '!' && (doc.version || doc.options.version) === '1.0') {\n if (suffix[0] === '^') {\n doc.warnings.push(new YAMLWarning(node, 'YAML 1.0 ^ tag expansion is not supported'));\n return suffix;\n }\n\n if (/[:/]/.test(suffix)) {\n // word/foo -> tag:word.yaml.org,2002:foo\n var vocab = suffix.match(/^([a-z0-9-]+)\\/(.*)/i);\n return vocab ? \"tag:\".concat(vocab[1], \".yaml.org,2002:\").concat(vocab[2]) : \"tag:\".concat(suffix);\n }\n }\n\n return prefix.prefix + decodeURIComponent(suffix);\n}\n\nfunction resolveTagName(doc, node) {\n var tag = node.tag,\n type = node.type;\n var nonSpecific = false;\n\n if (tag) {\n var handle = tag.handle,\n suffix = tag.suffix,\n verbatim = tag.verbatim;\n\n if (verbatim) {\n if (verbatim !== '!' && verbatim !== '!!') return verbatim;\n var msg = \"Verbatim tags aren't resolved, so \".concat(verbatim, \" is invalid.\");\n doc.errors.push(new YAMLSemanticError(node, msg));\n } else if (handle === '!' && !suffix) {\n nonSpecific = true;\n } else {\n try {\n return resolveTagHandle(doc, node);\n } catch (error) {\n doc.errors.push(error);\n }\n }\n }\n\n switch (type) {\n case Type.BLOCK_FOLDED:\n case Type.BLOCK_LITERAL:\n case Type.QUOTE_DOUBLE:\n case Type.QUOTE_SINGLE:\n return defaultTags.STR;\n\n case Type.FLOW_MAP:\n case Type.MAP:\n return defaultTags.MAP;\n\n case Type.FLOW_SEQ:\n case Type.SEQ:\n return defaultTags.SEQ;\n\n case Type.PLAIN:\n return nonSpecific ? defaultTags.STR : null;\n\n default:\n return null;\n }\n}\n\nfunction resolveByTagName(doc, node, tagName) {\n var tags = doc.schema.tags;\n var matchWithTest = [];\n\n var _iterator = _createForOfIteratorHelper(tags),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var tag = _step.value;\n\n if (tag.tag === tagName) {\n if (tag.test) matchWithTest.push(tag);else {\n var res = tag.resolve(doc, node);\n return res instanceof Collection ? res : new Scalar(res);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var str = resolveString(doc, node);\n if (typeof str === 'string' && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback);\n return null;\n}\n\nfunction getFallbackTagName(_ref) {\n var type = _ref.type;\n\n switch (type) {\n case Type.FLOW_MAP:\n case Type.MAP:\n return defaultTags.MAP;\n\n case Type.FLOW_SEQ:\n case Type.SEQ:\n return defaultTags.SEQ;\n\n default:\n return defaultTags.STR;\n }\n}\n\nfunction resolveTag(doc, node, tagName) {\n try {\n var res = resolveByTagName(doc, node, tagName);\n\n if (res) {\n if (tagName && node.tag) res.tag = tagName;\n return res;\n }\n } catch (error) {\n /* istanbul ignore if */\n if (!error.source) error.source = node;\n doc.errors.push(error);\n return null;\n }\n\n try {\n var fallback = getFallbackTagName(node);\n if (!fallback) throw new Error(\"The tag \".concat(tagName, \" is unavailable\"));\n var msg = \"The tag \".concat(tagName, \" is unavailable, falling back to \").concat(fallback);\n doc.warnings.push(new YAMLWarning(node, msg));\n\n var _res = resolveByTagName(doc, node, fallback);\n\n _res.tag = tagName;\n return _res;\n } catch (error) {\n var refError = new YAMLReferenceError(node, error.message);\n refError.stack = error.stack;\n doc.errors.push(refError);\n return null;\n }\n}\n\nvar isCollectionItem = function isCollectionItem(node) {\n if (!node) return false;\n var type = node.type;\n return type === Type.MAP_KEY || type === Type.MAP_VALUE || type === Type.SEQ_ITEM;\n};\n\nfunction resolveNodeProps(errors, node) {\n var comments = {\n before: [],\n after: []\n };\n var hasAnchor = false;\n var hasTag = false;\n var props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props;\n\n var _iterator = _createForOfIteratorHelper(props),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _step.value,\n start = _step$value.start,\n end = _step$value.end;\n\n switch (node.context.src[start]) {\n case Char.COMMENT:\n {\n if (!node.commentHasRequiredWhitespace(start)) {\n var msg = 'Comments must be separated from other tokens by white space characters';\n errors.push(new YAMLSemanticError(node, msg));\n }\n\n var header = node.header,\n valueRange = node.valueRange;\n var cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before;\n cc.push(node.context.src.slice(start + 1, end));\n break;\n }\n // Actual anchor & tag resolution is handled by schema, here we just complain\n\n case Char.ANCHOR:\n if (hasAnchor) {\n var _msg = 'A node can have at most one anchor';\n errors.push(new YAMLSemanticError(node, _msg));\n }\n\n hasAnchor = true;\n break;\n\n case Char.TAG:\n if (hasTag) {\n var _msg2 = 'A node can have at most one tag';\n errors.push(new YAMLSemanticError(node, _msg2));\n }\n\n hasTag = true;\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return {\n comments: comments,\n hasAnchor: hasAnchor,\n hasTag: hasTag\n };\n}\n\nfunction resolveNodeValue(doc, node) {\n var anchors = doc.anchors,\n errors = doc.errors,\n schema = doc.schema;\n\n if (node.type === Type.ALIAS) {\n var name = node.rawValue;\n var src = anchors.getNode(name);\n\n if (!src) {\n var msg = \"Aliased anchor not found: \".concat(name);\n errors.push(new YAMLReferenceError(node, msg));\n return null;\n } // Lazy resolution for circular references\n\n\n var res = new Alias(src);\n\n anchors._cstAliases.push(res);\n\n return res;\n }\n\n var tagName = resolveTagName(doc, node);\n if (tagName) return resolveTag(doc, node, tagName);\n\n if (node.type !== Type.PLAIN) {\n var _msg3 = \"Failed to resolve \".concat(node.type, \" node here\");\n\n errors.push(new YAMLSyntaxError(node, _msg3));\n return null;\n }\n\n try {\n var str = resolveString(doc, node);\n return resolveScalar(str, schema.tags, schema.tags.scalarFallback);\n } catch (error) {\n if (!error.source) error.source = node;\n errors.push(error);\n return null;\n }\n} // sets node.resolved on success\n\n\nfunction resolveNode(doc, node) {\n if (!node) return null;\n if (node.error) doc.errors.push(node.error);\n\n var _resolveNodeProps = resolveNodeProps(doc.errors, node),\n comments = _resolveNodeProps.comments,\n hasAnchor = _resolveNodeProps.hasAnchor,\n hasTag = _resolveNodeProps.hasTag;\n\n if (hasAnchor) {\n var anchors = doc.anchors;\n var name = node.anchor;\n var prev = anchors.getNode(name); // At this point, aliases for any preceding node with the same anchor\n // name have already been resolved, so it may safely be renamed.\n\n if (prev) anchors.map[anchors.newName(name)] = prev; // During parsing, we need to store the CST node in anchors.map as\n // anchors need to be available during resolution to allow for\n // circular references.\n\n anchors.map[name] = node;\n }\n\n if (node.type === Type.ALIAS && (hasAnchor || hasTag)) {\n var msg = 'An alias node must not specify any properties';\n doc.errors.push(new YAMLSemanticError(node, msg));\n }\n\n var res = resolveNodeValue(doc, node);\n\n if (res) {\n res.range = [node.range.start, node.range.end];\n if (doc.options.keepCstNodes) res.cstNode = node;\n if (doc.options.keepNodeTypes) res.type = node.type;\n var cb = comments.before.join('\\n');\n\n if (cb) {\n res.commentBefore = res.commentBefore ? \"\".concat(res.commentBefore, \"\\n\").concat(cb) : cb;\n }\n\n var ca = comments.after.join('\\n');\n if (ca) res.comment = res.comment ? \"\".concat(res.comment, \"\\n\").concat(ca) : ca;\n }\n\n return node.resolved = res;\n}\n\nfunction resolveMap(doc, cst) {\n if (cst.type !== Type.MAP && cst.type !== Type.FLOW_MAP) {\n var msg = \"A \".concat(cst.type, \" node cannot be resolved as a mapping\");\n doc.errors.push(new YAMLSyntaxError(cst, msg));\n return null;\n }\n\n var _ref = cst.type === Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst),\n comments = _ref.comments,\n items = _ref.items;\n\n var map = new YAMLMap();\n map.items = items;\n resolveComments(map, comments);\n var hasCollectionKey = false;\n\n for (var i = 0; i < items.length; ++i) {\n var iKey = items[i].key;\n if (iKey instanceof Collection) hasCollectionKey = true;\n\n if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) {\n items[i] = new Merge(items[i]);\n var sources = items[i].value.items;\n var error = null;\n sources.some(function (node) {\n if (node instanceof Alias) {\n // During parsing, alias sources are CST nodes; to account for\n // circular references their resolved values can't be used here.\n var type = node.source.type;\n if (type === Type.MAP || type === Type.FLOW_MAP) return false;\n return error = 'Merge nodes aliases can only point to maps';\n }\n\n return error = 'Merge nodes can only have Alias nodes as values';\n });\n if (error) doc.errors.push(new YAMLSemanticError(cst, error));\n } else {\n for (var j = i + 1; j < items.length; ++j) {\n var jKey = items[j].key;\n\n if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, 'value') && iKey.value === jKey.value) {\n var _msg = \"Map keys must be unique; \\\"\".concat(iKey, \"\\\" is repeated\");\n\n doc.errors.push(new YAMLSemanticError(cst, _msg));\n break;\n }\n }\n }\n }\n\n if (hasCollectionKey && !doc.options.mapAsMap) {\n var warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n doc.warnings.push(new YAMLWarning(cst, warn));\n }\n\n cst.resolved = map;\n return map;\n}\n\nvar valueHasPairComment = function valueHasPairComment(_ref2) {\n var _ref2$context = _ref2.context,\n lineStart = _ref2$context.lineStart,\n node = _ref2$context.node,\n src = _ref2$context.src,\n props = _ref2.props;\n if (props.length === 0) return false;\n var start = props[0].start;\n if (node && start > node.valueRange.start) return false;\n if (src[start] !== Char.COMMENT) return false;\n\n for (var i = lineStart; i < start; ++i) {\n if (src[i] === '\\n') return false;\n }\n\n return true;\n};\n\nfunction resolvePairComment(item, pair) {\n if (!valueHasPairComment(item)) return;\n var comment = item.getPropValue(0, Char.COMMENT, true);\n var found = false;\n var cb = pair.value.commentBefore;\n\n if (cb && cb.startsWith(comment)) {\n pair.value.commentBefore = cb.substr(comment.length + 1);\n found = true;\n } else {\n var cc = pair.value.comment;\n\n if (!item.node && cc && cc.startsWith(comment)) {\n pair.value.comment = cc.substr(comment.length + 1);\n found = true;\n }\n }\n\n if (found) pair.comment = comment;\n}\n\nfunction resolveBlockMapItems(doc, cst) {\n var comments = [];\n var items = [];\n var key = undefined;\n var keyStart = null;\n\n for (var i = 0; i < cst.items.length; ++i) {\n var item = cst.items[i];\n\n switch (item.type) {\n case Type.BLANK_LINE:\n comments.push({\n afterKey: !!key,\n before: items.length\n });\n break;\n\n case Type.COMMENT:\n comments.push({\n afterKey: !!key,\n before: items.length,\n comment: item.comment\n });\n break;\n\n case Type.MAP_KEY:\n if (key !== undefined) items.push(new Pair(key));\n if (item.error) doc.errors.push(item.error);\n key = resolveNode(doc, item.node);\n keyStart = null;\n break;\n\n case Type.MAP_VALUE:\n {\n if (key === undefined) key = null;\n if (item.error) doc.errors.push(item.error);\n\n if (!item.context.atLineStart && item.node && item.node.type === Type.MAP && !item.node.context.atLineStart) {\n var msg = 'Nested mappings are not allowed in compact mappings';\n doc.errors.push(new YAMLSemanticError(item.node, msg));\n }\n\n var valueNode = item.node;\n\n if (!valueNode && item.props.length > 0) {\n // Comments on an empty mapping value need to be preserved, so we\n // need to construct a minimal empty node here to use instead of the\n // missing `item.node`. -- eemeli/yaml#19\n valueNode = new PlainValue(Type.PLAIN, []);\n valueNode.context = {\n parent: item,\n src: item.context.src\n };\n var pos = item.range.start + 1;\n valueNode.range = {\n start: pos,\n end: pos\n };\n valueNode.valueRange = {\n start: pos,\n end: pos\n };\n\n if (typeof item.range.origStart === 'number') {\n var origPos = item.range.origStart + 1;\n valueNode.range.origStart = valueNode.range.origEnd = origPos;\n valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos;\n }\n }\n\n var pair = new Pair(key, resolveNode(doc, valueNode));\n resolvePairComment(item, pair);\n items.push(pair);\n\n if (key && typeof keyStart === 'number') {\n if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n }\n\n key = undefined;\n keyStart = null;\n }\n break;\n\n default:\n if (key !== undefined) items.push(new Pair(key));\n key = resolveNode(doc, item);\n keyStart = item.range.start;\n if (item.error) doc.errors.push(item.error);\n\n next: for (var j = i + 1;; ++j) {\n var nextItem = cst.items[j];\n\n switch (nextItem && nextItem.type) {\n case Type.BLANK_LINE:\n case Type.COMMENT:\n continue next;\n\n case Type.MAP_VALUE:\n break next;\n\n default:\n {\n var _msg2 = 'Implicit map keys need to be followed by map values';\n doc.errors.push(new YAMLSemanticError(item, _msg2));\n break next;\n }\n }\n }\n\n if (item.valueRangeContainsNewline) {\n var _msg3 = 'Implicit map keys need to be on a single line';\n doc.errors.push(new YAMLSemanticError(item, _msg3));\n }\n\n }\n }\n\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments: comments,\n items: items\n };\n}\n\nfunction resolveFlowMapItems(doc, cst) {\n var comments = [];\n var items = [];\n var key = undefined;\n var explicitKey = false;\n var next = '{';\n\n for (var i = 0; i < cst.items.length; ++i) {\n var item = cst.items[i];\n\n if (typeof item.char === 'string') {\n var char = item.char,\n offset = item.offset;\n\n if (char === '?' && key === undefined && !explicitKey) {\n explicitKey = true;\n next = ':';\n continue;\n }\n\n if (char === ':') {\n if (key === undefined) key = null;\n\n if (next === ':') {\n next = ',';\n continue;\n }\n } else {\n if (explicitKey) {\n if (key === undefined && char !== ',') key = null;\n explicitKey = false;\n }\n\n if (key !== undefined) {\n items.push(new Pair(key));\n key = undefined;\n\n if (char === ',') {\n next = ':';\n continue;\n }\n }\n }\n\n if (char === '}') {\n if (i === cst.items.length - 1) continue;\n } else if (char === next) {\n next = ':';\n continue;\n }\n\n var msg = \"Flow map contains an unexpected \".concat(char);\n var err = new YAMLSyntaxError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n } else if (item.type === Type.BLANK_LINE) {\n comments.push({\n afterKey: !!key,\n before: items.length\n });\n } else if (item.type === Type.COMMENT) {\n checkFlowCommentSpace(doc.errors, item);\n comments.push({\n afterKey: !!key,\n before: items.length,\n comment: item.comment\n });\n } else if (key === undefined) {\n if (next === ',') doc.errors.push(new YAMLSemanticError(item, 'Separator , missing in flow map'));\n key = resolveNode(doc, item);\n } else {\n if (next !== ',') doc.errors.push(new YAMLSemanticError(item, 'Indicator : missing in flow map entry'));\n items.push(new Pair(key, resolveNode(doc, item)));\n key = undefined;\n explicitKey = false;\n }\n }\n\n checkFlowCollectionEnd(doc.errors, cst);\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments: comments,\n items: items\n };\n}\n\nfunction resolveSeq(doc, cst) {\n if (cst.type !== Type.SEQ && cst.type !== Type.FLOW_SEQ) {\n var msg = \"A \".concat(cst.type, \" node cannot be resolved as a sequence\");\n doc.errors.push(new YAMLSyntaxError(cst, msg));\n return null;\n }\n\n var _ref = cst.type === Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst),\n comments = _ref.comments,\n items = _ref.items;\n\n var seq = new YAMLSeq();\n seq.items = items;\n resolveComments(seq, comments);\n\n if (!doc.options.mapAsMap && items.some(function (it) {\n return it instanceof Pair && it.key instanceof Collection;\n })) {\n var warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n doc.warnings.push(new YAMLWarning(cst, warn));\n }\n\n cst.resolved = seq;\n return seq;\n}\n\nfunction resolveBlockSeqItems(doc, cst) {\n var comments = [];\n var items = [];\n\n for (var i = 0; i < cst.items.length; ++i) {\n var item = cst.items[i];\n\n switch (item.type) {\n case Type.BLANK_LINE:\n comments.push({\n before: items.length\n });\n break;\n\n case Type.COMMENT:\n comments.push({\n comment: item.comment,\n before: items.length\n });\n break;\n\n case Type.SEQ_ITEM:\n if (item.error) doc.errors.push(item.error);\n items.push(resolveNode(doc, item.node));\n\n if (item.hasProps) {\n var msg = 'Sequence items cannot have tags or anchors before the - indicator';\n doc.errors.push(new YAMLSemanticError(item, msg));\n }\n\n break;\n\n default:\n if (item.error) doc.errors.push(item.error);\n doc.errors.push(new YAMLSyntaxError(item, \"Unexpected \".concat(item.type, \" node in sequence\")));\n }\n }\n\n return {\n comments: comments,\n items: items\n };\n}\n\nfunction resolveFlowSeqItems(doc, cst) {\n var comments = [];\n var items = [];\n var explicitKey = false;\n var key = undefined;\n var keyStart = null;\n var next = '[';\n var prevItem = null;\n\n for (var i = 0; i < cst.items.length; ++i) {\n var item = cst.items[i];\n\n if (typeof item.char === 'string') {\n var char = item.char,\n offset = item.offset;\n\n if (char !== ':' && (explicitKey || key !== undefined)) {\n if (explicitKey && key === undefined) key = next ? items.pop() : null;\n items.push(new Pair(key));\n explicitKey = false;\n key = undefined;\n keyStart = null;\n }\n\n if (char === next) {\n next = null;\n } else if (!next && char === '?') {\n explicitKey = true;\n } else if (next !== '[' && char === ':' && key === undefined) {\n if (next === ',') {\n key = items.pop();\n\n if (key instanceof Pair) {\n var msg = 'Chaining flow sequence pairs is invalid';\n var err = new YAMLSemanticError(cst, msg);\n err.offset = offset;\n doc.errors.push(err);\n }\n\n if (!explicitKey && typeof keyStart === 'number') {\n var keyEnd = item.range ? item.range.start : item.offset;\n if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n var src = prevItem.context.src;\n\n for (var _i = keyStart; _i < keyEnd; ++_i) {\n if (src[_i] === '\\n') {\n var _msg = 'Implicit keys of flow sequence pairs need to be on a single line';\n doc.errors.push(new YAMLSemanticError(prevItem, _msg));\n break;\n }\n }\n }\n } else {\n key = null;\n }\n\n keyStart = null;\n explicitKey = false;\n next = null;\n } else if (next === '[' || char !== ']' || i < cst.items.length - 1) {\n var _msg2 = \"Flow sequence contains an unexpected \".concat(char);\n\n var _err = new YAMLSyntaxError(cst, _msg2);\n\n _err.offset = offset;\n doc.errors.push(_err);\n }\n } else if (item.type === Type.BLANK_LINE) {\n comments.push({\n before: items.length\n });\n } else if (item.type === Type.COMMENT) {\n checkFlowCommentSpace(doc.errors, item);\n comments.push({\n comment: item.comment,\n before: items.length\n });\n } else {\n if (next) {\n var _msg3 = \"Expected a \".concat(next, \" in flow sequence\");\n\n doc.errors.push(new YAMLSemanticError(item, _msg3));\n }\n\n var value = resolveNode(doc, item);\n\n if (key === undefined) {\n items.push(value);\n prevItem = item;\n } else {\n items.push(new Pair(key, value));\n key = undefined;\n }\n\n keyStart = item.range.start;\n next = ',';\n }\n }\n\n checkFlowCollectionEnd(doc.errors, cst);\n if (key !== undefined) items.push(new Pair(key));\n return {\n comments: comments,\n items: items\n };\n}\n\nexport { Alias as A, Collection as C, Merge as M, Node as N, Pair as P, Scalar as S, YAMLSeq as Y, boolOptions as a, binaryOptions as b, stringifyString as c, YAMLMap as d, isEmptyPath as e, addComment as f, resolveMap as g, resolveSeq as h, intOptions as i, resolveString as j, stringifyNumber as k, findPair as l, nullOptions as n, resolveNode as r, strOptions as s, toJSON as t };\n","import { o as YAMLReferenceError, T as Type, g as YAMLSemanticError, _ as _createForOfIteratorHelper, e as _defineProperty, j as _inherits, k as _createSuper, c as _classCallCheck, p as _assertThisInitialized, b as _createClass, a as _typeof, l as _get, m as _getPrototypeOf } from './PlainValue-b8036b75.js';\nimport { j as resolveString, b as binaryOptions, c as stringifyString, h as resolveSeq, P as Pair, d as YAMLMap, Y as YAMLSeq, t as toJSON, S as Scalar, l as findPair, g as resolveMap, k as stringifyNumber } from './resolveSeq-492ab440.js';\n\n/* global atob, btoa, Buffer */\nvar binary = {\n identify: function identify(value) {\n return value instanceof Uint8Array;\n },\n // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve: function resolve(doc, node) {\n var src = resolveString(doc, node);\n\n if (typeof Buffer === 'function') {\n return Buffer.from(src, 'base64');\n } else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n var str = atob(src.replace(/[\\n\\r]/g, ''));\n var buffer = new Uint8Array(str.length);\n\n for (var i = 0; i < str.length; ++i) {\n buffer[i] = str.charCodeAt(i);\n }\n\n return buffer;\n } else {\n var msg = 'This environment does not support reading binary tags; either Buffer or atob is required';\n doc.errors.push(new YAMLReferenceError(node, msg));\n return null;\n }\n },\n options: binaryOptions,\n stringify: function stringify(_ref, ctx, onComment, onChompKeep) {\n var comment = _ref.comment,\n type = _ref.type,\n value = _ref.value;\n var src;\n\n if (typeof Buffer === 'function') {\n src = value instanceof Buffer ? value.toString('base64') : Buffer.from(value.buffer).toString('base64');\n } else if (typeof btoa === 'function') {\n var s = '';\n\n for (var i = 0; i < value.length; ++i) {\n s += String.fromCharCode(value[i]);\n }\n\n src = btoa(s);\n } else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n\n if (!type) type = binaryOptions.defaultType;\n\n if (type === Type.QUOTE_DOUBLE) {\n value = src;\n } else {\n var lineWidth = binaryOptions.lineWidth;\n var n = Math.ceil(src.length / lineWidth);\n var lines = new Array(n);\n\n for (var _i = 0, o = 0; _i < n; ++_i, o += lineWidth) {\n lines[_i] = src.substr(o, lineWidth);\n }\n\n value = lines.join(type === Type.BLOCK_LITERAL ? '\\n' : ' ');\n }\n\n return stringifyString({\n comment: comment,\n type: type,\n value: value\n }, ctx, onComment, onChompKeep);\n }\n};\n\nfunction parsePairs(doc, cst) {\n var seq = resolveSeq(doc, cst);\n\n for (var i = 0; i < seq.items.length; ++i) {\n var item = seq.items[i];\n if (item instanceof Pair) continue;else if (item instanceof YAMLMap) {\n if (item.items.length > 1) {\n var msg = 'Each pair must have its own sequence indicator';\n throw new YAMLSemanticError(cst, msg);\n }\n\n var pair = item.items[0] || new Pair();\n if (item.commentBefore) pair.commentBefore = pair.commentBefore ? \"\".concat(item.commentBefore, \"\\n\").concat(pair.commentBefore) : item.commentBefore;\n if (item.comment) pair.comment = pair.comment ? \"\".concat(item.comment, \"\\n\").concat(pair.comment) : item.comment;\n item = pair;\n }\n seq.items[i] = item instanceof Pair ? item : new Pair(item);\n }\n\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n var pairs = new YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n\n var _iterator = _createForOfIteratorHelper(iterable),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var it = _step.value;\n var key = void 0,\n value = void 0;\n\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n } else throw new TypeError(\"Expected [key, value] tuple: \".concat(it));\n } else if (it && it instanceof Object) {\n var keys = Object.keys(it);\n\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n } else throw new TypeError(\"Expected { key: value } tuple: \".concat(it));\n } else {\n key = it;\n }\n\n var pair = schema.createPair(key, value, ctx);\n pairs.items.push(pair);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return pairs;\n}\nvar pairs = {\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: parsePairs,\n createNode: createPairs\n};\n\nvar YAMLOMap = /*#__PURE__*/function (_YAMLSeq) {\n _inherits(YAMLOMap, _YAMLSeq);\n\n var _super = _createSuper(YAMLOMap);\n\n function YAMLOMap() {\n var _this;\n\n _classCallCheck(this, YAMLOMap);\n\n _this = _super.call(this);\n\n _defineProperty(_assertThisInitialized(_this), \"add\", YAMLMap.prototype.add.bind(_assertThisInitialized(_this)));\n\n _defineProperty(_assertThisInitialized(_this), \"delete\", YAMLMap.prototype.delete.bind(_assertThisInitialized(_this)));\n\n _defineProperty(_assertThisInitialized(_this), \"get\", YAMLMap.prototype.get.bind(_assertThisInitialized(_this)));\n\n _defineProperty(_assertThisInitialized(_this), \"has\", YAMLMap.prototype.has.bind(_assertThisInitialized(_this)));\n\n _defineProperty(_assertThisInitialized(_this), \"set\", YAMLMap.prototype.set.bind(_assertThisInitialized(_this)));\n\n _this.tag = YAMLOMap.tag;\n return _this;\n }\n\n _createClass(YAMLOMap, [{\n key: \"toJSON\",\n value: function toJSON$1(_, ctx) {\n var map = new Map();\n if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n var _iterator = _createForOfIteratorHelper(this.items),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var pair = _step.value;\n var key = void 0,\n value = void 0;\n\n if (pair instanceof Pair) {\n key = toJSON(pair.key, '', ctx);\n value = toJSON(pair.value, key, ctx);\n } else {\n key = toJSON(pair, '', ctx);\n }\n\n if (map.has(key)) throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return map;\n }\n }]);\n\n return YAMLOMap;\n}(YAMLSeq);\n\n_defineProperty(YAMLOMap, \"tag\", 'tag:yaml.org,2002:omap');\n\nfunction parseOMap(doc, cst) {\n var pairs = parsePairs(doc, cst);\n var seenKeys = [];\n\n var _iterator2 = _createForOfIteratorHelper(pairs.items),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var key = _step2.value.key;\n\n if (key instanceof Scalar) {\n if (seenKeys.includes(key.value)) {\n var msg = 'Ordered maps must not include duplicate keys';\n throw new YAMLSemanticError(cst, msg);\n } else {\n seenKeys.push(key.value);\n }\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return Object.assign(new YAMLOMap(), pairs);\n}\n\nfunction createOMap(schema, iterable, ctx) {\n var pairs = createPairs(schema, iterable, ctx);\n var omap = new YAMLOMap();\n omap.items = pairs.items;\n return omap;\n}\n\nvar omap = {\n identify: function identify(value) {\n return value instanceof Map;\n },\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve: parseOMap,\n createNode: createOMap\n};\n\nvar YAMLSet = /*#__PURE__*/function (_YAMLMap) {\n _inherits(YAMLSet, _YAMLMap);\n\n var _super = _createSuper(YAMLSet);\n\n function YAMLSet() {\n var _this;\n\n _classCallCheck(this, YAMLSet);\n\n _this = _super.call(this);\n _this.tag = YAMLSet.tag;\n return _this;\n }\n\n _createClass(YAMLSet, [{\n key: \"add\",\n value: function add(key) {\n var pair = key instanceof Pair ? key : new Pair(key);\n var prev = findPair(this.items, pair.key);\n if (!prev) this.items.push(pair);\n }\n }, {\n key: \"get\",\n value: function get(key, keepPair) {\n var pair = findPair(this.items, key);\n return !keepPair && pair instanceof Pair ? pair.key instanceof Scalar ? pair.key.value : pair.key : pair;\n }\n }, {\n key: \"set\",\n value: function set(key, value) {\n if (typeof value !== 'boolean') throw new Error(\"Expected boolean value for set(key, value) in a YAML set, not \".concat(_typeof(value)));\n var prev = findPair(this.items, key);\n\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n } else if (!prev && value) {\n this.items.push(new Pair(key));\n }\n }\n }, {\n key: \"toJSON\",\n value: function toJSON(_, ctx) {\n return _get(_getPrototypeOf(YAMLSet.prototype), \"toJSON\", this).call(this, _, ctx, Set);\n }\n }, {\n key: \"toString\",\n value: function toString(ctx, onComment, onChompKeep) {\n if (!ctx) return JSON.stringify(this);\n if (this.hasAllNullValues()) return _get(_getPrototypeOf(YAMLSet.prototype), \"toString\", this).call(this, ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');\n }\n }]);\n\n return YAMLSet;\n}(YAMLMap);\n\n_defineProperty(YAMLSet, \"tag\", 'tag:yaml.org,2002:set');\n\nfunction parseSet(doc, cst) {\n var map = resolveMap(doc, cst);\n if (!map.hasAllNullValues()) throw new YAMLSemanticError(cst, 'Set items must all have null values');\n return Object.assign(new YAMLSet(), map);\n}\n\nfunction createSet(schema, iterable, ctx) {\n var set = new YAMLSet();\n\n var _iterator = _createForOfIteratorHelper(iterable),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var value = _step.value;\n set.items.push(schema.createPair(value, null, ctx));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return set;\n}\n\nvar set = {\n identify: function identify(value) {\n return value instanceof Set;\n },\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n resolve: parseSet,\n createNode: createSet\n};\n\nvar parseSexagesimal = function parseSexagesimal(sign, parts) {\n var n = parts.split(':').reduce(function (n, p) {\n return n * 60 + Number(p);\n }, 0);\n return sign === '-' ? -n : n;\n}; // hhhh:mm:ss.sss\n\n\nvar stringifySexagesimal = function stringifySexagesimal(_ref) {\n var value = _ref.value;\n if (isNaN(value) || !isFinite(value)) return stringifyNumber(value);\n var sign = '';\n\n if (value < 0) {\n sign = '-';\n value = Math.abs(value);\n }\n\n var parts = [value % 60]; // seconds, including ms\n\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n } else {\n value = Math.round((value - parts[0]) / 60);\n parts.unshift(value % 60); // minutes\n\n if (value >= 60) {\n value = Math.round((value - parts[0]) / 60);\n parts.unshift(value); // hours\n }\n }\n\n return sign + parts.map(function (n) {\n return n < 10 ? '0' + String(n) : String(n);\n }).join(':').replace(/000000\\d*$/, '') // % 60 may introduce error\n ;\n};\n\nvar intTime = {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,\n resolve: function resolve(str, sign, parts) {\n return parseSexagesimal(sign, parts.replace(/_/g, ''));\n },\n stringify: stringifySexagesimal\n};\nvar floatTime = {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*)$/,\n resolve: function resolve(str, sign, parts) {\n return parseSexagesimal(sign, parts.replace(/_/g, ''));\n },\n stringify: stringifySexagesimal\n};\nvar timestamp = {\n identify: function identify(value) {\n return value instanceof Date;\n },\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^(?:' + '([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?' + ')$'),\n resolve: function resolve(str, year, month, day, hour, minute, second, millisec, tz) {\n if (millisec) millisec = (millisec + '00').substr(1, 3);\n var date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0);\n\n if (tz && tz !== 'Z') {\n var d = parseSexagesimal(tz[0], tz.slice(1));\n if (Math.abs(d) < 30) d *= 60;\n date -= 60000 * d;\n }\n\n return new Date(date);\n },\n stringify: function stringify(_ref2) {\n var value = _ref2.value;\n return value.toISOString().replace(/((T00:00)?:00)?\\.000Z$/, '');\n }\n};\n\n/* global console, process, YAML_SILENCE_DEPRECATION_WARNINGS, YAML_SILENCE_WARNINGS */\nfunction shouldWarn(deprecation) {\n var env = typeof process !== 'undefined' && process.env || {};\n\n if (deprecation) {\n if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== 'undefined') return !YAML_SILENCE_DEPRECATION_WARNINGS;\n return !env.YAML_SILENCE_DEPRECATION_WARNINGS;\n }\n\n if (typeof YAML_SILENCE_WARNINGS !== 'undefined') return !YAML_SILENCE_WARNINGS;\n return !env.YAML_SILENCE_WARNINGS;\n}\n\nfunction warn(warning, type) {\n if (shouldWarn(false)) {\n var emit = typeof process !== 'undefined' && process.emitWarning; // This will throw in Jest if `warning` is an Error instance due to\n // https://github.com/facebook/jest/issues/2549\n\n if (emit) emit(warning, type);else {\n // eslint-disable-next-line no-console\n console.warn(type ? \"\".concat(type, \": \").concat(warning) : warning);\n }\n }\n}\nfunction warnFileDeprecation(filename) {\n if (shouldWarn(true)) {\n var path = filename.replace(/.*yaml[/\\\\]/i, '').replace(/\\.js$/, '').replace(/\\\\/g, '/');\n warn(\"The endpoint 'yaml/\".concat(path, \"' will be removed in a future release.\"), 'DeprecationWarning');\n }\n}\nvar warned = {};\nfunction warnOptionDeprecation(name, alternative) {\n if (!warned[name] && shouldWarn(true)) {\n warned[name] = true;\n var msg = \"The option '\".concat(name, \"' will be removed in a future release\");\n msg += alternative ? \", use '\".concat(alternative, \"' instead.\") : '.';\n warn(msg, 'DeprecationWarning');\n }\n}\n\nexport { warnOptionDeprecation as a, binary as b, warnFileDeprecation as c, floatTime as f, intTime as i, omap as o, pairs as p, set as s, timestamp as t, warn as w };\n","import { _ as _createForOfIteratorHelper, h as _slicedToArray, a as _typeof, b as _createClass, e as _defineProperty, c as _classCallCheck, d as defaultTagPrefix, n as defaultTags } from './PlainValue-b8036b75.js';\nimport { d as YAMLMap, g as resolveMap, Y as YAMLSeq, h as resolveSeq, j as resolveString, c as stringifyString, s as strOptions, S as Scalar, n as nullOptions, a as boolOptions, i as intOptions, k as stringifyNumber, N as Node, A as Alias, P as Pair } from './resolveSeq-492ab440.js';\nimport { b as binary, o as omap, p as pairs, s as set, i as intTime, f as floatTime, t as timestamp, a as warnOptionDeprecation } from './warnings-df54cb69.js';\n\nfunction createMap(schema, obj, ctx) {\n var map = new YAMLMap(schema);\n\n if (obj instanceof Map) {\n var _iterator = _createForOfIteratorHelper(obj),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n key = _step$value[0],\n value = _step$value[1];\n\n map.items.push(schema.createPair(key, value, ctx));\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n } else if (obj && _typeof(obj) === 'object') {\n for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {\n var _key = _Object$keys[_i];\n map.items.push(schema.createPair(_key, obj[_key], ctx));\n }\n }\n\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n\n return map;\n}\n\nvar map = {\n createNode: createMap,\n default: true,\n nodeClass: YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve: resolveMap\n};\n\nfunction createSeq(schema, obj, ctx) {\n var seq = new YAMLSeq(schema);\n\n if (obj && obj[Symbol.iterator]) {\n var _iterator = _createForOfIteratorHelper(obj),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var it = _step.value;\n var v = schema.createNode(it, ctx.wrapScalars, null, ctx);\n seq.items.push(v);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n return seq;\n}\n\nvar seq = {\n createNode: createSeq,\n default: true,\n nodeClass: YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve: resolveSeq\n};\n\nvar string = {\n identify: function identify(value) {\n return typeof value === 'string';\n },\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: resolveString,\n stringify: function stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({\n actualString: true\n }, ctx);\n return stringifyString(item, ctx, onComment, onChompKeep);\n },\n options: strOptions\n};\n\nvar failsafe = [map, seq, string];\n\n/* global BigInt */\n\nvar intIdentify$2 = function intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n};\n\nvar intResolve$1 = function intResolve(src, part, radix) {\n return intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);\n};\n\nfunction intStringify$1(node, radix, prefix) {\n var value = node.value;\n if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix);\n return stringifyNumber(node);\n}\n\nvar nullObj = {\n identify: function identify(value) {\n return value == null;\n },\n createNode: function createNode(schema, value, ctx) {\n return ctx.wrapScalars ? new Scalar(null) : null;\n },\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: function resolve() {\n return null;\n },\n options: nullOptions,\n stringify: function stringify() {\n return nullOptions.nullStr;\n }\n};\nvar boolObj = {\n identify: function identify(value) {\n return typeof value === 'boolean';\n },\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: function resolve(str) {\n return str[0] === 't' || str[0] === 'T';\n },\n options: boolOptions,\n stringify: function stringify(_ref) {\n var value = _ref.value;\n return value ? boolOptions.trueStr : boolOptions.falseStr;\n }\n};\nvar octObj = {\n identify: function identify(value) {\n return intIdentify$2(value) && value >= 0;\n },\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o([0-7]+)$/,\n resolve: function resolve(str, oct) {\n return intResolve$1(str, oct, 8);\n },\n options: intOptions,\n stringify: function stringify(node) {\n return intStringify$1(node, 8, '0o');\n }\n};\nvar intObj = {\n identify: intIdentify$2,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: function resolve(str) {\n return intResolve$1(str, str, 10);\n },\n options: intOptions,\n stringify: stringifyNumber\n};\nvar hexObj = {\n identify: function identify(value) {\n return intIdentify$2(value) && value >= 0;\n },\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x([0-9a-fA-F]+)$/,\n resolve: function resolve(str, hex) {\n return intResolve$1(str, hex, 16);\n },\n options: intOptions,\n stringify: function stringify(node) {\n return intStringify$1(node, 16, '0x');\n }\n};\nvar nanObj = {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n resolve: function resolve(str, nan) {\n return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n },\n stringify: stringifyNumber\n};\nvar expObj = {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: function resolve(str) {\n return parseFloat(str);\n },\n stringify: function stringify(_ref2) {\n var value = _ref2.value;\n return Number(value).toExponential();\n }\n};\nvar floatObj = {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.([0-9]+)|[0-9]+\\.([0-9]*))$/,\n resolve: function resolve(str, frac1, frac2) {\n var frac = frac1 || frac2;\n var node = new Scalar(parseFloat(str));\n if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;\n return node;\n },\n stringify: stringifyNumber\n};\nvar core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);\n\n/* global BigInt */\n\nvar intIdentify$1 = function intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n};\n\nvar stringifyJSON = function stringifyJSON(_ref) {\n var value = _ref.value;\n return JSON.stringify(value);\n};\n\nvar json = [map, seq, {\n identify: function identify(value) {\n return typeof value === 'string';\n },\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: resolveString,\n stringify: stringifyJSON\n}, {\n identify: function identify(value) {\n return value == null;\n },\n createNode: function createNode(schema, value, ctx) {\n return ctx.wrapScalars ? new Scalar(null) : null;\n },\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: function resolve() {\n return null;\n },\n stringify: stringifyJSON\n}, {\n identify: function identify(value) {\n return typeof value === 'boolean';\n },\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true|false$/,\n resolve: function resolve(str) {\n return str === 'true';\n },\n stringify: stringifyJSON\n}, {\n identify: intIdentify$1,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: function resolve(str) {\n return intOptions.asBigInt ? BigInt(str) : parseInt(str, 10);\n },\n stringify: function stringify(_ref2) {\n var value = _ref2.value;\n return intIdentify$1(value) ? value.toString() : JSON.stringify(value);\n }\n}, {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: function resolve(str) {\n return parseFloat(str);\n },\n stringify: stringifyJSON\n}];\n\njson.scalarFallback = function (str) {\n throw new SyntaxError(\"Unresolved plain scalar \".concat(JSON.stringify(str)));\n};\n\n/* global BigInt */\n\nvar boolStringify = function boolStringify(_ref) {\n var value = _ref.value;\n return value ? boolOptions.trueStr : boolOptions.falseStr;\n};\n\nvar intIdentify = function intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n};\n\nfunction intResolve(sign, src, radix) {\n var str = src.replace(/_/g, '');\n\n if (intOptions.asBigInt) {\n switch (radix) {\n case 2:\n str = \"0b\".concat(str);\n break;\n\n case 8:\n str = \"0o\".concat(str);\n break;\n\n case 16:\n str = \"0x\".concat(str);\n break;\n }\n\n var _n = BigInt(str);\n\n return sign === '-' ? BigInt(-1) * _n : _n;\n }\n\n var n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\n\nfunction intStringify(node, radix, prefix) {\n var value = node.value;\n\n if (intIdentify(value)) {\n var str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n\n return stringifyNumber(node);\n}\n\nvar yaml11 = failsafe.concat([{\n identify: function identify(value) {\n return value == null;\n },\n createNode: function createNode(schema, value, ctx) {\n return ctx.wrapScalars ? new Scalar(null) : null;\n },\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: function resolve() {\n return null;\n },\n options: nullOptions,\n stringify: function stringify() {\n return nullOptions.nullStr;\n }\n}, {\n identify: function identify(value) {\n return typeof value === 'boolean';\n },\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: function resolve() {\n return true;\n },\n options: boolOptions,\n stringify: boolStringify\n}, {\n identify: function identify(value) {\n return typeof value === 'boolean';\n },\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,\n resolve: function resolve() {\n return false;\n },\n options: boolOptions,\n stringify: boolStringify\n}, {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^([-+]?)0b([0-1_]+)$/,\n resolve: function resolve(str, sign, bin) {\n return intResolve(sign, bin, 2);\n },\n stringify: function stringify(node) {\n return intStringify(node, 2, '0b');\n }\n}, {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^([-+]?)0([0-7_]+)$/,\n resolve: function resolve(str, sign, oct) {\n return intResolve(sign, oct, 8);\n },\n stringify: function stringify(node) {\n return intStringify(node, 8, '0');\n }\n}, {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^([-+]?)([0-9][0-9_]*)$/,\n resolve: function resolve(str, sign, abs) {\n return intResolve(sign, abs, 10);\n },\n stringify: stringifyNumber\n}, {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^([-+]?)0x([0-9a-fA-F_]+)$/,\n resolve: function resolve(str, sign, hex) {\n return intResolve(sign, hex, 16);\n },\n stringify: function stringify(node) {\n return intStringify(node, 16, '0x');\n }\n}, {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n resolve: function resolve(str, nan) {\n return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n },\n stringify: stringifyNumber\n}, {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?([0-9][0-9_]*)?(\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: function resolve(str) {\n return parseFloat(str.replace(/_/g, ''));\n },\n stringify: function stringify(_ref2) {\n var value = _ref2.value;\n return Number(value).toExponential();\n }\n}, {\n identify: function identify(value) {\n return typeof value === 'number';\n },\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.([0-9_]*)$/,\n resolve: function resolve(str, frac) {\n var node = new Scalar(parseFloat(str.replace(/_/g, '')));\n\n if (frac) {\n var f = frac.replace(/_/g, '');\n if (f[f.length - 1] === '0') node.minFractionDigits = f.length;\n }\n\n return node;\n },\n stringify: stringifyNumber\n}], binary, omap, pairs, set, intTime, floatTime, timestamp);\n\nvar schemas = {\n core: core,\n failsafe: failsafe,\n json: json,\n yaml11: yaml11\n};\nvar tags = {\n binary: binary,\n bool: boolObj,\n float: floatObj,\n floatExp: expObj,\n floatNaN: nanObj,\n floatTime: floatTime,\n int: intObj,\n intHex: hexObj,\n intOct: octObj,\n intTime: intTime,\n map: map,\n null: nullObj,\n omap: omap,\n pairs: pairs,\n seq: seq,\n set: set,\n timestamp: timestamp\n};\n\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n var match = tags.filter(function (t) {\n return t.tag === tagName;\n });\n var tagObj = match.find(function (t) {\n return !t.format;\n }) || match[0];\n if (!tagObj) throw new Error(\"Tag \".concat(tagName, \" not found\"));\n return tagObj;\n } // TODO: deprecate/remove class check\n\n\n return tags.find(function (t) {\n return (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format;\n });\n}\n\nfunction createNode(value, tagName, ctx) {\n if (value instanceof Node) return value;\n var defaultPrefix = ctx.defaultPrefix,\n onTagObj = ctx.onTagObj,\n prevObjects = ctx.prevObjects,\n schema = ctx.schema,\n wrapScalars = ctx.wrapScalars;\n if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);\n var tagObj = findTagObject(value, tagName, schema.tags);\n\n if (!tagObj) {\n if (typeof value.toJSON === 'function') value = value.toJSON();\n if (!value || _typeof(value) !== 'object') return wrapScalars ? new Scalar(value) : value;\n tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;\n }\n\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n } // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `obj` wrapper allows for circular references to resolve.\n\n\n var obj = {\n value: undefined,\n node: undefined\n };\n\n if (value && _typeof(value) === 'object' && prevObjects) {\n var prev = prevObjects.get(value);\n\n if (prev) {\n var alias = new Alias(prev); // leaves source dirty; must be cleaned by caller\n\n ctx.aliasNodes.push(alias); // defined along with prevObjects\n\n return alias;\n }\n\n obj.value = value;\n prevObjects.set(value, obj);\n }\n\n obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new Scalar(value) : value;\n if (tagName && obj.node instanceof Node) obj.node.tag = tagName;\n return obj.node;\n}\n\nfunction getSchemaTags(schemas, knownTags, customTags, schemaId) {\n var tags = schemas[schemaId.replace(/\\W/g, '')]; // 'yaml-1.1' -> 'yaml11'\n\n if (!tags) {\n var keys = Object.keys(schemas).map(function (key) {\n return JSON.stringify(key);\n }).join(', ');\n throw new Error(\"Unknown schema \\\"\".concat(schemaId, \"\\\"; use one of \").concat(keys));\n }\n\n if (Array.isArray(customTags)) {\n var _iterator = _createForOfIteratorHelper(customTags),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var tag = _step.value;\n tags = tags.concat(tag);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n } else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n\n for (var i = 0; i < tags.length; ++i) {\n var _tag = tags[i];\n\n if (typeof _tag === 'string') {\n var tagObj = knownTags[_tag];\n\n if (!tagObj) {\n var _keys = Object.keys(knownTags).map(function (key) {\n return JSON.stringify(key);\n }).join(', ');\n\n throw new Error(\"Unknown custom tag \\\"\".concat(_tag, \"\\\"; use one of \").concat(_keys));\n }\n\n tags[i] = tagObj;\n }\n }\n\n return tags;\n}\n\nvar sortMapEntriesByKey = function sortMapEntriesByKey(a, b) {\n return a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\n};\n\nvar Schema = /*#__PURE__*/function () {\n // TODO: remove in v2\n // TODO: remove in v2\n function Schema(_ref) {\n var customTags = _ref.customTags,\n merge = _ref.merge,\n schema = _ref.schema,\n sortMapEntries = _ref.sortMapEntries,\n deprecatedCustomTags = _ref.tags;\n\n _classCallCheck(this, Schema);\n\n this.merge = !!merge;\n this.name = schema;\n this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;\n if (!customTags && deprecatedCustomTags) warnOptionDeprecation('tags', 'customTags');\n this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);\n }\n\n _createClass(Schema, [{\n key: \"createNode\",\n value: function createNode$1(value, wrapScalars, tagName, ctx) {\n var baseCtx = {\n defaultPrefix: Schema.defaultPrefix,\n schema: this,\n wrapScalars: wrapScalars\n };\n var createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;\n return createNode(value, tagName, createCtx);\n }\n }, {\n key: \"createPair\",\n value: function createPair(key, value, ctx) {\n if (!ctx) ctx = {\n wrapScalars: true\n };\n var k = this.createNode(key, ctx.wrapScalars, null, ctx);\n var v = this.createNode(value, ctx.wrapScalars, null, ctx);\n return new Pair(k, v);\n }\n }]);\n\n return Schema;\n}();\n\n_defineProperty(Schema, \"defaultPrefix\", defaultTagPrefix);\n\n_defineProperty(Schema, \"defaultTags\", defaultTags);\n\nexport { Schema as S };\n","import { d as defaultTagPrefix, _ as _createForOfIteratorHelper, a as _typeof, b as _createClass, c as _classCallCheck, e as _defineProperty, Y as YAMLSyntaxError, T as Type, f as YAMLWarning, g as YAMLSemanticError, h as _slicedToArray, i as YAMLError, j as _inherits, k as _createSuper } from './PlainValue-b8036b75.js';\nimport { parse as parse$1 } from './parse-cst.js';\nimport { b as binaryOptions, a as boolOptions, i as intOptions, n as nullOptions, s as strOptions, N as Node, P as Pair, S as Scalar, c as stringifyString, A as Alias, Y as YAMLSeq, d as YAMLMap, M as Merge, C as Collection, r as resolveNode, e as isEmptyPath, t as toJSON, f as addComment } from './resolveSeq-492ab440.js';\nimport { S as Schema } from './Schema-e94716c8.js';\nimport { w as warn } from './warnings-df54cb69.js';\n\nvar defaultOptions = {\n anchorPrefix: 'a',\n customTags: null,\n indent: 2,\n indentSeq: true,\n keepCstNodes: false,\n keepNodeTypes: true,\n keepBlobsInJSON: true,\n mapAsMap: false,\n maxAliasCount: 100,\n prettyErrors: false,\n // TODO Set true in v2\n simpleKeys: false,\n version: '1.2'\n};\nvar scalarOptions = {\n get binary() {\n return binaryOptions;\n },\n\n set binary(opt) {\n Object.assign(binaryOptions, opt);\n },\n\n get bool() {\n return boolOptions;\n },\n\n set bool(opt) {\n Object.assign(boolOptions, opt);\n },\n\n get int() {\n return intOptions;\n },\n\n set int(opt) {\n Object.assign(intOptions, opt);\n },\n\n get null() {\n return nullOptions;\n },\n\n set null(opt) {\n Object.assign(nullOptions, opt);\n },\n\n get str() {\n return strOptions;\n },\n\n set str(opt) {\n Object.assign(strOptions, opt);\n }\n\n};\nvar documentOptions = {\n '1.0': {\n schema: 'yaml-1.1',\n merge: true,\n tagPrefixes: [{\n handle: '!',\n prefix: defaultTagPrefix\n }, {\n handle: '!!',\n prefix: 'tag:private.yaml.org,2002:'\n }]\n },\n 1.1: {\n schema: 'yaml-1.1',\n merge: true,\n tagPrefixes: [{\n handle: '!',\n prefix: '!'\n }, {\n handle: '!!',\n prefix: defaultTagPrefix\n }]\n },\n 1.2: {\n schema: 'core',\n merge: false,\n tagPrefixes: [{\n handle: '!',\n prefix: '!'\n }, {\n handle: '!!',\n prefix: defaultTagPrefix\n }]\n }\n};\n\nfunction stringifyTag(doc, tag) {\n if ((doc.version || doc.options.version) === '1.0') {\n var priv = tag.match(/^tag:private\\.yaml\\.org,2002:([^:/]+)$/);\n if (priv) return '!' + priv[1];\n var vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\\.yaml\\.org,2002:(.*)/);\n return vocab ? \"!\".concat(vocab[1], \"/\").concat(vocab[2]) : \"!\".concat(tag.replace(/^tag:/, ''));\n }\n\n var p = doc.tagPrefixes.find(function (p) {\n return tag.indexOf(p.prefix) === 0;\n });\n\n if (!p) {\n var dtp = doc.getDefaults().tagPrefixes;\n p = dtp && dtp.find(function (p) {\n return tag.indexOf(p.prefix) === 0;\n });\n }\n\n if (!p) return tag[0] === '!' ? tag : \"!<\".concat(tag, \">\");\n var suffix = tag.substr(p.prefix.length).replace(/[!,[\\]{}]/g, function (ch) {\n return {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n }[ch];\n });\n return p.handle + suffix;\n}\n\nfunction getTagObject(tags, item) {\n if (item instanceof Alias) return Alias;\n\n if (item.tag) {\n var match = tags.filter(function (t) {\n return t.tag === item.tag;\n });\n if (match.length > 0) return match.find(function (t) {\n return t.format === item.format;\n }) || match[0];\n }\n\n var tagObj, obj;\n\n if (item instanceof Scalar) {\n obj = item.value; // TODO: deprecate/remove class check\n\n var _match = tags.filter(function (t) {\n return t.identify && t.identify(obj) || t.class && obj instanceof t.class;\n });\n\n tagObj = _match.find(function (t) {\n return t.format === item.format;\n }) || _match.find(function (t) {\n return !t.format;\n });\n } else {\n obj = item;\n tagObj = tags.find(function (t) {\n return t.nodeClass && obj instanceof t.nodeClass;\n });\n }\n\n if (!tagObj) {\n var name = obj && obj.constructor ? obj.constructor.name : _typeof(obj);\n throw new Error(\"Tag not resolved for \".concat(name, \" value\"));\n }\n\n return tagObj;\n} // needs to be called before value stringifier to allow for circular anchor refs\n\n\nfunction stringifyProps(node, tagObj, _ref) {\n var anchors = _ref.anchors,\n doc = _ref.doc;\n var props = [];\n var anchor = doc.anchors.getName(node);\n\n if (anchor) {\n anchors[anchor] = node;\n props.push(\"&\".concat(anchor));\n }\n\n if (node.tag) {\n props.push(stringifyTag(doc, node.tag));\n } else if (!tagObj.default) {\n props.push(stringifyTag(doc, tagObj.tag));\n }\n\n return props.join(' ');\n}\n\nfunction stringify$1(item, ctx, onComment, onChompKeep) {\n var _ctx$doc = ctx.doc,\n anchors = _ctx$doc.anchors,\n schema = _ctx$doc.schema;\n var tagObj;\n\n if (!(item instanceof Node)) {\n var createCtx = {\n aliasNodes: [],\n onTagObj: function onTagObj(o) {\n return tagObj = o;\n },\n prevObjects: new Map()\n };\n item = schema.createNode(item, true, null, createCtx);\n\n var _iterator = _createForOfIteratorHelper(createCtx.aliasNodes),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var alias = _step.value;\n alias.source = alias.source.node;\n var name = anchors.getName(alias.source);\n\n if (!name) {\n name = anchors.newName();\n anchors.map[name] = alias.source;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n if (item instanceof Pair) return item.toString(ctx, onComment, onChompKeep);\n if (!tagObj) tagObj = getTagObject(schema.tags, item);\n var props = stringifyProps(item, tagObj, ctx);\n if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1;\n var str = typeof tagObj.stringify === 'function' ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof Scalar ? stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep);\n if (!props) return str;\n return item instanceof Scalar || str[0] === '{' || str[0] === '[' ? \"\".concat(props, \" \").concat(str) : \"\".concat(props, \"\\n\").concat(ctx.indent).concat(str);\n}\n\nvar Anchors = /*#__PURE__*/function () {\n function Anchors(prefix) {\n _classCallCheck(this, Anchors);\n\n _defineProperty(this, \"map\", Object.create(null));\n\n this.prefix = prefix;\n }\n\n _createClass(Anchors, [{\n key: \"createAlias\",\n value: function createAlias(node, name) {\n this.setAnchor(node, name);\n return new Alias(node);\n }\n }, {\n key: \"createMergePair\",\n value: function createMergePair() {\n var _this = this;\n\n var merge = new Merge();\n\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n\n merge.value.items = sources.map(function (s) {\n if (s instanceof Alias) {\n if (s.source instanceof YAMLMap) return s;\n } else if (s instanceof YAMLMap) {\n return _this.createAlias(s);\n }\n\n throw new Error('Merge sources must be Map nodes or their Aliases');\n });\n return merge;\n }\n }, {\n key: \"getName\",\n value: function getName(node) {\n var map = this.map;\n return Object.keys(map).find(function (a) {\n return map[a] === node;\n });\n }\n }, {\n key: \"getNames\",\n value: function getNames() {\n return Object.keys(this.map);\n }\n }, {\n key: \"getNode\",\n value: function getNode(name) {\n return this.map[name];\n }\n }, {\n key: \"newName\",\n value: function newName(prefix) {\n if (!prefix) prefix = this.prefix;\n var names = Object.keys(this.map);\n\n for (var i = 1; true; ++i) {\n var name = \"\".concat(prefix).concat(i);\n if (!names.includes(name)) return name;\n }\n } // During parsing, map & aliases contain CST nodes\n\n }, {\n key: \"resolveNodes\",\n value: function resolveNodes() {\n var map = this.map,\n _cstAliases = this._cstAliases;\n Object.keys(map).forEach(function (a) {\n map[a] = map[a].resolved;\n });\n\n _cstAliases.forEach(function (a) {\n a.source = a.source.resolved;\n });\n\n delete this._cstAliases;\n }\n }, {\n key: \"setAnchor\",\n value: function setAnchor(node, name) {\n if (node != null && !Anchors.validAnchorNode(node)) {\n throw new Error('Anchors may only be set for Scalar, Seq and Map nodes');\n }\n\n if (name && /[\\x00-\\x19\\s,[\\]{}]/.test(name)) {\n throw new Error('Anchor names must not contain whitespace or control characters');\n }\n\n var map = this.map;\n var prev = node && Object.keys(map).find(function (a) {\n return map[a] === node;\n });\n\n if (prev) {\n if (!name) {\n return prev;\n } else if (prev !== name) {\n delete map[prev];\n map[name] = node;\n }\n } else {\n if (!name) {\n if (!node) return null;\n name = this.newName();\n }\n\n map[name] = node;\n }\n\n return name;\n }\n }], [{\n key: \"validAnchorNode\",\n value: function validAnchorNode(node) {\n return node instanceof Scalar || node instanceof YAMLSeq || node instanceof YAMLMap;\n }\n }]);\n\n return Anchors;\n}();\n\nvar visit = function visit(node, tags) {\n if (node && _typeof(node) === 'object') {\n var tag = node.tag;\n\n if (node instanceof Collection) {\n if (tag) tags[tag] = true;\n node.items.forEach(function (n) {\n return visit(n, tags);\n });\n } else if (node instanceof Pair) {\n visit(node.key, tags);\n visit(node.value, tags);\n } else if (node instanceof Scalar) {\n if (tag) tags[tag] = true;\n }\n }\n\n return tags;\n};\n\nvar listTagNames = function listTagNames(node) {\n return Object.keys(visit(node, {}));\n};\n\nfunction parseContents(doc, contents) {\n var comments = {\n before: [],\n after: []\n };\n var body = undefined;\n var spaceBefore = false;\n\n var _iterator = _createForOfIteratorHelper(contents),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var node = _step.value;\n\n if (node.valueRange) {\n if (body !== undefined) {\n var msg = 'Document contains trailing content not separated by a ... or --- line';\n doc.errors.push(new YAMLSyntaxError(node, msg));\n break;\n }\n\n var res = resolveNode(doc, node);\n\n if (spaceBefore) {\n res.spaceBefore = true;\n spaceBefore = false;\n }\n\n body = res;\n } else if (node.comment !== null) {\n var cc = body === undefined ? comments.before : comments.after;\n cc.push(node.comment);\n } else if (node.type === Type.BLANK_LINE) {\n spaceBefore = true;\n\n if (body === undefined && comments.before.length > 0 && !doc.commentBefore) {\n // space-separated comments at start are parsed as document comments\n doc.commentBefore = comments.before.join('\\n');\n comments.before = [];\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n doc.contents = body || null;\n\n if (!body) {\n doc.comment = comments.before.concat(comments.after).join('\\n') || null;\n } else {\n var cb = comments.before.join('\\n');\n\n if (cb) {\n var cbNode = body instanceof Collection && body.items[0] ? body.items[0] : body;\n cbNode.commentBefore = cbNode.commentBefore ? \"\".concat(cb, \"\\n\").concat(cbNode.commentBefore) : cb;\n }\n\n doc.comment = comments.after.join('\\n') || null;\n }\n}\n\nfunction resolveTagDirective(_ref, directive) {\n var tagPrefixes = _ref.tagPrefixes;\n\n var _directive$parameters = _slicedToArray(directive.parameters, 2),\n handle = _directive$parameters[0],\n prefix = _directive$parameters[1];\n\n if (!handle || !prefix) {\n var msg = 'Insufficient parameters given for %TAG directive';\n throw new YAMLSemanticError(directive, msg);\n }\n\n if (tagPrefixes.some(function (p) {\n return p.handle === handle;\n })) {\n var _msg = 'The %TAG directive must only be given at most once per handle in the same document.';\n throw new YAMLSemanticError(directive, _msg);\n }\n\n return {\n handle: handle,\n prefix: prefix\n };\n}\n\nfunction resolveYamlDirective(doc, directive) {\n var _directive$parameters2 = _slicedToArray(directive.parameters, 1),\n version = _directive$parameters2[0];\n\n if (directive.name === 'YAML:1.0') version = '1.0';\n\n if (!version) {\n var msg = 'Insufficient parameters given for %YAML directive';\n throw new YAMLSemanticError(directive, msg);\n }\n\n if (!documentOptions[version]) {\n var v0 = doc.version || doc.options.version;\n\n var _msg2 = \"Document will be parsed as YAML \".concat(v0, \" rather than YAML \").concat(version);\n\n doc.warnings.push(new YAMLWarning(directive, _msg2));\n }\n\n return version;\n}\n\nfunction parseDirectives(doc, directives, prevDoc) {\n var directiveComments = [];\n var hasDirectives = false;\n\n var _iterator = _createForOfIteratorHelper(directives),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var directive = _step.value;\n var comment = directive.comment,\n name = directive.name;\n\n switch (name) {\n case 'TAG':\n try {\n doc.tagPrefixes.push(resolveTagDirective(doc, directive));\n } catch (error) {\n doc.errors.push(error);\n }\n\n hasDirectives = true;\n break;\n\n case 'YAML':\n case 'YAML:1.0':\n if (doc.version) {\n var msg = 'The %YAML directive must only be given at most once per document.';\n doc.errors.push(new YAMLSemanticError(directive, msg));\n }\n\n try {\n doc.version = resolveYamlDirective(doc, directive);\n } catch (error) {\n doc.errors.push(error);\n }\n\n hasDirectives = true;\n break;\n\n default:\n if (name) {\n var _msg3 = \"YAML only supports %TAG and %YAML directives, and not %\".concat(name);\n\n doc.warnings.push(new YAMLWarning(directive, _msg3));\n }\n\n }\n\n if (comment) directiveComments.push(comment);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (prevDoc && !hasDirectives && '1.1' === (doc.version || prevDoc.version || doc.options.version)) {\n var copyTagPrefix = function copyTagPrefix(_ref2) {\n var handle = _ref2.handle,\n prefix = _ref2.prefix;\n return {\n handle: handle,\n prefix: prefix\n };\n };\n\n doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix);\n doc.version = prevDoc.version;\n }\n\n doc.commentBefore = directiveComments.join('\\n') || null;\n}\n\nfunction assertCollection(contents) {\n if (contents instanceof Collection) return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nvar Document$1 = /*#__PURE__*/function () {\n function Document(options) {\n _classCallCheck(this, Document);\n\n this.anchors = new Anchors(options.anchorPrefix);\n this.commentBefore = null;\n this.comment = null;\n this.contents = null;\n this.directivesEndMarker = null;\n this.errors = [];\n this.options = options;\n this.schema = null;\n this.tagPrefixes = [];\n this.version = null;\n this.warnings = [];\n }\n\n _createClass(Document, [{\n key: \"add\",\n value: function add(value) {\n assertCollection(this.contents);\n return this.contents.add(value);\n }\n }, {\n key: \"addIn\",\n value: function addIn(path, value) {\n assertCollection(this.contents);\n this.contents.addIn(path, value);\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n assertCollection(this.contents);\n return this.contents.delete(key);\n }\n }, {\n key: \"deleteIn\",\n value: function deleteIn(path) {\n if (isEmptyPath(path)) {\n if (this.contents == null) return false;\n this.contents = null;\n return true;\n }\n\n assertCollection(this.contents);\n return this.contents.deleteIn(path);\n }\n }, {\n key: \"getDefaults\",\n value: function getDefaults() {\n return Document.defaults[this.version] || Document.defaults[this.options.version] || {};\n }\n }, {\n key: \"get\",\n value: function get(key, keepScalar) {\n return this.contents instanceof Collection ? this.contents.get(key, keepScalar) : undefined;\n }\n }, {\n key: \"getIn\",\n value: function getIn(path, keepScalar) {\n if (isEmptyPath(path)) return !keepScalar && this.contents instanceof Scalar ? this.contents.value : this.contents;\n return this.contents instanceof Collection ? this.contents.getIn(path, keepScalar) : undefined;\n }\n }, {\n key: \"has\",\n value: function has(key) {\n return this.contents instanceof Collection ? this.contents.has(key) : false;\n }\n }, {\n key: \"hasIn\",\n value: function hasIn(path) {\n if (isEmptyPath(path)) return this.contents !== undefined;\n return this.contents instanceof Collection ? this.contents.hasIn(path) : false;\n }\n }, {\n key: \"set\",\n value: function set(key, value) {\n assertCollection(this.contents);\n this.contents.set(key, value);\n }\n }, {\n key: \"setIn\",\n value: function setIn(path, value) {\n if (isEmptyPath(path)) this.contents = value;else {\n assertCollection(this.contents);\n this.contents.setIn(path, value);\n }\n }\n }, {\n key: \"setSchema\",\n value: function setSchema(id, customTags) {\n if (!id && !customTags && this.schema) return;\n if (typeof id === 'number') id = id.toFixed(1);\n\n if (id === '1.0' || id === '1.1' || id === '1.2') {\n if (this.version) this.version = id;else this.options.version = id;\n delete this.options.schema;\n } else if (id && typeof id === 'string') {\n this.options.schema = id;\n }\n\n if (Array.isArray(customTags)) this.options.customTags = customTags;\n var opt = Object.assign({}, this.getDefaults(), this.options);\n this.schema = new Schema(opt);\n }\n }, {\n key: \"parse\",\n value: function parse(node, prevDoc) {\n if (this.options.keepCstNodes) this.cstNode = node;\n if (this.options.keepNodeTypes) this.type = 'DOCUMENT';\n var _node$directives = node.directives,\n directives = _node$directives === void 0 ? [] : _node$directives,\n _node$contents = node.contents,\n contents = _node$contents === void 0 ? [] : _node$contents,\n directivesEndMarker = node.directivesEndMarker,\n error = node.error,\n valueRange = node.valueRange;\n\n if (error) {\n if (!error.source) error.source = this;\n this.errors.push(error);\n }\n\n parseDirectives(this, directives, prevDoc);\n if (directivesEndMarker) this.directivesEndMarker = true;\n this.range = valueRange ? [valueRange.start, valueRange.end] : null;\n this.setSchema();\n this.anchors._cstAliases = [];\n parseContents(this, contents);\n this.anchors.resolveNodes();\n\n if (this.options.prettyErrors) {\n var _iterator = _createForOfIteratorHelper(this.errors),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _error = _step.value;\n if (_error instanceof YAMLError) _error.makePretty();\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var _iterator2 = _createForOfIteratorHelper(this.warnings),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var warn = _step2.value;\n if (warn instanceof YAMLError) warn.makePretty();\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n\n return this;\n }\n }, {\n key: \"listNonDefaultTags\",\n value: function listNonDefaultTags() {\n return listTagNames(this.contents).filter(function (t) {\n return t.indexOf(Schema.defaultPrefix) !== 0;\n });\n }\n }, {\n key: \"setTagPrefix\",\n value: function setTagPrefix(handle, prefix) {\n if (handle[0] !== '!' || handle[handle.length - 1] !== '!') throw new Error('Handle must start and end with !');\n\n if (prefix) {\n var prev = this.tagPrefixes.find(function (p) {\n return p.handle === handle;\n });\n if (prev) prev.prefix = prefix;else this.tagPrefixes.push({\n handle: handle,\n prefix: prefix\n });\n } else {\n this.tagPrefixes = this.tagPrefixes.filter(function (p) {\n return p.handle !== handle;\n });\n }\n }\n }, {\n key: \"toJSON\",\n value: function toJSON$1(arg, onAnchor) {\n var _this = this;\n\n var _this$options = this.options,\n keepBlobsInJSON = _this$options.keepBlobsInJSON,\n mapAsMap = _this$options.mapAsMap,\n maxAliasCount = _this$options.maxAliasCount;\n var keep = keepBlobsInJSON && (typeof arg !== 'string' || !(this.contents instanceof Scalar));\n var ctx = {\n doc: this,\n indentStep: ' ',\n keep: keep,\n mapAsMap: keep && !!mapAsMap,\n maxAliasCount: maxAliasCount,\n stringify: stringify$1 // Requiring directly in Pair would create circular dependencies\n\n };\n var anchorNames = Object.keys(this.anchors.map);\n if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map(function (name) {\n return [_this.anchors.map[name], {\n alias: [],\n aliasCount: 0,\n count: 1\n }];\n }));\n\n var res = toJSON(this.contents, arg, ctx);\n\n if (typeof onAnchor === 'function' && ctx.anchors) {\n var _iterator3 = _createForOfIteratorHelper(ctx.anchors.values()),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _step3$value = _step3.value,\n count = _step3$value.count,\n _res = _step3$value.res;\n onAnchor(_res, count);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n }\n\n return res;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n if (this.errors.length > 0) throw new Error('Document with errors cannot be stringified');\n var indentSize = this.options.indent;\n\n if (!Number.isInteger(indentSize) || indentSize <= 0) {\n var s = JSON.stringify(indentSize);\n throw new Error(\"\\\"indent\\\" option must be a positive integer, not \".concat(s));\n }\n\n this.setSchema();\n var lines = [];\n var hasDirectives = false;\n\n if (this.version) {\n var vd = '%YAML 1.2';\n\n if (this.schema.name === 'yaml-1.1') {\n if (this.version === '1.0') vd = '%YAML:1.0';else if (this.version === '1.1') vd = '%YAML 1.1';\n }\n\n lines.push(vd);\n hasDirectives = true;\n }\n\n var tagNames = this.listNonDefaultTags();\n this.tagPrefixes.forEach(function (_ref) {\n var handle = _ref.handle,\n prefix = _ref.prefix;\n\n if (tagNames.some(function (t) {\n return t.indexOf(prefix) === 0;\n })) {\n lines.push(\"%TAG \".concat(handle, \" \").concat(prefix));\n hasDirectives = true;\n }\n });\n if (hasDirectives || this.directivesEndMarker) lines.push('---');\n\n if (this.commentBefore) {\n if (hasDirectives || !this.directivesEndMarker) lines.unshift('');\n lines.unshift(this.commentBefore.replace(/^/gm, '#'));\n }\n\n var ctx = {\n anchors: Object.create(null),\n doc: this,\n indent: '',\n indentStep: ' '.repeat(indentSize),\n stringify: stringify$1 // Requiring directly in nodes would create circular dependencies\n\n };\n var chompKeep = false;\n var contentComment = null;\n\n if (this.contents) {\n if (this.contents instanceof Node) {\n if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push('');\n if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, '#')); // top-level block scalars need to be indented if followed by a comment\n\n ctx.forceBlockIndent = !!this.comment;\n contentComment = this.contents.comment;\n }\n\n var onChompKeep = contentComment ? null : function () {\n return chompKeep = true;\n };\n var body = stringify$1(this.contents, ctx, function () {\n return contentComment = null;\n }, onChompKeep);\n lines.push(addComment(body, '', contentComment));\n } else if (this.contents !== undefined) {\n lines.push(stringify$1(this.contents, ctx));\n }\n\n if (this.comment) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') lines.push('');\n lines.push(this.comment.replace(/^/gm, '#'));\n }\n\n return lines.join('\\n') + '\\n';\n }\n }]);\n\n return Document;\n}();\n\n_defineProperty(Document$1, \"defaults\", documentOptions);\n\nfunction createNode(value) {\n var wrapScalars = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var tag = arguments.length > 2 ? arguments[2] : undefined;\n\n if (tag === undefined && typeof wrapScalars === 'string') {\n tag = wrapScalars;\n wrapScalars = true;\n }\n\n var options = Object.assign({}, Document$1.defaults[defaultOptions.version], defaultOptions);\n var schema = new Schema(options);\n return schema.createNode(value, wrapScalars, tag);\n}\n\nvar Document = /*#__PURE__*/function (_YAMLDocument) {\n _inherits(Document, _YAMLDocument);\n\n var _super = _createSuper(Document);\n\n function Document(options) {\n _classCallCheck(this, Document);\n\n return _super.call(this, Object.assign({}, defaultOptions, options));\n }\n\n return Document;\n}(Document$1);\n\nfunction parseAllDocuments(src, options) {\n var stream = [];\n var prev;\n\n var _iterator = _createForOfIteratorHelper(parse$1(src)),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var cstDoc = _step.value;\n var doc = new Document(options);\n doc.parse(cstDoc, prev);\n stream.push(doc);\n prev = doc;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return stream;\n}\n\nfunction parseDocument(src, options) {\n var cst = parse$1(src);\n var doc = new Document(options).parse(cst[0]);\n\n if (cst.length > 1) {\n var errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';\n doc.errors.unshift(new YAMLSemanticError(cst[1], errMsg));\n }\n\n return doc;\n}\n\nfunction parse(src, options) {\n var doc = parseDocument(src, options);\n doc.warnings.forEach(function (warning) {\n return warn(warning);\n });\n if (doc.errors.length > 0) throw doc.errors[0];\n return doc.toJSON();\n}\n\nfunction stringify(value, options) {\n var doc = new Document(options);\n doc.contents = value;\n return String(doc);\n}\n\nvar YAML = {\n createNode: createNode,\n defaultOptions: defaultOptions,\n Document: Document,\n parse: parse,\n parseAllDocuments: parseAllDocuments,\n parseCST: parse$1,\n parseDocument: parseDocument,\n scalarOptions: scalarOptions,\n stringify: stringify\n};\n\nexport { YAML };\n","'use strict';\n\n// Gets all non-builtin properties up the prototype chain\nconst getAllProperties = object => {\n\tconst properties = new Set();\n\n\tdo {\n\t\tfor (const key of Reflect.ownKeys(object)) {\n\t\t\tproperties.add([object, key]);\n\t\t}\n\t} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);\n\n\treturn properties;\n};\n\nmodule.exports = (self, {include, exclude} = {}) => {\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\n\t\tif (include) {\n\t\t\treturn include.some(match);\n\t\t}\n\n\t\tif (exclude) {\n\t\t\treturn !exclude.some(match);\n\t\t}\n\n\t\treturn true;\n\t};\n\n\tfor (const [object, key] of getAllProperties(self.constructor.prototype)) {\n\t\tif (key === 'constructor' || !filter(key)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst descriptor = Reflect.getOwnPropertyDescriptor(object, key);\n\t\tif (descriptor && typeof descriptor.value === 'function') {\n\t\t\tself[key] = self[key].bind(self);\n\t\t}\n\t}\n\n\treturn self;\n};\n","import { writable, get } from 'svelte/store';\nimport autoBind from 'auto-bind';\nexport class BaseQuestion {\n constructor(text, explanation, hint, answers, type, options) {\n if (answers.length === 0) {\n throw 'no answers for question provided';\n }\n this.text = text;\n this.explanation = explanation;\n this.hint = hint;\n this.solved = false;\n this.options = options;\n this.answers = answers;\n if (options['shuffle_answers']) {\n this.answers = BaseQuestion.shuffle(answers);\n }\n this.selected = [];\n this.type = type;\n autoBind(this);\n }\n static is_equal(a1, a2) {\n return JSON.stringify(a1) === JSON.stringify(a2);\n }\n static shuffle(array) {\n // https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array\n let currentIndex = array.length, temporaryValue, randomIndex;\n // While there remain elements to shuffle...\n while (0 !== currentIndex) {\n // Pick a remaining element...\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n // And swap it with the current element.\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n }\n reset() {\n this.selected = [];\n this.solved = false;\n BaseQuestion.shuffle(this.answers);\n }\n}\nclass Blanks extends BaseQuestion {\n check() {\n this.solved = false;\n return this.solved;\n }\n}\nclass Pairs extends BaseQuestion {\n check() {\n this.solved = false;\n return this.solved;\n }\n}\nexport class Sequence extends BaseQuestion {\n constructor(text, explanation, hint, answers, options) {\n // always enable shuffling for sequence questions\n options['shuffle_answers'] = true;\n super(text, explanation, hint, answers, 'Sequence', options);\n }\n check() {\n // extract answer ids from answers\n let true_answer_ids = this.answers.map((answer) => answer.id);\n this.solved = BaseQuestion.is_equal(true_answer_ids.sort(), this.selected);\n return this.solved;\n }\n}\nexport class MultipleChoice extends BaseQuestion {\n constructor(text, explanation, hint, answers, options) {\n super(text, explanation, hint, answers, 'MultipleChoice', options);\n }\n check() {\n let true_answer_ids = this.answers\n .map((answer, i) => i)\n .filter((i) => this.answers[i].correct);\n this.solved = BaseQuestion.is_equal(true_answer_ids.sort(), this.selected.sort());\n return this.solved;\n }\n}\nexport class SingleChoice extends BaseQuestion {\n constructor(text, explanation, hint, answers, options) {\n super(text, explanation, hint, answers, 'SingleChoice', options);\n let self = this;\n answers.forEach(function (answer, i) {\n if (answer.correct) {\n if (typeof self.correct !== 'undefined') {\n throw 'Single choice question can only have one answer';\n }\n self.correct = i;\n }\n });\n }\n check() {\n this.solved = this.selected[0] === this.correct;\n return this.solved;\n }\n}\nexport class Answer {\n constructor(id, html, correct, comment) {\n this.html = html;\n this.correct = correct;\n this.id = id;\n this.comment = comment;\n autoBind(this);\n }\n}\nclass Counter {\n constructor(max) {\n this.val = writable(0);\n this.max = max;\n this.subscribe = this.val.subscribe;\n autoBind(this);\n }\n jump(i) {\n this.val.set(i);\n }\n next() {\n this.val.update((val) => (val < this.max - 1 ? val + 1 : val));\n }\n previous() {\n this.val.update((val) => (val > 0 ? val - 1 : val));\n }\n reset() {\n // trigger a change\n if (get(this.val) == 0)\n this.val.set(1);\n this.val.set(0);\n }\n}\nexport class Quiz {\n constructor(questions, config) {\n if (questions.length == 0) {\n throw 'No questions for quiz provided';\n }\n this.questions = questions;\n this.counter = new Counter(this.questions.length);\n this.finished = writable(false);\n this.points = 0;\n this.config = config;\n if (config['shuffle_questions']) {\n this.questions = BaseQuestion.shuffle(questions);\n }\n autoBind(this);\n }\n current() {\n let n = get(this.counter);\n return this.questions[n];\n }\n next() {\n this.counter.next();\n }\n previous() {\n this.counter.previous();\n }\n jump(i) {\n this.counter.jump(i);\n }\n reset() {\n this.counter.reset();\n this.questions.forEach((q) => q.reset());\n this.finished.set(false);\n }\n evaluate() {\n this.finished.set(true);\n var points = 0;\n for (var q of this.questions) {\n q.check();\n if (q.solved)\n points++;\n }\n this.points = points;\n this.jump(this.counter.max);\n }\n}\n","function get(attr, def) {\n return typeof attr != 'undefined' ? attr : def;\n}\nexport class Config {\n constructor(options) {\n this.start_on_load = get(options.start_on_load, true);\n this.shuffle_answers = get(options.shuffle_answers, true);\n this.shuffle_questions = get(options.shuffle_questions, false);\n this.primary_color = get(options.primary_color, 'steelblue');\n this.secondary_color = get(options.secondary_color, '#f2f2f2');\n this.text_color = get(options.text_color, 'black');\n this.locale = get(options.locale, null);\n }\n}\nexport function merge_attributes(base_config, new_config) {\n //new_config overwrites entries in config1\n let config = new Config(base_config);\n for (let attrname in new_config) {\n if (Object.prototype.hasOwnProperty.call(new_config, attrname)) {\n config[attrname] = new_config[attrname];\n }\n }\n return config;\n}\n","import marked from 'marked';\nimport DOMPurify from 'dompurify';\nimport stripIndent from 'strip-indent';\nimport hljs from 'highlight.js/lib/core';\nimport python from 'highlight.js/lib/languages/python';\nimport plaintext from 'highlight.js/lib/languages/plaintext';\nimport YAML from 'yaml';\nimport { Quiz, MultipleChoice, SingleChoice, Sequence, Answer, } from './quiz.js';\nimport { Config, merge_attributes } from './config.js';\nhljs.registerLanguage('python', python);\nhljs.registerLanguage('plaintext', plaintext);\n// this does not work....\n// ['javascript', 'python', 'bash'].forEach(async (langName) => {\n// const langModule = await import(`highlight.js/lib/languages/${langName}`);\n// hljs.registerLanguage(langName, langModule);\n// });\nmarked.setOptions({\n highlight: function (code, language) {\n const validLanguage = hljs.getLanguage(language)\n ? language\n : 'plaintext';\n return hljs.highlight(code, { language: validLanguage }).value;\n },\n});\n// customize tokenizer to include yaml like header blocks\nconst tokenizer = {\n hr(src) {\n //adapted from https://github.com/markedjs/marked/blob/master/src/rules.js\n const regex = RegExp(/^ {0,3}(-{3,}(?=[^-\\n]*\\n)|~{3,})([^\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~-]* *(?:\\n+|$)|$)/);\n const cap = regex.exec(src);\n if (cap) {\n return {\n type: 'options',\n raw: cap[0],\n data: YAML.parse(cap[3], {}),\n };\n }\n },\n};\n// customize renderer\nconst renderer = {\n // disable paragraph\n paragraph(text) {\n return text;\n },\n //disable blockquote\n blockquote(text) {\n return text;\n },\n //disable heading\n heading(text) {\n return text;\n },\n};\n// @ts-ignore\nmarked.use({ renderer, tokenizer });\nfunction parse_tokens(tokens) {\n return DOMPurify.sanitize(marked.parser(tokens));\n}\nfunction html_decode(input) {\n // https://stackoverflow.com/questions/1912501/unescape-html-entities-in-javascript\n var doc = new DOMParser().parseFromString(input, 'text/html');\n return doc.documentElement.textContent;\n}\nfunction parse_quizdown(raw_quizdown, global_config) {\n let tokens = marked.lexer(html_decode(stripIndent(raw_quizdown)));\n let questions = [];\n let text = '';\n let explanation = '';\n let hint = '';\n let before_first = true;\n // global_config < quiz_config < question_config\n let quiz_config = new Config(global_config);\n let question_config;\n tokens.forEach(function (el, i) {\n if (el['type'] == 'heading') {\n // start a new question\n explanation = '';\n hint = '';\n text = parse_tokens([el]);\n question_config = new Config(quiz_config);\n before_first = false;\n }\n if (el['type'] == 'options') {\n if (before_first) {\n // comes before the first heading: quiz config\n quiz_config = merge_attributes(quiz_config, el['data']);\n }\n else {\n // comes after a heading: question config\n question_config = merge_attributes(quiz_config, el['data']);\n }\n }\n if (el['type'] == 'paragraph' || el['type'] == 'code') {\n explanation += parse_tokens([el]);\n }\n if (el['type'] == 'blockquote') {\n hint += parse_tokens([el]);\n }\n if (el['type'] == 'list') {\n let answers = [];\n el['items'].forEach(function (item, i) {\n let text = '';\n let comment = '';\n item['tokens'].forEach(function (token, i) {\n if (token['type'] == 'blockquote') {\n comment += parse_tokens([token]);\n }\n else {\n text += parse_tokens([token]);\n }\n });\n answers.push(new Answer(i, text, item['checked'], comment));\n });\n if (el['ordered']) {\n if (el['items'][0]['task']) {\n // single choice list\n questions.push(new SingleChoice(text, explanation, hint, answers, question_config));\n }\n else {\n // sequence list\n questions.push(new Sequence(text, explanation, hint, answers, question_config));\n }\n }\n else {\n // multiple choice list\n questions.push(new MultipleChoice(text, explanation, hint, answers, question_config));\n }\n }\n });\n return new Quiz(questions, quiz_config);\n}\nexport default parse_quizdown;\n","import App from './App.svelte';\nimport parse_quizdown from './parser.js';\nimport { Config } from './config.js';\nexport function create_app(raw_quizdown, node, config) {\n node.innerHTML = '';\n let root;\n if (!!node.shadowRoot) {\n //clear root if it allready exists\n root = node.shadowRoot;\n root.innerHTML = '';\n }\n else {\n root = node.attachShadow({ mode: 'open' });\n }\n try {\n let quiz = parse_quizdown(raw_quizdown, config);\n new App({\n // https://github.com/sveltejs/svelte/pull/5870\n target: root,\n intro: false,\n props: {\n quiz: quiz,\n },\n });\n }\n catch (e) {\n root.innerHTML = `${e}. App could not render. Please check your quizdown syntax.`;\n }\n}\nexport function init(config = {}) {\n let global_config = new Config(config);\n if (global_config.start_on_load) {\n if (typeof document !== 'undefined') {\n window.addEventListener('load', function () {\n let nodes = document.querySelectorAll('.quizdown');\n for (let node of nodes) {\n create_app(node.innerHTML, node, global_config);\n }\n }, false);\n }\n }\n}\n"],"names":["fn","fns","safe_not_equal","b","callbacks","subscribe","component","store","callback","assign","$$scope","get_slot_changes_fn","definition","dirty","merged","max","i","len","slot_context","get_slot_context","slot","window","now","forEach","tasks","delete","task","loop","fulfill","name","node","target","styleSheetId","styles","style","id","textContent","append","get_root_for_node","iterations","length","event","options","attribute","text","data","this","a","anchor","e","element","t","html","n","insert","d","h","duration","p","step","ease","keyframes","rule","hash","active_docs","doc","stylesheet","current_rules","active","previous","animation","anim","indexOf","deleteRule","width","height","position","top","add_transform","current_component","get_current_component","binding_callbacks","render_callbacks","set_current_component","update","flush_callbacks","update_scheduled","flushing","seen_callbacks","$$","run_all","before_update","r","c","outros","block","outroing","has","push","globalThis","lookup","destroy_block","mount_component","on_destroy","after_update","destroy_component","dirty_components","resolved_promise","fragment","props","not_equal","on_mount","on_disconnect","skip_bound","root","ctx","value","rest","ret","ready","hydrate","nodes","flush","$$props","$$set","params","transform","scaleX","from","clientWidth","dx","left","delay","easing","cubicOut","css","JSON","end","tick","running","started","stop","old_blocks","o","new_blocks","new_lookup","child_ctx","get_key","will_move","transition_in","m","set","next","new_block","old_block","new_key","key","did_move","destroy","ghost","grabbed","lastTarget","removesItems","mouseY","offsetY","clientY","touchEnter","targetElement","moveDatum","slice","ev","index","stopPropagation","undefined","writable","new_value","s","subscriber_queue","invalidate","noop","subscribers","stores","single","pending","cleanup","auto","unsubscribers","values","sync","inited","stringValue","Symbol","cloneUnlessOtherwiseSpecified","deepmerge","val","property","_","destination","arrayMerge","sourceIsArray","Array","isArray","source","extendStatics","Object","TypeError","__assign","__spreadArray","il","j","el","SKELETON_TYPE","SPACE_SEPARATOR_START_REGEX","result","hourCycle","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","g2","minimumSignificantDigits","g1","maximumSignificantDigits","signDisplay","stem","signOpts","tokens","notation","currencyDisplay","token","CONCISE_INTEGER_WIDTH_REGEX","minimumFractionDigits","g4","conciseScientificAndEngineeringOpts","hasNativeStartsWith","hasNativeFromCodePoint","hasNativeFromEntries","fromEntries","hasNativeCodePointAt","hasTrimStart","hasTrimEnd","prototype","Number","isFinite","Math","floor","REGEX_SUPPORTS_U_AND_Y","matchIdentifierAtIndex","search","_i","elements","code","String","fromCharCode","entries","entries_1","_a","size","first","flag","IDENTIFIER_PREFIX_RE_1","exec","match","Parser","message","offset","ignoreTag","requiresOtherClause","char","err","expectingCloseTag","_isAlpha","type","startPosition","tagName","childrenResult","endTagStartPosition","closingTagNameStartPosition","bumpSpace","children","startOffset","isEOF","start","parseQuoteResult","parseUnquotedResult","parseLeftAngleResult","bump","parentArgType","codePoints","ch","openingBracePosition","startingPosition","endOffset","typeStartPosition","argType","parseIdentifierIfPossible","styleAndLocation","bumpIf","styleStartPosition","argCloseResult","skeleton","pattern","location","parseDateTimeSkeleton","TYPE","date","location_1","typeEndPosition_1","identifierAndLocation","pluralOffset","optionsResult","location_2","pluralType","nestedBraces","apostrophePosition","parseNumberSkeletonFromString","split","WHITE_SPACE_REGEX","stemAndOptions","stringTokens_1","options_1","parseNumberSkeleton","hasOtherClause","parsedSelectors","selector","selectorLocation","ErrorKind","DUPLICATE_SELECT_ARGUMENT_SELECTOR","EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT","fragmentResult","EXPECT_SELECT_ARGUMENT_SELECTOR","tryParseDecimalInteger","sign","hasDigits","decimal","line","kind","column","startsWith$1","prefix","currentOffset","targetOffset","charCodeAt","isSelectElement","isTimeElement","isDateTimeSkeleton","opts","error","originalMessage","cache","serializer","cacheKey","computedValue","args","variadic","serializerDefault","ObjectWithoutPrototypeCache","cacheDefault","strategies","FormatError","_this","__extends","InvalidValueError","variableId","InvalidValueTypeError","MissingValueError","els","isLiteralElement","isPoundElement","currentPluralValue","isArgumentElement","isDateElement","formats","parsedOptions","getDateTimeFormat","isNumberElement","getNumberFormat","isTagElement","formatFn","chunks","formatters","map","opt","isPluralElement","PluralRules","getPluralRules","parts","lastPart","part","PART_TYPE","mergeConfigs","all","c1","IntlMessageFormat","locales","number","dateTime","reduce","literal","__parse","ast","pluralRules","defineProperty","enumerable","memoizedDefaultLocale","month","day","weekday","hour","minute","second","points","quiz","MultipleChoice","SingleChoice","$$slots","buttonAction","getTime","keys","interpolators","defaults","previous_task","interpolate","addMessages","de","init","fallbackLocale","primary_color","secondary_color","text_color","config","setProperty","descriptor","configurable","protoProps","staticProps","Constructor","_arrayLikeToArray","minLen","arr","_createForOfIteratorHelperLoose","it","done","iterator","exports","getDefaults","baseUrl","breaks","gfm","headerIds","headerPrefix","highlight","langPrefix","mangle","pedantic","renderer","sanitize","sanitizer","silent","smartLists","smartypants","tokenizer","walkTokens","xhtml","changeDefaults","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","&","<",">","\"","'","regex","nonWordAndColonTest","prot","decodeURIComponent","href","encodeURI","baseUrls","justDomain","protocol","base","arguments","cells","escaped","curr","l","currChar","findClosingBracket$1","str","level","checkSanitizeDeprecation$1","count","escape","escape$2","unescape","edit","cleanUrl","cleanUrl$1","resolveUrl","noopTest","merge","splitCells","rtrim","findClosingBracket","checkSanitizeDeprecation","repeatString","defaults$4","_escape","title","raw","src","codeBlockStyle","lang","cap","depth","header","align","item","space","bcurr","bnext","addBack","loose","istask","ischecked","endMatch","bull","isordered","ordered","items","itemMatch","list","join","checked","pre","substring","tag","inRawBlock","inLink","linkLen","lastParenIndex","reflink","link","rDelim","rLength","lLength","delimTotal","midDelimTotal","endReg","maskedSrc","min","hasNonSpaceChars","test","hasSpaceCharsOnBothEnds","prevCapZero","_backpedal","helpers","newline","fences","hr","heading","blockquote","def","nptable","table","_paragraph","_label","_title","block$1","bullet","listItemStart","_tag","_comment","replace","paragraph","autolink","url","nolink","reflinkSearch","rDelimAst","br","del","punctuation","_punctuation","inline$1","blockSkip","escapedEmSt","emStrong","lDelim","getRegex","_escapes","_scheme","_email","_attribute","_href","middle","endAst","merge$1","_extended_email","inline","defaults$3","defaults$5","out","links","rules","lex","Lexer","lexInline","blockTokens","lastToken","lheading","console","row","k","_lastToken","_lastToken2","codespan","inlineText","keepPrevChar","defaults$2","_code","body","flags","slug","originalSlug","occurenceAccumulator","seen","defaults$1","textRenderer","l2","l3","cell","itemBody","checkbox","parse","Parser_1","marked","extension","prop","_iterator3","parser","Renderer","TextRenderer","TextRenderer_1","Lexer_1","lexer","Tokenizer","Slugger","factory","hasOwnProperty","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","_ref","apply","thisValue","arrayForEach","arrayPop","pop","stringToLowerCase","toLowerCase","stringMatch","stringReplace","unapply","stringIndexOf","unconstruct","func","array","lcElement","object","lookupGetter","desc","get","fallbackValue","MUSTACHE_EXPR","ERB_EXPR","DATA_ATTR","ARIA_ATTR","IS_SCRIPT_OR_DATA","trustedTypes","suffix","ATTR_NAME","policyName","document","DocumentFragment","HTMLTemplateElement","Node","Element","NodeFilter","_window$NamedNodeMap","NamedNodeMap","Text","Comment","DOMParser","cloneNode","getNextSibling","getChildNodes","ElementPrototype","template","createElement","content","trustedTypesPolicy","_document","implementation","createNodeIterator","createDocumentFragment","documentMode","MUSTACHE_EXPR$$1","ERB_EXPR$$1","DATA_ATTR$$1","ARIA_ATTR$$1","IS_SCRIPT_OR_DATA$$1","ATTR_WHITESPACE$$1","ALLOWED_TAGS","ALLOWED_ATTR","DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","cfg","addToSet","DEFAULT_ALLOWED_TAGS","clone","FORBID_TAGS","FORBID_ATTR","USE_PROFILES","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","SAFE_FOR_TEMPLATES","WHOLE_DOCUMENT","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_DOM_IMPORT","RETURN_TRUSTED_TYPE","FORCE_BODY","SANITIZE_DOM","KEEP_CONTENT","IN_PLACE","IS_ALLOWED_URI$$1","NAMESPACE","svg","svg$1","svgFilters","mathMl","mathMl$1","CONFIG","ALL_SVG_TAGS","namespaceURI","HTML_NAMESPACE","arrayPush","_forceRemove","hook","nodeName","allowedTags","parentNode","getParentNode","currentNode","attr","lcName","attrName","attrValue","keepAttr","allowedAttributes","_attr","hookEvent","_executeHook","_removeAttribute","lcTag","shadowNode","importedNode","oldNode","serializedHTML","_parseConfig","SET_CONFIG","entryPoint","hookFunction","hooks","removeAllHooks","obj","Map","clear","Set","add","deepFreezeEs6","escapeHTML","buffer","className","rootNode","stack","builder","child","TokenTree","super","openNode","addText","sublanguage","HTMLRenderer","source$1","re","IDENT_RE","UNDERSCORE_IDENT_RE","NUMBER_RE","C_NUMBER_RE","BINARY_NUMBER_RE","begin","illegal","contains","modeOptions","mode","PHRASAL_WORDS_MODE","relevance","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","HASH_COMMENT_MODE","BACKSLASH_ESCAPE","MODES","__proto__","MATCH_NOTHING_RE","RE_STARTERS_RE","SHEBANG","beginShebang","APOS_STRING_MODE","QUOTE_STRING_MODE","COMMENT","NUMBER_MODE","C_NUMBER_MODE","BINARY_NUMBER_MODE","CSS_NUMBER_MODE","REGEXP_MODE","TITLE_MODE","UNDERSCORE_TITLE_MODE","METHOD_GUARD","on:end","parent","__beforeBegin","skipIfhasPrecedingDot","COMMON_KEYWORDS","rawKeywords","compiledKeywords","compileKeywords","keyword","langRe","RegExp","regexes","matchAt","matchIndexes","matcherRe","numCaptures","multiRegexes","lastIndex","matcher","m2","compileMatch","compileRelevance","keywordPattern","keywords","cmode","endSameAsBegin","terminatorEnd","illegalRe","cachedVariants","detectedLanguage","unknownLanguage","autoDetect","getLanguage","language","class","domProps","resultNode","processed","attributeString","render","nodeStack","stream","original","deprecated","seenDeprecations","escape$1","inherit$1","fixMarkupRe","noHighlightRe","languageDetectRe","classPrefix","tabReplace","useBR","__emitter","shouldNotHighlight","languageName","ignoreIllegals","context","processBuffer","emitter","subLanguage","keywordPatternRe","buf","classNameAliases","modeBuffer","matchPlusRemainder","lexeme","endsWithParent","doIgnore","resumeScanAtSamePosition","cb","newMode","skip","excludeBegin","endOfMode","codeToHighlight","Error","doEndMatch","NO_MATCH","LANGUAGE_NOT_FOUND","continuations","processContinuations","processLexeme","closeAllNodes","msg","sofar","errorRaised","languageSubset","filter","_highlight","warn","updateClassName","relavance","second_best","initHighlighting","wantsHighlight","aliasList","addEventListener","highlightAuto","highlightAll","fixMarkup","highlightBlock","configure","initHighlightingOnLoad","registerLanguage","languageDefinition","languages","unregisterLanguage","listLanguages","registerAliases","requireLanguage","autoDetection","inherit","plugin","upgradePluginAPI","vuePlugin","hljs","debugMode","safeMode","SAFE_MODE","addPlugin","brPlugin","mergeHTMLPlugin","lookahead","$pattern","built_in","PROMPT","LITERAL_BRACKET","digitpart","pointfloat","KEYWORDS","excludeEnd","NUMBER","STRING","beginKeywords","COMMENT_TYPE","PARAMS","disableAutodetect","_defineProperty","Reflect","Boolean","instance","Wrapper","Super","_slicedToArray","_arr","_n","_d","_toArray","_createForOfIteratorHelper","F","f","normalCompletion","didErr","defaultTagPrefix","MAP","SEQ","STR","ls","lineStarts","cst","_getSrcInfo","col","_getSrcInfo2","origStart","cr","range","valueRange","getPropValue","Char","comment","Type","getLinePos","_this$valueRange","verbatim","_tag$match2","handle","_this$valueRange2","commentRange","setOrigRange","ch0","prev","ch1","ch2","isVerbatim","lineStart","wsEnd","inCount","fold","_this$linePos$start","linePos","maxWidth","getLine","halfWidth","errLen","repeat","_Node$foldNewline","wsStart","errors","_this$context","indent","inFlow","Node$1","valueEnd","isEmpty","PlainValue","Range","BlankLine","parseNode","atLineStart","endOfWhiteSpace","inlineComment","comments","blankLine","nextNodeIsIndented","inCollection","CollectionItem","cnode","_n$context","ci","ca","firstItem","ec","atBlank","normalizeOffset","_item$context","Collection","parseParameters","Directive","directives","contents","directivesEndMarker","hasDirectives","directive","iEnd","parseDirectives","parseContents","Document","parseComment","Alias","blockIndent","chomping","lastNewLine","keepStart","bi","folded","atStart","sep","lineEnd","endOfLine","_ch","_this$context2","explicit","_ch2","lineIndent","parseBlockValue","BlockValue","idx","origOffset","prevEnd","FlowCollection","cc","QuoteDouble","YAMLSyntaxError","QuoteSingle","atDocumentBoundary","_context$parseProps","parseEnd","nodeStartsCollection","collection","orig","inEnd","indentDiff","noIndicatorAsIndent","lineHasProps","valueStart","documents","Document$2","addComment","_classCallCheck","toJSON","anchors","res","path","_path","_ref2","_ref3","keepScalar","_ref4","_ref5","_ref6","_ref7","_ref8","blockItem","_ref9","flowChars","isMap","itemIndent","_ctx","indentStep","stringify","allNullValues","chompKeep","hasItemWithNewLine","includes","_iterator","_step","_iterator2","_step2","asItemIndex","splice","seq","call","Pair","jsKey","_typeof","inStringifyKey","mapAsMap","_ctx$doc$options","indentSize","indentSeq","simpleKeys","explicitKey","implicitKey","vcb","ws","valueComment","PAIR","MERGE_PAIR","getAliasCount","kc","arg","maxAliasCount","_msg","pair","findPair","YAMLSeq","_step2$value","defaultType","lineWidth","trueStr","falseStr","asBigInt","nullStr","jsonEncoding","_step$value","format","FOLD_FLOW","FOLD_BLOCK","indentAtStart","_ref$lineWidth","_ref$minContentWidth","minContentWidth","onFold","onOverflow","endStep","folds","escapedFolds","overflow","escStart","consumeMoreIndentedLines","FOLD_QUOTED","concat","_strOptions$doubleQuo","minMultiLineLength","json","singleQuotedString","forceBlockIndent","limit","indentLength","strLen","strOptions","_item","actualString","tags","minFractionDigits","isNaN","lastItem","YAMLSemanticError","sk","substr","afterKey","before","resolveString","resolveTagName","_node$tag","tagPrefixes","find","dtp","resolveTagHandle","fallback","getFallbackTagName","_res","refError","after","hasAnchor","hasTag","_resolveNodeProps","resolveScalar","keepCstNodes","cstNode","resolveMap","checkFlowCommentSpace","checkFlowCollectionEnd","keyStart","valueNode","origPos","resolveNode","resolvePairComment","_msg2","_msg3","resolveComments","iKey","schema","sources","jKey","_ref2$context","found","startsWith","resolveSeq","keyEnd","_err","hasProps","default","atob","binaryOptions","parsePairs","commentBefore","resolve","createNode","YAMLOMap","nodeClass","pairs","omap","YAMLSet","round","millisec","tz","parseSexagesimal","shouldWarn","YAML_SILENCE_DEPRECATION_WARNINGS","YAML_SILENCE_WARNINGS","_key","v","nullOptions","boolOptions","intOptions","identify","frac","frac1","parseFloat","intResolve","radix","toString","core","failsafe","yaml11","binary","bool","float","floatExp","expObj","floatNaN","floatTime","int","intHex","hexObj","intOct","intTime","null","nullObj","timestamp","defaultPrefix","onTagObj","prevObjects","wrapScalars","tagObj","customTags","sortMapEntries","warned","warnOptionDeprecation","schemas","knownTags","anchorPrefix","keepNodeTypes","keepBlobsInJSON","version","priv","!",",","[","]","{","}","_ctx$doc","aliasNodes","alias","onComment","_match","constructor","_len","visit","Scalar","_directive$parameters","assertCollection","_node$directives","_node$contents","directiveComments","resolveYamlDirective","setSchema","_cstAliases","_error","_this$options","keep","anchorNames","aliasCount","_step3$value","lines","tagNames","unshift","spaceBefore","contentComment","parseDocument","parse$1","Document$1","defaultOptions","parseAllDocuments","cstDoc","parseCST","scalarOptions","self","include","properties","answers","explanation","hint","solved","selected","a1","randomIndex","temporaryValue","currentIndex","true_answer_ids","answer","correct","get_store_value","questions","counter","finished","q","start_on_load","shuffle_answers","shuffle_questions","Config","core$1","validLanguage","raw_quizdown","parseFromString","quiz_config","question_config","create_app","App","intro","global_config"],"mappings":"2QAKA,gBAEC,2BACA,SAaD,WAAaA,GACZ,WAGD,aACC,2BAGD,WAAiBC,GAChBA,aAGD,cACC,2BAGD,SAASC,IAAkBC,GAC1B,oEAiBD,sBACc,QACZ,SAED,uBAAiCC,GACjC,2CAGD,cACC,MAEA,OADAC,aAAAA,KAID,WAA6BC,EAAWC,EAAOC,GAC9CF,6BAUD,oBAIC,SAH2B,MACxBG,EAAOC,gCA6BX,qBAAiEC,KAChE,QAzBD,SAA0BC,oBACA,kCAGZC,MACX,gCAIA,MAAMC,YACWC,qCACRC,EAAI,IAAOC,OACnBH,qBAGD,SAGD,iBAGD,+BAMC,MAAMI,EAAeC,WACrBC,UA0CF,cACC,uDAgBD,QACG,IAAMC,0FAgBT,WAAmBC,KACZC,sBAEJC,EAAMC,UACNC,2BAkBH,SAASC,yDAMcC,IACpBJ,8BAGAA,cAMH,WAAiBK,GAChB,iCAOD,aAAwBC,GACvBC,iBAGD,WACCA,EACAC,EACAC,0CAhBD,wUAsBE,MAAMC,aACNA,EAAMC,KACND,EAAME,cACNC,QAIF,WAA2BP,mEAM3B,cACC,QAAaQ,EAAkBR,GAC/B,uBAOD,kBACCC,0BAGD,WAAgBD,GACfA,4BAGD,oBACM,QAAWd,EAAIuB,EAAWC,4BAoBhC,cACC,gEAGD,cACC,kCAGD,aACC,cAGD,aACC,aAGD,aAAsBC,OAErB,OADAX,uBAAsCY,oCA2BvC,WAAcZ,EAAMa,KACN,wEAyGd,WAAkBC,KACjBC,mCAgBD,oBACCf,0CA4GD,4BAOEgB,KAAKC,EAAIC,EACTF,iCAIKA,KAAK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MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,eACA,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,cACA,OAANA,GACM,UACLA,GAAK,eACA,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,UACLA,GAAK,gBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QA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OACA,QACA,SACA,MACA,QACA,OACA,SA0GAqH,UAtGA,aACA,MACA,MACA,MACA,QACA,MACA,OACA,aACA,YACA,QACA,WACA,MACA,cACA,UACA,UACA,UACA,OACA,MACA,SACA,YACA,OACA,OACA,SACA,QACA,SACA,YACA,UACA,UACA,UACA,OACA,OACA,MACA,KACA,QACA,MACA,aACA,aACA,OACA,MACA,OACA,SACA,MACA,MACA,aACA,MACA,OACA,SACA,MACA,OACA,MACA,MACA,QACA,WACA,QACA,OACA,WACA,QACA,MACA,UACA,QACA,SACA,eACA,MACA,MACA,QACA,QACA,OACA,OACA,OAmCAtjB,SA/BA,YACA,WACA,QACA,OACA,iBACA,QA2BA9H,MApBA,MACA,WACA,YACA,OACA,OACA,UACA,UACA,WACA,WACA,MACA,QACA,OACA,aAYAygB,iBACAkB,2BAIAlB,UAAW,QACXkB,WACAjqB,SACAotB,WACAlD,gBAIAD,aACAM,gBAIAxB,mBACAoB,SAAU,gCAGNF,+CACAjqB,oBAEEizB,qCAMFhJ,+CACAjqB,oBAEEizB,qCAMFhJ,oCACAjqB,oBAEEizB,mBACAU,EACAC,OAKF3J,oCACAjqB,oBAEEizB,mBACAU,EACAC,OAKF3J,qBACAjqB,uBAIAiqB,qBACAjqB,uBAIAiqB,4CAIAA,4CAIAA,kCACAjqB,kBAEEizB,mBACAW,OAKF3J,kCACAjqB,kBAEEizB,mBACAW,MAIJX,EAAK/H,uCAMH2I,oBACAC,0CAEJ/K,UAAW,SACXwB,sSA8CAxB,oBACAkB,oBACAjqB,QACAotB,SAAU2G,+BAON9J,UACAjqB,mCAMJ+oB,8BAIIA,aACAkB,0BAIAA,WACAjqB,SACAswB,gBACA0D,cACA5G,SAAU2G,YAER,OACAJ,EACAM,EACAC,6CAONA,EACAD,EACAN,IAIAv6B,uBAEE,KACA,iBAGFg0B,WACAlD,mCAEEyJ,EACAM,sBAQEE,gCAGFD,EACAE,EACAnB,gCAIMlK,2CAIAA,0CAIJ/oB,QACAkqB,8BAEE+I,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4xB,iDAGdpJ,qEAOA,8DAIA,MAAYhe,QACZ,8BAGUtR,sDAIVi3B,WACAntB,4BACAwtB,QAAS7C,kEAMG,wDAGZwC,WACAntB,6BACAgB,sBACS,uFAQTmsB,WACAntB,6BACAgB,4BACS,6CAKT2tB,YACAxB,WACAntB,4BACAgB,qCACS,mEAGE,YACT,4GAOFmsB,WACAntB,8BACAgB,sEACS,kCAGTwkB,eAGFiE,8BACE,6EAKF,mBAEE,OADYjiB,+CAKZ,+CAGF,SAASunB,yCAGQ7G,iBACL8G,QACD,EACHhyB,EAAM,0BAGH,EACHA,EAAM,0BAGH,GACHA,EAAM,4DASZ,iBAAsBgyB,wBAIxB,2CAII,QAAgBC,SAASD,iDAO7B,iBAA6B,CAAC,iDAIhB,wDAGZ7B,WACAntB,6BACAgB,qCACS,wBAGThgB,QAASwtC,6FAQTrB,WACAntB,6BACAgB,0DACS,qBAGThgB,QAASytC,kEAMTtB,WACAntB,6BACAgB,6DACS,qBAGThgB,QAASytC,kBAGTE,YACAxB,WACAntB,4BACAsoB,aACAtnB,oCACS,SAAiBhE,EAAK/J,oEAO/B07B,YACAxB,WACAntB,4BACAsoB,aACAtnB,mCACS,SAAiBhE,EAAK/J,mEAO/B07B,YACAxB,WACAntB,4BACAgB,uCACS,SAAiBhE,EAAK/J,uCAK/B07B,YACAxB,WACAntB,4BACAsoB,aACAtnB,0CACS,SAAiBhE,EAAK/J,2CAGD7S,0EAO9B+sC,WACAntB,8BACAgB,yCACS,SAAiBhE,8IAQ1BmwB,WACAntB,8BACAsoB,aACAtnB,iEACS,6DAGE,YACT,iGAOFmsB,WACAntB,8BACAgB,mHAIY,CACR,IAAImb,EAAIyS,eAAmB,kEAM/BpJ,yCAIA0J,QACAC,SAAUA,GACV1F,KAAMA,GACN2F,eAGAC,UACAC,QACAC,SACAC,SAAUC,GACVC,YACAC,UAAWA,GACXC,OACAC,OAAQC,GACRC,UACAC,WACA95B,OACA+5B,KAAMC,GACNrC,QACAD,SACAzH,I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AW5rC,OAChBhI,KAAK4W,OAAS,EACd5W,cACI+X,uEAMJ,QAAwB/X,0IAaxBA,KAAK2zC,gBACL3zC,KAAK0zC,mBAAmBG,gDAIxB7zC,cAAcyG,QACd,YACK,SAASzG,eACV6zC,UACIA,cAGR7zC,KAAK4W,OAASA,+BC5KtB,uCAGA,wBAEQ5W,KAAK8zC,qCACL9zC,KAAK+zC,yCACL/zC,KAAKg0C,kBAAoBzsB,2BACzBvnB,KAAK4X,8CACL5X,KAAK6X,gDACL7X,KAAK8X,WAAayP,wDAI1B,iBAEI,UAAiB0sB,qBAETnqC,OAAOoC,4DCTd8rB,iBAAiB,aACtBkc,oCAMAlvB,6CAEcmvB,oBACA1gB,2DAMd,MAAM3Z,UAGE,wHAEIuD,SAEIpP,eACAgP,iEAaDnd,mBAUf,gDAQA,YAAwBs0C,KACpB,IAAIjpC,EAAS6Z,mBAJH,eAAgBqvB,6DAF9B,MAOI,MAAIX,KACA5zC,KACAgzC,KACAC,UAGAuB,mEAKIxB,KACAC,EAAO,GACPjzC,UACAy0C,6BAGAnqC,uDAUAA,gBAA6BA,mCAG7BA,qBAGc,QAAdA,QACA,iBACY3L,uBACR,IAAIqB,EAAO,GACPo8B,EAAU,KACD,4CACL5wB,mEASRlB,wHC/GhB,SAASoqC,UAEL,IAAIpwC,EADJpF,6BAIIoF,mEAOA,IAAIqwC,kBAGAx1C,SACAy1C,OAAO,0GDoCnB1vB,0DC1BA,eACI,IAAI2vB,SAA2B58B,GAC3B48B,qCACWzsB,kCACiB,mBACpB"}
\ No newline at end of file
+{"version":3,"file":"quizdown.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/svelte/easing/index.mjs","../../node_modules/svelte/animate/index.mjs","../../src/components/DragDropList.svelte","../../src/components/SequenceView.svelte","../../src/components/ChoiceView.svelte","../../node_modules/svelte/store/index.mjs","../../node_modules/deepmerge/dist/cjs.js","../../node_modules/tslib/tslib.es6.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js","../../node_modules/@formatjs/fast-memoize/lib/index.js","../../node_modules/intl-messageformat/lib/src/error.js","../../node_modules/intl-messageformat/lib/src/formatters.js","../../node_modules/intl-messageformat/lib/src/core.js","../../node_modules/svelte-i18n/dist/runtime.esm.js","../../src/components/ResultView.svelte","../../src/components/QuizSection.svelte","../../src/components/Button.svelte","../../src/components/Footer.svelte","../../node_modules/svelte/motion/index.mjs","../../src/components/ProgressBar.svelte","../../src/languages/i18n.ts","../../src/App.svelte","../../node_modules/dompurify/dist/purify.js","../../node_modules/strip-indent/index.js","../../node_modules/auto-bind/index.js","../../src/quiz.ts","../../src/config.ts","../../node_modules/marked/lib/marked.js","../../node_modules/highlight.js/lib/core.js","../../node_modules/highlight.js/lib/languages/python.js","../../node_modules/highlight.js/lib/languages/xml.js","../../node_modules/highlight.js/lib/languages/plaintext.js","../../node_modules/yaml/browser/dist/PlainValue-b8036b75.js","../../src/highlight.ts","../../node_modules/yaml/browser/dist/parse-cst.js","../../node_modules/yaml/browser/dist/resolveSeq-492ab440.js","../../node_modules/yaml/browser/dist/warnings-df54cb69.js","../../node_modules/yaml/browser/dist/Schema-e94716c8.js","../../node_modules/yaml/browser/dist/index.js","../../src/customized_marked.ts","../../src/parser.ts","../../src/quizdown.ts"],"sourcesContent":["function noop() {}\n\nconst identity = x => x;\n\nfunction assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn tar ;\n}\n\nfunction is_promise(value) {\n\treturn value && typeof value === 'object' && typeof value.then === 'function';\n}\n\nfunction add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nfunction run(fn) {\n\treturn fn();\n}\n\nfunction blank_object() {\n\treturn Object.create(null);\n}\n\nfunction run_all(fns) {\n\tfns.forEach(run);\n}\n\nfunction is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\nfunction safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\n\nfunction not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\nfunction is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\nfunction validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nfunction subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\nfunction get_store_value(store) {\n\tlet value;\n\tsubscribe(store, _ => value = _)();\n\treturn value;\n}\n\nfunction component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nfunction create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\tconst context = definition[1] && fn\n\t\t? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n\t\t: $$scope.ctx;\n\treturn context;\n}\n\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\n\t\t\treturn merged;\n\t\t}\n\n\t\treturn $$scope.dirty | lets;\n\t}\n\n\treturn $$scope.dirty;\n}\n\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n\tconst slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\nfunction exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\nfunction compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\nfunction compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\nfunction once(fn) {\n\tlet ran = false;\n\treturn function( ...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nfunction null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nfunction set_store_value(store, ret, value = ret) {\n\tstore.set(value);\n\treturn ret;\n}\n\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nfunction action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\n\nlet now = is_client\n\t? () => window.performance.now()\n\t: () => Date.now();\n\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n\n// used internally for testing\nfunction set_now(fn) {\n\tnow = fn;\n}\n\nfunction set_raf(fn) {\n\traf = fn;\n}\n\nconst tasks = new Set();\n\nfunction run_tasks(now) {\n\ttasks.forEach(task => {\n\t\tif (!task.c(now)) {\n\t\t\ttasks.delete(task);\n\t\t\ttask.f();\n\t\t}\n\t});\n\n\tif (tasks.size !== 0) raf(run_tasks);\n}\n\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n\ttasks.clear();\n}\n\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n\tlet task;\n\n\tif (tasks.size === 0) raf(run_tasks);\n\n\treturn {\n\t\tpromise: new Promise(fulfill => {\n\t\t\ttasks.add(task = { c: callback, f: fulfill });\n\t\t}),\n\t\tabort() {\n\t\t\ttasks.delete(task);\n\t\t}\n\t};\n}\n\nfunction _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\nfunction element(name) {\n\treturn document.createElement(name);\n}\n\nfunction element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\nfunction append(target, node) {\n\ttarget.appendChild(node);\n}\n\nfunction append_styles(\n\ttarget,\n\tstyleSheetId,\n\tstyles,\n\tstyleId = `svelte-${styleSheetId}-style`\n) {\n\tconst appendStylesTo = get_root_for_styles(target);\n\n\tif (!_optionalChain([appendStylesTo, 'optionalAccess', _ => _.querySelector, 'call', _2 => _2('#' + styleId)])) {\n\t\tconst style = element('style');\n\t\tstyle.id = styleId;\n\t\tstyle.textContent = styles;\n\t\tappend(appendStylesTo, style);\n\t}\n}\n\nfunction get_root_for_node(node) {\n\tif (!node) return document;\n\n\treturn (node.getRootNode ? node.getRootNode() : node.ownerDocument); // check for getRootNode because IE is still supported\n}\n\nfunction get_root_for_styles(node) {\n\tconst root = get_root_for_node(node);\n\treturn ((root ).host ? root : (root ).head) ;\n}\n\nfunction append_empty_stylesheet(node) {\n\treturn get_root_for_styles(node).appendChild(element('style') );\n}\n\nfunction insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\nfunction detach(node) {\n\tnode.parentNode.removeChild(node);\n}\n\nfunction destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\nfunction object_without_properties(obj, exclude) {\n\tconst target = {} ;\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k)\n\t\t\t// @ts-ignore\n\t\t\t&& exclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\nfunction svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\nfunction text(data) {\n\treturn document.createTextNode(data);\n}\n\nfunction space() {\n\treturn text(' ');\n}\n\nfunction empty() {\n\treturn text('');\n}\n\nfunction listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\nfunction prevent_default(fn) {\n\treturn function(event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction stop_propagation(fn) {\n\treturn function(event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction self(fn) {\n\treturn function(event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\nfunction attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n\nfunction set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t(node ).value = node[key] = attributes[key];\n\t\t} else if (descriptors[key] && descriptors[key].set) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\nfunction set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\nfunction set_custom_element_data(node, prop, value) {\n\tif (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\nfunction xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\nfunction get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\nfunction to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\nfunction time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\nfunction children(element) {\n\treturn Array.from(element.childNodes);\n}\n\nfunction claim_element(nodes, name, attributes, svg) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeName === name) {\n\t\t\tlet j = 0;\n\t\t\tconst remove = [];\n\t\t\twhile (j < node.attributes.length) {\n\t\t\t\tconst attribute = node.attributes[j++];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let k = 0; k < remove.length; k++) {\n\t\t\t\tnode.removeAttribute(remove[k]);\n\t\t\t}\n\t\t\treturn nodes.splice(i, 1)[0];\n\t\t}\n\t}\n\n\treturn svg ? svg_element(name) : element(name);\n}\n\nfunction claim_text(nodes, data) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 3) {\n\t\t\tnode.data = '' + data;\n\t\t\treturn nodes.splice(i, 1)[0];\n\t\t}\n\t}\n\n\treturn text(data);\n}\n\nfunction claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\nfunction set_data(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText !== data) text.data = data;\n}\n\nfunction set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\nfunction set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\nfunction set_style(node, key, value, important) {\n\tnode.style.setProperty(key, value, important ? 'important' : '');\n}\n\nfunction select_option(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nfunction select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nfunction select_value(select) {\n\tconst selected_option = select.querySelector(':checked') || select.options[0];\n\treturn selected_option && selected_option.__value;\n}\n\nfunction select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\n\nfunction is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\n\treturn crossorigin;\n}\n\nfunction add_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\n\tconst iframe = element('iframe');\n\tiframe.setAttribute('style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\n\tconst crossorigin = is_crossorigin();\n\n\tlet unsubscribe;\n\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,\";\n\t\tunsubscribe = listen(window, 'message', (event) => {\n\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t});\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t};\n\t}\n\n\tappend(node, iframe);\n\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\n\t\tdetach(iframe);\n\t};\n}\n\nfunction toggle_class(element, name, toggle) {\n\telement.classList[toggle ? 'add' : 'remove'](name);\n}\n\nfunction custom_event(type, detail) {\n\tconst e = document.createEvent('CustomEvent');\n\te.initCustomEvent(type, false, false, detail);\n\treturn e;\n}\n\nfunction query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\nclass HtmlTag {\n\t\n\t\n\t\n\t\n\n\tconstructor(anchor = null) {\n\t\tthis.a = anchor;\n\t\tthis.e = this.n = null;\n\t}\n\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tthis.e = element(target.nodeName );\n\t\t\tthis.t = target;\n\t\t\tthis.h(html);\n\t\t}\n\n\t\tthis.i(anchor);\n\t}\n\n\th(html) {\n\t\tthis.e.innerHTML = html;\n\t\tthis.n = Array.from(this.e.childNodes);\n\t}\n\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert(this.t, this.n[i], anchor);\n\t\t}\n\t}\n\n\tp(html) {\n\t\tthis.d();\n\t\tthis.h(html);\n\t\tthis.i(this.a);\n\t}\n\n\td() {\n\t\tthis.n.forEach(detach);\n\t}\n}\n\nfunction attribute_to_object(attributes) {\n\tconst result = {};\n\tfor (const attribute of attributes) {\n\t\tresult[attribute.name] = attribute.value;\n\t}\n\treturn result;\n}\n\nfunction get_custom_elements_slots(element) {\n\tconst result = {};\n\telement.childNodes.forEach((node) => {\n\t\tresult[node.slot || 'default'] = true;\n\t});\n\treturn result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n\tlet hash = 5381;\n\tlet i = str.length;\n\n\twhile (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n\treturn hash >>> 0;\n}\n\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n\tconst step = 16.666 / duration;\n\tlet keyframes = '{\\n';\n\n\tfor (let p = 0; p <= 1; p += step) {\n\t\tconst t = a + (b - a) * ease(p);\n\t\tkeyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n\t}\n\n\tconst rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n\tconst name = `__svelte_${hash(rule)}_${uid}`;\n\tconst doc = get_root_for_node(node) ;\n\tactive_docs.add(doc);\n\tconst stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet );\n\tconst current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n\n\tif (!current_rules[name]) {\n\t\tcurrent_rules[name] = true;\n\t\tstylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n\t}\n\n\tconst animation = node.style.animation || '';\n\tnode.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n\n\tactive += 1;\n\treturn name;\n}\n\nfunction delete_rule(node, name) {\n\tconst previous = (node.style.animation || '').split(', ');\n\tconst next = previous.filter(name\n\t\t? anim => anim.indexOf(name) < 0 // remove specific animation\n\t\t: anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n\t);\n\tconst deleted = previous.length - next.length;\n\tif (deleted) {\n\t\tnode.style.animation = next.join(', ');\n\t\tactive -= deleted;\n\t\tif (!active) clear_rules();\n\t}\n}\n\nfunction clear_rules() {\n\traf(() => {\n\t\tif (active) return;\n\t\tactive_docs.forEach(doc => {\n\t\t\tconst stylesheet = doc.__svelte_stylesheet;\n\t\t\tlet i = stylesheet.cssRules.length;\n\t\t\twhile (i--) stylesheet.deleteRule(i);\n\t\t\tdoc.__svelte_rules = {};\n\t\t});\n\t\tactive_docs.clear();\n\t});\n}\n\n//todo: documentation says it is DOMRect, but in IE it would be ClientRect\n\n\n\n\nfunction create_animation(node, from, fn, params) {\n\tif (!from) return noop;\n\n\tconst to = node.getBoundingClientRect();\n\tif (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom) return noop;\n\n\n\tconst {\n\t\tdelay = 0,\n\t\tduration = 300,\n\t\teasing = identity,\n\t\t// @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n\t\tstart: start_time = now() + delay,\n\t\t// @ts-ignore todo:\n\t\tend = start_time + duration,\n\t\ttick = noop,\n\t\tcss\n\t} = fn(node, { from, to }, params);\n\n\tlet running = true;\n\tlet started = false;\n\tlet name;\n\n\tfunction start() {\n\t\tif (css) {\n\t\t\tname = create_rule(node, 0, 1, duration, delay, easing, css);\n\t\t}\n\n\t\tif (!delay) {\n\t\t\tstarted = true;\n\t\t}\n\t}\n\n\tfunction stop() {\n\t\tif (css) delete_rule(node, name);\n\t\trunning = false;\n\t}\n\n\tloop(now => {\n\t\tif (!started && now >= start_time) {\n\t\t\tstarted = true;\n\t\t}\n\n\t\tif (started && now >= end) {\n\t\t\ttick(1, 0);\n\t\t\tstop();\n\t\t}\n\n\t\tif (!running) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (started) {\n\t\t\tconst p = now - start_time;\n\t\t\tconst t = 0 + 1 * easing(p / duration);\n\t\t\ttick(t, 1 - t);\n\t\t}\n\n\t\treturn true;\n\t});\n\n\tstart();\n\n\ttick(0, 1);\n\n\treturn stop;\n}\n\nfunction fix_position(node) {\n\tconst style = getComputedStyle(node);\n\n\tif (style.position !== 'absolute' && style.position !== 'fixed') {\n\t\tconst { width, height } = style;\n\t\tconst a = node.getBoundingClientRect();\n\t\tnode.style.position = 'absolute';\n\t\tnode.style.width = width;\n\t\tnode.style.height = height;\n\t\tadd_transform(node, a);\n\t}\n}\n\nfunction add_transform(node, a) {\n\tconst b = node.getBoundingClientRect();\n\n\tif (a.left !== b.left || a.top !== b.top) {\n\t\tconst style = getComputedStyle(node);\n\t\tconst transform = style.transform === 'none' ? '' : style.transform;\n\n\t\tnode.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n\t}\n}\n\nlet current_component;\n\nfunction set_current_component(component) {\n\tcurrent_component = component;\n}\n\nfunction get_current_component() {\n\tif (!current_component) throw new Error('Function called outside component initialization');\n\treturn current_component;\n}\n\nfunction beforeUpdate(fn) {\n\tget_current_component().$$.before_update.push(fn);\n}\n\nfunction onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\nfunction afterUpdate(fn) {\n\tget_current_component().$$.after_update.push(fn);\n}\n\nfunction onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\nfunction createEventDispatcher\n\n() {\n\tconst component = get_current_component();\n\n\treturn (type, detail) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(type, detail);\n\t\t\tcallbacks.slice().forEach(fn => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t}\n\t};\n}\n\nfunction setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n}\n\nfunction getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\nfunction hasContext(key) {\n\treturn get_current_component().$$.context.has(key);\t\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\n\tif (callbacks) {\n\t\tcallbacks.slice().forEach(fn => fn(event));\n\t}\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\n\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\n\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\n\nfunction schedule_update() {\n\tif (!update_scheduled) {\n\t\tupdate_scheduled = true;\n\t\tresolved_promise.then(flush);\n\t}\n}\n\nfunction tick() {\n\tschedule_update();\n\treturn resolved_promise;\n}\n\nfunction add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\nfunction add_flush_callback(fn) {\n\tflush_callbacks.push(fn);\n}\n\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n\tif (flushing) return;\n\tflushing = true;\n\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\tfor (let i = 0; i < dirty_components.length; i += 1) {\n\t\t\tconst component = dirty_components[i];\n\t\t\tset_current_component(component);\n\t\t\tupdate(component.$$);\n\t\t}\n\t\tset_current_component(null);\n\n\t\tdirty_components.length = 0;\n\n\t\twhile (binding_callbacks.length) binding_callbacks.pop()();\n\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\tfor (let i = 0; i < render_callbacks.length; i += 1) {\n\t\t\tconst callback = render_callbacks[i];\n\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\n\t\trender_callbacks.length = 0;\n\t} while (dirty_components.length);\n\n\twhile (flush_callbacks.length) {\n\t\tflush_callbacks.pop()();\n\t}\n\n\tupdate_scheduled = false;\n\tflushing = false;\n\tseen_callbacks.clear();\n}\n\nfunction update($$) {\n\tif ($$.fragment !== null) {\n\t\t$$.update();\n\t\trun_all($$.before_update);\n\t\tconst dirty = $$.dirty;\n\t\t$$.dirty = [-1];\n\t\t$$.fragment && $$.fragment.p($$.ctx, dirty);\n\n\t\t$$.after_update.forEach(add_render_callback);\n\t}\n}\n\nlet promise;\n\nfunction wait() {\n\tif (!promise) {\n\t\tpromise = Promise.resolve();\n\t\tpromise.then(() => {\n\t\t\tpromise = null;\n\t\t});\n\t}\n\n\treturn promise;\n}\n\nfunction dispatch(node, direction, kind) {\n\tnode.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\n\nconst outroing = new Set();\nlet outros;\n\nfunction group_outros() {\n\toutros = {\n\t\tr: 0, // remaining outros\n\t\tc: [], // callbacks\n\t\tp: outros // parent group\n\t};\n}\n\nfunction check_outros() {\n\tif (!outros.r) {\n\t\trun_all(outros.c);\n\t}\n\toutros = outros.p;\n}\n\nfunction transition_in(block, local) {\n\tif (block && block.i) {\n\t\toutroing.delete(block);\n\t\tblock.i(local);\n\t}\n}\n\nfunction transition_out(block, local, detach, callback) {\n\tif (block && block.o) {\n\t\tif (outroing.has(block)) return;\n\t\toutroing.add(block);\n\n\t\toutros.c.push(() => {\n\t\t\toutroing.delete(block);\n\t\t\tif (callback) {\n\t\t\t\tif (detach) block.d(1);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\n\t\tblock.o(local);\n\t}\n}\n\nconst null_transition = { duration: 0 };\n\n\n\nfunction create_in_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = false;\n\tlet animation_name;\n\tlet task;\n\tlet uid = 0;\n\n\tfunction cleanup() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n\t\ttick(0, 1);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tif (task) task.abort();\n\t\trunning = true;\n\n\t\tadd_render_callback(() => dispatch(node, true, 'start'));\n\n\t\ttask = loop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(1, 0);\n\n\t\t\t\t\tdispatch(node, true, 'end');\n\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn running = false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tlet started = false;\n\n\treturn {\n\t\tstart() {\n\t\t\tif (started) return;\n\n\t\t\tdelete_rule(node);\n\n\t\t\tif (is_function(config)) {\n\t\t\t\tconfig = config();\n\t\t\t\twait().then(go);\n\t\t\t} else {\n\t\t\t\tgo();\n\t\t\t}\n\t\t},\n\n\t\tinvalidate() {\n\t\t\tstarted = false;\n\t\t},\n\n\t\tend() {\n\t\t\tif (running) {\n\t\t\t\tcleanup();\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_out_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = true;\n\tlet animation_name;\n\n\tconst group = outros;\n\n\tgroup.r += 1;\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tadd_render_callback(() => dispatch(node, false, 'start'));\n\n\t\tloop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(0, 1);\n\n\t\t\t\t\tdispatch(node, false, 'end');\n\n\t\t\t\t\tif (!--group.r) {\n\t\t\t\t\t\t// this will result in `end()` being called,\n\t\t\t\t\t\t// so we don't need to clean up here\n\t\t\t\t\t\trun_all(group.c);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(1 - t, t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tif (is_function(config)) {\n\t\twait().then(() => {\n\t\t\t// @ts-ignore\n\t\t\tconfig = config();\n\t\t\tgo();\n\t\t});\n\t} else {\n\t\tgo();\n\t}\n\n\treturn {\n\t\tend(reset) {\n\t\t\tif (reset && config.tick) {\n\t\t\t\tconfig.tick(1, 0);\n\t\t\t}\n\n\t\t\tif (running) {\n\t\t\t\tif (animation_name) delete_rule(node, animation_name);\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_bidirectional_transition(node, fn, params, intro) {\n\tlet config = fn(node, params);\n\n\tlet t = intro ? 0 : 1;\n\n\tlet running_program = null;\n\tlet pending_program = null;\n\tlet animation_name = null;\n\n\tfunction clear_animation() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction init(program, duration) {\n\t\tconst d = program.b - t;\n\t\tduration *= Math.abs(d);\n\n\t\treturn {\n\t\t\ta: t,\n\t\t\tb: program.b,\n\t\t\td,\n\t\t\tduration,\n\t\t\tstart: program.start,\n\t\t\tend: program.start + duration,\n\t\t\tgroup: program.group\n\t\t};\n\t}\n\n\tfunction go(b) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tconst program = {\n\t\t\tstart: now() + delay,\n\t\t\tb\n\t\t};\n\n\t\tif (!b) {\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tprogram.group = outros;\n\t\t\toutros.r += 1;\n\t\t}\n\n\t\tif (running_program || pending_program) {\n\t\t\tpending_program = program;\n\t\t} else {\n\t\t\t// if this is an intro, and there's a delay, we need to do\n\t\t\t// an initial tick and/or apply CSS animation immediately\n\t\t\tif (css) {\n\t\t\t\tclear_animation();\n\t\t\t\tanimation_name = create_rule(node, t, b, duration, delay, easing, css);\n\t\t\t}\n\n\t\t\tif (b) tick(0, 1);\n\n\t\t\trunning_program = init(program, duration);\n\t\t\tadd_render_callback(() => dispatch(node, b, 'start'));\n\n\t\t\tloop(now => {\n\t\t\t\tif (pending_program && now > pending_program.start) {\n\t\t\t\t\trunning_program = init(pending_program, duration);\n\t\t\t\t\tpending_program = null;\n\n\t\t\t\t\tdispatch(node, running_program.b, 'start');\n\n\t\t\t\t\tif (css) {\n\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\tanimation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (running_program) {\n\t\t\t\t\tif (now >= running_program.end) {\n\t\t\t\t\t\ttick(t = running_program.b, 1 - t);\n\t\t\t\t\t\tdispatch(node, running_program.b, 'end');\n\n\t\t\t\t\t\tif (!pending_program) {\n\t\t\t\t\t\t\t// we're done\n\t\t\t\t\t\t\tif (running_program.b) {\n\t\t\t\t\t\t\t\t// intro — we can tidy up immediately\n\t\t\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// outro — needs to be coordinated\n\t\t\t\t\t\t\t\tif (!--running_program.group.r) run_all(running_program.group.c);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trunning_program = null;\n\t\t\t\t\t} else if (now >= running_program.start) {\n\t\t\t\t\t\tconst p = now - running_program.start;\n\t\t\t\t\t\tt = running_program.a + running_program.d * easing(p / running_program.duration);\n\t\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn !!(running_program || pending_program);\n\t\t\t});\n\t\t}\n\t}\n\n\treturn {\n\t\trun(b) {\n\t\t\tif (is_function(config)) {\n\t\t\t\twait().then(() => {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconfig = config();\n\t\t\t\t\tgo(b);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgo(b);\n\t\t\t}\n\t\t},\n\n\t\tend() {\n\t\t\tclear_animation();\n\t\t\trunning_program = pending_program = null;\n\t\t}\n\t};\n}\n\nfunction handle_promise(promise, info) {\n\tconst token = info.token = {};\n\n\tfunction update(type, index, key, value) {\n\t\tif (info.token !== token) return;\n\n\t\tinfo.resolved = value;\n\n\t\tlet child_ctx = info.ctx;\n\n\t\tif (key !== undefined) {\n\t\t\tchild_ctx = child_ctx.slice();\n\t\t\tchild_ctx[key] = value;\n\t\t}\n\n\t\tconst block = type && (info.current = type)(child_ctx);\n\n\t\tlet needs_flush = false;\n\n\t\tif (info.block) {\n\t\t\tif (info.blocks) {\n\t\t\t\tinfo.blocks.forEach((block, i) => {\n\t\t\t\t\tif (i !== index && block) {\n\t\t\t\t\t\tgroup_outros();\n\t\t\t\t\t\ttransition_out(block, 1, 1, () => {\n\t\t\t\t\t\t\tif (info.blocks[i] === block) {\n\t\t\t\t\t\t\t\tinfo.blocks[i] = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcheck_outros();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tinfo.block.d(1);\n\t\t\t}\n\n\t\t\tblock.c();\n\t\t\ttransition_in(block, 1);\n\t\t\tblock.m(info.mount(), info.anchor);\n\n\t\t\tneeds_flush = true;\n\t\t}\n\n\t\tinfo.block = block;\n\t\tif (info.blocks) info.blocks[index] = block;\n\n\t\tif (needs_flush) {\n\t\t\tflush();\n\t\t}\n\t}\n\n\tif (is_promise(promise)) {\n\t\tconst current_component = get_current_component();\n\t\tpromise.then(value => {\n\t\t\tset_current_component(current_component);\n\t\t\tupdate(info.then, 1, info.value, value);\n\t\t\tset_current_component(null);\n\t\t}, error => {\n\t\t\tset_current_component(current_component);\n\t\t\tupdate(info.catch, 2, info.error, error);\n\t\t\tset_current_component(null);\n\t\t\tif (!info.hasCatch) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t});\n\n\t\t// if we previously had a then/catch block, destroy it\n\t\tif (info.current !== info.pending) {\n\t\t\tupdate(info.pending, 0);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tif (info.current !== info.then) {\n\t\t\tupdate(info.then, 1, info.value, promise);\n\t\t\treturn true;\n\t\t}\n\n\t\tinfo.resolved = promise;\n\t}\n}\n\nfunction update_await_block_branch(info, ctx, dirty) {\n\tconst child_ctx = ctx.slice();\n\tconst { resolved } = info;\n\n\tif (info.current === info.then) {\n\t\tchild_ctx[info.value] = resolved;\n\t}\n\tif (info.current === info.catch) {\n\t\tchild_ctx[info.error] = resolved;\n\t}\n\n\tinfo.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n\t? window\n\t: typeof globalThis !== 'undefined'\n\t? globalThis\n\t: global) ;\n\nfunction destroy_block(block, lookup) {\n\tblock.d(1);\n\tlookup.delete(block.key);\n}\n\nfunction outro_and_destroy_block(block, lookup) {\n\ttransition_out(block, 1, 1, () => {\n\t\tlookup.delete(block.key);\n\t});\n}\n\nfunction fix_and_destroy_block(block, lookup) {\n\tblock.f();\n\tdestroy_block(block, lookup);\n}\n\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n\tblock.f();\n\toutro_and_destroy_block(block, lookup);\n}\n\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n\tlet o = old_blocks.length;\n\tlet n = list.length;\n\n\tlet i = o;\n\tconst old_indexes = {};\n\twhile (i--) old_indexes[old_blocks[i].key] = i;\n\n\tconst new_blocks = [];\n\tconst new_lookup = new Map();\n\tconst deltas = new Map();\n\n\ti = n;\n\twhile (i--) {\n\t\tconst child_ctx = get_context(ctx, list, i);\n\t\tconst key = get_key(child_ctx);\n\t\tlet block = lookup.get(key);\n\n\t\tif (!block) {\n\t\t\tblock = create_each_block(key, child_ctx);\n\t\t\tblock.c();\n\t\t} else if (dynamic) {\n\t\t\tblock.p(child_ctx, dirty);\n\t\t}\n\n\t\tnew_lookup.set(key, new_blocks[i] = block);\n\n\t\tif (key in old_indexes) deltas.set(key, Math.abs(i - old_indexes[key]));\n\t}\n\n\tconst will_move = new Set();\n\tconst did_move = new Set();\n\n\tfunction insert(block) {\n\t\ttransition_in(block, 1);\n\t\tblock.m(node, next);\n\t\tlookup.set(block.key, block);\n\t\tnext = block.first;\n\t\tn--;\n\t}\n\n\twhile (o && n) {\n\t\tconst new_block = new_blocks[n - 1];\n\t\tconst old_block = old_blocks[o - 1];\n\t\tconst new_key = new_block.key;\n\t\tconst old_key = old_block.key;\n\n\t\tif (new_block === old_block) {\n\t\t\t// do nothing\n\t\t\tnext = new_block.first;\n\t\t\to--;\n\t\t\tn--;\n\t\t} else if (!new_lookup.has(old_key)) {\n\t\t\t// remove old block\n\t\t\tdestroy(old_block, lookup);\n\t\t\to--;\n\t\t} else if (!lookup.has(new_key) || will_move.has(new_key)) {\n\t\t\tinsert(new_block);\n\t\t} else if (did_move.has(old_key)) {\n\t\t\to--;\n\n\t\t} else if (deltas.get(new_key) > deltas.get(old_key)) {\n\t\t\tdid_move.add(new_key);\n\t\t\tinsert(new_block);\n\n\t\t} else {\n\t\t\twill_move.add(old_key);\n\t\t\to--;\n\t\t}\n\t}\n\n\twhile (o--) {\n\t\tconst old_block = old_blocks[o];\n\t\tif (!new_lookup.has(old_block.key)) destroy(old_block, lookup);\n\t}\n\n\twhile (n) insert(new_blocks[n - 1]);\n\n\treturn new_blocks;\n}\n\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n\tconst keys = new Set();\n\tfor (let i = 0; i < list.length; i++) {\n\t\tconst key = get_key(get_context(ctx, list, i));\n\t\tif (keys.has(key)) {\n\t\t\tthrow new Error('Cannot have duplicate keys in a keyed each');\n\t\t}\n\t\tkeys.add(key);\n\t}\n}\n\nfunction get_spread_update(levels, updates) {\n\tconst update = {};\n\n\tconst to_null_out = {};\n\tconst accounted_for = { $$scope: 1 };\n\n\tlet i = levels.length;\n\twhile (i--) {\n\t\tconst o = levels[i];\n\t\tconst n = updates[i];\n\n\t\tif (n) {\n\t\t\tfor (const key in o) {\n\t\t\t\tif (!(key in n)) to_null_out[key] = 1;\n\t\t\t}\n\n\t\t\tfor (const key in n) {\n\t\t\t\tif (!accounted_for[key]) {\n\t\t\t\t\tupdate[key] = n[key];\n\t\t\t\t\taccounted_for[key] = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlevels[i] = n;\n\t\t} else {\n\t\t\tfor (const key in o) {\n\t\t\t\taccounted_for[key] = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const key in to_null_out) {\n\t\tif (!(key in update)) update[key] = undefined;\n\t}\n\n\treturn update;\n}\n\nfunction get_spread_object(spread_props) {\n\treturn typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n\t'allowfullscreen',\n\t'allowpaymentrequest',\n\t'async',\n\t'autofocus',\n\t'autoplay',\n\t'checked',\n\t'controls',\n\t'default',\n\t'defer',\n\t'disabled',\n\t'formnovalidate',\n\t'hidden',\n\t'ismap',\n\t'loop',\n\t'multiple',\n\t'muted',\n\t'nomodule',\n\t'novalidate',\n\t'open',\n\t'playsinline',\n\t'readonly',\n\t'required',\n\t'reversed',\n\t'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\n\nfunction spread(args, classes_to_add) {\n\tconst attributes = Object.assign({}, ...args);\n\tif (classes_to_add) {\n\t\tif (attributes.class == null) {\n\t\t\tattributes.class = classes_to_add;\n\t\t} else {\n\t\t\tattributes.class += ' ' + classes_to_add;\n\t\t}\n\t}\n\tlet str = '';\n\n\tObject.keys(attributes).forEach(name => {\n\t\tif (invalid_attribute_name_character.test(name)) return;\n\n\t\tconst value = attributes[name];\n\t\tif (value === true) str += ' ' + name;\n\t\telse if (boolean_attributes.has(name.toLowerCase())) {\n\t\t\tif (value) str += ' ' + name;\n\t\t} else if (value != null) {\n\t\t\tstr += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n\t\t}\n\t});\n\n\treturn str;\n}\n\nconst escaped = {\n\t'\"': '"',\n\t\"'\": ''',\n\t'&': '&',\n\t'<': '<',\n\t'>': '>'\n};\n\nfunction escape(html) {\n\treturn String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\n\nfunction each(items, fn) {\n\tlet str = '';\n\tfor (let i = 0; i < items.length; i += 1) {\n\t\tstr += fn(items[i], i);\n\t}\n\treturn str;\n}\n\nconst missing_component = {\n\t$$render: () => ''\n};\n\nfunction validate_component(component, name) {\n\tif (!component || !component.$$render) {\n\t\tif (name === 'svelte:component') name += ' this={...}';\n\t\tthrow new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n\t}\n\n\treturn component;\n}\n\nfunction debug(file, line, column, values) {\n\tconsole.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n\tconsole.log(values); // eslint-disable-line no-console\n\treturn '';\n}\n\nlet on_destroy;\n\nfunction create_ssr_component(fn) {\n\tfunction $$render(result, props, bindings, slots, context) {\n\t\tconst parent_component = current_component;\n\n\t\tconst $$ = {\n\t\t\ton_destroy,\n\t\t\tcontext: new Map(parent_component ? parent_component.$$.context : context || []),\n\n\t\t\t// these will be immediately discarded\n\t\t\ton_mount: [],\n\t\t\tbefore_update: [],\n\t\t\tafter_update: [],\n\t\t\tcallbacks: blank_object()\n\t\t};\n\n\t\tset_current_component({ $$ });\n\n\t\tconst html = fn(result, props, bindings, slots);\n\n\t\tset_current_component(parent_component);\n\t\treturn html;\n\t}\n\n\treturn {\n\t\trender: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n\t\t\ton_destroy = [];\n\n\t\t\tconst result\n\n\n\n\n\n\n = { title: '', head: '', css: new Set() };\n\n\t\t\tconst html = $$render(result, props, {}, $$slots, context);\n\n\t\t\trun_all(on_destroy);\n\n\t\t\treturn {\n\t\t\t\thtml,\n\t\t\t\tcss: {\n\t\t\t\t\tcode: Array.from(result.css).map(css => css.code).join('\\n'),\n\t\t\t\t\tmap: null // TODO\n\t\t\t\t},\n\t\t\t\thead: result.title + result.head\n\t\t\t};\n\t\t},\n\n\t\t$$render\n\t};\n}\n\nfunction add_attribute(name, value, boolean) {\n\tif (value == null || (boolean && !value)) return '';\n\treturn ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\n\nfunction add_classes(classes) {\n\treturn classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n\tconst index = component.$$.props[name];\n\tif (index !== undefined) {\n\t\tcomponent.$$.bound[index] = callback;\n\t\tcallback(component.$$.ctx[index]);\n\t}\n}\n\nfunction create_component(block) {\n\tblock && block.c();\n}\n\nfunction claim_component(block, parent_nodes) {\n\tblock && block.l(parent_nodes);\n}\n\nfunction mount_component(component, target, anchor, customElement) {\n\tconst { fragment, on_mount, on_destroy, after_update } = component.$$;\n\n\tfragment && fragment.m(target, anchor);\n\n\tif (!customElement) {\n\t\t// onMount happens before the initial afterUpdate\n\t\tadd_render_callback(() => {\n\n\t\t\tconst new_on_destroy = on_mount.map(run).filter(is_function);\n\t\t\tif (on_destroy) {\n\t\t\t\ton_destroy.push(...new_on_destroy);\n\t\t\t} else {\n\t\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t\t// most likely as a result of a binding initialising\n\t\t\t\trun_all(new_on_destroy);\n\t\t\t}\n\t\t\tcomponent.$$.on_mount = [];\n\t\t});\n\t}\n\n\tafter_update.forEach(add_render_callback);\n}\n\nfunction destroy_component(component, detaching) {\n\tconst $$ = component.$$;\n\tif ($$.fragment !== null) {\n\t\trun_all($$.on_destroy);\n\n\t\t$$.fragment && $$.fragment.d(detaching);\n\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\t$$.on_destroy = $$.fragment = null;\n\t\t$$.ctx = [];\n\t}\n}\n\nfunction make_dirty(component, i) {\n\tif (component.$$.dirty[0] === -1) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty.fill(0);\n\t}\n\tcomponent.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\n\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\n\tconst $$ = component.$$ = {\n\t\tfragment: null,\n\t\tctx: null,\n\n\t\t// state\n\t\tprops,\n\t\tupdate: noop,\n\t\tnot_equal,\n\t\tbound: blank_object(),\n\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\ton_disconnect: [],\n\t\tbefore_update: [],\n\t\tafter_update: [],\n\t\tcontext: new Map(parent_component ? parent_component.$$.context : options.context || []),\n\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty,\n\t\tskip_bound: false,\n\t\troot: options.target || parent_component.$$.root\n\t};\n\n\tappend_styles && append_styles($$.root);\n\n\tlet ready = false;\n\n\t$$.ctx = instance\n\t\t? instance(component, options.props || {}, (i, ret, ...rest) => {\n\t\t\tconst value = rest.length ? rest[0] : ret;\n\t\t\tif ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n\t\t\t\tif (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);\n\t\t\t\tif (ready) make_dirty(component, i);\n\t\t\t}\n\t\t\treturn ret;\n\t\t})\n\t\t: [];\n\n\t$$.update();\n\tready = true;\n\trun_all($$.before_update);\n\n\t// `false` as a special case of no DOM component\n\t$$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\tconst nodes = children(options.target);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.l(nodes);\n\t\t\tnodes.forEach(detach);\n\t\t} else {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.c();\n\t\t}\n\n\t\tif (options.intro) transition_in(component.$$.fragment);\n\t\tmount_component(component, options.target, options.anchor, options.customElement);\n\t\tflush();\n\t}\n\n\tset_current_component(parent_component);\n}\n\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t\n\t\t\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t}\n\n\t\tconnectedCallback() {\n\t\t\tconst { on_mount } = this.$$;\n\t\t\tthis.$$.on_disconnect = on_mount.map(run).filter(is_function);\n\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tfor (const key in this.$$.slotted) {\n\t\t\t\t// @ts-ignore todo: improve typings\n\t\t\t\tthis.appendChild(this.$$.slotted[key]);\n\t\t\t}\n\t\t}\n\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tthis[attr] = newValue;\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\trun_all(this.$$.on_disconnect);\n\t\t}\n\n\t\t$destroy() {\n\t\t\tdestroy_component(this, 1);\n\t\t\tthis.$destroy = noop;\n\t\t}\n\n\t\t$on(type, callback) {\n\t\t\t// TODO should this delegate to addEventListener?\n\t\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\t\tcallbacks.push(callback);\n\n\t\t\treturn () => {\n\t\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t\t};\n\t\t}\n\n\t\t$set($$props) {\n\t\t\tif (this.$$set && !is_empty($$props)) {\n\t\t\t\tthis.$$.skip_bound = true;\n\t\t\t\tthis.$$set($$props);\n\t\t\t\tthis.$$.skip_bound = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n\t\n\t\n\n\t$destroy() {\n\t\tdestroy_component(this, 1);\n\t\tthis.$destroy = noop;\n\t}\n\n\t$on(type, callback) {\n\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\tcallbacks.push(callback);\n\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t$set($$props) {\n\t\tif (this.$$set && !is_empty($$props)) {\n\t\t\tthis.$$.skip_bound = true;\n\t\t\tthis.$$set($$props);\n\t\t\tthis.$$.skip_bound = false;\n\t\t}\n\t}\n}\n\nfunction dispatch_dev(type, detail) {\n\tdocument.dispatchEvent(custom_event(type, { version: '3.38.2', ...detail }));\n}\n\nfunction append_dev(target, node) {\n\tdispatch_dev('SvelteDOMInsert', { target, node });\n\tappend(target, node);\n}\n\nfunction insert_dev(target, node, anchor) {\n\tdispatch_dev('SvelteDOMInsert', { target, node, anchor });\n\tinsert(target, node, anchor);\n}\n\nfunction detach_dev(node) {\n\tdispatch_dev('SvelteDOMRemove', { node });\n\tdetach(node);\n}\n\nfunction detach_between_dev(before, after) {\n\twhile (before.nextSibling && before.nextSibling !== after) {\n\t\tdetach_dev(before.nextSibling);\n\t}\n}\n\nfunction detach_before_dev(after) {\n\twhile (after.previousSibling) {\n\t\tdetach_dev(after.previousSibling);\n\t}\n}\n\nfunction detach_after_dev(before) {\n\twhile (before.nextSibling) {\n\t\tdetach_dev(before.nextSibling);\n\t}\n}\n\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n\tconst modifiers = options === true ? [ 'capture' ] : options ? Array.from(Object.keys(options)) : [];\n\tif (has_prevent_default) modifiers.push('preventDefault');\n\tif (has_stop_propagation) modifiers.push('stopPropagation');\n\n\tdispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n\n\tconst dispose = listen(node, event, handler, options);\n\treturn () => {\n\t\tdispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n\t\tdispose();\n\t};\n}\n\nfunction attr_dev(node, attribute, value) {\n\tattr(node, attribute, value);\n\n\tif (value == null) dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n\telse dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\n\nfunction prop_dev(node, property, value) {\n\tnode[property] = value;\n\n\tdispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\n\nfunction dataset_dev(node, property, value) {\n\tnode.dataset[property] = value;\n\n\tdispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\n\nfunction set_data_dev(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\n\tdispatch_dev('SvelteDOMSetData', { node: text, data });\n\ttext.data = data;\n}\n\nfunction validate_each_argument(arg) {\n\tif (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n\t\tlet msg = '{#each} only iterates over array-like objects.';\n\t\tif (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n\t\t\tmsg += ' You can use a spread to convert this iterable into an array.';\n\t\t}\n\t\tthrow new Error(msg);\n\t}\n}\n\nfunction validate_slots(name, slot, keys) {\n\tfor (const slot_key of Object.keys(slot)) {\n\t\tif (!~keys.indexOf(slot_key)) {\n\t\t\tconsole.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n\t\t}\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\n\tconstructor(options) {\n\t\tif (!options || (!options.target && !options.$$inline)) {\n\t\t\tthrow new Error(\"'target' is a required option\");\n\t\t}\n\n\t\tsuper();\n\t}\n\n\t$destroy() {\n\t\tsuper.$destroy();\n\t\tthis.$destroy = () => {\n\t\t\tconsole.warn('Component was already destroyed'); // eslint-disable-line no-console\n\t\t};\n\t}\n\n\t$capture_state() {}\n\n\t$inject_state() {}\n}\n\n// TODO https://github.com/microsoft/TypeScript/issues/41770 is the reason\n// why we have to split out SvelteComponentTyped to not break existing usage of SvelteComponent.\n// Try to find a better way for Svelte 4.0.\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped\n\n\n\n extends SvelteComponentDev {\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\n\tconstructor(options) {\n\t\tsuper(options);\n\t}\n}\n\nfunction loop_guard(timeout) {\n\tconst start = Date.now();\n\treturn () => {\n\t\tif (Date.now() - start > timeout) {\n\t\t\tthrow new Error('Infinite loop detected');\n\t\t}\n\t};\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_node, get_root_for_styles, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\n\nfunction backInOut(t) {\n\tconst s = 1.70158 * 1.525;\n\tif ((t *= 2) < 1) return 0.5 * (t * t * ((s + 1) * t - s));\n\treturn 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\n\nfunction backIn(t) {\n\tconst s = 1.70158;\n\treturn t * t * ((s + 1) * t - s);\n}\n\nfunction backOut(t) {\n\tconst s = 1.70158;\n\treturn --t * t * ((s + 1) * t + s) + 1;\n}\n\nfunction bounceOut(t) {\n\tconst a = 4.0 / 11.0;\n\tconst b = 8.0 / 11.0;\n\tconst c = 9.0 / 10.0;\n\n\tconst ca = 4356.0 / 361.0;\n\tconst cb = 35442.0 / 1805.0;\n\tconst cc = 16061.0 / 1805.0;\n\n\tconst t2 = t * t;\n\n\treturn t < a\n\t\t? 7.5625 * t2\n\t\t: t < b\n\t\t\t? 9.075 * t2 - 9.9 * t + 3.4\n\t\t\t: t < c\n\t\t\t\t? ca * t2 - cb * t + cc\n\t\t\t\t: 10.8 * t * t - 20.52 * t + 10.72;\n}\n\nfunction bounceInOut(t) {\n\treturn t < 0.5\n\t\t? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n\t\t: 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\n\nfunction bounceIn(t) {\n\treturn 1.0 - bounceOut(1.0 - t);\n}\n\nfunction circInOut(t) {\n\tif ((t *= 2) < 1) return -0.5 * (Math.sqrt(1 - t * t) - 1);\n\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\n\nfunction circIn(t) {\n\treturn 1.0 - Math.sqrt(1.0 - t * t);\n}\n\nfunction circOut(t) {\n\treturn Math.sqrt(1 - --t * t);\n}\n\nfunction cubicInOut(t) {\n\treturn t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\n\nfunction cubicIn(t) {\n\treturn t * t * t;\n}\n\nfunction cubicOut(t) {\n\tconst f = t - 1.0;\n\treturn f * f * f + 1.0;\n}\n\nfunction elasticInOut(t) {\n\treturn t < 0.5\n\t\t? 0.5 *\n\t\t\t\tMath.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n\t\t\t\tMath.pow(2.0, 10.0 * (2.0 * t - 1.0))\n\t\t: 0.5 *\n\t\t\t\tMath.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n\t\t\t\tMath.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n\t\t\t\t1.0;\n}\n\nfunction elasticIn(t) {\n\treturn Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\n\nfunction elasticOut(t) {\n\treturn (\n\t\tMath.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0\n\t);\n}\n\nfunction expoInOut(t) {\n\treturn t === 0.0 || t === 1.0\n\t\t? t\n\t\t: t < 0.5\n\t\t\t? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n\t\t\t: -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\n\nfunction expoIn(t) {\n\treturn t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\n\nfunction expoOut(t) {\n\treturn t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\n\nfunction quadInOut(t) {\n\tt /= 0.5;\n\tif (t < 1) return 0.5 * t * t;\n\tt--;\n\treturn -0.5 * (t * (t - 2) - 1);\n}\n\nfunction quadIn(t) {\n\treturn t * t;\n}\n\nfunction quadOut(t) {\n\treturn -t * (t - 2.0);\n}\n\nfunction quartInOut(t) {\n\treturn t < 0.5\n\t\t? +8.0 * Math.pow(t, 4.0)\n\t\t: -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\n\nfunction quartIn(t) {\n\treturn Math.pow(t, 4.0);\n}\n\nfunction quartOut(t) {\n\treturn Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\n\nfunction quintInOut(t) {\n\tif ((t *= 2) < 1) return 0.5 * t * t * t * t * t;\n\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\n\nfunction quintIn(t) {\n\treturn t * t * t * t * t;\n}\n\nfunction quintOut(t) {\n\treturn --t * t * t * t * t + 1;\n}\n\nfunction sineInOut(t) {\n\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\n}\n\nfunction sineIn(t) {\n\tconst v = Math.cos(t * Math.PI * 0.5);\n\tif (Math.abs(v) < 1e-14) return 1;\n\telse return 1 - v;\n}\n\nfunction sineOut(t) {\n\treturn Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicOut } from '../easing/index.mjs';\nimport { is_function } from '../internal/index.mjs';\n\n// todo: same as Transition, should it be shared?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction flip(node, animation, params = {}) {\n\tconst style = getComputedStyle(node);\n\tconst transform = style.transform === 'none' ? '' : style.transform;\n\tconst scaleX = animation.from.width / node.clientWidth;\n\tconst scaleY = animation.from.height / node.clientHeight;\n\n\tconst dx = (animation.from.left - animation.to.left) / scaleX;\n\tconst dy = (animation.from.top - animation.to.top) / scaleY;\n\n\tconst d = Math.sqrt(dx * dx + dy * dy);\n\n\tconst {\n\t\tdelay = 0,\n\t\tduration = (d) => Math.sqrt(d) * 120,\n\t\teasing = cubicOut\n\t} = params;\n\n\treturn {\n\t\tdelay,\n\t\tduration: is_function(duration) ? duration(d) : duration,\n\t\teasing,\n\t\tcss: (_t, u) => `transform: ${transform} translate(${u * dx}px, ${u * dy}px);`\n\t};\n}\n\nexport { flip };\n","\n\n\n \n \n \n \n {#each data as datum, i (datum.id ? datum.id : JSON.stringify(datum))}\n \n \n {#if datum.html}\n {@html datum.html}\n {:else if datum.text}\n {datum.text}
\n {:else}\n {datum}
\n {/if}\n \n\n \n \n {/each}\n \n\n \n\n\n\n","\n\n \n","\n\n{#if current.type === 'MultipleChoice'}\n {#each current.answers as answer, i}\n \n {/each}\n{:else}\n {#each current.answers as answer, i}\n \n {/each}\n{/if}\n\n\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\n/** Callback to inform of a value updates. */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst subscriber_queue = [];\n\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n\treturn {\n\t\tsubscribe: writable(value, start).subscribe\n\t};\n}\n\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n\tlet stop;\n\tconst subscribers = [];\n\n\tfunction set(new_value) {\n\t\tif (safe_not_equal(value, new_value)) {\n\t\t\tvalue = new_value;\n\t\t\tif (stop) { // store is ready\n\t\t\t\tconst run_queue = !subscriber_queue.length;\n\t\t\t\tfor (let i = 0; i < subscribers.length; i += 1) {\n\t\t\t\t\tconst s = subscribers[i];\n\t\t\t\t\ts[1]();\n\t\t\t\t\tsubscriber_queue.push(s, value);\n\t\t\t\t}\n\t\t\t\tif (run_queue) {\n\t\t\t\t\tfor (let i = 0; i < subscriber_queue.length; i += 2) {\n\t\t\t\t\t\tsubscriber_queue[i][0](subscriber_queue[i + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tsubscriber_queue.length = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction update(fn) {\n\t\tset(fn(value));\n\t}\n\n\tfunction subscribe(run, invalidate = noop) {\n\t\tconst subscriber = [run, invalidate];\n\t\tsubscribers.push(subscriber);\n\t\tif (subscribers.length === 1) {\n\t\t\tstop = start(set) || noop;\n\t\t}\n\t\trun(value);\n\n\t\treturn () => {\n\t\t\tconst index = subscribers.indexOf(subscriber);\n\t\t\tif (index !== -1) {\n\t\t\t\tsubscribers.splice(index, 1);\n\t\t\t}\n\t\t\tif (subscribers.length === 0) {\n\t\t\t\tstop();\n\t\t\t\tstop = null;\n\t\t\t}\n\t\t};\n\t}\n\n\treturn { set, update, subscribe };\n}\n\n/** One or more `Readable`s. */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction derived(stores, fn, initial_value) {\n\tconst single = !Array.isArray(stores);\n\tconst stores_array = single\n\t\t? [stores ]\n\t\t: stores ;\n\n\tconst auto = fn.length < 2;\n\n\treturn readable(initial_value, (set) => {\n\t\tlet inited = false;\n\t\tconst values = [];\n\n\t\tlet pending = 0;\n\t\tlet cleanup = noop;\n\n\t\tconst sync = () => {\n\t\t\tif (pending) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcleanup();\n\t\t\tconst result = fn(single ? values[0] : values, set);\n\t\t\tif (auto) {\n\t\t\t\tset(result );\n\t\t\t} else {\n\t\t\t\tcleanup = is_function(result) ? result : noop;\n\t\t\t}\n\t\t};\n\n\t\tconst unsubscribers = stores_array.map((store, i) => subscribe(\n\t\t\tstore,\n\t\t\t(value) => {\n\t\t\t\tvalues[i] = value;\n\t\t\t\tpending &= ~(1 << i);\n\t\t\t\tif (inited) {\n\t\t\t\t\tsync();\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tpending |= (1 << i);\n\t\t\t})\n\t\t);\n\n\t\tinited = true;\n\t\tsync();\n\n\t\treturn function stop() {\n\t\t\trun_all(unsubscribers);\n\t\t\tcleanup();\n\t\t};\n\t});\n}\n\nexport { derived, readable, writable };\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `foo ) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo123>`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_START_REGEX = /^[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]*/i;\nexport var SPACE_SEPARATOR_END_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]*$/i;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n if (token.options.length) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_END_REGEX, SPACE_SEPARATOR_START_REGEX, } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith;\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"\" tagName (whitespace)* \">\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\" + tagName + \"/>\",\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('')) {\n if (this.isEOF() || !_isAlpha(this.char())) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n var closingTagNameStartPosition = this.clonePosition();\n var closingTagName = this.parseTagName();\n if (tagName !== closingTagName) {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (!this.bumpIf('>')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: skeleton,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(skeleton)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \" + offset + \" is at invalid UTF-16 code unit boundary\");\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \" + targetOffset + \" must be greater than or equal to the current offset \" + this.offset());\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \" + targetOffset + \" is at invalid UTF-16 code unit boundary\");\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n","//\n// Main\n//\nexport default function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nfunction ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n}\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n return key in this.cache;\n};\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n};\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n};\nvar cacheDefault = {\n create: function create() {\n // @ts-ignore\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \" + this.code + \"] \" + this.message;\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\" + variableId + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(options).join('\", \"') + \"\\\"\", ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\" + value + \"\\\" must be of type \" + type, ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\" + variableId + \"\\\" was not provided to the string \\\"\" + originalMessage + \"\\\"\", ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, isTagElement, } from '@formatjs/icu-messageformat-parser';\nimport { MissingValueError, InvalidValueError, ErrorCode, FormatError, InvalidValueTypeError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\" + value];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __spreadArray } from \"tslib\";\nimport { parse } from '@formatjs/icu-messageformat-parser';\nimport memoize, { strategies } from '@formatjs/fast-memoize';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n has: function (key) {\n return key in store;\n },\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n var _this = this;\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () { return ({\n locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n }); };\n this.getAst = function () { return _this.ast; };\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, {\n ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,\n });\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import{writable as e,derived as n}from\"svelte/store\";import t from\"deepmerge\";import o from\"intl-messageformat\";const r={},i=(e,n,t)=>t?(n in r||(r[n]={}),e in r[n]||(r[n][e]=t),t):t,a=(e,n)=>{if(null==n)return;if(n in r&&e in r[n])return r[n][e];const t=E(n);for(let o=0;o0){const n=t.slice(e,t.length).join(\".\");if(n in o){o=o[n];break}}o=o[t[e]]}else o=void 0;return o}(function(e){return l[e]||null}(e),n)}function m(e,...n){delete r[e],s.update((o=>(o[e]=t.all([o[e]||{},...n]),o)))}const f=n([s],(([e])=>Object.keys(e)));s.subscribe((e=>l=e));const d={};function g(e){return d[e]}function w(e){return E(e).some((e=>{var n;return null===(n=g(e))||void 0===n?void 0:n.size}))}function h(e,n){return Promise.all(n.map((n=>(function(e,n){d[e].delete(n),0===d[e].size&&delete d[e]}(e,n),n().then((e=>e.default||e)))))).then((n=>m(e,...n)))}const p={};function b(e){if(!w(e))return e in p?p[e]:void 0;const n=function(e){return E(e).map((e=>{const n=g(e);return[e,n?[...n]:[]]})).filter((([,e])=>e.length>0))}(e);return p[e]=Promise.all(n.map((([e,n])=>h(e,n)))).then((()=>{if(w(e))return b(e);delete p[e]})),p[e]}function y(e,n){g(e)||function(e){d[e]=new Set}(e);const t=g(e);g(e).has(n)||(u(e)||s.update((n=>(n[e]={},n))),t.add(n))}\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */function v(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);rt.slice(0,n+1).join(\"-\"))).reverse()}function E(e,n=j().fallbackLocale){const t=x(e);return n?[...new Set([...t,...x(n)])]:t}function D(){return L}T.subscribe((e=>{L=e,\"undefined\"!=typeof window&&null!==e&&document.documentElement.setAttribute(\"lang\",e)}));const M=T.set;T.set=e=>{if(function(e){if(null==e)return;const n=E(e);for(let e=0;ek.set(!0)),n):k.set(!0),b(e).then((()=>{M(e)})).finally((()=>{clearTimeout(t),k.set(!1)}))}return M(e)},T.update=e=>M(e(L));const S=(e,n)=>{const t=e.split(\"&\").find((e=>0===e.indexOf(`${n}=`)));return t?t.split(\"=\").pop():null},N=(e,n)=>{const t=n.exec(e);return t&&t[1]||null},P=e=>\"undefined\"==typeof window?null:N(window.location.hostname,e),A=e=>\"undefined\"==typeof window?null:N(window.location.pathname,e),I=()=>\"undefined\"==typeof window?null:window.navigator.language||window.navigator.languages[0],F=e=>\"undefined\"==typeof window?null:S(window.location.search.substr(1),e),z=e=>\"undefined\"==typeof window?null:S(window.location.hash.substr(1),e),Z=e=>{const n=Object.create(null);return t=>{const o=JSON.stringify(t);return o in n?n[o]:n[o]=e(t)}},C=(e,n)=>{const{formats:t}=j();if(e in t&&n in t[e])return t[e][n];throw new Error(`[svelte-i18n] Unknown \"${n}\" ${e} format.`)},G=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format numbers');return t&&(o=C(\"number\",t)),new Intl.NumberFormat(n,o)})),J=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format dates');return t?o=C(\"date\",t):0===Object.keys(o).length&&(o=C(\"date\",\"short\")),new Intl.DateTimeFormat(n,o)})),U=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format time values');return t?o=C(\"time\",t):0===Object.keys(o).length&&(o=C(\"time\",\"short\")),new Intl.DateTimeFormat(n,o)})),_=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return G(Object.assign({locale:n},t))},q=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return J(Object.assign({locale:n},t))},B=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return U(Object.assign({locale:n},t))},H=Z(((e,n=D())=>new o(e,n,j().formats,{ignoreTag:j().ignoreTag}))),K=(e,n={})=>{\"object\"==typeof e&&(e=(n=e).id);const{values:t,locale:o=D(),default:r}=n;if(null==o)throw new Error(\"[svelte-i18n] Cannot format a message without first setting the initial locale.\");let i=a(e,o);if(i){if(\"string\"!=typeof i)return console.warn(`[svelte-i18n] Message with id \"${e}\" must be of type \"string\", found: \"${typeof i}\". Gettin its value through the \"$format\" method is deprecated; use the \"json\" method instead.`),i}else j().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message \"${e}\" was not found in \"${E(o).join('\", \"')}\".${w(D())?\"\\n\\nNote: there are at least one loader still registered to this locale that wasn't executed.\":\"\"}`),i=r||e;if(!t)return i;let l=i;try{l=H(i,o).format(t)}catch(n){console.warn(`[svelte-i18n] Message \"${e}\" has syntax error:`,n.message)}return l},Q=(e,n)=>B(n).format(e),R=(e,n)=>q(n).format(e),V=(e,n)=>_(n).format(e),W=(e,n=D())=>a(e,n),X=n([T,s],(()=>K)),Y=n([T],(()=>Q)),ee=n([T],(()=>R)),ne=n([T],(()=>V)),te=n([T,s],(()=>W));function oe(e){return e}function re(e){return b(e||D()||j().initialLocale)}export{X as _,m as addMessages,ee as date,oe as defineMessages,s as dictionary,X as format,q as getDateFormatter,z as getLocaleFromHash,P as getLocaleFromHostname,I as getLocaleFromNavigator,A as getLocaleFromPathname,F as getLocaleFromQueryString,H as getMessageFormatter,_ as getNumberFormatter,B as getTimeFormatter,$ as init,k as isLoading,te as json,T as locale,f as locales,ne as number,y as register,X as t,Y as time,re as waitLocale};\n","\n\n\n {@html $_('results_text', {\n values: {\n points: `${quiz.points}`,\n total: `${quiz.counter.max}`,\n },\n })}\n
\n\n\n {#each quiz.questions as question, i}\n - quiz.jump(i)}\">\n \n {emojis[+question.solved]}\n Q{i + 1}:{@html question.text}\n \n
\n \n {#each question.selected as selected}\n {#if question.answers[selected].comment !== ''}\n - \n {@html question.answers[selected].html}:\n {@html question.answers[selected].comment}\n
\n {/if}\n {/each}\n
\n \n {/each}\n
\n\n\n","\n\n{#if $counter === counter.max}\n \n {$_('results_title')}
\n \n{:else}\n \n \n Q{$counter + 1}: {@html current.text}
\n \n {#if current.explanation !== null && current.explanation !== ''}\n {@html current.explanation}
\n {/if}\n \n{/if}\n","\n\n\n\n\n","\n\n \n\n{#if show_hint}\n 💡 {@html current.hint}
\n{/if}\n\n\n\n\n","import { writable } from '../store/index.mjs';\nimport { now, loop, assign } from '../internal/index.mjs';\nimport { linear } from '../easing/index.mjs';\n\nfunction is_date(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Date]';\n}\n\nfunction tick_spring(ctx, last_value, current_value, target_value) {\n\tif (typeof current_value === 'number' || is_date(current_value)) {\n\t\t// @ts-ignore\n\t\tconst delta = target_value - current_value;\n\t\t// @ts-ignore\n\t\tconst velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0\n\t\tconst spring = ctx.opts.stiffness * delta;\n\t\tconst damper = ctx.opts.damping * velocity;\n\t\tconst acceleration = (spring - damper) * ctx.inv_mass;\n\t\tconst d = (velocity + acceleration) * ctx.dt;\n\n\t\tif (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) {\n\t\t\treturn target_value; // settled\n\t\t} else {\n\t\t\tctx.settled = false; // signal loop to keep ticking\n\t\t\t// @ts-ignore\n\t\t\treturn is_date(current_value) ?\n\t\t\t\tnew Date(current_value.getTime() + d) : current_value + d;\n\t\t}\n\t} else if (Array.isArray(current_value)) {\n\t\t// @ts-ignore\n\t\treturn current_value.map((_, i) =>\n\t\t\ttick_spring(ctx, last_value[i], current_value[i], target_value[i]));\n\t} else if (typeof current_value === 'object') {\n\t\tconst next_value = {};\n\t\tfor (const k in current_value) {\n\t\t\t// @ts-ignore\n\t\t\tnext_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]);\n\t\t}\n\t\t// @ts-ignore\n\t\treturn next_value;\n\t} else {\n\t\tthrow new Error(`Cannot spring ${typeof current_value} values`);\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction spring(value, opts = {}) {\n\tconst store = writable(value);\n\tconst { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;\n\n\tlet last_time;\n\tlet task;\n\tlet current_token;\n\tlet last_value = value;\n\tlet target_value = value;\n\n\tlet inv_mass = 1;\n\tlet inv_mass_recovery_rate = 0;\n\tlet cancel_task = false;\n\n\tfunction set(new_value, opts = {}) {\n\t\ttarget_value = new_value;\n\t\tconst token = current_token = {};\n\n\t\tif (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) {\n\t\t\tcancel_task = true; // cancel any running animation\n\t\t\tlast_time = now();\n\t\t\tlast_value = new_value;\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t} else if (opts.soft) {\n\t\t\tconst rate = opts.soft === true ? .5 : +opts.soft;\n\t\t\tinv_mass_recovery_rate = 1 / (rate * 60);\n\t\t\tinv_mass = 0; // infinite mass, unaffected by spring forces\n\t\t}\n\n\t\tif (!task) {\n\t\t\tlast_time = now();\n\t\t\tcancel_task = false;\n\n\t\t\ttask = loop(now => {\n\n\t\t\t\tif (cancel_task) {\n\t\t\t\t\tcancel_task = false;\n\t\t\t\t\ttask = null;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tinv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1);\n\n\t\t\t\tconst ctx = {\n\t\t\t\t\tinv_mass,\n\t\t\t\t\topts: spring,\n\t\t\t\t\tsettled: true, // tick_spring may signal false\n\t\t\t\t\tdt: (now - last_time) * 60 / 1000\n\t\t\t\t};\n\t\t\t\tconst next_value = tick_spring(ctx, last_value, value, target_value);\n\n\t\t\t\tlast_time = now;\n\t\t\t\tlast_value = value;\n\t\t\t\tstore.set(value = next_value);\n\n\t\t\t\tif (ctx.settled) {\n\t\t\t\t\ttask = null;\n\t\t\t\t}\n\t\t\t\treturn !ctx.settled;\n\t\t\t});\n\t\t}\n\n\t\treturn new Promise(fulfil => {\n\t\t\ttask.promise.then(() => {\n\t\t\t\tif (token === current_token) fulfil();\n\t\t\t});\n\t\t});\n\t}\n\n\tconst spring = {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe,\n\t\tstiffness,\n\t\tdamping,\n\t\tprecision\n\t};\n\n\treturn spring;\n}\n\nfunction get_interpolator(a, b) {\n\tif (a === b || a !== a) return () => a;\n\n\tconst type = typeof a;\n\n\tif (type !== typeof b || Array.isArray(a) !== Array.isArray(b)) {\n\t\tthrow new Error('Cannot interpolate values of different type');\n\t}\n\n\tif (Array.isArray(a)) {\n\t\tconst arr = b.map((bi, i) => {\n\t\t\treturn get_interpolator(a[i], bi);\n\t\t});\n\n\t\treturn t => arr.map(fn => fn(t));\n\t}\n\n\tif (type === 'object') {\n\t\tif (!a || !b) throw new Error('Object cannot be null');\n\n\t\tif (is_date(a) && is_date(b)) {\n\t\t\ta = a.getTime();\n\t\t\tb = b.getTime();\n\t\t\tconst delta = b - a;\n\t\t\treturn t => new Date(a + t * delta);\n\t\t}\n\n\t\tconst keys = Object.keys(b);\n\t\tconst interpolators = {};\n\n\t\tkeys.forEach(key => {\n\t\t\tinterpolators[key] = get_interpolator(a[key], b[key]);\n\t\t});\n\n\t\treturn t => {\n\t\t\tconst result = {};\n\t\t\tkeys.forEach(key => {\n\t\t\t\tresult[key] = interpolators[key](t);\n\t\t\t});\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tif (type === 'number') {\n\t\tconst delta = b - a;\n\t\treturn t => a + t * delta;\n\t}\n\n\tthrow new Error(`Cannot interpolate ${type} values`);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction tweened(value, defaults = {}) {\n\tconst store = writable(value);\n\n\tlet task;\n\tlet target_value = value;\n\n\tfunction set(new_value, opts) {\n\t\tif (value == null) {\n\t\t\tstore.set(value = new_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\ttarget_value = new_value;\n\n\t\tlet previous_task = task;\n\t\tlet started = false;\n\n\t\tlet {\n\t\t\tdelay = 0,\n\t\t\tduration = 400,\n\t\t\teasing = linear,\n\t\t\tinterpolate = get_interpolator\n\t\t} = assign(assign({}, defaults), opts);\n\n\t\tif (duration === 0) {\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tconst start = now() + delay;\n\t\tlet fn;\n\n\t\ttask = loop(now => {\n\t\t\tif (now < start) return true;\n\n\t\t\tif (!started) {\n\t\t\t\tfn = interpolate(value, new_value);\n\t\t\t\tif (typeof duration === 'function') duration = duration(value, new_value);\n\t\t\t\tstarted = true;\n\t\t\t}\n\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tconst elapsed = now - start;\n\n\t\t\tif (elapsed > duration) {\n\t\t\t\tstore.set(value = new_value);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// @ts-ignore\n\t\t\tstore.set(value = fn(easing(elapsed / duration)));\n\t\t\treturn true;\n\t\t});\n\n\t\treturn task.promise;\n\t}\n\n\treturn {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe\n\t};\n}\n\nexport { spring, tweened };\n","\n\n\n \n\n\n\n","import { init, addMessages, getLocaleFromNavigator } from 'svelte-i18n';\nimport en from './en.json';\nimport de from './de.json';\nexport default function (locale) {\n addMessages('de', de);\n addMessages('en', en);\n init({\n fallbackLocale: 'en',\n initialLocale: locale === null ? getLocaleFromNavigator() : locale,\n });\n}\n","\n\n\n \n \n \n \n \n \n \n\n\n\n","/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.DOMPurify = factory());\n}(this, function () { 'use strict';\n\n function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n\n var regExpTest = unapply(RegExp.prototype.test);\n\n var typeErrorCreate = unconstruct(TypeError);\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n\n /* Add properties to a lookup table */\n function addToSet(set, array) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = stringToLowerCase(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n\n /* Shallow clone an object */\n function clone(object) {\n var newObject = create(null);\n\n var property = void 0;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n\n var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\n var text = freeze(['#text']);\n\n var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n\n var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n\n var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n var MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n var ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html$$1) {\n return html$$1;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '2.2.8';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n Text = window.Text,\n Comment = window.Comment,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n\n\n var ElementPrototype = Element.prototype;\n\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';\n\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment;\n var importNode = originalDocument.importNode;\n\n\n var documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\n var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,\n ERB_EXPR$$1 = ERB_EXPR,\n DATA_ATTR$$1 = DATA_ATTR,\n ARIA_ATTR$$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n * `Node` is imported into the current `Document`. If this flag is not enabled the\n * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n * DOMPurify.\n *\n * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`\n * might cause XSS from attacks hidden in closed shadowroots in case the browser\n * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/\n */\n var RETURN_DOM_IMPORT = true;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n var RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks? */\n var SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);\n\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n var NAMESPACE = HTML_NAMESPACE;\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n NAMESPACE = cfg.NAMESPACE || NAMESPACE;\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html);\n addToSet(ALLOWED_ATTR, html$1);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl);\n addToSet(ALLOWED_ATTR, mathMl$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n var ALL_SVG_TAGS = addToSet({}, svg);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n\n var ALL_MATHML_TAGS = addToSet({}, mathMl);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via
`\n };\n\n const VuePlugin = {\n install(Vue) {\n Vue.component('highlightjs', Component);\n }\n };\n\n return { Component, VuePlugin };\n}\n\n/* plugin itself */\n\n/** @type {HLJSPlugin} */\nconst mergeHTMLPlugin = {\n \"after:highlightElement\": ({ el, result, text }) => {\n const originalStream = nodeStream(el);\n if (!originalStream.length) return;\n\n const resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n};\n\n/* Stream merging support functions */\n\n/**\n * @typedef Event\n * @property {'start'|'stop'} event\n * @property {number} offset\n * @property {Node} node\n */\n\n/**\n * @param {Node} node\n */\nfunction tag(node) {\n return node.nodeName.toLowerCase();\n}\n\n/**\n * @param {Node} node\n */\nfunction nodeStream(node) {\n /** @type Event[] */\n const result = [];\n (function _nodeStream(node, offset) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3) {\n offset += child.nodeValue.length;\n } else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n}\n\n/**\n * @param {any} original - the original stream\n * @param {any} highlighted - stream of the highlighted source\n * @param {string} value - the original source itself\n */\nfunction mergeStreams(original, highlighted, value) {\n let processed = 0;\n let result = '';\n const nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n /**\n * @param {Node} node\n */\n function open(node) {\n /** @param {Attr} attr */\n function attributeString(attr) {\n return ' ' + attr.nodeName + '=\"' + escapeHTML(attr.value) + '\"';\n }\n // @ts-ignore\n result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';\n }\n\n /**\n * @param {Node} node\n */\n function close(node) {\n result += '' + tag(node) + '>';\n }\n\n /**\n * @param {Event} event\n */\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n let stream = selectStream();\n result += escapeHTML(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escapeHTML(value.substr(processed));\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record blocks on a page\n *\n * @type {Function & {called?: boolean}}\n */\n // TODO: remove v12, deprecated\n const initHighlighting = () => {\n if (initHighlighting.called) return;\n initHighlighting.called = true;\n\n deprecated(\"10.6.0\", \"initHighlighting() is deprecated. Use highlightAll() instead.\");\n\n const blocks = document.querySelectorAll('pre code');\n blocks.forEach(highlightElement);\n };\n\n // Higlights all when DOMContentLoaded fires\n // TODO: remove v12, deprecated\n function initHighlightingOnLoad() {\n deprecated(\"10.6.0\", \"initHighlightingOnLoad() is deprecated. Use highlightAll() instead.\");\n wantsHighlight = true;\n }\n\n let wantsHighlight = false;\n\n /**\n * auto-highlights all pre>code elements on the page\n */\n function highlightAll() {\n // if we are called too early in the loading process\n if (document.readyState === \"loading\") {\n wantsHighlight = true;\n return;\n }\n\n const blocks = document.querySelectorAll('pre code');\n blocks.forEach(highlightElement);\n }\n\n function boot() {\n // if a highlight was requested before DOM was loaded, do now\n if (wantsHighlight) highlightAll();\n }\n\n // make sure we are in the browser environment\n if (typeof window !== 'undefined' && window.addEventListener) {\n window.addEventListener('DOMContentLoaded', boot, false);\n }\n\n /**\n * Register a language grammar module\n *\n * @param {string} languageName\n * @param {LanguageFn} languageDefinition\n */\n function registerLanguage(languageName, languageDefinition) {\n let lang = null;\n try {\n lang = languageDefinition(hljs);\n } catch (error$1) {\n error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n // hard or soft error\n if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n // languages that have serious errors are replaced with essentially a\n // \"plaintext\" stand-in so that the code blocks will still get normal\n // css classes applied to them - and one bad language won't break the\n // entire highlighter\n lang = PLAINTEXT_LANGUAGE;\n }\n // give it a temporary name if it doesn't have one in the meta-data\n if (!lang.name) lang.name = languageName;\n languages[languageName] = lang;\n lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n if (lang.aliases) {\n registerAliases(lang.aliases, { languageName });\n }\n }\n\n /**\n * Remove a language grammar module\n *\n * @param {string} languageName\n */\n function unregisterLanguage(languageName) {\n delete languages[languageName];\n for (const alias of Object.keys(aliases)) {\n if (aliases[alias] === languageName) {\n delete aliases[alias];\n }\n }\n }\n\n /**\n * @returns {string[]} List of language internal names\n */\n function listLanguages() {\n return Object.keys(languages);\n }\n\n /**\n intended usage: When one language truly requires another\n\n Unlike `getLanguage`, this will throw when the requested language\n is not available.\n\n @param {string} name - name of the language to fetch/require\n @returns {Language | never}\n */\n function requireLanguage(name) {\n deprecated(\"10.4.0\", \"requireLanguage will be removed entirely in v11.\");\n deprecated(\"10.4.0\", \"Please see https://github.com/highlightjs/highlight.js/pull/2844\");\n\n const lang = getLanguage(name);\n if (lang) { return lang; }\n\n const err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}', name));\n throw err;\n }\n\n /**\n * @param {string} name - name of the language to retrieve\n * @returns {Language | undefined}\n */\n function getLanguage(name) {\n name = (name || '').toLowerCase();\n return languages[name] || languages[aliases[name]];\n }\n\n /**\n *\n * @param {string|string[]} aliasList - single alias or list of aliases\n * @param {{languageName: string}} opts\n */\n function registerAliases(aliasList, { languageName }) {\n if (typeof aliasList === 'string') {\n aliasList = [aliasList];\n }\n aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n }\n\n /**\n * Determines if a given language has auto-detection enabled\n * @param {string} name - name of the language\n */\n function autoDetection(name) {\n const lang = getLanguage(name);\n return lang && !lang.disableAutodetect;\n }\n\n /**\n * Upgrades the old highlightBlock plugins to the new\n * highlightElement API\n * @param {HLJSPlugin} plugin\n */\n function upgradePluginAPI(plugin) {\n // TODO: remove with v12\n if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n plugin[\"before:highlightElement\"] = (data) => {\n plugin[\"before:highlightBlock\"](\n Object.assign({ block: data.el }, data)\n );\n };\n }\n if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n plugin[\"after:highlightElement\"] = (data) => {\n plugin[\"after:highlightBlock\"](\n Object.assign({ block: data.el }, data)\n );\n };\n }\n }\n\n /**\n * @param {HLJSPlugin} plugin\n */\n function addPlugin(plugin) {\n upgradePluginAPI(plugin);\n plugins.push(plugin);\n }\n\n /**\n *\n * @param {PluginEvent} event\n * @param {any} args\n */\n function fire(event, args) {\n const cb = event;\n plugins.forEach(function(plugin) {\n if (plugin[cb]) {\n plugin[cb](args);\n }\n });\n }\n\n /**\n Note: fixMarkup is deprecated and will be removed entirely in v11\n\n @param {string} arg\n @returns {string}\n */\n function deprecateFixMarkup(arg) {\n deprecated(\"10.2.0\", \"fixMarkup will be removed entirely in v11.0\");\n deprecated(\"10.2.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2534\");\n\n return fixMarkup(arg);\n }\n\n /**\n *\n * @param {HighlightedHTMLElement} el\n */\n function deprecateHighlightBlock(el) {\n deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n return highlightElement(el);\n }\n\n /* Interface definition */\n Object.assign(hljs, {\n highlight,\n highlightAuto,\n highlightAll,\n fixMarkup: deprecateFixMarkup,\n highlightElement,\n // TODO: Remove with v12 API\n highlightBlock: deprecateHighlightBlock,\n configure,\n initHighlighting,\n initHighlightingOnLoad,\n registerLanguage,\n unregisterLanguage,\n listLanguages,\n getLanguage,\n registerAliases,\n requireLanguage,\n autoDetection,\n inherit: inherit$1,\n addPlugin,\n // plugins for frameworks\n vuePlugin: BuildVuePlugin(hljs).VuePlugin\n });\n\n hljs.debugMode = function() { SAFE_MODE = false; };\n hljs.safeMode = function() { SAFE_MODE = true; };\n hljs.versionString = version;\n\n for (const key in MODES) {\n // @ts-ignore\n if (typeof MODES[key] === \"object\") {\n // @ts-ignore\n deepFreezeEs6(MODES[key]);\n }\n }\n\n // merge all the modes/regexs into our main object\n Object.assign(hljs, MODES);\n\n // built-in plugins, likely to be moved out of core in the future\n hljs.addPlugin(brPlugin); // slated to be removed in v11\n hljs.addPlugin(mergeHTMLPlugin);\n hljs.addPlugin(tabReplacePlugin);\n return hljs;\n};\n\n// export an \"instance\" of the highlighter\nvar highlight = HLJS({});\n\nmodule.exports = highlight;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n return concat('(?=', re, ')');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/*\nLanguage: Python\nDescription: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.\nWebsite: https://www.python.org\nCategory: common\n*/\n\nfunction python(hljs) {\n const RESERVED_WORDS = [\n 'and',\n 'as',\n 'assert',\n 'async',\n 'await',\n 'break',\n 'class',\n 'continue',\n 'def',\n 'del',\n 'elif',\n 'else',\n 'except',\n 'finally',\n 'for',\n 'from',\n 'global',\n 'if',\n 'import',\n 'in',\n 'is',\n 'lambda',\n 'nonlocal|10',\n 'not',\n 'or',\n 'pass',\n 'raise',\n 'return',\n 'try',\n 'while',\n 'with',\n 'yield'\n ];\n\n const BUILT_INS = [\n '__import__',\n 'abs',\n 'all',\n 'any',\n 'ascii',\n 'bin',\n 'bool',\n 'breakpoint',\n 'bytearray',\n 'bytes',\n 'callable',\n 'chr',\n 'classmethod',\n 'compile',\n 'complex',\n 'delattr',\n 'dict',\n 'dir',\n 'divmod',\n 'enumerate',\n 'eval',\n 'exec',\n 'filter',\n 'float',\n 'format',\n 'frozenset',\n 'getattr',\n 'globals',\n 'hasattr',\n 'hash',\n 'help',\n 'hex',\n 'id',\n 'input',\n 'int',\n 'isinstance',\n 'issubclass',\n 'iter',\n 'len',\n 'list',\n 'locals',\n 'map',\n 'max',\n 'memoryview',\n 'min',\n 'next',\n 'object',\n 'oct',\n 'open',\n 'ord',\n 'pow',\n 'print',\n 'property',\n 'range',\n 'repr',\n 'reversed',\n 'round',\n 'set',\n 'setattr',\n 'slice',\n 'sorted',\n 'staticmethod',\n 'str',\n 'sum',\n 'super',\n 'tuple',\n 'type',\n 'vars',\n 'zip'\n ];\n\n const LITERALS = [\n '__debug__',\n 'Ellipsis',\n 'False',\n 'None',\n 'NotImplemented',\n 'True'\n ];\n\n // https://docs.python.org/3/library/typing.html\n // TODO: Could these be supplemented by a CamelCase matcher in certain\n // contexts, leaving these remaining only for relevance hinting?\n const TYPES = [\n \"Any\",\n \"Callable\",\n \"Coroutine\",\n \"Dict\",\n \"List\",\n \"Literal\",\n \"Generic\",\n \"Optional\",\n \"Sequence\",\n \"Set\",\n \"Tuple\",\n \"Type\",\n \"Union\"\n ];\n\n const KEYWORDS = {\n $pattern: /[A-Za-z]\\w+|__\\w+__/,\n keyword: RESERVED_WORDS,\n built_in: BUILT_INS,\n literal: LITERALS,\n type: TYPES\n };\n\n const PROMPT = {\n className: 'meta',\n begin: /^(>>>|\\.\\.\\.) /\n };\n\n const SUBST = {\n className: 'subst',\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS,\n illegal: /#/\n };\n\n const LITERAL_BRACKET = {\n begin: /\\{\\{/,\n relevance: 0\n };\n\n const STRING = {\n className: 'string',\n contains: [ hljs.BACKSLASH_ESCAPE ],\n variants: [\n {\n begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,\n end: /'''/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT\n ],\n relevance: 10\n },\n {\n begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?\"\"\"/,\n end: /\"\"\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT\n ],\n relevance: 10\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])'''/,\n end: /'''/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])\"\"\"/,\n end: /\"\"\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n PROMPT,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n {\n begin: /([uU]|[rR])'/,\n end: /'/,\n relevance: 10\n },\n {\n begin: /([uU]|[rR])\"/,\n end: /\"/,\n relevance: 10\n },\n {\n begin: /([bB]|[bB][rR]|[rR][bB])'/,\n end: /'/\n },\n {\n begin: /([bB]|[bB][rR]|[rR][bB])\"/,\n end: /\"/\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])'/,\n end: /'/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n {\n begin: /([fF][rR]|[rR][fF]|[fF])\"/,\n end: /\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n LITERAL_BRACKET,\n SUBST\n ]\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE\n ]\n };\n\n // https://docs.python.org/3.9/reference/lexical_analysis.html#numeric-literals\n const digitpart = '[0-9](_?[0-9])*';\n const pointfloat = `(\\\\b(${digitpart}))?\\\\.(${digitpart})|\\\\b(${digitpart})\\\\.`;\n const NUMBER = {\n className: 'number',\n relevance: 0,\n variants: [\n // exponentfloat, pointfloat\n // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals\n // optionally imaginary\n // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n // Note: no leading \\b because floats can start with a decimal point\n // and we don't want to mishandle e.g. `fn(.5)`,\n // no trailing \\b for pointfloat because it can end with a decimal point\n // and we don't want to mishandle e.g. `0..hex()`; this should be safe\n // because both MUST contain a decimal point and so cannot be confused with\n // the interior part of an identifier\n {\n begin: `(\\\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?\\\\b`\n },\n {\n begin: `(${pointfloat})[jJ]?`\n },\n\n // decinteger, bininteger, octinteger, hexinteger\n // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals\n // optionally \"long\" in Python 2\n // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals\n // decinteger is optionally imaginary\n // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n {\n begin: '\\\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\\\b'\n },\n {\n begin: '\\\\b0[bB](_?[01])+[lL]?\\\\b'\n },\n {\n begin: '\\\\b0[oO](_?[0-7])+[lL]?\\\\b'\n },\n {\n begin: '\\\\b0[xX](_?[0-9a-fA-F])+[lL]?\\\\b'\n },\n\n // imagnumber (digitpart-based)\n // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n {\n begin: `\\\\b(${digitpart})[jJ]\\\\b`\n }\n ]\n };\n const COMMENT_TYPE = {\n className: \"comment\",\n begin: lookahead(/# type:/),\n end: /$/,\n keywords: KEYWORDS,\n contains: [\n { // prevent keywords from coloring `type`\n begin: /# type:/\n },\n // comment within a datatype comment includes no keywords\n {\n begin: /#/,\n end: /\\b\\B/,\n endsWithParent: true\n }\n ]\n };\n const PARAMS = {\n className: 'params',\n variants: [\n // Exclude params in functions without params\n {\n className: \"\",\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n contains: [\n 'self',\n PROMPT,\n NUMBER,\n STRING,\n hljs.HASH_COMMENT_MODE\n ]\n }\n ]\n };\n SUBST.contains = [\n STRING,\n NUMBER,\n PROMPT\n ];\n\n return {\n name: 'Python',\n aliases: [\n 'py',\n 'gyp',\n 'ipython'\n ],\n keywords: KEYWORDS,\n illegal: /(<\\/|->|\\?)|=>/,\n contains: [\n PROMPT,\n NUMBER,\n {\n // very common convention\n begin: /\\bself\\b/\n },\n {\n // eat \"if\" prior to string so that it won't accidentally be\n // labeled as an f-string\n beginKeywords: \"if\",\n relevance: 0\n },\n STRING,\n COMMENT_TYPE,\n hljs.HASH_COMMENT_MODE,\n {\n variants: [\n {\n className: 'function',\n beginKeywords: 'def'\n },\n {\n className: 'class',\n beginKeywords: 'class'\n }\n ],\n end: /:/,\n illegal: /[${=;\\n,]/,\n contains: [\n hljs.UNDERSCORE_TITLE_MODE,\n PARAMS,\n {\n begin: /->/,\n endsWithParent: true,\n keywords: KEYWORDS\n }\n ]\n },\n {\n className: 'meta',\n begin: /^[\\t ]*@/,\n end: /(?=#)|$/,\n contains: [\n NUMBER,\n PARAMS,\n STRING\n ]\n }\n ]\n };\n}\n\nmodule.exports = python;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n return concat('(?=', re, ')');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction optional(re) {\n return concat('(', re, ')?');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/*\nLanguage: HTML, XML\nWebsite: https://www.w3.org/XML/\nCategory: common\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction xml(hljs) {\n // Element names can contain letters, digits, hyphens, underscores, and periods\n const TAG_NAME_RE = concat(/[A-Z_]/, optional(/[A-Z0-9_.-]*:/), /[A-Z0-9_.-]*/);\n const XML_IDENT_RE = /[A-Za-z0-9._:-]+/;\n const XML_ENTITIES = {\n className: 'symbol',\n begin: /&[a-z]+;|[0-9]+;|[a-f0-9]+;/\n };\n const XML_META_KEYWORDS = {\n begin: /\\s/,\n contains: [\n {\n className: 'meta-keyword',\n begin: /#?[a-z_][a-z1-9_-]+/,\n illegal: /\\n/\n }\n ]\n };\n const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {\n begin: /\\(/,\n end: /\\)/\n });\n const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {\n className: 'meta-string'\n });\n const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n className: 'meta-string'\n });\n const TAG_INTERNALS = {\n endsWithParent: true,\n illegal: /,\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: XML_IDENT_RE,\n relevance: 0\n },\n {\n begin: /=\\s*/,\n relevance: 0,\n contains: [\n {\n className: 'string',\n endsParent: true,\n variants: [\n {\n begin: /\"/,\n end: /\"/,\n contains: [ XML_ENTITIES ]\n },\n {\n begin: /'/,\n end: /'/,\n contains: [ XML_ENTITIES ]\n },\n {\n begin: /[^\\s\"'=<>`]+/\n }\n ]\n }\n ]\n }\n ]\n };\n return {\n name: 'HTML, XML',\n aliases: [\n 'html',\n 'xhtml',\n 'rss',\n 'atom',\n 'xjb',\n 'xsd',\n 'xsl',\n 'plist',\n 'wsf',\n 'svg'\n ],\n case_insensitive: true,\n contains: [\n {\n className: 'meta',\n begin: //,\n relevance: 10,\n contains: [\n XML_META_KEYWORDS,\n QUOTE_META_STRING_MODE,\n APOS_META_STRING_MODE,\n XML_META_PAR_KEYWORDS,\n {\n begin: /\\[/,\n end: /\\]/,\n contains: [\n {\n className: 'meta',\n begin: //,\n contains: [\n XML_META_KEYWORDS,\n XML_META_PAR_KEYWORDS,\n QUOTE_META_STRING_MODE,\n APOS_META_STRING_MODE\n ]\n }\n ]\n }\n ]\n },\n hljs.COMMENT(\n //,\n {\n relevance: 10\n }\n ),\n {\n begin: //,\n relevance: 10\n },\n XML_ENTITIES,\n {\n className: 'meta',\n begin: /<\\?xml/,\n end: /\\?>/,\n relevance: 10\n },\n {\n className: 'tag',\n /*\n The lookahead pattern (?=...) ensures that 'begin' only matches\n '