squiffy-runtime 7.0.0-beta.4 → 7.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/events.d.ts +1 -0
  2. package/dist/panels.d.ts +14 -0
  3. package/dist/panels.test.d.ts +1 -0
  4. package/dist/preview-host.d.ts +2 -1
  5. package/dist/preview-host.js +4 -1
  6. package/dist/preview-host.js.map +2 -2
  7. package/dist/preview-html.js +1 -1
  8. package/dist/preview-protocol.d.ts +4 -0
  9. package/dist/saveSlots.d.ts +16 -0
  10. package/dist/saves.test.d.ts +1 -0
  11. package/dist/savesDialog.d.ts +43 -0
  12. package/dist/savesDialog.test.d.ts +1 -0
  13. package/dist/squiffy.page.css +46 -22
  14. package/dist/squiffy.preview.html +612 -109
  15. package/dist/squiffy.runtime.css +476 -9
  16. package/dist/squiffy.runtime.d.ts +9 -1
  17. package/dist/squiffy.runtime.global.js +113 -72
  18. package/dist/squiffy.runtime.global.js.map +1 -1
  19. package/dist/squiffy.runtime.js +4146 -3460
  20. package/dist/squiffy.runtime.js.map +1 -1
  21. package/dist/state.d.ts +4 -0
  22. package/dist/textProcessor.d.ts +5 -0
  23. package/dist/types.d.ts +32 -0
  24. package/package.json +3 -3
  25. package/src/__snapshots__/squiffy.runtime.test.ts.snap +21 -21
  26. package/src/events.ts +1 -0
  27. package/src/panels.test.ts +201 -0
  28. package/src/panels.ts +187 -0
  29. package/src/plugins/plugins.test.ts +42 -0
  30. package/src/plugins/replaceLabel.ts +6 -2
  31. package/src/preview-host.test.ts +5 -1
  32. package/src/preview-host.ts +9 -3
  33. package/src/preview-protocol.ts +6 -2
  34. package/src/preview.test.ts +71 -3
  35. package/src/preview.ts +74 -13
  36. package/src/saveSlots.ts +159 -0
  37. package/src/saves.test.ts +199 -0
  38. package/src/savesDialog.test.ts +290 -0
  39. package/src/savesDialog.ts +499 -0
  40. package/src/squiffy.page.css +46 -22
  41. package/src/squiffy.runtime.css +476 -9
  42. package/src/squiffy.runtime.test.ts +890 -4
  43. package/src/squiffy.runtime.ts +322 -17
  44. package/src/state.ts +34 -4
  45. package/src/textProcessor.ts +76 -9
  46. package/src/types.ts +57 -1
  47. package/vite.preview.config.ts +7 -0
@@ -1,2 +1,2 @@
1
1
  // The Squiffy preview page, built from squiffy-runtime's src/preview.main.ts
2
- export const previewHtml = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Squiffy preview</title>\n<style>\n/* Core Squiffy Runtime Styles. See https://squiffystory.com/styling/ for how to customise these. */\n\n/* Colours. Each has a light and a dark value, and light-dark() picks one from the page's\n color-scheme. This file doesn't set color-scheme itself, so a story embedded in a page stays\n light unless the page opts in to dark mode. The exported story's page (squiffy.page.css) sets\n \"color-scheme: light dark\", so it follows the reader's system setting. */\n:root\n{\n --squiffy-text: light-dark(#1f2328, #e4e4e7);\n --squiffy-background: light-dark(#ffffff, #18181b);\n /* Secondary text: the Restart button, and links waiting for valid input */\n --squiffy-muted: light-dark(#6b6f76, #9a9ca3);\n /* The lines between sections */\n --squiffy-border: light-dark(#e2e2e6, #34343a);\n --squiffy-link: light-dark(#1d5fd6, #7aa7ff);\n --squiffy-link-hover: light-dark(#0f3f99, #b0cbff);\n --squiffy-error: light-dark(#c62828, #ff7b72);\n --squiffy-success: light-dark(#2e7d32, #6cc070);\n}\n\n/* Link styles */\na.squiffy-link\n{\n color: var(--squiffy-link);\n text-decoration: underline;\n text-decoration-color: currentColor;\n text-decoration-thickness: from-font;\n text-underline-offset: 0.15em;\n cursor: pointer;\n transition: color 0.4s ease-in-out, text-decoration-color 0.4s ease-in-out;\n}\n\na.squiffy-link:hover\n{\n color: var(--squiffy-link-hover);\n}\n\na.squiffy-link:focus-visible,\nbutton.squiffy-header-button:focus-visible,\n.squiffy-continue:focus-visible\n{\n outline: 2px solid var(--squiffy-link);\n outline-offset: 2px;\n border-radius: 2px;\n}\n\n/* Rotate/sequence links - visually distinct as they update in-place rather than advancing the story */\na.squiffy-link[data-handler=\"rotate\"],\na.squiffy-link[data-handler=\"sequence\"] {\n text-decoration-style: dotted;\n}\n\n/* Disabled link states */\na.squiffy-link.disabled,\ndiv.squiffy-output-section:not(:last-child) a.squiffy-link,\ndiv.squiffy-output-section.links-disabled a.squiffy-link\n{\n text-decoration: inherit;\n text-decoration-color: transparent;\n color: inherit !important;\n cursor: inherit;\n pointer-events: none;\n}\n\n/* Links disabled due to input validation */\na.squiffy-link.validation-disabled\n{\n text-decoration: inherit;\n text-decoration-color: transparent;\n color: var(--squiffy-muted) !important;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* Invalid input field states */\ninput.squiffy-invalid,\ntextarea.squiffy-invalid,\nselect.squiffy-invalid\n{\n border-color: var(--squiffy-error) !important;\n box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--squiffy-error) 25%, transparent);\n}\n\n/* Valid input field states (optional, provides positive feedback) */\ninput:not([disabled]):valid,\ntextarea:not([disabled]):valid,\nselect:not([disabled]):valid\n{\n border-color: var(--squiffy-success);\n}\n\n/* Focus state for invalid inputs */\ninput.squiffy-invalid:focus,\ntextarea.squiffy-invalid:focus,\nselect.squiffy-invalid:focus\n{\n outline: none;\n border-color: var(--squiffy-error) !important;\n box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--squiffy-error) 50%, transparent);\n}\n\n/* Header button styles: the Restart button */\nbutton.squiffy-header-button\n{\n color: var(--squiffy-muted);\n cursor: pointer;\n background: none;\n border: none;\n padding: 0.25em 0;\n font: inherit;\n text-decoration: underline;\n text-decoration-color: transparent;\n text-underline-offset: 0.15em;\n transition: color 0.2s ease-in-out, text-decoration-color 0.2s ease-in-out;\n}\n\nbutton.squiffy-header-button:hover\n{\n color: var(--squiffy-text);\n text-decoration-color: currentColor;\n}\n\n/* Output block spacing */\ndiv.squiffy-output-block:not(:last-child),\ndiv.squiffy-output-passage:not(:last-child),\ndiv.squiffy-output-section:not(:last-child)\n{\n margin-bottom: 1em;\n border-bottom: 1px solid var(--squiffy-border);\n}\n\n/* Fade animations */\n.fade-out {\n opacity: 0;\n transition: opacity 200ms;\n}\n\n.fade-in {\n opacity: 1;\n transition: opacity 200ms;\n}\n\n/* Continue animation - click to proceed */\n.squiffy-continue {\n color: var(--squiffy-link);\n text-decoration: underline;\n text-decoration-color: currentColor;\n text-decoration-thickness: from-font;\n text-underline-offset: 0.15em;\n cursor: pointer;\n}\n\n/* Style: pulse - fades in and out */\n.squiffy-continue-pulse {\n animation: squiffy-pulse 1.5s ease-in-out infinite;\n}\n\n@keyframes squiffy-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.4; }\n}\n\n/* Style: glow - pulsing glow effect */\n.squiffy-continue-glow {\n animation: squiffy-glow 1.5s ease-in-out infinite;\n}\n\n@keyframes squiffy-glow {\n 0%, 100% { text-shadow: 0 0 4px color-mix(in srgb, currentColor 50%, transparent); }\n 50% { text-shadow: 0 0 12px color-mix(in srgb, currentColor 80%, transparent), 0 0 20px color-mix(in srgb, currentColor 40%, transparent); }\n}\n\n/* Style: bounce - subtle vertical bounce */\n.squiffy-continue-bounce {\n display: inline-block;\n animation: squiffy-bounce 0.6s ease-in-out infinite;\n}\n\n@keyframes squiffy-bounce {\n 0%, 100% { transform: translateY(0); }\n 50% { transform: translateY(-4px); }\n}\n\n/* Style: wave - character spans need special handling for underline */\n.squiffy-continue-wave {\n text-decoration: none;\n border-bottom: 1px solid currentColor;\n}\n\n/* Respect the reader's reduced-motion setting */\n@media (prefers-reduced-motion: reduce)\n{\n .squiffy-continue-pulse,\n .squiffy-continue-glow,\n .squiffy-continue-bounce\n {\n animation: none;\n }\n}\n\n/* Page layout styles for an exported story. See https://squiffystory.com/styling/ for how to customise these. */\n\n:root\n{\n /* The width of the story text */\n --squiffy-max-width: 42rem;\n}\n\n/* Follow the reader's light or dark system setting, or what they chose with the theme button.\n To keep a story light (or dark) whatever the setting, set \":root { color-scheme: light; }\"\n (or dark). These rules use :where() so that a :root rule like that overrides them, and the\n theme button is hidden. */\n:where(:root)\n{\n color-scheme: light dark;\n}\n\n:where(:root[data-squiffy-theme=\"light\"])\n{\n color-scheme: light;\n}\n\n:where(:root[data-squiffy-theme=\"dark\"])\n{\n color-scheme: dark;\n}\n\nbody\n{\n margin: 0;\n background-color: var(--squiffy-background);\n color: var(--squiffy-text);\n}\n\n/* Wraps the header and the story: sets the page width and font */\ndiv#squiffy-container\n{\n max-width: var(--squiffy-max-width);\n margin-left: auto;\n margin-right: auto;\n padding: 0 1.25rem 3rem;\n font-family: Charter, \"Bitstream Charter\", \"Sitka Text\", Cambria, Georgia, serif;\n line-height: 1.6;\n}\n\n/* The bar above the story containing the Restart and light/dark buttons. It stays at the top of\n the window as the story scrolls under it. */\ndiv#squiffy-header\n{\n position: sticky;\n top: 0;\n z-index: 1;\n padding: 0.5rem 0;\n background-color: var(--squiffy-background);\n font-size: 0.875rem;\n text-align: right;\n white-space: nowrap;\n}\n\n/* A short fade under the header, so the story scrolls under it rather than being cut off */\ndiv#squiffy-header::after\n{\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n top: 100%;\n height: 0.75rem;\n background: linear-gradient(var(--squiffy-background), transparent);\n pointer-events: none;\n}\n\n/* The button that switches between light and dark mode. It shows a moon in light mode and a sun\n in dark mode. */\nbutton#squiffy-theme\n{\n margin-left: 0.75em;\n}\n\n/* Centred on the capital letters of \"Restart\", rather than on the line, which looks too low */\nbutton#squiffy-theme svg\n{\n width: 1.1em;\n height: 1.1em;\n vertical-align: -0.25em;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\nbutton#squiffy-theme:not([data-next=\"light\"]) .squiffy-icon-light,\nbutton#squiffy-theme[data-next=\"light\"] .squiffy-icon-dark\n{\n display: none;\n}\n\n/* The story text */\ndiv#squiffy\n{\n font-size: 1.125rem;\n}\n\ndiv#squiffy :is(h1, h2, h3, h4, h5, h6)\n{\n line-height: 1.25;\n}\n\ndiv#squiffy p\n{\n text-wrap: pretty;\n}\n\n/* Stop images overflowing the page */\ndiv#squiffy img\n{\n max-width: 100%;\n height: auto;\n}\n\n/* The preview scrolls the story within the frame, with the text centred as on the exported page */\nhtml, body { height: 100%; }\ndiv#squiffy-container { max-width: none; height: 100%; padding: 0; }\n#squiffy, .squiffy-preview-story, .squiffy-preview-story > div { height: 100%; box-sizing: border-box; }\n.squiffy-preview-story > div { padding: 1em max(1.25rem, calc((100% - var(--squiffy-max-width)) / 2)); }\n</style>\n</head>\n<body>\n<div id=\"squiffy-container\"><div id=\"squiffy\"></div></div>\n<script>\n(function(){var oa=Object.create,$s=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,la=Object.getOwnPropertyNames,ca=Object.getPrototypeOf,$i=Object.prototype.hasOwnProperty,ue=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),es=(e,t)=>{let s={};for(var r in e)$s(s,r,{get:e[r],enumerable:!0});return t||$s(s,Symbol.toStringTag,{value:\"Module\"}),s},ua=(e,t,s,r)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(var i=la(t),n=0,o=i.length,c;n<o;n++)c=i[n],!$i.call(e,c)&&c!==s&&$s(e,c,{get:(u=>t[u]).bind(null,c),enumerable:!(r=aa(t,c))||r.enumerable});return e},ha=(e,t,s)=>(s=e!=null?oa(ca(e)):{},ua(t||!e||!e.__esModule||!$i.call(e,\"default\")?$s(s,\"default\",{value:e,enumerable:!0}):s,e));function fs(e){\"@babel/helpers - typeof\";return fs=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},fs(e)}function pa(e,t){if(fs(e)!=\"object\"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||\"default\");if(fs(r)!=\"object\")return r;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function da(e){var t=pa(e,\"string\");return fs(t)==\"symbol\"?t:t+\"\"}function Ee(e,t,s){return(t=da(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function fa(e,t){if(t.has(e))throw new TypeError(\"Cannot initialize the same private elements twice on an object\")}function ga(e,t){fa(e,t),t.add(e)}function Hs(e,t,s){if(typeof e==\"function\"?e===t:e.has(t))return arguments.length<3?t:s;throw new TypeError(\"Private element is not present on this object\")}var ts,qs;function Ar(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ft=Ar();function Hi(e){Ft=e}var Vt={exec:()=>null};function zt(e){let t=[];return s=>{let r=Math.max(0,Math.min(3,s-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function ce(e,t=\"\"){let s=typeof e==\"string\"?e:e.source,r={replace:(i,n)=>{let o=typeof n==\"string\"?n:n.source;return o=o.replace(qe.caret,\"$1\"),s=s.replace(i,o),r},getRegex:()=>new RegExp(s,t)};return r}var qi=((e=\"\")=>{try{return!!new RegExp(\"(?<=1)(?<!1)\"+e)}catch{return!1}})(),qe={codeRemoveIndent:/^(?: {0,3}\\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \\t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,leadingSpaceTab:/^[ \\t]+/,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+)[ \\t]*)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \\t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\][ \\t]+\\S/,listReplaceTask:/^\\[[ xX]\\][ \\t]+/,listTaskCheckbox:/\\[[ xX]\\]/,anyLine:/\\n.*\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\||\\| *$/g,tableRowBlankLine:/\\n[ \\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\s|>)/i,endPreScriptTag:/^<\\/(pre|code|kbd|script)(\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/,unicodeAlphaNumeric:/[\\p{L}\\p{N}]/u,numericCharacterReference:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,escapeTest:/[&<>\"']/,escapeReplace:/[&<>\"']/g,escapeTestNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,escapeReplaceNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,caret:/(^|[^\\[])\\^/g,percentDecode:/%25/g,findPipe:/\\|/g,splitPipe:/ \\|/,slashPipe:/\\\\\\|/g,carriageReturn:/\\r\\n|\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\S*/,endingNewline:/\\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\\\n]*)?(?:\\\\n|$))`),nextBulletRegex:zt(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \t][^\\\\n]*)?(?:\\\\n|$))`)),hrRegex:zt(e=>new RegExp(`^ {0,${e}}((?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\\\\*[ \t]*){3,})(?:\\\\n+|$)`)),fencesBeginRegex:zt(e=>new RegExp(`^ {0,${e}}(?:\\`\\`\\`|~~~)`)),headingBeginRegex:zt(e=>new RegExp(`^ {0,${e}}#{1,6}(?:\\\\s|$)`)),pedanticHeadingBeginRegex:zt(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:zt(e=>new RegExp(`^ {0,${e}}(?:</?(?:${ms})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)`,\"i\")),blockquoteBeginRegex:zt(e=>new RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\\d{1,9}[.)])[ \\t]+|>[ \\t]?))+/},ma=/^(?:[ \\t]*(?:\\n|$))+/,va=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,ya=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}(?:(?=`)\\1`*|(?=~)\\1~*) *(?=\\n|$)|$)/,gs=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,ba=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,Lr=/ {0,3}(?:[*+-]|\\d{1,9}[.)])/,Fi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |fences|blockquote|heading|hr|html|table))+?)\\n {0,3}(=+|-+)[ \\t]*(?:\\n+|$)/,Vi=ce(Fi).replace(/bull/g,Lr).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,\"\").getRegex(),_a=ce(Fi).replace(/bull/g,Lr).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),Rr=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \\t]+\\n)[^\\n]+)*)/,Sa=/^[^\\n]+/,Ir=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\\\n]|\\n(?![ \\t]*\\n))+/,ka=ce(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace(\"label\",Ir).replace(\"title\",/(?:\"(?:\\\\[\\s\\S]|[^\"\\\\])*\"|'(?:\\\\[\\s\\S]|[^'\\\\\\n]|\\n(?!\\n))*'|\\((?:\\\\[\\s\\S]|[^()\\\\])*\\))/).getRegex(),wa=ce(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/).replace(/bull/g,Lr).getRegex(),ms=\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\",Or=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,xa=ce(\"^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n*|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>[^\\\\n]*\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>[^\\\\n]*\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>[^\\\\n]*\\\\n*|$)|</?(tag)(?:[ \\\\t]+|\\\\n|/?>|$)[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|</[a-z][a-z0-9-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$))\",\"i\").replace(\"comment\",Or).replace(\"tag\",ms).replace(\"attribute\",/ +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex(),zi=e=>ce(Rr).replace(\"hr\",gs).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",e).replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",ms).getRegex(),Ta=zi(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/),Ca=zi(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/),Mr={blockquote:ce(/^( {0,3}> ?(?:(?![ \\t]*(?:\\n|$))(paragraph)|[^\\n]*)(?:\\n|$))+/).replace(\"paragraph\",Ca).getRegex(),code:va,def:ka,fences:ya,heading:ba,hr:gs,html:xa,lheading:Vi,list:wa,newline:ma,paragraph:Ta,table:Vt,text:Sa},Ui=ce(\"^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)\").replace(\"hr\",gs).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"blockquote\",\" {0,3}>\").replace(\"code\",\"(?: {4}| {0,3}\t)[^\\\\n]\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",ms).getRegex(),Pa={...Mr,lheading:_a,table:Ui,paragraph:ce(Rr).replace(\"hr\",gs).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"table\",Ui).replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",ms).getRegex()},Ea={...Mr,html:ce(`^ *(?:comment(?: *\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1>(?: *\\\\n{2,}|\\\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\\\s[^'\"/>\\\\s]*)*?/?>(?: *\\\\n{2,}|\\\\s*$))`).replace(\"comment\",Or).replace(/tag/g,\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b\").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:Vt,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:ce(Rr).replace(\"hr\",gs).replace(\"heading\",` *#{1,6} *[^\n]`).replace(\"lheading\",Vi).replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"|fences\",\"\").replace(\"|list\",\"\").replace(\"|html\",\"\").replace(\"|tag\",\"\").getRegex()},Aa=/^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,La=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,Wi=/^( {2,}|\\\\)\\n(?!\\s*$)[ \\t]*/,Ra=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,kt=/[\\p{P}\\p{S}]/u,ss=/[\\s\\p{P}\\p{S}]/u,vs=/[^\\s\\p{P}\\p{S}]/u,Ia=ce(/^((?![*_])punctSpace)/,\"u\").replace(/punctSpace/g,ss).getRegex(),Oa=/[\\p{Pi}\\p{Ps}\"']/u,Xi=/(?!~)[\\p{P}\\p{S}]/u,Ma=/(?!~)[\\s\\p{P}\\p{S}]/u,Na=/(?:[^\\s\\p{P}\\p{S}]|~)/u,Da=ce(/link|precode-code|html/,\"g\").replace(\"link\",/\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/).replace(\"precode-\",qi?\"(?<!`)()\":\"(^^|[^`])\").replace(\"code\",/(?<b>`+)[^`]+\\k<b>(?!`)/).replace(\"html\",/<(?! )[^<>]*?>/).getRegex(),Yi=/^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/,Ba=ce(Yi,\"u\").replace(/punct/g,kt).getRegex(),$a=ce(Yi,\"u\").replace(/punct/g,Xi).getRegex(),Ha=ce(/^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/,\"u\").replace(/openQuote/g,Oa).replace(/punct/g,kt).getRegex(),Gi=\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)\",qa=ce(Gi,\"gu\").replace(/notPunctSpace/g,vs).replace(/punctSpace/g,ss).replace(/punct/g,kt).getRegex(),Fa=ce(Gi,\"gu\").replace(/notPunctSpace/g,Na).replace(/punctSpace/g,Ma).replace(/punct/g,Xi).getRegex(),Va=ce(\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)\",\"gu\").replace(/notPunctSpace/g,vs).replace(/punctSpace/g,ss).replace(/punct/g,kt).getRegex(),za=ce(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)\",\"gu\").replace(/notPunctSpace/g,vs).replace(/punctSpace/g,ss).replace(/punct/g,kt).getRegex(),Ua=ce(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\\\s](_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)\",\"gu\").replace(/notPunctSpace/g,vs).replace(/punctSpace/g,ss).replace(/punct/g,kt).getRegex(),Wa=ce(/^~~?(?:((?!~)punct)|[^\\s~])/,\"u\").replace(/punct/g,kt).getRegex(),Xa=ce(\"^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)\",\"gu\").replace(/notPunctSpace/g,vs).replace(/punctSpace/g,ss).replace(/punct/g,kt).getRegex(),Ya=ce(/\\\\(punct)/,\"gu\").replace(/punct/g,kt).getRegex(),Ga=ce(/(`+)(?:[^`]|[^`][\\s\\S]*?[^`])\\1(?!`)|`+|\\\\(punct)/,\"gu\").replace(/punct/g,kt).getRegex(),Za=ce(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace(\"scheme\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\"email\",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ja=ce(Or).replace(\"(?:-->|$)\",\"-->\").getRegex(),Qa=ce(\"^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\").replace(\"comment\",ja).replace(\"attribute\",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/).getRegex(),Zi=/\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]/,Fs=ce(/(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/).replace(\"brackets\",Zi).getRegex(),Ja=ce(/^!?\\[(label)\\]\\([ \\t\\n]*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?[ \\t\\n]*\\)/).replace(\"label\",Fs).replace(\"href\",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/).replace(\"title\",/\"(?:\\\\[\\s\\S]|[^\"\\\\])*\"|'(?:\\\\[\\s\\S]|[^'\\\\])*'|\\((?:\\\\[\\s\\S]|[^)\\\\])*\\)/).getRegex(),Ka=ce(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",Fs).replace(\"ref\",Ir).getRegex(),el=ce(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",Ir).getRegex(),ji=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\]){1,999}/,tl=ce(/(?:[^\\[\\]\\\\`]*(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\]))){0,999}?[^\\[\\]\\\\`]*?/).replace(\"brackets\",Zi).getRegex(),sl=ce(\"reflink|nolink(?!\\\\()\",\"g\").replace(\"reflink\",ce(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",tl).replace(\"ref\",ji).getRegex()).replace(\"nolink\",ce(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",ji).getRegex()).getRegex(),Qi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rl=ce(/(?:mailto:email|xmpp:email(?:\\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),Nr={_backpedal:Vt,anyPunctuation:Ya,anyPunctuationOutsideCode:Ga,autolink:Za,blockSkip:Da,br:Wi,code:La,del:Vt,delLDelim:Vt,delRDelim:Vt,emStrongLDelim:Ba,emStrongRDelimAst:qa,emStrongRDelimUnd:za,escape:Aa,link:Ja,nolink:el,punctuation:Ia,reflink:Ka,reflinkSearch:sl,tag:Qa,text:Ra,url:Vt},il={...Nr,emStrongLDelim:Ha,emStrongRDelimAst:Va,emStrongRDelimUnd:Ua,link:ce(/^!?\\[(label)\\]\\((.*?)\\)/).replace(\"label\",Fs).getRegex(),reflink:ce(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace(\"label\",Fs).getRegex()},Dr={...Nr,emStrongRDelimAst:Fa,emStrongLDelim:$a,delLDelim:Wa,delRDelim:Xa,url:ce(/^emailProtocol|^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/).replace(\"emailProtocol\",rl).replace(\"protocol\",Qi).replace(\"email\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:ce(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|wwwStart|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))))/).replace(\"protocol\",Qi).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace(\"wwwStart\",qi?\"(?<![^\\\\s*_~(])www\\\\.\":\"www\\\\.\").getRegex()},nl={...Dr,br:ce(Wi).replace(\"{2,}\",\"*\").getRegex(),text:ce(Dr.text).replace(\"\\\\b_\",\"\\\\b_| {2,}\\\\n\").replace(/\\{2,\\}/g,\"*\").getRegex()},Vs={normal:Mr,gfm:Pa,pedantic:Ea},ys={normal:Nr,gfm:Dr,breaks:nl,pedantic:il},ol={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\"},Ji=e=>ol[e];function it(e,t){if(t){if(qe.escapeTest.test(e))return e.replace(qe.escapeReplace,Ji)}else if(qe.escapeTestNoEncode.test(e))return e.replace(qe.escapeReplaceNoEncode,Ji);return e}function al(e){return qe.numericCharacterReference.test(e)?e.replace(qe.numericCharacterReferenceOrAmpersand,(t,s,r)=>{if(s===void 0&&r===void 0)return\"&amp;\";let i=s===void 0?Number.parseInt(r,16):Number.parseInt(s,10);return i===0||i>1114111||i>=55296&&i<=57343?\"�\":i===38?\"&amp;\":String.fromCodePoint(i)}):e}function Ki(e){try{e=encodeURI(e).replace(qe.percentDecode,\"%\")}catch{return null}return e}function en(e,t){let s=e.replace(qe.findPipe,(i,n,o)=>{let c=!1,u=n;for(;--u>=0&&o[u]===\"\\\\\";)c=!c;return c?\"|\":\" |\"}).split(qe.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push(\"\");for(;r<s.length;r++)s[r]=s[r].trim().replace(qe.slashPipe,\"|\");return s}function Ct(e,t,s){let r=e.length;if(r===0)return\"\";let i=0;for(;i<r;){let n=e.charAt(r-i-1);if(n===t&&!s)i++;else if(n!==t&&s)i++;else break}return e.slice(0,r-i)}function tn(e){let t=e.split(`\n`),s=t.length-1;for(;s>=0&&qe.blankLine.test(t[s]);)s--;return t.length-s<=2?e:t.slice(0,s+1).join(`\n`)}function zs(e){return e.trim().replace(qe.multipleSpaceGlobal,\" \").toLowerCase().toUpperCase().toLowerCase()}function sn(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let s=0;for(let r=0;r<e.length;r++)if(e[r]===\"\\\\\")r++;else if(e[r]===t[0])s++;else if(e[r]===t[1]&&(s--,s<0))return r;return s>0?-2:-1}var rs=new WeakMap;function Br(e){let t={\"*\":-1,_:-1},s=-1,r=e.length;for(let i=0;i<r;i++){let n=e[i];if(n!==\"*\"&&n!==\"_\"&&n!==\"~\")continue;let o=i===0?`\n`:e[i-1],c=i+1;for(;c<r&&e[c]===n;)c++;o!==\" \"&&o!==\"\t\"&&o!==`\n`&&o!==\"\\r\"&&o!==\"\\f\"&&(n===\"~\"?s=i:t[n]=i),i=c-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:s}}function ll(e,t){let s=Br(t),r=rs.get(e);r?r.push(s):rs.set(e,[s])}function cl(e){let t=rs.get(e);t&&(t.pop(),t.length===0&&rs.delete(e))}function ul(e,t,s){let r=rs.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleEmStrongCloserIndex[s]:Br(t).lastPossibleEmStrongCloserIndex[s]}function hl(e,t){let s=rs.get(e)?.at(-1);return s&&s.maskedSrc===t?s.lastPossibleDelCloserIndex:Br(t).lastPossibleDelCloserIndex}function Us(e,t=0){let s=t,r=\"\";for(let i of e)if(i===\"\t\"){let n=4-s%4;r+=\" \".repeat(n),s+=n}else r+=i,s++;return r}function rn(e,t,s,r,i){let n=t.href,o=t.title||null,c=e[1].replace(i.other.outputLinkReplace,\"$1\"),u=e[0].charAt(0)===\"!\",h=r.state.inLink,p=r.state.linkEmitted,a=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let d=r.inlineTokens(c),l=r.state.linkEmitted;if(r.state.linkEmitted=p,r.state.inLink=h,!u){if(l){r.state.inRawBlock=a;return}r.state.linkEmitted=!0}return{type:u?\"image\":\"link\",raw:s,href:n,title:o,text:c,tokens:d}}function pl(e,t,s){let r=e.match(s.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`\n`).map(n=>{let o=n.match(s.other.beginningSpace);if(o===null)return n;let[c]=o;return n.slice(Math.min(c.length,i.length))}).join(`\n`)}function nn(e,t,s,r){if(!t.includes(\"<\"))return!1;for(let i=0;i<t.length;i++){if(t[i]===\"\\\\\"){i++;continue}if(t[i]===\"`\"){let c=r.inline.code.exec(t.slice(i));if(c){i+=c[0].length-1;continue}}if(t[i]!==\"<\")continue;let n=e.slice(s+i),o=r.inline.tag.exec(n)||r.inline.autolink.exec(n);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var is=class{constructor(e){Ee(this,\"options\",void 0),Ee(this,\"rules\",void 0),Ee(this,\"lexer\",void 0),this.options=e||Ft}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:\"space\",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let s=this.options.pedantic?t[0]:tn(t[0]);return{type:\"code\",raw:s,codeBlockStyle:\"indented\",text:s.replace(this.rules.other.codeRemoveIndent,\"\")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],r=pl(s,t[3]||\"\",this.rules);return{type:\"code\",raw:s,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,\"$1\"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(this.rules.other.endingHash.test(s)){let r=Ct(s,\"#\");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(s=r.trim())}return{type:\"heading\",raw:Ct(t[0],`\n`),depth:t[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:\"hr\",raw:Ct(t[0],`\n`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=Ct(t[0],`\n`).split(`\n`),r=\"\",i=\"\",n=[];for(;s.length>0;){let o=!1,c=[],u=0;for(;u<s.length;u++)if(this.rules.other.blockquoteStart.test(s[u]))c.push(s[u]),o=!0;else if(!o)c.push(s[u]);else break;s=s.slice(u);let h=c.join(`\n`),p=h.replace(this.rules.other.blockquoteMarkerWhitespace,(l,f,g)=>f+Us(g,f.length)).replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,\"\");r=r?`${r}\n${h}`:h,i=i?`${i}\n${p}`:p;let a=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,n,!0),this.lexer.state.top=a,s.length===0)break;let d=n.at(-1);if(d?.type===\"code\"||d?.type===\"heading\"||d?.type===\"hr\"||d?.type===\"html\"||d?.type===\"table\")break;if(d?.type===\"blockquote\"){let l=d,f=s.join(`\n`),g=l.raw+`\n`+f.replace(this.rules.other.blockquoteSetextReplace2,\"\"),v=this.blockquote(g);n[n.length-1]=v;let b=g.substring(v.raw.length).replace(/^\\n/,\"\"),S=b?b.split(`\n`).length:0,y=S?s.slice(0,-S):s;if(y.length>0&&(r=`${r}\n${y.join(`\n`)}`),i=i.substring(0,i.length-l.text.length)+v.text,s=s.slice(y.length),s.length>0&&this.rules.other.blockquoteStart.test(s[0]))continue;break}else if(d?.type===\"list\"){let l=d,f=l.raw+`\n`+s.join(`\n`),g=this.list(f);n[n.length-1]=g;let v=g.raw.length>l.raw.length?f.slice(l.raw.length+1,g.raw.length).split(`\n`).length:0;if(v>0){let b=s.slice(0,v).join(`\n`);r=`${r}\n${b}`,i=`${i}\n${b}`}s=s.slice(v);continue}}return{type:\"blockquote\",raw:r,tokens:n,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type===\"text\"&&!this.rules.other.listInterruptsParagraph.test(e))return;let s=e,r=()=>s.length-e.length,i=t[1].trim(),n=i.length>1,o={type:\"list\",raw:\"\",ordered:n,start:n?+i.slice(0,-1):\"\",loose:!1,items:[]};i=n?`\\\\d{1,9}\\\\${i.slice(-1)}`:`\\\\${i}`,this.options.pedantic&&(i=n?i:\"[*+-]\");let c=this.rules.other.listItemRegex(i),u=!1;for(;e;){let p=!1,a=\"\";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;let d=r();e=e.substring(t[0].length);let l=t[2].split(`\n`,1)[0],f=t[1].length,g=this.options.pedantic?Us(l,f):l.replace(this.rules.other.leadingSpaceTab,m=>Us(m,f)),v=e.split(`\n`,1)[0],b=!g.trim(),S=0;if(this.options.pedantic?(S=2,a=g.trimStart()):b?S=f+1:(S=g.search(this.rules.other.nonSpaceChar),S=S>4?1:S,a=g.slice(S),S+=f),b&&this.rules.other.blankLine.test(v)&&(e=e.substring(v.length+1),p=!0),!p){let m=this.rules.other.nextBulletRegex(S),_=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),w=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(S):this.rules.other.headingBeginRegex(S),C=this.rules.other.htmlBeginRegex(S),O=this.rules.other.blockquoteBeginRegex(S),E=!1;for(;e;){let A=e.split(`\n`,1)[0],P;if(v=A,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting,\" \"),P=v):P=v.replace(this.rules.other.leadingSpaceTab,B=>Us(B)),k.test(v)||w.test(v)||C.test(v)||O.test(v)||m.test(v)||_.test(v))break;if(P.search(this.rules.other.nonSpaceChar)>=S||!v.trim())a+=`\n`+P.slice(S),E=!1;else{if(b||g.replace(this.rules.other.tabCharGlobal,\" \").search(this.rules.other.nonSpaceChar)>=4||k.test(g)||w.test(g)||C.test(g)||_.test(g))break;if(!this.options.pedantic&&!E){let H=g.replace(this.rules.other.nestedContainerMarkers,\"\");if(this.rules.block.fences.test(H)||this.rules.block.heading.test(H)||this.rules.block.hr.test(H))break}let B=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(v)&&this.rules.block.lheading.test(`${g}\n${v}`)?` ${P.replace(/^ {0,3}/,\"\")}`:v;a+=`\n`+B,E=!0}b=!v.trim(),e=e.substring(A.length+1),g=P.slice(S)}}let y=s.slice(d,r());o.loose||(u?o.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(u=!0)),o.items.push({type:\"list_item\",raw:y,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=s.slice(0,r()).trimEnd();for(let p of o.items)if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),!o.loose){let a=p.tokens.filter(d=>d.type===\"space\");o.loose=a.length>0&&a.some(d=>this.rules.other.anyLine.test(d.raw))}for(let p of o.items){let a=p.tokens[0];if(p.task&&(a?.type===\"text\"||a?.type===\"paragraph\")){p.text=p.text.replace(this.rules.other.listReplaceTask,\"\"),a.raw=a.raw.replace(this.rules.other.listReplaceTask,\"\"),a.text=a.text.replace(this.rules.other.listReplaceTask,\"\");for(let l=this.lexer.inlineQueue.length-1;l>=0;l--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[l].src)){this.lexer.inlineQueue[l].src=this.lexer.inlineQueue[l].src.replace(this.rules.other.listReplaceTask,\"\");break}let d=this.rules.other.listTaskCheckbox.exec(p.raw);if(d){let l={type:\"checkbox\",raw:d[0]+\" \",checked:d[0]!==\"[ ]\"};p.checked=l.checked,o.loose?p.tokens[0]&&[\"paragraph\",\"text\"].includes(p.tokens[0].type)&&\"tokens\"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=l.raw+p.tokens[0].raw,p.tokens[0].text=l.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(l)):p.tokens.unshift({type:\"paragraph\",raw:l.raw,text:l.raw,tokens:[l]}):p.tokens.unshift(l)}}else p.task&&(p.task=!1)}if(o.loose)for(let p of o.items){p.loose=!0;for(let a of p.tokens)a.type===\"text\"&&(a.type=\"paragraph\")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let s=tn(t[0]);return{type:\"html\",block:!0,raw:s,pre:t[1]===\"pre\"||t[1]===\"script\"||t[1]===\"style\",text:s}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&sn(t[2],\"()\")!==-1)return;let s=zs(t[1]),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,\"$1\").replace(this.rules.inline.anyPunctuation,\"$1\"):\"\",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,\"$1\"):t[3];return{type:\"def\",tag:s,raw:Ct(t[0],`\n`),href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let s=en(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,\"\").split(\"|\"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,\"\").split(`\n`):[],n={type:\"table\",raw:Ct(t[0],`\n`),header:[],align:[],rows:[]};if(s.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?n.align.push(\"right\"):this.rules.other.tableAlignCenter.test(o)?n.align.push(\"center\"):this.rules.other.tableAlignLeft.test(o)?n.align.push(\"left\"):n.align.push(null);for(let o=0;o<s.length;o++)n.header.push({text:s[o],tokens:this.lexer.inline(s[o]),header:!0,align:n.align[o]});for(let o of i)n.rows.push(en(o,n.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:n.align[u]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let s=t[1].trim();return{type:\"heading\",raw:Ct(t[0],`\n`),depth:t[2].charAt(0)===\"=\"?1:2,text:s,tokens:this.lexer.inline(s)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let s=t[1].charAt(t[1].length-1)===`\n`?t[1].slice(0,-1):t[1];return{type:\"paragraph\",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:\"text\",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:\"escape\",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:\"html\",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let s=t[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&nn(e,t[1],s,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let c=Ct(r.slice(0,-1),\"\\\\\");if((r.length-c.length)%2===0)return}else{let c=sn(t[2],\"()\");if(c===-2)return;if(c>-1){let u=(t[0].indexOf(\"!\")===0?5:4)+t[1].length+c;t[2]=t[2].substring(0,c),t[0]=t[0].substring(0,u).trim(),t[3]=\"\"}}let i=Ct(t[0].slice(0,-1),\"\\\\\");if((t[0].length-i.length)%2===0)return;let n=t[2],o=\"\";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(n);c&&(n=c[1],o=c[3])}else o=t[3]?t[3].slice(1,-1):\"\";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),rn(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,\"$1\"),title:o&&o.replace(this.rules.inline.anyPunctuation,\"$1\")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){let r=s[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&nn(e,s[1],r,this.rules))return;let i=t[zs(s[2]||s[1])];if(!i){let n=s[0].charAt(0);return{type:\"text\",raw:n,text:n}}return rn(s,i,s[0],this.lexer,this.rules)}}emStrong(e,t,s=\"\"){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||!r[1]&&!r[2]&&!r[3]&&!r[4])return;let i=r[0][0],n=s===i,o=t.length-e.length,c=o;for(;!this.options.pedantic&&c>0&&t[c-1]===i;)c--;let u=[...t.slice(Math.max(0,c-2),c)].at(-1)??\"\",h=u===\"*\"||u===\"_\"||!!this.rules.inline.punctuation.exec(u);c<o&&(s=u);let p=c<o?h:s===\"*\"||s===\"_\"||!!this.rules.inline.punctuation.exec(s);if(r[4]&&s.match(this.rules.other.unicodeAlphaNumeric))return;let a=r[1]||r[3]||\"\";if(!a||!s||p){let d=[...r[0]].length-1,l,f,g=d,v=0,b=o-c+d,S=!this.options.pedantic&&!!u.trim()&&(!!a||i===\"*\"&&!h);if(i!==\"*\"&&i!==\"_\")return;let y=i===\"*\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,m=ul(this,t,i),_=t.length-e.length+d;if(m<_)return;t=t.slice(-1*e.length+d);let k=m-_;for(y.lastIndex=0;(r=y.exec(t))!==null&&!(r.index>k);){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(f=[...l].length,r[3]||r[4]){g+=f;continue}else if(r[5]||r[6]||S){if(n&&(r[5]||r[6]))break;if(b%3&&!((b+f)%3)){v+=f;continue}}if(g-=f,g>0)continue;f=Math.min(f,f+g+v);let w=[...r[0]][0].length,C=e.slice(0,d+r.index+w+f);if(Math.min(d,f)%2){let E=C.slice(1,-1);return{type:\"em\",raw:C,text:E,tokens:this.lexer.inlineTokens(E)}}let O=C.slice(2,-2);return{type:\"strong\",raw:C,text:O,tokens:this.lexer.inlineTokens(O)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal,\" \"),r=this.rules.other.nonSpaceChar.test(s),i=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return r&&i&&(s=s.substring(1,s.length-1)),{type:\"codespan\",raw:t[0],text:s}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:\"br\",raw:t[0]}}del(e,t,s=\"\"){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!s||this.rules.inline.punctuation.exec(s))){let i=[...r[0]].length-1,n,o,c=i,u=this.rules.inline.delRDelim,h=hl(this,t),p=t.length-e.length+i;if(h<p)return;t=t.slice(-1*e.length+i);let a=h-p;for(u.lastIndex=0;(r=u.exec(t))!==null&&!(r.index>a);){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(o=[...n].length,o!==i))continue;if(r[3]||r[4]){c+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c);let d=[...r[0]][0].length,l=e.slice(0,i+r.index+d+o),f=l.slice(i,-i);return{type:\"del\",raw:l,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let s,r;return t[2]===\"@\"?(s=t[1],r=\"mailto:\"+s):(s=t[1],r=s),{type:\"link\",raw:t[0],text:s,href:r,autolink:!0,tokens:[{type:\"text\",raw:s,text:s}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let s,r;if(t[2]===\"@\")s=t[0],r=\"mailto:\"+s;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??\"\";while(i!==t[0]);s=t[0],t[1]===\"www.\"?r=\"http://\"+t[0]:r=t[0]}return{type:\"link\",raw:t[0],text:s,href:r,autolink:!0,tokens:[{type:\"text\",raw:s,text:s}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let s=this.lexer.state.inRawBlock;return{type:\"text\",raw:t[0],text:s?t[0]:al(t[0]),escaped:s}}}},mt=(ts=new WeakSet,class Di{constructor(t){ga(this,ts),Ee(this,\"tokens\",void 0),Ee(this,\"options\",void 0),Ee(this,\"state\",void 0),Ee(this,\"inlineQueue\",void 0),Ee(this,\"tokenizer\",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ft,this.options.tokenizer=this.options.tokenizer||new is,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let s={other:qe,block:Vs.normal,inline:ys.normal};this.options.pedantic?(s.block=Vs.pedantic,s.inline=ys.pedantic):this.options.gfm&&(s.block=Vs.gfm,this.options.breaks?s.inline=ys.breaks:s.inline=ys.gfm),this.tokenizer.rules=s}static get rules(){return{block:Vs,inline:ys}}static lex(t,s){return new Di(s).lex(t)}static lexInline(t,s){return new Di(s).inlineTokens(t)}lex(t){t=t.replace(qe.carriageReturn,`\n`),this.blockTokens(t,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let r=this.inlineQueue[s];this.state.inRawBlock=!1,this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,s=[],r=!1){this.tokenizer.lexer=this;let i=this.state.lastToken;this.options.pedantic&&(t=t.replace(qe.tabCharGlobal,\" \").replace(qe.spaceLine,\"\"));let n=1/0;for(;t;){if(t.length<n)n=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}this.state.lastToken=s.at(-1);let o;if(this.options.extensions?.block?.some(u=>(o=u.call({lexer:this},t,s))?(t=t.substring(o.raw.length),s.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let u=s.at(-1);o.raw.length===1&&u!==void 0?u.raw+=`\n`:s.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let u=s.at(-1);u?.type===\"paragraph\"||u?.type===\"text\"?(u.raw+=(u.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,u.text+=`\n`+o.text,this.inlineQueue.at(-1).src=u.text):s.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let u=s.at(-1);u?.type===\"paragraph\"||u?.type===\"text\"?(u.raw+=(u.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,u.text+=`\n`+o.raw,this.inlineQueue.at(-1).src=u.text):(this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title}),s.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),s.push(o);continue}let c=t;if(this.options.extensions?.startBlock){let u=1/0,h=t.slice(1),p;this.options.extensions.startBlock.forEach(a=>{p=a.call({lexer:this},h),typeof p==\"number\"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let u=s.at(-1);r&&u?.type===\"paragraph\"?(u.raw+=(u.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,u.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):s.push(o),r=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let u=s.at(-1);u?.type===\"text\"?(u.raw+=(u.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,u.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):s.push(o);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=i,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}linkInText(t){if(!t.includes(\"[\"))return!1;let s=this.tokenizer.rules.inline.link;for(let r of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(s.test(r[0])&&t.charAt(r.index-1)!==\"!\")return!0;for(let r of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=r[0],n=i.lastIndexOf(\"[\");if(!(i.charAt(0)===\"!\"||!Object.hasOwn(this.tokens.links,zs(i.slice(n+1,-1))))&&!(n>1&&this.linkInText(i.slice(1,n-1))))return!0}return!1}inlineTokens(t,s=[]){this.tokenizer.lexer=this;let r=this.state.linkParenPossible;this.state.linkParenPossible=r&&t.includes(\")\");try{return Hs(ts,this,dl).call(this,t,s)}finally{this.state.linkParenPossible=r}}infiniteLoopError(t){let s=\"Infinite loop on byte: \"+t;if(this.options.silent)console.error(s);else throw new Error(s)}});function dl(e,t){let s=e.includes(\"*\")||e.includes(\"_\")||e.includes(\"~\")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==is.prototype.emStrong||this.tokenizer.del!==is.prototype.del?Hs(ts,this,ml).call(this,e):e;ll(this.tokenizer,s);try{return Hs(ts,this,fl).call(this,e,s,t)}finally{cl(this.tokenizer)}}function fl(e,t,s){let r=!1,i=\"\",n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=\"\"),r=!1;let o;if(this.options.extensions?.inline?.some(u=>(o=u.call({lexer:this},e,s))?(e=e.substring(o.raw.length),s.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let u=s.at(-1);o.type===\"text\"&&u?.type===\"text\"?(u.raw+=o.raw,u.text+=o.text):s.push(o);continue}if(o=this.tokenizer.emStrong(e,t,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.del(e,t,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),s.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),s.push(o);continue}let c=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),p;this.options.extensions.startInline.forEach(a=>{p=a.call({lexer:this},h),typeof p==\"number\"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(c=e.substring(0,u+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!==\"_\"&&(i=o.raw.slice(-1)),r=!0;let u=s.at(-1);u?.type===\"text\"?(u.raw+=o.raw,u.text+=o.text):s.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return s}function gl(e){let{blockSkip:t,tag:s,autolink:r}=this.tokenizer.rules.inline,i=\"\",n=0,o;for(t.lastIndex=0;o=t.exec(e);){let c=o.index+(o[2]?o[2].length:0),u=o.index+o[0].length;if(e.charAt(c)===\"<\"){let h=e.slice(c),p=s.exec(h)||r.exec(h);if(!p){t.lastIndex=c+1;continue}u=c+p[0].length,t.lastIndex=u}i+=e.slice(n,c)+\"[\"+\"a\".repeat(u-c-2)+\"]\",n=u}return i+e.slice(n)}function ml(e){let t=e;if(this.tokens.links&&e.includes(\"[\")){let s=this.tokenizer.rules.inline.reflinkSearch,r=i=>{let n=i.lastIndexOf(\"[\");if(!Object.hasOwn(this.tokens.links,zs(i.slice(n+1,-1))))return i;if(n>1&&i.charAt(0)!==\"!\"){let o=i.slice(1,n-1);if(this.linkInText(o))return\"[\"+o.replace(s,r)+\"][\"+\"a\".repeat(i.length-n-2)+\"]\"}return\"[\"+\"a\".repeat(i.length-2)+\"]\"};t=t.replace(s,r)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(s,r,i)=>i?\"+\".repeat(s.length):r?r+s.slice(r.length,-r.length).replace(/`/g,\"+\")+r:s),t=Hs(ts,this,gl).call(this,t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}var Ws=class{constructor(e){Ee(this,\"options\",void 0),Ee(this,\"parser\",void 0),this.options=e||Ft}space(e){return\"\"}code({text:e,lang:t,escaped:s}){let r=(t||\"\").match(qe.notSpaceStart)?.[0],i=e?e.replace(qe.endingNewline,\"\")+`\n`:\"\";return r?'<pre><code class=\"language-'+it(r)+'\">'+(s?i:it(i,!0))+`</code></pre>\n`:\"<pre><code>\"+(s?i:it(i,!0))+`</code></pre>\n`}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return\"\"}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return`<hr>\n`}list(e){let t=e.ordered,s=e.start,r=\"\";for(let o=0;o<e.items.length;o++){let c=e.items[o];r+=this.listitem(c)}let i=t?\"ol\":\"ul\",n=t&&s!==1?' start=\"'+s+'\"':\"\";return\"<\"+i+n+`>\n`+r+\"</\"+i+`>\n`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return\"<input \"+(e?'checked=\"\" ':\"\")+'disabled=\"\" type=\"checkbox\"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t=\"\",s=\"\";for(let i=0;i<e.header.length;i++)s+=this.tablecell(e.header[i]);t+=this.tablerow({text:s});let r=\"\";for(let i=0;i<e.rows.length;i++){let n=e.rows[i];s=\"\";for(let o=0;o<n.length;o++)s+=this.tablecell(n[o]);r+=this.tablerow({text:s})}return r&&(r=`<tbody>${r}</tbody>`),`<table>\n<thead>\n`+t+`</thead>\n`+r+`</table>\n`}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),s=e.header?\"th\":\"td\";return(e.align?`<${s} align=\"${e.align}\">`:`<${s}>`)+t+`</${s}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${it(e,!0)}</code>`}br(e){return\"<br>\"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:s,tokens:r,autolink:i}){let n=i?it(s,!0):this.parser.parseInline(r),o=Ki(e);if(o===null)return n;e=it(o,i);let c='<a href=\"'+e+'\"';return t&&(c+=' title=\"'+it(t)+'\"'),c+=\">\"+n+\"</a>\",c}image({href:e,title:t,text:s,tokens:r}){r&&(s=this.parser.parseInline(r,this.parser.textRenderer));let i=Ki(e);if(i===null)return it(s);e=i;let n=`<img src=\"${it(e)}\" alt=\"${it(s)}\"`;return t&&(n+=` title=\"${it(t)}\"`),n+=\">\",n}text(e){return\"tokens\"in e&&e.tokens?this.parser.parseInline(e.tokens):\"escaped\"in e&&e.escaped?e.text:it(e.text)}},$r=class{constructor(){Ee(this,\"parser\",void 0)}strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`\n`}checkbox({raw:e}){return e}},vt=class Bi{constructor(t){Ee(this,\"options\",void 0),Ee(this,\"renderer\",void 0),Ee(this,\"textRenderer\",void 0),this.options=t||Ft,this.options.renderer=this.options.renderer||new Ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $r,this.textRenderer.parser=this}static parse(t,s){return new Bi(s).parse(t)}static parseInline(t,s){return new Bi(s).parseInline(t)}parse(t){this.renderer.parser=this;let s=\"\";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let o=i,c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||![\"space\",\"hr\",\"heading\",\"code\",\"table\",\"blockquote\",\"list\",\"checkbox\",\"html\",\"def\",\"paragraph\",\"text\"].includes(o.type)){s+=c===!1?\"\":c??\"\";continue}}let n=i;switch(n.type){case\"space\":s+=this.renderer.space(n);break;case\"hr\":s+=this.renderer.hr(n);break;case\"heading\":s+=this.renderer.heading(n);break;case\"code\":s+=this.renderer.code(n);break;case\"table\":s+=this.renderer.table(n);break;case\"blockquote\":s+=this.renderer.blockquote(n);break;case\"list\":s+=this.renderer.list(n);break;case\"checkbox\":s+=this.renderer.checkbox(n);break;case\"html\":s+=this.renderer.html(n);break;case\"def\":s+=this.renderer.def(n);break;case\"paragraph\":s+=this.renderer.paragraph(n);break;case\"text\":s+=this.renderer.text(n);break;default:{let o='Token with \"'+n.type+'\" type was not found.';if(this.options.silent)return console.error(o),\"\";throw new Error(o)}}}return s}parseInline(t,s=this.renderer){this.renderer.parser=this;let r=\"\";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||![\"escape\",\"html\",\"link\",\"image\",\"checkbox\",\"strong\",\"em\",\"codespan\",\"br\",\"del\",\"text\"].includes(n.type)){r+=c===!1?\"\":c??\"\";continue}}let o=n;switch(o.type){case\"escape\":r+=s.text(o);break;case\"html\":r+=s.html(o);break;case\"link\":r+=s.link(o);break;case\"image\":r+=s.image(o);break;case\"checkbox\":r+=s.checkbox(o);break;case\"strong\":r+=s.strong(o);break;case\"em\":r+=s.em(o);break;case\"codespan\":r+=s.codespan(o);break;case\"br\":r+=s.br(o);break;case\"del\":r+=s.del(o);break;case\"text\":r+=s.text(o);break;default:{let c='Token with \"'+o.type+'\" type was not found.';if(this.options.silent)return console.error(c),\"\";throw new Error(c)}}}return r}},bs=(qs=class{constructor(e){Ee(this,\"options\",void 0),Ee(this,\"block\",void 0),this.options=e||Ft}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?mt.lex:mt.lexInline}provideParser(e=this.block){return e?vt.parse:vt.parseInline}},Ee(qs,\"passThroughHooks\",new Set([\"preprocess\",\"postprocess\",\"processAllTokens\",\"emStrongMask\"])),Ee(qs,\"passThroughHooksRespectAsync\",new Set([\"preprocess\",\"postprocess\",\"processAllTokens\"])),qs);function Ot(e,t){if(Array.isArray(t))for(let s=0;s<t.length;s++)e.push(t[s]);else e.push(t)}var vl=class{constructor(...e){Ee(this,\"defaults\",Ar()),Ee(this,\"options\",this.setOptions),Ee(this,\"parse\",this.parseMarkdown(!0)),Ee(this,\"parseInline\",this.parseMarkdown(!1)),Ee(this,\"Parser\",vt),Ee(this,\"Renderer\",Ws),Ee(this,\"TextRenderer\",$r),Ee(this,\"Lexer\",mt),Ee(this,\"Tokenizer\",is),Ee(this,\"Hooks\",bs),this.use(...e)}walkTokens(e,t){let s=[];for(let r of e)switch(Ot(s,t.call(this,r)),r.type){case\"table\":{let i=r;for(let n of i.header)Ot(s,this.walkTokens(n.tokens,t));for(let n of i.rows)for(let o of n)Ot(s,this.walkTokens(o.tokens,t));break}case\"list\":{let i=r;Ot(s,this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let o=i[n].flat(1/0);Ot(s,this.walkTokens(o,t))}):i.tokens&&Ot(s,this.walkTokens(i.tokens,t))}}return s}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(s=>{let r={...s};if(r.async=this.defaults.async||r.async||!1,s.extensions&&(s.extensions.forEach(i=>{if(!i.name)throw new Error(\"extension name required\");if(\"renderer\"in i){let n=t.renderers[i.name];n?t.renderers[i.name]=function(...o){let c=i.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:t.renderers[i.name]=i.renderer}if(\"tokenizer\"in i){if(!i.level||i.level!==\"block\"&&i.level!==\"inline\")throw new Error(\"extension level must be 'block' or 'inline'\");let n=t[i.level];n?n.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level===\"block\"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level===\"inline\"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}\"childTokens\"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),s.renderer){let i=this.defaults.renderer||new Ws(this.defaults);for(let n in s.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if([\"options\",\"parser\"].includes(n))continue;let o=n,c=s.renderer[o],u=i[o];i[o]=(...h)=>{let p=c.apply(i,h);return p===!1&&(p=u.apply(i,h)),p===!1?\"\":p??\"\"}}r.renderer=i}if(s.tokenizer){let i=this.defaults.tokenizer||new is(this.defaults);for(let n in s.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if([\"options\",\"rules\",\"lexer\"].includes(n))continue;let o=n,c=s.tokenizer[o],u=i[o];i[o]=(...h)=>{let p=c.apply(i,h);return p===!1&&(p=u.apply(i,h)),p}}r.tokenizer=i}if(s.hooks){let i=this.defaults.hooks||new bs;for(let n in s.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if([\"options\",\"block\"].includes(n))continue;let o=n,c=s.hooks[o],u=i[o];bs.passThroughHooks.has(n)?i[o]=h=>{if(i.options.async&&bs.passThroughHooksRespectAsync.has(n))return(async()=>{let a=await c.call(i,h);return u.call(i,a)})();let p=c.call(i,h);return u.call(i,p)}:i[o]=(...h)=>{if(i.options.async)return(async()=>{let a=await c.apply(i,h);return a===!1&&(a=await u.apply(i,h)),a})();let p=c.apply(i,h);return p===!1&&(p=u.apply(i,h)),p}}r.hooks=i}if(s.walkTokens){let i=this.defaults.walkTokens,n=s.walkTokens;r.walkTokens=function(o){let c=[];return Ot(c,n.call(this,o)),i&&Ot(c,i.call(this,o)),c}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return mt.lex(e,t??this.defaults)}parser(e,t){return vt.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let r={...s},i={...this.defaults,...r},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return n(new Error(\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\"));if(typeof t>\"u\"||t===null)return n(new Error(\"marked(): input parameter is undefined or null\"));if(typeof t!=\"string\")return n(new Error(\"marked(): input parameter is of type \"+Object.prototype.toString.call(t)+\", string expected\"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(t):t,c=await(i.hooks?await i.hooks.provideLexer(e):e?mt.lex:mt.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(c):c;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let h=await(i.hooks?await i.hooks.provideParser(e):e?vt.parse:vt.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(h):h})().catch(n);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer(e):e?mt.lex:mt.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let c=(i.hooks?i.hooks.provideParser(e):e?vt.parse:vt.parseInline)(o,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}catch(o){return n(o)}}}onError(e,t){return s=>{if(s.message+=`\nPlease report this to https://github.com/markedjs/marked.`,e){let r=\"<p>An error occurred:</p><pre>\"+it(s.message+\"\",!0)+\"</pre>\";return t?Promise.resolve(r):r}if(t)return Promise.reject(s);throw s}}},Ut=new vl;function Ae(e,t){return Ut.parse(e,t)}Ae.options=Ae.setOptions=function(e){return Ut.setOptions(e),Ae.defaults=Ut.defaults,Hi(Ae.defaults),Ae},Ae.getDefaults=Ar,Ae.defaults=Ft;function yl(...e){return Ut.use(...e),Ae.defaults=Ut.defaults,Hi(Ae.defaults),Ae}Ae.use=yl,Ae.walkTokens=function(e,t){return Ut.walkTokens(e,t)},Ae.parseInline=Ut.parseInline,Ae.Parser=vt,Ae.parser=vt.parse,Ae.Renderer=Ws,Ae.TextRenderer=$r,Ae.Lexer=mt,Ae.lexer=mt.lex,Ae.Tokenizer=is,Ae.Hooks=bs,Ae.parse=Ae;var th=Ae.options,sh=Ae.setOptions,rh=Ae.walkTokens,Hr=Ae.parseInline,qr=Ae,ih=vt.parse,nh=mt.lex,Ze=ue((e=>{e.__esModule=!0,e.extend=n,e.indexOf=h,e.escapeExpression=p,e.isEmpty=a,e.createFrame=d,e.blockParams=l,e.appendContextPath=f;var t={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#x27;\",\"`\":\"&#x60;\",\"=\":\"&#x3D;\"},s=/[&<>\"'`=]/g,r=/[&<>\"'`=]/;function i(g){return t[g]}function n(g){for(var v=1;v<arguments.length;v++)for(var b in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],b)&&(g[b]=arguments[v][b]);return g}var o=Object.prototype.toString;e.toString=o;var c=function(v){return typeof v==\"function\"};c(/x/)&&(e.isFunction=c=function(g){return typeof g==\"function\"&&o.call(g)===\"[object Function]\"}),e.isFunction=c;var u=Array.isArray||function(g){return g&&typeof g==\"object\"?o.call(g)===\"[object Array]\":!1};e.isArray=u;function h(g,v){for(var b=0,S=g.length;b<S;b++)if(g[b]===v)return b;return-1}function p(g){if(typeof g!=\"string\"){if(g&&typeof g.toHTML==\"function\")return g.toHTML();if(g==null)return\"\";if(!g)return g+\"\";g=\"\"+g}return r.test(g)?g.replace(s,i):g}function a(g){return!g&&g!==0?!0:!!(u(g)&&g.length===0)}function d(g){var v=n({},g);return v._parent=g,v}function l(g,v){return g.path=v,g}function f(g,v){return(g?g+\".\":\"\")+v}})),yt=ue(((e,t)=>{e.__esModule=!0;var s=[\"description\",\"fileName\",\"lineNumber\",\"endLineNumber\",\"message\",\"name\",\"number\",\"stack\"];function r(i,n){var o=n&&n.loc,c=void 0,u=void 0,h=void 0,p=void 0;o&&o.start&&(c=o.start.line,h=o.start.column,o.end&&(u=o.end.line,p=o.end.column),i+=\" - \"+c+\":\"+h);for(var a=Error.prototype.constructor.call(this,i),d=0;d<s.length;d++)this[s[d]]=a[s[d]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{o&&(this.lineNumber=c,this.endLineNumber=u,Object.defineProperty?(Object.defineProperty(this,\"column\",{value:h,enumerable:!0}),Object.defineProperty(this,\"endColumn\",{value:p,enumerable:!0})):(this.column=h,this.endColumn=p))}catch{}}r.prototype=new Error,e.default=r,t.exports=e.default})),bl=ue(((e,t)=>{e.__esModule=!0;var s=Ze();e.default=function(r){r.registerHelper(\"blockHelperMissing\",function(i,n){var o=n.inverse,c=n.fn;if(i===!0)return c(this);if(i===!1||i==null)return o(this);if(s.isArray(i))return i.length>0?(n.ids&&(n.ids=[n.name]),r.helpers.each(i,n)):o(this);if(n.data&&n.ids){var u=s.createFrame(n.data);u.contextPath=s.appendContextPath(n.data.contextPath,n.name),n={data:u}}return c(i,n)})},t.exports=e.default})),_l=ue(((e,t)=>{e.__esModule=!0;function s(o){return o&&o.__esModule?o:{default:o}}var r=Ze(),i=s(yt());function n(o){try{var c=o.return;r.isFunction(c)&&c.call(o)}catch{}}e.default=function(o){o.registerHelper(\"each\",function(c,u){if(!u)throw new i.default(\"Must pass iterator to #each\");var h=u.fn,p=u.inverse,a=0,d=\"\",l=void 0,f=void 0;u.data&&u.ids&&(f=r.appendContextPath(u.data.contextPath,u.ids[0])+\".\"),r.isFunction(c)&&(c=c.call(this)),u.data&&(l=r.createFrame(u.data));function g(m,_,k,w){l&&(l.key=m,l.index=_,l.first=_===0,l.last=!!k,f&&(l.contextPath=f+m)),d=d+h(w,{data:l,blockParams:r.blockParams([w,m],[f+m,null])})}if(c&&typeof c==\"object\")if(r.isArray(c))for(var v=c.length;a<v;a++)a in c&&g(a,a,a===c.length-1,c[a]);else if(typeof Symbol==\"function\"&&c[Symbol.iterator])for(var b=c[Symbol.iterator](),S=b.next();!S.done;){var y=b.next();try{g(a,a,y.done,S.value)}catch(m){throw y.done||n(b),m}S=y,a++}else(function(){var m=void 0;Object.keys(c).forEach(function(_){m!==void 0&&g(m,a-1,!1,c[m]),m=_,a++}),m!==void 0&&g(m,a-1,!0,c[m])})();return a===0&&(d=p(this)),d})},t.exports=e.default})),Sl=ue(((e,t)=>{e.__esModule=!0;function s(i){return i&&i.__esModule?i:{default:i}}var r=s(yt());e.default=function(i){i.registerHelper(\"helperMissing\",function(){if(arguments.length!==1)throw new r.default('Missing helper: \"'+arguments[arguments.length-1].name+'\"')})},t.exports=e.default})),kl=ue(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=Ze(),i=s(yt());e.default=function(n){n.registerHelper(\"if\",function(o,c){if(arguments.length!=2)throw new i.default(\"#if requires exactly one argument\");return r.isFunction(o)&&(o=o.call(this)),!c.hash.includeZero&&!o||r.isEmpty(o)?c.inverse(this):c.fn(this)}),n.registerHelper(\"unless\",function(o,c){if(arguments.length!=2)throw new i.default(\"#unless requires exactly one argument\");return n.helpers.if.call(this,o,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},t.exports=e.default})),wl=ue(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper(\"log\",function(){for(var r=[void 0],i=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)r.push(arguments[n]);var o=1;i.hash.level!=null?o=i.hash.level:i.data&&i.data.level!=null&&(o=i.data.level),r[0]=o,s.log.apply(s,r)})},t.exports=e.default})),xl=ue(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper(\"lookup\",function(r,i,n){return r&&n.lookupProperty(r,i)})},t.exports=e.default})),Tl=ue(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=Ze(),i=s(yt());e.default=function(n){n.registerHelper(\"with\",function(o,c){if(arguments.length!=2)throw new i.default(\"#with requires exactly one argument\");r.isFunction(o)&&(o=o.call(this));var u=c.fn;if(r.isEmpty(o))return c.inverse(this);var h=c.data;return c.data&&c.ids&&(h=r.createFrame(c.data),h.contextPath=r.appendContextPath(c.data.contextPath,c.ids[0])),u(o,{data:h,blockParams:r.blockParams([o],[h&&h.contextPath])})})},t.exports=e.default})),on=ue((e=>{e.__esModule=!0,e.registerDefaultHelpers=h,e.moveHelperToHooks=p;function t(a){return a&&a.__esModule?a:{default:a}}var s=t(bl()),r=t(_l()),i=t(Sl()),n=t(kl()),o=t(wl()),c=t(xl()),u=t(Tl());function h(a){s.default(a),r.default(a),i.default(a),n.default(a),o.default(a),c.default(a),u.default(a)}function p(a,d,l){a.helpers[d]&&(a.hooks[d]=a.helpers[d],l||(a.helpers[d]=void 0))}})),Cl=ue(((e,t)=>{e.__esModule=!0;var s=Ze();e.default=function(r){r.registerDecorator(\"inline\",function(i,n,o,c){var u=i;return n.partials||(n.partials={},u=function(h,p){var a=o.partials;o.partials=s.extend({},a,n.partials);var d=i(h,p);return o.partials=a,d}),n.partials[c.args[0]]=c.fn,u})},t.exports=e.default})),Pl=ue((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;function t(i){return i&&i.__esModule?i:{default:i}}var s=t(Cl());function r(i){s.default(i)}})),an=ue(((e,t)=>{e.__esModule=!0;var s=Ze(),r={methodMap:[\"debug\",\"info\",\"warn\",\"error\"],level:\"info\",lookupLevel:function(n){if(typeof n==\"string\"){var o=s.indexOf(r.methodMap,n.toLowerCase());o>=0?n=o:n=parseInt(n,10)}return n},log:function(n){if(n=r.lookupLevel(n),typeof console<\"u\"&&r.lookupLevel(r.level)<=n){var o=r.methodMap[n];console[o]||(o=\"log\");for(var c=arguments.length,u=Array(c>1?c-1:0),h=1;h<c;h++)u[h-1]=arguments[h];console[o].apply(console,u)}}};e.default=r,t.exports=e.default})),ln=ue((e=>{e.__esModule=!0,e.createProtoAccessControl=n,e.resultIsAllowed=o,e.isPrototypeConstructor=c,e.resetLoggedProperties=p;function t(a){return a&&a.__esModule?a:{default:a}}var s=Ze(),r=t(an()),i=Object.create(null);function n(a){var d=Object.create(null);d.__proto__=!1,s.extend(d,a.allowedProtoProperties);var l=Object.create(null);return l.constructor=!1,l.__defineGetter__=!1,l.__defineSetter__=!1,l.__lookupGetter__=!1,l.__lookupSetter__=!1,s.extend(l,a.allowedProtoMethods),{properties:{whitelist:d,defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l,defaultValue:a.allowProtoMethodsByDefault}}}function o(a,d,l){return u(typeof a==\"function\"?d.methods:d.properties,l)}function c(a,d,l){return d===\"constructor\"&&typeof l==\"function\"&&a===l.prototype}function u(a,d){return a.whitelist[d]!==void 0?a.whitelist[d]===!0:a.defaultValue!==void 0?a.defaultValue:(h(d),!1)}function h(a){i[a]!==!0&&(i[a]=!0,r.default.log(\"error\",'Handlebars: Access has been denied to resolve the property \"'+a+`\" because it is not an \"own property\" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function p(){Object.keys(i).forEach(function(a){delete i[a]})}})),Fr=ue((e=>{e.__esModule=!0,e.HandlebarsEnvironment=l;function t(g){return g&&g.__esModule?g:{default:g}}var s=Ze(),r=t(yt()),i=on(),n=Pl(),o=t(an()),c=ln(),u=\"4.7.10\";e.VERSION=u;var h=8;e.COMPILER_REVISION=h;var p=7;e.LAST_COMPATIBLE_COMPILER_REVISION=p;var a={1:\"<= 1.0.rc.2\",2:\"== 1.0.0-rc.3\",3:\"== 1.0.0-rc.4\",4:\"== 1.x.x\",5:\"== 2.0.0-alpha.x\",6:\">= 2.0.0-beta.1\",7:\">= 4.0.0 <4.3.0\",8:\">= 4.3.0\"};e.REVISION_CHANGES=a;var d=\"[object Object]\";function l(g,v,b){this.helpers=g||{},this.partials=v||{},this.decorators=b||{},i.registerDefaultHelpers(this),n.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:o.default,log:o.default.log,registerHelper:function(v,b){if(s.toString.call(v)===d){if(b)throw new r.default(\"Arg not supported with multiple helpers\");s.extend(this.helpers,v)}else this.helpers[v]=b},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,b){if(s.toString.call(v)===d)s.extend(this.partials,v);else{if(typeof b>\"u\")throw new r.default('Attempting to register a partial called \"'+v+'\" as undefined');this.partials[v]=b}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,b){if(s.toString.call(v)===d){if(b)throw new r.default(\"Arg not supported with multiple decorators\");s.extend(this.decorators,v)}else this.decorators[v]=b},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var f=o.default.log;e.log=f,e.createFrame=s.createFrame,e.logger=o.default})),El=ue(((e,t)=>{e.__esModule=!0;function s(r){this.string=r}s.prototype.toString=s.prototype.toHTML=function(){return\"\"+this.string},e.default=s,t.exports=e.default})),Al=ue((e=>{e.__esModule=!0,e.wrapHelper=t;function t(s,r){return typeof s!=\"function\"?s:function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=r(n),s.apply(this,arguments)}}})),Ll=ue((e=>{e.__esModule=!0,e.checkRevision=h,e.template=p,e.wrapProgram=a,e.resolvePartial=d,e.invokePartial=l,e.noop=f;function t(m){return m&&m.__esModule?m:{default:m}}function s(m){if(m&&m.__esModule)return m;var _={};if(m!=null)for(var k in m)Object.prototype.hasOwnProperty.call(m,k)&&(_[k]=m[k]);return _.default=m,_}var r=s(Ze()),i=t(yt()),n=Fr(),o=on(),c=Al(),u=ln();function h(m){var _=m&&m[0]||1,k=n.COMPILER_REVISION;if(!(_>=n.LAST_COMPATIBLE_COMPILER_REVISION&&_<=n.COMPILER_REVISION))if(_<n.LAST_COMPATIBLE_COMPILER_REVISION){var w=n.REVISION_CHANGES[k],C=n.REVISION_CHANGES[_];throw new i.default(\"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (\"+w+\") or downgrade your runtime to an older version (\"+C+\").\")}else throw new i.default(\"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (\"+m[1]+\").\")}function p(m,_){if(!_)throw new i.default(\"No environment passed to template\");if(!m||!m.main)throw new i.default(\"Unknown template object: \"+typeof m);m.main.decorator=m.main_d,_.VM.checkRevision(m.compiler);var k=m.compiler&&m.compiler[0]===7;function w(E,A,P){P.hash&&(A=r.extend({},A,P.hash),P.ids&&(P.ids[0]=!0)),E=_.VM.resolvePartial.call(this,E,A,P),P.hooks=this.hooks,P.protoAccessControl=this.protoAccessControl;var B=_.VM.invokePartial.call(this,E,A,P);if(B==null&&r.isFunction(E))throw new i.default(\"The partial \"+P.name+\" returned no output: partials must return a string\");if(B==null&&_.compile){if(typeof E!=\"string\")throw new i.default(\"The partial \"+P.name+\" could not be compiled: partials must be strings or functions returning strings\");P.partials[P.name]=_.compile(E,m.compilerOptions,_),B=P.partials[P.name](A,P)}if(B!=null){if(P.indent){for(var H=B.split(`\n`),z=0,T=H.length;z<T&&!(!H[z]&&z+1===T);z++)H[z]=P.indent+H[z];B=H.join(`\n`)}return B}else throw new i.default(\"The partial \"+P.name+\" could not be compiled when running in runtime-only mode\")}var C={strict:function(A,P,B){if(!A||!(P in A))throw new i.default('\"'+P+'\" not defined in '+A,{loc:B});return C.lookupProperty(A,P)},lookupProperty:function(A,P){var B=A[P];if(B==null||Object.prototype.hasOwnProperty.call(A,P)&&!u.isPrototypeConstructor(A,P,B)||u.resultIsAllowed(B,C.protoAccessControl,P))return B},lookup:function(A,P){for(var B=A.length,H=0;H<B;H++){var z=A[H]&&C.lookupProperty(A[H],P);if(z!=null)return z}},lambda:function(A,P){return typeof A==\"function\"?A.call(P):A},escapeExpression:r.escapeExpression,invokePartial:w,fn:function(A){var P=m[A];return P.decorator=m[A+\"_d\"],P},programs:[],program:function(A,P,B,H,z){var T=this.programs[A],M=this.fn(A);return P||z||H||B?T=a(this,A,M,P,B,H,z):T||(T=this.programs[A]=a(this,A,M)),T},data:function(A,P){for(;A&&P--;)A=A._parent;return A},mergeIfNeeded:function(A,P){var B=A||P;return A&&P&&A!==P&&(B=r.extend({},P,A)),B},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:m.compiler};function O(E){var A=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],P=A.data;O._setup(A),!A.partial&&m.useData&&(P=v(E,P));var B=void 0,H=m.useBlockParams?[]:void 0;m.useDepths&&(A.depths?B=E!=A.depths[0]?[E].concat(A.depths):A.depths:B=[E]);function z(T){return\"\"+m.main(C,T,C.helpers,C.partials,P,H,B)}return z=b(m.main,z,C,A.depths||[],P,H),z(E,A)}return O.isTop=!0,O._setup=function(E){if(E.partial)C.protoAccessControl=E.protoAccessControl,C.helpers=E.helpers,C.partials=E.partials,C.decorators=E.decorators,C.hooks=E.hooks;else{var A={};S(A,_.helpers,C),S(A,E.helpers,C),C.helpers=A,m.usePartial&&(C.partials=C.mergeIfNeeded(E.partials,_.partials)),(m.usePartial||m.useDecorators)&&(C.decorators=r.extend({},_.decorators,E.decorators)),C.hooks={},C.protoAccessControl=u.createProtoAccessControl(E);var P=E.allowCallsToHelperMissing||k;o.moveHelperToHooks(C,\"helperMissing\",P),o.moveHelperToHooks(C,\"blockHelperMissing\",P)}},O._child=function(E,A,P,B){if(m.useBlockParams&&!P)throw new i.default(\"must pass block params\");if(m.useDepths&&!B)throw new i.default(\"must pass parent depths\");return a(C,E,m[E],A,0,P,B)},O}function a(m,_,k,w,C,O,E){function A(P){var B=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],H=E;return E&&P!=E[0]&&!(P===m.nullContext&&E[0]===null)&&(H=[P].concat(E)),k(m,P,m.helpers,m.partials,B.data||w,O&&[B.blockParams].concat(O),H)}return A=b(k,A,m,E,w,O),A.program=_,A.depth=E?E.length:0,A.blockParams=C||0,A}function d(m,_,k){return m?typeof m!=\"function\"&&!k.name&&(k.name=m,m=g(k.partials,m)):k.name===\"@partial-block\"?m=g(k.data,\"partial-block\"):m=g(k.partials,k.name),m}function l(m,_,k){var w=g(k.data,\"partial-block\");k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var C=void 0;if(k.fn&&k.fn!==f&&(function(){k.data=n.createFrame(k.data);var O=k.fn;C=k.data[\"partial-block\"]=function(A){var P=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return P.data=n.createFrame(P.data),P.data[\"partial-block\"]=w,O(A,P)},O.partials&&(k.partials=r.extend({},k.partials,O.partials))})(),m===void 0&&C&&(m=C),m===void 0)throw new i.default(\"The partial \"+k.name+\" could not be found\");if(m instanceof Function)return m(_,k)}function f(){return\"\"}function g(m,_){if(m&&Object.prototype.hasOwnProperty.call(m,_))return m[_]}function v(m,_){return(!_||!(\"root\"in _))&&(_=_?n.createFrame(_):{},_.root=m),_}function b(m,_,k,w,C,O){if(m.decorator){var E={};_=m.decorator(_,E,k,w&&w[0],C,O,w),r.extend(_,E)}return _}function S(m,_,k){_&&Object.keys(_).forEach(function(w){var C=_[w];m[w]=y(C,k)})}function y(m,_){var k=_.lookupProperty;return c.wrapHelper(m,function(w){return w.lookupProperty=k,w})}})),cn=ue(((e,t)=>{e.__esModule=!0,e.default=function(s){(function(){typeof globalThis!=\"object\"&&(Object.prototype.__defineGetter__(\"__magic__\",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var r=globalThis.Handlebars;s.noConflict=function(){return globalThis.Handlebars===s&&(globalThis.Handlebars=r),s}},t.exports=e.default})),Rl=ue(((e,t)=>{e.__esModule=!0;function s(d){return d&&d.__esModule?d:{default:d}}function r(d){if(d&&d.__esModule)return d;var l={};if(d!=null)for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(l[f]=d[f]);return l.default=d,l}var i=r(Fr()),n=s(El()),o=s(yt()),c=r(Ze()),u=r(Ll()),h=s(cn());function p(){var d=new i.HandlebarsEnvironment;return c.extend(d,i),d.SafeString=n.default,d.Exception=o.default,d.Utils=c,d.escapeExpression=c.escapeExpression,d.VM=u,d.template=function(l){return u.template(l,d)},d}var a=p();a.create=p,h.default(a),a.default=a,e.default=a,t.exports=e.default})),un=ue(((e,t)=>{e.__esModule=!0;var s={helpers:{helperExpression:function(i){return i.type===\"SubExpression\"||(i.type===\"MustacheStatement\"||i.type===\"BlockStatement\")&&!!(i.params&&i.params.length||i.hash)},scopedId:function(i){return/^\\.|this\\b/.test(i.original)},simpleId:function(i){return i.parts.length===1&&!s.helpers.scopedId(i)&&!i.depth}}};e.default=s,t.exports=e.default})),Il=ue(((e,t)=>{e.__esModule=!0;var s=(function(){var r={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:\"error\",5:\"EOF\",14:\"COMMENT\",15:\"CONTENT\",18:\"END_RAW_BLOCK\",19:\"OPEN_RAW_BLOCK\",23:\"CLOSE_RAW_BLOCK\",29:\"OPEN_BLOCK\",33:\"CLOSE\",34:\"OPEN_INVERSE\",39:\"OPEN_INVERSE_CHAIN\",44:\"INVERSE\",47:\"OPEN_ENDBLOCK\",48:\"OPEN\",51:\"OPEN_UNESCAPED\",54:\"CLOSE_UNESCAPED\",55:\"OPEN_PARTIAL\",60:\"OPEN_PARTIAL_BLOCK\",65:\"OPEN_SEXPR\",68:\"CLOSE_SEXPR\",72:\"ID\",73:\"EQUALS\",75:\"OPEN_BLOCK_PARAMS\",77:\"CLOSE_BLOCK_PARAMS\",80:\"STRING\",81:\"NUMBER\",82:\"BOOLEAN\",83:\"UNDEFINED\",84:\"NULL\",85:\"DATA\",87:\"SEP\"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,c,u,h,p,a,d){var l=a.length-1;switch(p){case 1:return a[l-1];case 2:this.$=h.prepareProgram(a[l]);break;case 3:this.$=a[l];break;case 4:this.$=a[l];break;case 5:this.$=a[l];break;case 6:this.$=a[l];break;case 7:this.$=a[l];break;case 8:this.$=a[l];break;case 9:this.$={type:\"CommentStatement\",value:h.stripComment(a[l]),strip:h.stripFlags(a[l],a[l]),loc:h.locInfo(this._$)};break;case 10:this.$={type:\"ContentStatement\",original:a[l],value:a[l],loc:h.locInfo(this._$)};break;case 11:this.$=h.prepareRawBlock(a[l-2],a[l-1],a[l],this._$);break;case 12:this.$={path:a[l-3],params:a[l-2],hash:a[l-1]};break;case 13:this.$=h.prepareBlock(a[l-3],a[l-2],a[l-1],a[l],!1,this._$);break;case 14:this.$=h.prepareBlock(a[l-3],a[l-2],a[l-1],a[l],!0,this._$);break;case 15:this.$={open:a[l-5],path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:h.stripFlags(a[l-5],a[l])};break;case 16:this.$={path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:h.stripFlags(a[l-5],a[l])};break;case 17:this.$={path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:h.stripFlags(a[l-5],a[l])};break;case 18:this.$={strip:h.stripFlags(a[l-1],a[l-1]),program:a[l]};break;case 19:var f=h.prepareBlock(a[l-2],a[l-1],a[l],a[l],!1,this._$),g=h.prepareProgram([f],a[l-1].loc);g.chained=!0,this.$={strip:a[l-2].strip,program:g,chain:!0};break;case 20:this.$=a[l];break;case 21:this.$={path:a[l-1],strip:h.stripFlags(a[l-2],a[l])};break;case 22:this.$=h.prepareMustache(a[l-3],a[l-2],a[l-1],a[l-4],h.stripFlags(a[l-4],a[l]),this._$);break;case 23:this.$=h.prepareMustache(a[l-3],a[l-2],a[l-1],a[l-4],h.stripFlags(a[l-4],a[l]),this._$);break;case 24:this.$={type:\"PartialStatement\",name:a[l-3],params:a[l-2],hash:a[l-1],indent:\"\",strip:h.stripFlags(a[l-4],a[l]),loc:h.locInfo(this._$)};break;case 25:this.$=h.preparePartialBlock(a[l-2],a[l-1],a[l],this._$);break;case 26:this.$={path:a[l-3],params:a[l-2],hash:a[l-1],strip:h.stripFlags(a[l-4],a[l])};break;case 27:this.$=a[l];break;case 28:this.$=a[l];break;case 29:this.$={type:\"SubExpression\",path:a[l-3],params:a[l-2],hash:a[l-1],loc:h.locInfo(this._$)};break;case 30:this.$={type:\"Hash\",pairs:a[l],loc:h.locInfo(this._$)};break;case 31:this.$={type:\"HashPair\",key:h.id(a[l-2]),value:a[l],loc:h.locInfo(this._$)};break;case 32:this.$=h.id(a[l-1]);break;case 33:this.$=a[l];break;case 34:this.$=a[l];break;case 35:this.$={type:\"StringLiteral\",value:a[l],original:a[l],loc:h.locInfo(this._$)};break;case 36:this.$={type:\"NumberLiteral\",value:Number(a[l]),original:Number(a[l]),loc:h.locInfo(this._$)};break;case 37:this.$={type:\"BooleanLiteral\",value:a[l]===\"true\",original:a[l]===\"true\",loc:h.locInfo(this._$)};break;case 38:this.$={type:\"UndefinedLiteral\",original:void 0,value:void 0,loc:h.locInfo(this._$)};break;case 39:this.$={type:\"NullLiteral\",original:null,value:null,loc:h.locInfo(this._$)};break;case 40:this.$=a[l];break;case 41:this.$=a[l];break;case 42:this.$=h.preparePath(!0,a[l],this._$);break;case 43:this.$=h.preparePath(!1,a[l],this._$);break;case 44:a[l-2].push({part:h.id(a[l]),original:a[l],separator:a[l-1]}),this.$=a[l-2];break;case 45:this.$=[{part:h.id(a[l]),original:a[l]}];break;case 46:this.$=[];break;case 47:a[l-1].push(a[l]);break;case 48:this.$=[];break;case 49:a[l-1].push(a[l]);break;case 50:this.$=[];break;case 51:a[l-1].push(a[l]);break;case 58:this.$=[];break;case 59:a[l-1].push(a[l]);break;case 64:this.$=[];break;case 65:a[l-1].push(a[l]);break;case 70:this.$=[];break;case 71:a[l-1].push(a[l]);break;case 78:this.$=[];break;case 79:a[l-1].push(a[l]);break;case 82:this.$=[];break;case 83:a[l-1].push(a[l]);break;case 86:this.$=[];break;case 87:a[l-1].push(a[l]);break;case 90:this.$=[];break;case 91:a[l-1].push(a[l]);break;case 94:this.$=[];break;case 95:a[l-1].push(a[l]);break;case 98:this.$=[a[l]];break;case 99:a[l-1].push(a[l]);break;case 100:this.$=[a[l]];break;case 101:a[l-1].push(a[l])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,c){throw new Error(o)},parse:function(o){var c=this,u=[0],h=[null],p=[],a=this.table,d=\"\",l=0,f=0,g=0;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>\"u\"&&(this.lexer.yylloc={});var v=this.lexer.yylloc;p.push(v);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError==\"function\"&&(this.parseError=this.yy.parseError);function S(){var H=c.lexer.lex()||1;return typeof H!=\"number\"&&(H=c.symbols_[H]||H),H}for(var y,m,_,k,w,C={},O,E,A,P;;){if(_=u[u.length-1],this.defaultActions[_]?k=this.defaultActions[_]:((y===null||typeof y>\"u\")&&(y=S()),k=a[_]&&a[_][y]),typeof k>\"u\"||!k.length||!k[0]){var B=\"\";if(!g){P=[];for(O in a[_])this.terminals_[O]&&O>2&&P.push(\"'\"+this.terminals_[O]+\"'\");this.lexer.showPosition?B=\"Parse error on line \"+(l+1)+`:\n`+this.lexer.showPosition()+`\nExpecting `+P.join(\", \")+\", got '\"+(this.terminals_[y]||y)+\"'\":B=\"Parse error on line \"+(l+1)+\": Unexpected \"+(y==1?\"end of input\":\"'\"+(this.terminals_[y]||y)+\"'\"),this.parseError(B,{text:this.lexer.match,token:this.terminals_[y]||y,line:this.lexer.yylineno,loc:v,expected:P})}}if(k[0]instanceof Array&&k.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+_+\", token: \"+y);switch(k[0]){case 1:u.push(y),h.push(this.lexer.yytext),p.push(this.lexer.yylloc),u.push(k[1]),y=null,m?(y=m,m=null):(f=this.lexer.yyleng,d=this.lexer.yytext,l=this.lexer.yylineno,v=this.lexer.yylloc,g>0&&g--);break;case 2:if(E=this.productions_[k[1]][1],C.$=h[h.length-E],C._$={first_line:p[p.length-(E||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(E||1)].first_column,last_column:p[p.length-1].last_column},b&&(C._$.range=[p[p.length-(E||1)].range[0],p[p.length-1].range[1]]),w=this.performAction.call(C,d,f,l,this.yy,k[1],h,p),typeof w<\"u\")return w;E&&(u=u.slice(0,-1*E*2),h=h.slice(0,-1*E),p=p.slice(0,-1*E)),u.push(this.productions_[k[1]][0]),h.push(C.$),p.push(C._$),A=a[u[u.length-2]][u[u.length-1]],u.push(A);break;case 3:return!0}}return!0}};r.lexer=(function(){var n={EOF:1,parseError:function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);else throw new Error(c)},setInput:function(c){return this._input=c,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=\"\",this.conditionStack=[\"INITIAL\"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var c=this._input[0];return this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c,c.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},unput:function(c){var u=c.length,h=c.split(/(?:\\r\\n?|\\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u-1),this.offset-=u;var p=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-u]),this},more:function(){return this._more=!0,this},less:function(c){this.unput(this.match.slice(c))},pastInput:function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?\"...\":\"\")+c.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var c=this.pastInput(),u=new Array(c.length+1).join(\"-\");return c+this.upcomingInput()+`\n`+u+\"^\"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,u,h,p,a;this._more||(this.yytext=\"\",this.match=\"\");for(var d=this._currentRules(),l=0;l<d.length&&(h=this._input.match(this.rules[d[l]]),!(h&&(!u||h[0].length>u[0].length)&&(u=h,p=l,!this.options.flex)));l++);return u?(a=u[0].match(/(?:\\r\\n?|\\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],c=this.performAction.call(this,this.yy,this,d[p],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c||void 0):this._input===\"\"?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){var c=this.next();return typeof c<\"u\"?c:this.lex()},begin:function(c){this.conditionStack.push(c)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(c){this.begin(c)}};return n.options={},n.performAction=function(c,u,h,p){function a(d,l){return u.yytext=u.yytext.substring(d,u.yyleng-l+d)}switch(h){case 0:if(u.yytext.slice(-2)===\"\\\\\\\\\"?(a(0,1),this.begin(\"mu\")):u.yytext.slice(-1)===\"\\\\\"?(a(0,1),this.begin(\"emu\")):this.begin(\"mu\"),u.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(\"raw\"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===\"raw\"?15:(a(5,9),\"END_RAW_BLOCK\");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(\"raw\"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(u.yytext),this.popState(),this.begin(\"com\");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return u.yytext=a(1,2).replace(/\\\\\"/g,'\"'),80;case 32:return u.yytext=a(1,2).replace(/\\\\'/g,\"'\"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return u.yytext=u.yytext.replace(/\\\\([\\\\\\]])/g,\"$1\"),72;case 43:return\"INVALID\";case 44:return 5}},n.rules=[/^(?:[^\\x00]*?(?=(\\{\\{)))/,/^(?:[^\\x00]+)/,/^(?:[^\\x00]{2,}?(?=(\\{\\{|\\\\\\{\\{|\\\\\\\\\\{\\{|$)))/,/^(?:\\{\\{\\{\\{(?=[^\\/]))/,/^(?:\\{\\{\\{\\{\\/[^\\s!\"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=[=}\\s\\/.])\\}\\}\\}\\})/,/^(?:[^\\x00]+?(?=(\\{\\{\\{\\{)))/,/^(?:[\\s\\S]*?--(~)?\\}\\})/,/^(?:\\()/,/^(?:\\))/,/^(?:\\{\\{\\{\\{)/,/^(?:\\}\\}\\}\\})/,/^(?:\\{\\{(~)?>)/,/^(?:\\{\\{(~)?#>)/,/^(?:\\{\\{(~)?#\\*?)/,/^(?:\\{\\{(~)?\\/)/,/^(?:\\{\\{(~)?\\^\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\s*else\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\^)/,/^(?:\\{\\{(~)?\\s*else\\b)/,/^(?:\\{\\{(~)?\\{)/,/^(?:\\{\\{(~)?&)/,/^(?:\\{\\{(~)?!--)/,/^(?:\\{\\{(~)?![\\s\\S]*?\\}\\})/,/^(?:\\{\\{(~)?\\*?)/,/^(?:=)/,/^(?:\\.\\.)/,/^(?:\\.(?=([=~}\\s\\/.)|])))/,/^(?:[\\/.])/,/^(?:\\s+)/,/^(?:\\}(~)?\\}\\})/,/^(?:(~)?\\}\\})/,/^(?:\"(\\\\[\"]|[^\"])*\")/,/^(?:'(\\\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\\s)])))/,/^(?:false(?=([~}\\s)])))/,/^(?:undefined(?=([~}\\s)])))/,/^(?:null(?=([~}\\s)])))/,/^(?:-?[0-9]+(?:\\.[0-9]+)?(?=([~}\\s)])))/,/^(?:as\\s+\\|)/,/^(?:\\|)/,/^(?:([^\\s!\"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=([=~}\\s\\/.)|]))))/,/^(?:\\[(\\\\\\]|[^\\]])*\\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i})();e.default=s,t.exports=e.default})),hn=ue((e=>{e.__esModule=!0;var t=[\"Program\",\"BlockStatement\",\"DecoratorBlock\",\"PartialStatement\",\"PartialBlockStatement\",\"Decorator\",\"MustacheStatement\",\"ContentStatement\",\"CommentStatement\",\"SubExpression\",\"PathExpression\",\"StringLiteral\",\"NumberLiteral\",\"BooleanLiteral\",\"UndefinedLiteral\",\"NullLiteral\",\"Hash\",\"HashPair\"];e.NODE_TYPES=t})),pn=ue(((e,t)=>{e.__esModule=!0;function s(a){return a&&a.__esModule?a:{default:a}}var r=s(yt()),i=Ze(),n=hn();function o(){this.parents=[]}function c(a,d){return i.indexOf(n.NODE_TYPES,d)!==-1||!(d in o.prototype)&&typeof a[d]==\"function\"}o.prototype={constructor:o,mutating:!1,acceptKey:function(d,l){var f=this.accept(d[l]);if(this.mutating){if(f&&!c(this,f.type))throw new r.default('Unexpected node type \"'+f.type+'\" found when accepting '+l+\" on \"+d.type);d[l]=f}},acceptRequired:function(d,l){if(this.acceptKey(d,l),!d[l])throw new r.default(d.type+\" requires \"+l)},acceptArray:function(d){for(var l=0,f=d.length;l<f;l++)this.acceptKey(d,l),d[l]||(d.splice(l,1),l--,f--)},accept:function(d){if(d){if(!c(this,d.type)||!this[d.type])throw new r.default(\"Unknown type: \"+d.type,d);this.current&&this.parents.unshift(this.current),this.current=d;var l=this[d.type](d);if(this.current=this.parents.shift(),!this.mutating||l)return l;if(l!==!1)return d}},Program:function(d){this.acceptArray(d.body)},MustacheStatement:u,Decorator:u,BlockStatement:h,DecoratorBlock:h,PartialStatement:p,PartialBlockStatement:function(d){p.call(this,d),this.acceptKey(d,\"program\")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:u,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(d){this.acceptArray(d.pairs)},HashPair:function(d){this.acceptRequired(d,\"value\")}};function u(a){this.acceptRequired(a,\"path\"),this.acceptArray(a.params),this.acceptKey(a,\"hash\")}function h(a){u.call(this,a),this.acceptKey(a,\"program\"),this.acceptKey(a,\"inverse\")}function p(a){this.acceptRequired(a,\"name\"),this.acceptArray(a.params),this.acceptKey(a,\"hash\")}e.default=o,t.exports=e.default})),Ol=ue(((e,t)=>{e.__esModule=!0;function s(h){return h&&h.__esModule?h:{default:h}}var r=s(pn());function i(){var h=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=h}i.prototype=new r.default,i.prototype.Program=function(h){var p=!this.options.ignoreStandalone,a=!this.isRootSeen;this.isRootSeen=!0;for(var d=h.body,l=0,f=d.length;l<f;l++){var g=d[l],v=this.accept(g);if(v){var b=n(d,l,a),S=o(d,l,a),y=v.openStandalone&&b,m=v.closeStandalone&&S,_=v.inlineStandalone&&b&&S;v.close&&c(d,l,!0),v.open&&u(d,l,!0),p&&_&&(c(d,l),u(d,l)&&g.type===\"PartialStatement\"&&(g.indent=/(?:^|[^ \\t])([ \\t]+)$/.exec(d[l-1].original)[1])),p&&y&&(c((g.program||g.inverse).body),u(d,l)),p&&m&&(c(d,l),u((g.inverse||g.program).body))}}return h},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(h){this.accept(h.program),this.accept(h.inverse);var p=h.program||h.inverse,a=h.program&&h.inverse,d=a,l=a;if(a&&a.chained)for(d=a.body[0].program;l.chained;)l=l.body[l.body.length-1].program;var f={open:h.openStrip.open,close:h.closeStrip.close,openStandalone:o(p.body),closeStandalone:n((d||p).body)};if(h.openStrip.close&&c(p.body,null,!0),a){var g=h.inverseStrip;g.open&&u(p.body,null,!0),g.close&&c(d.body,null,!0),h.closeStrip.open&&u(l.body,null,!0),!this.options.ignoreStandalone&&n(p.body)&&o(d.body)&&(u(p.body),c(d.body))}else h.closeStrip.open&&u(p.body,null,!0);return f},i.prototype.Decorator=i.prototype.MustacheStatement=function(h){return h.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(h){var p=h.strip||{};return{inlineStandalone:!0,open:p.open,close:p.close}};function n(h,p,a){p===void 0&&(p=h.length);var d=h[p-1],l=h[p-2];if(!d)return a;if(d.type===\"ContentStatement\")return(l||!a?/(?:^|\\S)[^\\S\\n]*\\n\\s*$/:/^\\s*$|(?:^|\\S)[^\\S\\n]*\\n\\s*$/).test(d.original)}function o(h,p,a){p===void 0&&(p=-1);var d=h[p+1],l=h[p+2];if(!d)return a;if(d.type===\"ContentStatement\")return(l||!a?/^\\s*?\\r?\\n/:/^\\s*?(\\r?\\n|$)/).test(d.original)}function c(h,p,a){var d=h[p==null?0:p+1];if(!(!d||d.type!==\"ContentStatement\"||!a&&d.rightStripped)){var l=d.value;d.value=d.value.replace(a?/^\\s+/:/^[ \\t]*\\r?\\n?/,\"\"),d.rightStripped=d.value!==l}}function u(h,p,a){var d=h[p==null?h.length-1:p-1];if(!(!d||d.type!==\"ContentStatement\"||!a&&d.leftStripped)){var l=d.value;return d.value=d.value.replace(a?/(^|\\S)\\s+$/:/(^|[^ \\t])[ \\t]+$/,\"$1\"),d.leftStripped=d.value!==l,d.leftStripped}}e.default=i,t.exports=e.default})),Ml=ue((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=n,e.stripFlags=o,e.stripComment=c,e.preparePath=u,e.prepareMustache=h,e.prepareRawBlock=p,e.prepareBlock=a,e.prepareProgram=d,e.preparePartialBlock=l;function t(f){return f&&f.__esModule?f:{default:f}}var s=t(yt());function r(f,g){if(g=g.path?g.path.original:g,f.path.original!==g){var v={loc:f.path.loc};throw new s.default(f.path.original+\" doesn't match \"+g,v)}}function i(f,g){this.source=f,this.start={line:g.first_line,column:g.first_column},this.end={line:g.last_line,column:g.last_column}}function n(f){return/^\\[.*\\]$/.test(f)?f.substring(1,f.length-1):f}function o(f,g){return{open:f.charAt(2)===\"~\",close:g.charAt(g.length-3)===\"~\"}}function c(f){return f.replace(/^\\{\\{~?!-?-?/,\"\").replace(/-?-?~?\\}\\}$/,\"\")}function u(f,g,v){v=this.locInfo(v);for(var b=f?\"@\":\"\",S=[],y=0,m=0,_=g.length;m<_;m++){var k=g[m].part,w=g[m].original!==k;if(b+=(g[m].separator||\"\")+k,!w&&(k===\"..\"||k===\".\"||k===\"this\")){if(S.length>0)throw new s.default(\"Invalid path: \"+b,{loc:v});k===\"..\"&&y++}else S.push(k)}return{type:\"PathExpression\",data:f,depth:y,parts:S,original:b,loc:v}}function h(f,g,v,b,S,y){var m=b.charAt(3)||b.charAt(2),_=m!==\"{\"&&m!==\"&\";return{type:/\\*/.test(b)?\"Decorator\":\"MustacheStatement\",path:f,params:g,hash:v,escaped:_,strip:S,loc:this.locInfo(y)}}function p(f,g,v,b){r(f,v),b=this.locInfo(b);var S={type:\"Program\",body:g,strip:{},loc:b};return{type:\"BlockStatement\",path:f.path,params:f.params,hash:f.hash,program:S,openStrip:{},inverseStrip:{},closeStrip:{},loc:b}}function a(f,g,v,b,S,y){b&&b.path&&r(f,b);var m=/\\*/.test(f.open);g.blockParams=f.blockParams;var _=void 0,k=void 0;if(v){if(m)throw new s.default(\"Unexpected inverse block on decorator\",v);v.chain&&(v.program.body[0].closeStrip=b.strip),k=v.strip,_=v.program}return S&&(S=_,_=g,g=S),{type:m?\"DecoratorBlock\":\"BlockStatement\",path:f.path,params:f.params,hash:f.hash,program:g,inverse:_,openStrip:f.strip,inverseStrip:k,closeStrip:b&&b.strip,loc:this.locInfo(y)}}function d(f,g){if(!g&&f.length){var v=f[0].loc,b=f[f.length-1].loc;v&&b&&(g={source:v.source,start:{line:v.start.line,column:v.start.column},end:{line:b.end.line,column:b.end.column}})}return{type:\"Program\",body:f,strip:{},loc:g}}function l(f,g,v,b){return r(f,v),{type:\"PartialBlockStatement\",name:f.path,params:f.params,hash:f.hash,program:g,openStrip:f.strip,closeStrip:v&&v.strip,loc:this.locInfo(b)}}})),Nl=ue((e=>{e.__esModule=!0,e.parseWithoutProcessing=u,e.parse=h;function t(p){if(p&&p.__esModule)return p;var a={};if(p!=null)for(var d in p)Object.prototype.hasOwnProperty.call(p,d)&&(a[d]=p[d]);return a.default=p,a}function s(p){return p&&p.__esModule?p:{default:p}}var r=s(Il()),i=s(Ol()),n=t(Ml()),o=Ze();e.parser=r.default;var c={};o.extend(c,n);function u(p,a){return p.type===\"Program\"?p:(r.default.yy=c,c.locInfo=function(d){return new c.SourceLocation(a&&a.srcName,d)},r.default.parse(p))}function h(p,a){var d=u(p,a);return new i.default(a).accept(d)}})),Dl=ue((e=>{e.__esModule=!0,e.Compiler=c,e.precompile=u,e.compile=h;function t(S){return S&&S.__esModule?S:{default:S}}var s=t(yt()),r=Ze(),i=t(un()),n=hn(),o=[].slice;function c(){}c.prototype={compiler:c,equals:function(y){var m=this.opcodes.length;if(y.opcodes.length!==m)return!1;for(var _=0;_<m;_++){var k=this.opcodes[_],w=y.opcodes[_];if(k.opcode!==w.opcode||!v(k.args,w.args))return!1}m=this.children.length;for(var _=0;_<m;_++)if(!this.children[_].equals(y.children[_]))return!1;return!0},guid:0,compile:function(y,m){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=m,this.stringParams=m.stringParams,this.trackIds=m.trackIds,m.blockParams=m.blockParams||[],m.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},m.knownHelpers),this.accept(y)},compileProgram:function(y){var m=new this.compiler().compile(y,this.options),_=this.guid++;return this.usePartial=this.usePartial||m.usePartial,this.children[_]=m,this.useDepths=this.useDepths||m.useDepths,_},accept:function(y){if(r.indexOf(n.NODE_TYPES,y.type)===-1||!this[y.type])throw new s.default(\"Unknown type: \"+y.type,y);this.sourceNode.unshift(y);var m=this[y.type](y);return this.sourceNode.shift(),m},Program:function(y){g(y),this.options.blockParams.unshift(y.blockParams);for(var m=y.body,_=m.length,k=0;k<_;k++)this.accept(m[k]);return this.options.blockParams.shift(),this.isSimple=_===1,this.blockParams=y.blockParams?y.blockParams.length:0,this},BlockStatement:function(y){b(y);var m=y.program,_=y.inverse;m=m&&this.compileProgram(m),_=_&&this.compileProgram(_);var k=this.classifySexpr(y);k===\"helper\"?this.helperSexpr(y,m,_):k===\"simple\"?(this.simpleSexpr(y),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",_),this.opcode(\"emptyHash\"),this.opcode(\"blockValue\",y.path.original)):(this.ambiguousSexpr(y,m,_),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",_),this.opcode(\"emptyHash\"),this.opcode(\"ambiguousBlockValue\")),this.opcode(\"append\")},DecoratorBlock:function(y){var m=y.program&&this.compileProgram(y.program),_=this.setupFullMustacheParams(y,m,void 0),k=y.path;this.useDecorators=!0,this.opcode(\"registerDecorator\",_.length,k.original)},PartialStatement:function(y){this.usePartial=!0;var m=y.program;m&&(m=this.compileProgram(y.program));var _=y.params;if(_.length>1)throw new s.default(\"Unsupported number of partial arguments: \"+_.length,y);_.length||(this.options.explicitPartialContext?this.opcode(\"pushLiteral\",\"undefined\"):_.push({type:\"PathExpression\",parts:[],depth:0}));var k=y.name.original,w=y.name.type===\"SubExpression\";w&&this.accept(y.name),this.setupFullMustacheParams(y,m,void 0,!0);var C=y.indent||\"\";this.options.preventIndent&&C&&(this.opcode(\"appendContent\",C),C=\"\"),this.opcode(\"invokePartial\",w,k,C),this.opcode(\"append\")},PartialBlockStatement:function(y){this.PartialStatement(y)},MustacheStatement:function(y){this.SubExpression(y),y.escaped&&!this.options.noEscape?this.opcode(\"appendEscaped\"):this.opcode(\"append\")},Decorator:function(y){this.DecoratorBlock(y)},ContentStatement:function(y){if(y.value!=null&&typeof y.value!=\"string\")throw p(y,\"value must be a string\");y.value&&this.opcode(\"appendContent\",y.value)},CommentStatement:function(){},SubExpression:function(y){b(y);var m=this.classifySexpr(y);m===\"simple\"?this.simpleSexpr(y):m===\"helper\"?this.helperSexpr(y):this.ambiguousSexpr(y)},ambiguousSexpr:function(y,m,_){var k=y.path,w=k.parts[0],C=m!=null||_!=null;this.opcode(\"getContext\",a(k)),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",_),k.strict=!0,this.accept(k),this.opcode(\"invokeAmbiguous\",w,C)},simpleSexpr:function(y){var m=y.path;m.strict=!0,this.accept(m),this.opcode(\"resolvePossibleLambda\")},helperSexpr:function(y,m,_){var k=this.setupFullMustacheParams(y,m,_),w=y.path,C=w.parts[0];if(this.options.knownHelpers[C])this.opcode(\"invokeKnownHelper\",k.length,C);else{if(this.options.knownHelpersOnly)throw new s.default(\"You specified knownHelpersOnly, but used the unknown helper \"+C,y);w.strict=!0,w.falsy=!0,this.accept(w),this.opcode(\"invokeHelper\",k.length,w.original,i.default.helpers.simpleId(w))}},PathExpression:function(y){var m=a(y),_=f(y);this.addDepth(m),this.opcode(\"getContext\",m);var k=_[0],w=i.default.helpers.scopedId(y),C=!m&&!w&&this.blockParamIndex(k);C?this.opcode(\"lookupBlockParam\",C,_):k?y.data?(this.options.data=!0,this.opcode(\"lookupData\",m,_,y.strict)):this.opcode(\"lookupOnContext\",_,y.falsy,y.strict,w):this.opcode(\"pushContext\")},StringLiteral:function(y){d(y),this.opcode(\"pushString\",y.value)},NumberLiteral:function(y){d(y),this.opcode(\"pushLiteral\",y.value)},BooleanLiteral:function(y){d(y),this.opcode(\"pushLiteral\",y.value)},UndefinedLiteral:function(){this.opcode(\"pushLiteral\",\"undefined\")},NullLiteral:function(){this.opcode(\"pushLiteral\",\"null\")},Hash:function(y){var m=y.pairs,_=0,k=void 0;if(!r.isArray(m))throw p(y,\"pairs must be an array\");k=m.length;for(var w=0;w<k;w++)if(!m[w]||typeof m[w].key!=\"string\")throw p(y,\"pair keys must be strings\");for(this.opcode(\"pushHash\");_<k;_++)this.pushParam(m[_].value);for(;_--;)this.opcode(\"assignToHash\",m[_].key);this.opcode(\"popHash\")},opcode:function(y){this.opcodes.push({opcode:y,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(y){y&&(this.useDepths=!0)},classifySexpr:function(y){f(y.path);var m=i.default.helpers.simpleId(y.path),_=m&&!!this.blockParamIndex(y.path.parts[0]),k=!_&&i.default.helpers.helperExpression(y),w=!_&&(k||m);if(w&&!k){var C=y.path.parts[0],O=this.options;O.knownHelpers[C]?k=!0:O.knownHelpersOnly&&(w=!1)}return k?\"helper\":w?\"ambiguous\":\"simple\"},pushParams:function(y){for(var m=0,_=y.length;m<_;m++)this.pushParam(y[m])},pushParam:function(y){d(y);var m=y.value!=null?y.value:y.original||\"\",_=a(y);if(this.stringParams)typeof m!=\"number\"&&typeof m!=\"boolean\"&&(m=String(m)),m.replace&&(m=m.replace(/^(\\.?\\.\\/)*/g,\"\").replace(/\\//g,\".\")),_&&this.addDepth(_),this.opcode(\"getContext\",_),this.opcode(\"pushStringParam\",m,y.type),y.type===\"SubExpression\"&&this.accept(y);else{if(this.trackIds){var k=void 0;if(y.parts&&!i.default.helpers.scopedId(y)&&!_&&(k=this.blockParamIndex(f(y)[0])),k){var w=y.parts.slice(1).join(\".\");this.opcode(\"pushId\",\"BlockParam\",k,w)}else m=y.original||m,m.replace&&(m=m.replace(/^this(?:\\.|$)/,\"\").replace(/^\\.\\//,\"\").replace(/^\\.$/,\"\")),this.opcode(\"pushId\",y.type,m)}this.accept(y)}},setupFullMustacheParams:function(y,m,_,k){var w=y.params;return this.pushParams(w),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",_),y.hash?this.accept(y.hash):this.opcode(\"emptyHash\",k),w},blockParamIndex:function(y){for(var m=0,_=this.options.blockParams.length;m<_;m++){var k=this.options.blockParams[m],w=k&&r.indexOf(k,y);if(k&&w>=0)return[m,w]}}};function u(S,y,m){if(S==null||typeof S!=\"string\"&&S.type!==\"Program\")throw new s.default(\"You must pass a string or Handlebars AST to Handlebars.precompile. You passed \"+S);y=y||{},\"data\"in y||(y.data=!0),y.compat&&(y.useDepths=!0);var _=m.parse(S,y),k=new m.Compiler().compile(_,y);return new m.JavaScriptCompiler().compile(k,y)}function h(S,y,m){if(y===void 0&&(y={}),S==null||typeof S!=\"string\"&&S.type!==\"Program\")throw new s.default(\"You must pass a string or Handlebars AST to Handlebars.compile. You passed \"+S);y=r.extend({},y),\"data\"in y||(y.data=!0),y.compat&&(y.useDepths=!0);var _=void 0;function k(){var C=m.parse(S,y),O=new m.Compiler().compile(C,y),E=new m.JavaScriptCompiler().compile(O,y,void 0,!0);return m.template(E)}function w(C,O){return _||(_=k()),_.call(this,C,O)}return w._setup=function(C){return _||(_=k()),_._setup(C)},w._child=function(C,O,E,A){return _||(_=k()),_._child(C,O,E,A)},w}function p(S,y){return new s.default(\"Invalid AST: \"+S.type+\" \"+y,S)}function a(S){var y=S.depth;if(y==null)return 0;if(typeof y!=\"number\"||!isFinite(y)||Math.floor(y)!==y||y<0)throw p(S,\"depth must be a non-negative integer\");return y}function d(S){var y=S.value;if(S.type===\"StringLiteral\"&&typeof y!=\"string\")throw p(S,\"value must be a string\");if(S.type===\"NumberLiteral\"&&typeof y!=\"number\")throw p(S,\"value must be a number\");if(S.type===\"BooleanLiteral\"&&typeof y!=\"boolean\")throw p(S,\"value must be a boolean\")}function l(S,y,m){if(!r.isArray(y))throw p(S,m+\" must be an array\");for(var _=0;_<y.length;_++)if(typeof y[_]!=\"string\")throw p(S,m+\" must only contain strings\");return y}function f(S){return l(S,S.parts,\"parts\")}function g(S){S.blockParams!=null&&l(S,S.blockParams,\"blockParams\")}function v(S,y){if(S===y)return!0;if(r.isArray(S)&&r.isArray(y)&&S.length===y.length){for(var m=0;m<S.length;m++)if(!v(S[m],y[m]))return!1;return!0}}function b(S){if(!S.path.parts){var y=S.path;S.path={type:\"PathExpression\",data:!1,depth:0,parts:[y.original+\"\"],original:y.original+\"\",loc:y.loc}}}})),Bl=ue((e=>{var t=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");e.encode=function(s){if(0<=s&&s<t.length)return t[s];throw new TypeError(\"Must be between 0 and 63: \"+s)},e.decode=function(s){var r=65,i=90,n=97,o=122,c=48,u=57,h=43,p=47,a=26,d=52;return r<=s&&s<=i?s-r:n<=s&&s<=o?s-n+a:c<=s&&s<=u?s-c+d:s==h?62:s==p?63:-1}})),dn=ue((e=>{var t=Bl(),s=5,r=1<<s,i=r-1,n=r;function o(u){return u<0?(-u<<1)+1:(u<<1)+0}function c(u){var h=(u&1)===1,p=u>>1;return h?-p:p}e.encode=function(h){var p=\"\",a,d=o(h);do a=d&i,d>>>=s,d>0&&(a|=n),p+=t.encode(a);while(d>0);return p},e.decode=function(h,p,a){var d=h.length,l=0,f=0,g,v;do{if(p>=d)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(v=t.decode(h.charCodeAt(p++)),v===-1)throw new Error(\"Invalid base64 digit: \"+h.charAt(p-1));g=!!(v&n),v&=i,l=l+(v<<f),f+=s}while(g);a.value=c(l),a.rest=p}})),_s=ue((e=>{function t(m,_,k){if(_ in m)return m[_];if(arguments.length===3)return k;throw new Error('\"'+_+'\" is a required argument.')}e.getArg=t;var s=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,r=/^data:.+\\,.+$/;function i(m){var _=m.match(s);return _?{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}:null}e.urlParse=i;function n(m){var _=\"\";return m.scheme&&(_+=m.scheme+\":\"),_+=\"//\",m.auth&&(_+=m.auth+\"@\"),m.host&&(_+=m.host),m.port&&(_+=\":\"+m.port),m.path&&(_+=m.path),_}e.urlGenerate=n;function o(m){var _=m,k=i(m);if(k){if(!k.path)return m;_=k.path}for(var w=e.isAbsolute(_),C=_.split(/\\/+/),O,E=0,A=C.length-1;A>=0;A--)O=C[A],O===\".\"?C.splice(A,1):O===\"..\"?E++:E>0&&(O===\"\"?(C.splice(A+1,E),E=0):(C.splice(A,2),E--));return _=C.join(\"/\"),_===\"\"&&(_=w?\"/\":\".\"),k?(k.path=_,n(k)):_}e.normalize=o;function c(m,_){m===\"\"&&(m=\".\"),_===\"\"&&(_=\".\");var k=i(_),w=i(m);if(w&&(m=w.path||\"/\"),k&&!k.scheme)return w&&(k.scheme=w.scheme),n(k);if(k||_.match(r))return _;if(w&&!w.host&&!w.path)return w.host=_,n(w);var C=_.charAt(0)===\"/\"?_:o(m.replace(/\\/+$/,\"\")+\"/\"+_);return w?(w.path=C,n(w)):C}e.join=c,e.isAbsolute=function(m){return m.charAt(0)===\"/\"||s.test(m)};function u(m,_){m===\"\"&&(m=\".\"),m=m.replace(/\\/$/,\"\");for(var k=0;_.indexOf(m+\"/\")!==0;){var w=m.lastIndexOf(\"/\");if(w<0||(m=m.slice(0,w),m.match(/^([^\\/]+:\\/)?\\/*$/)))return _;++k}return Array(k+1).join(\"../\")+_.substr(m.length+1)}e.relative=u;var h=(function(){return!(\"__proto__\"in Object.create(null))})();function p(m){return m}function a(m){return l(m)?\"$\"+m:m}e.toSetString=h?p:a;function d(m){return l(m)?m.slice(1):m}e.fromSetString=h?p:d;function l(m){if(!m)return!1;var _=m.length;if(_<9||m.charCodeAt(_-1)!==95||m.charCodeAt(_-2)!==95||m.charCodeAt(_-3)!==111||m.charCodeAt(_-4)!==116||m.charCodeAt(_-5)!==111||m.charCodeAt(_-6)!==114||m.charCodeAt(_-7)!==112||m.charCodeAt(_-8)!==95||m.charCodeAt(_-9)!==95)return!1;for(var k=_-10;k>=0;k--)if(m.charCodeAt(k)!==36)return!1;return!0}function f(m,_,k){var w=v(m.source,_.source);return w!==0||(w=m.originalLine-_.originalLine,w!==0)||(w=m.originalColumn-_.originalColumn,w!==0||k)||(w=m.generatedColumn-_.generatedColumn,w!==0)||(w=m.generatedLine-_.generatedLine,w!==0)?w:v(m.name,_.name)}e.compareByOriginalPositions=f;function g(m,_,k){var w=m.generatedLine-_.generatedLine;return w!==0||(w=m.generatedColumn-_.generatedColumn,w!==0||k)||(w=v(m.source,_.source),w!==0)||(w=m.originalLine-_.originalLine,w!==0)||(w=m.originalColumn-_.originalColumn,w!==0)?w:v(m.name,_.name)}e.compareByGeneratedPositionsDeflated=g;function v(m,_){return m===_?0:m===null?1:_===null?-1:m>_?1:-1}function b(m,_){var k=m.generatedLine-_.generatedLine;return k!==0||(k=m.generatedColumn-_.generatedColumn,k!==0)||(k=v(m.source,_.source),k!==0)||(k=m.originalLine-_.originalLine,k!==0)||(k=m.originalColumn-_.originalColumn,k!==0)?k:v(m.name,_.name)}e.compareByGeneratedPositionsInflated=b;function S(m){return JSON.parse(m.replace(/^\\)]}'[^\\n]*\\n/,\"\"))}e.parseSourceMapInput=S;function y(m,_,k){if(_=_||\"\",m&&(m[m.length-1]!==\"/\"&&_[0]!==\"/\"&&(m+=\"/\"),_=m+_),k){var w=i(k);if(!w)throw new Error(\"sourceMapURL could not be parsed\");if(w.path){var C=w.path.lastIndexOf(\"/\");C>=0&&(w.path=w.path.substring(0,C+1))}_=c(n(w),_)}return o(_)}e.computeSourceURL=y})),fn=ue((e=>{var t=_s(),s=Object.prototype.hasOwnProperty,r=typeof Map<\"u\";function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(o,c){for(var u=new i,h=0,p=o.length;h<p;h++)u.add(o[h],c);return u},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(o,c){var u=r?o:t.toSetString(o),h=r?this.has(o):s.call(this._set,u),p=this._array.length;(!h||c)&&this._array.push(o),h||(r?this._set.set(o,p):this._set[u]=p)},i.prototype.has=function(o){if(r)return this._set.has(o);var c=t.toSetString(o);return s.call(this._set,c)},i.prototype.indexOf=function(o){if(r){var c=this._set.get(o);if(c>=0)return c}else{var u=t.toSetString(o);if(s.call(this._set,u))return this._set[u]}throw new Error('\"'+o+'\" is not in the set.')},i.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error(\"No element indexed by \"+o)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),$l=ue((e=>{var t=_s();function s(i,n){var o=i.generatedLine,c=n.generatedLine,u=i.generatedColumn,h=n.generatedColumn;return c>o||c==o&&h>=u||t.compareByGeneratedPositionsInflated(i,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(n,o){this._array.forEach(n,o)},r.prototype.add=function(n){s(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),gn=ue((e=>{var t=dn(),s=_s(),r=fn().ArraySet,i=$l().MappingList;function n(o){o||(o={}),this._file=s.getArg(o,\"file\",null),this._sourceRoot=s.getArg(o,\"sourceRoot\",null),this._skipValidation=s.getArg(o,\"skipValidation\",!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}n.prototype._version=3,n.fromSourceMap=function(c){var u=c.sourceRoot,h=new n({file:c.file,sourceRoot:u});return c.eachMapping(function(p){var a={generated:{line:p.generatedLine,column:p.generatedColumn}};p.source!=null&&(a.source=p.source,u!=null&&(a.source=s.relative(u,a.source)),a.original={line:p.originalLine,column:p.originalColumn},p.name!=null&&(a.name=p.name)),h.addMapping(a)}),c.sources.forEach(function(p){var a=p;u!==null&&(a=s.relative(u,p)),h._sources.has(a)||h._sources.add(a);var d=c.sourceContentFor(p);d!=null&&h.setSourceContent(p,d)}),h},n.prototype.addMapping=function(c){var u=s.getArg(c,\"generated\"),h=s.getArg(c,\"original\",null),p=s.getArg(c,\"source\",null),a=s.getArg(c,\"name\",null);this._skipValidation||this._validateMapping(u,h,p,a),p!=null&&(p=String(p),this._sources.has(p)||this._sources.add(p)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:u.line,generatedColumn:u.column,originalLine:h!=null&&h.line,originalColumn:h!=null&&h.column,source:p,name:a})},n.prototype.setSourceContent=function(c,u){var h=c;this._sourceRoot!=null&&(h=s.relative(this._sourceRoot,h)),u!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(h)]=u):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(h)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(c,u,h){var p=u;if(u==null){if(c.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's \"file\" property. Both were omitted.`);p=c.file}var a=this._sourceRoot;a!=null&&(p=s.relative(a,p));var d=new r,l=new r;this._mappings.unsortedForEach(function(f){if(f.source===p&&f.originalLine!=null){var g=c.originalPositionFor({line:f.originalLine,column:f.originalColumn});g.source!=null&&(f.source=g.source,h!=null&&(f.source=s.join(h,f.source)),a!=null&&(f.source=s.relative(a,f.source)),f.originalLine=g.line,f.originalColumn=g.column,g.name!=null&&(f.name=g.name))}var v=f.source;v!=null&&!d.has(v)&&d.add(v);var b=f.name;b!=null&&!l.has(b)&&l.add(b)},this),this._sources=d,this._names=l,c.sources.forEach(function(f){var g=c.sourceContentFor(f);g!=null&&(h!=null&&(f=s.join(h,f)),a!=null&&(f=s.relative(a,f)),this.setSourceContent(f,g))},this)},n.prototype._validateMapping=function(c,u,h,p){if(u&&typeof u.line!=\"number\"&&typeof u.column!=\"number\")throw new Error(\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\");if(!(c&&\"line\"in c&&\"column\"in c&&c.line>0&&c.column>=0&&!u&&!h&&!p)){if(c&&\"line\"in c&&\"column\"in c&&u&&\"line\"in u&&\"column\"in u&&c.line>0&&c.column>=0&&u.line>0&&u.column>=0&&h)return;throw new Error(\"Invalid mapping: \"+JSON.stringify({generated:c,source:h,original:u,name:p}))}},n.prototype._serializeMappings=function(){for(var c=0,u=1,h=0,p=0,a=0,d=0,l=\"\",f,g,v,b,S=this._mappings.toArray(),y=0,m=S.length;y<m;y++){if(g=S[y],f=\"\",g.generatedLine!==u)for(c=0;g.generatedLine!==u;)f+=\";\",u++;else if(y>0){if(!s.compareByGeneratedPositionsInflated(g,S[y-1]))continue;f+=\",\"}f+=t.encode(g.generatedColumn-c),c=g.generatedColumn,g.source!=null&&(b=this._sources.indexOf(g.source),f+=t.encode(b-d),d=b,f+=t.encode(g.originalLine-1-p),p=g.originalLine-1,f+=t.encode(g.originalColumn-h),h=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),f+=t.encode(v-a),a=v)),l+=f}return l},n.prototype._generateSourcesContent=function(c,u){return c.map(function(h){if(!this._sourcesContents)return null;u!=null&&(h=s.relative(u,h));var p=s.toSetString(h);return Object.prototype.hasOwnProperty.call(this._sourcesContents,p)?this._sourcesContents[p]:null},this)},n.prototype.toJSON=function(){var c={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(c.file=this._file),this._sourceRoot!=null&&(c.sourceRoot=this._sourceRoot),this._sourcesContents&&(c.sourcesContent=this._generateSourcesContent(c.sources,c.sourceRoot)),c},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=n})),Hl=ue((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(s,r,i,n,o,c){var u=Math.floor((r-s)/2)+s,h=o(i,n[u],!0);return h===0?u:h>0?r-u>1?t(u,r,i,n,o,c):c==e.LEAST_UPPER_BOUND?r<n.length?r:-1:u:u-s>1?t(s,u,i,n,o,c):c==e.LEAST_UPPER_BOUND?u:s<0?-1:s}e.search=function(r,i,n,o){if(i.length===0)return-1;var c=t(-1,i.length,r,i,n,o||e.GREATEST_LOWER_BOUND);if(c<0)return-1;for(;c-1>=0&&n(i[c],i[c-1],!0)===0;)--c;return c}})),ql=ue((e=>{function t(i,n,o){var c=i[n];i[n]=i[o],i[o]=c}function s(i,n){return Math.round(i+Math.random()*(n-i))}function r(i,n,o,c){if(o<c){var u=s(o,c),h=o-1;t(i,u,c);for(var p=i[c],a=o;a<c;a++)n(i[a],p)<=0&&(h+=1,t(i,h,a));t(i,h+1,a);var d=h+1;r(i,n,o,d-1),r(i,n,d+1,c)}}e.quickSort=function(i,n){r(i,n,0,i.length-1)}})),Fl=ue((e=>{var t=_s(),s=Hl(),r=fn().ArraySet,i=dn(),n=ql().quickSort;function o(p,a){var d=p;return typeof p==\"string\"&&(d=t.parseSourceMapInput(p)),d.sections!=null?new h(d,a):new c(d,a)}o.fromSourceMap=function(p,a){return c.fromSourceMap(p,a)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,\"_generatedMappings\",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,\"_originalMappings\",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(a,d){var l=a.charAt(d);return l===\";\"||l===\",\"},o.prototype._parseMappings=function(a,d){throw new Error(\"Subclasses must implement _parseMappings\")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(a,d,l){var f=d||null,g=l||o.GENERATED_ORDER,v;switch(g){case o.GENERATED_ORDER:v=this._generatedMappings;break;case o.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error(\"Unknown order of iteration.\")}var b=this.sourceRoot;v.map(function(S){var y=S.source===null?null:this._sources.at(S.source);return y=t.computeSourceURL(b,y,this._sourceMapURL),{source:y,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:this._names.at(S.name)}},this).forEach(a,f)},o.prototype.allGeneratedPositionsFor=function(a){var d=t.getArg(a,\"line\"),l={source:t.getArg(a,\"source\"),originalLine:d,originalColumn:t.getArg(a,\"column\",0)};if(l.source=this._findSourceIndex(l.source),l.source<0)return[];var f=[],g=this._findMapping(l,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(g>=0){var v=this._originalMappings[g];if(a.column===void 0)for(var b=v.originalLine;v&&v.originalLine===b;)f.push({line:t.getArg(v,\"generatedLine\",null),column:t.getArg(v,\"generatedColumn\",null),lastColumn:t.getArg(v,\"lastGeneratedColumn\",null)}),v=this._originalMappings[++g];else for(var S=v.originalColumn;v&&v.originalLine===d&&v.originalColumn==S;)f.push({line:t.getArg(v,\"generatedLine\",null),column:t.getArg(v,\"generatedColumn\",null),lastColumn:t.getArg(v,\"lastGeneratedColumn\",null)}),v=this._originalMappings[++g]}return f},e.SourceMapConsumer=o;function c(p,a){var d=p;typeof p==\"string\"&&(d=t.parseSourceMapInput(p));var l=t.getArg(d,\"version\"),f=t.getArg(d,\"sources\"),g=t.getArg(d,\"names\",[]),v=t.getArg(d,\"sourceRoot\",null),b=t.getArg(d,\"sourcesContent\",null),S=t.getArg(d,\"mappings\"),y=t.getArg(d,\"file\",null);if(l!=this._version)throw new Error(\"Unsupported version: \"+l);v&&(v=t.normalize(v)),f=f.map(String).map(t.normalize).map(function(m){return v&&t.isAbsolute(v)&&t.isAbsolute(m)?t.relative(v,m):m}),this._names=r.fromArray(g.map(String),!0),this._sources=r.fromArray(f,!0),this._absoluteSources=this._sources.toArray().map(function(m){return t.computeSourceURL(v,m,a)}),this.sourceRoot=v,this.sourcesContent=b,this._mappings=S,this._sourceMapURL=a,this.file=y}c.prototype=Object.create(o.prototype),c.prototype.consumer=o,c.prototype._findSourceIndex=function(p){var a=p;if(this.sourceRoot!=null&&(a=t.relative(this.sourceRoot,a)),this._sources.has(a))return this._sources.indexOf(a);for(var d=0;d<this._absoluteSources.length;++d)if(this._absoluteSources[d]==p)return d;return-1},c.fromSourceMap=function(a,d){var l=Object.create(c.prototype),f=l._names=r.fromArray(a._names.toArray(),!0),g=l._sources=r.fromArray(a._sources.toArray(),!0);l.sourceRoot=a._sourceRoot,l.sourcesContent=a._generateSourcesContent(l._sources.toArray(),l.sourceRoot),l.file=a._file,l._sourceMapURL=d,l._absoluteSources=l._sources.toArray().map(function(w){return t.computeSourceURL(l.sourceRoot,w,d)});for(var v=a._mappings.toArray().slice(),b=l.__generatedMappings=[],S=l.__originalMappings=[],y=0,m=v.length;y<m;y++){var _=v[y],k=new u;k.generatedLine=_.generatedLine,k.generatedColumn=_.generatedColumn,_.source&&(k.source=g.indexOf(_.source),k.originalLine=_.originalLine,k.originalColumn=_.originalColumn,_.name&&(k.name=f.indexOf(_.name)),S.push(k)),b.push(k)}return n(l.__originalMappings,t.compareByOriginalPositions),l},c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){return this._absoluteSources.slice()}});function u(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}c.prototype._parseMappings=function(a,d){for(var l=1,f=0,g=0,v=0,b=0,S=0,y=a.length,m=0,_={},k={},w=[],C=[],O,E,A,P,B;m<y;)if(a.charAt(m)===\";\")l++,m++,f=0;else if(a.charAt(m)===\",\")m++;else{for(O=new u,O.generatedLine=l,P=m;P<y&&!this._charIsMappingSeparator(a,P);P++);if(E=a.slice(m,P),A=_[E],A)m+=E.length;else{for(A=[];m<P;)i.decode(a,m,k),B=k.value,m=k.rest,A.push(B);if(A.length===2)throw new Error(\"Found a source, but no line and column\");if(A.length===3)throw new Error(\"Found a source and line, but no column\");_[E]=A}O.generatedColumn=f+A[0],f=O.generatedColumn,A.length>1&&(O.source=b+A[1],b+=A[1],O.originalLine=g+A[2],g=O.originalLine,O.originalLine+=1,O.originalColumn=v+A[3],v=O.originalColumn,A.length>4&&(O.name=S+A[4],S+=A[4])),C.push(O),typeof O.originalLine==\"number\"&&w.push(O)}n(C,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,n(w,t.compareByOriginalPositions),this.__originalMappings=w},c.prototype._findMapping=function(a,d,l,f,g,v){if(a[l]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+a[l]);if(a[f]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+a[f]);return s.search(a,d,g,v)},c.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var d=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var l=this._generatedMappings[a+1];if(d.generatedLine===l.generatedLine){d.lastGeneratedColumn=l.generatedColumn-1;continue}}d.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(a){var d={generatedLine:t.getArg(a,\"line\"),generatedColumn:t.getArg(a,\"column\")},l=this._findMapping(d,this._generatedMappings,\"generatedLine\",\"generatedColumn\",t.compareByGeneratedPositionsDeflated,t.getArg(a,\"bias\",o.GREATEST_LOWER_BOUND));if(l>=0){var f=this._generatedMappings[l];if(f.generatedLine===d.generatedLine){var g=t.getArg(f,\"source\",null);g!==null&&(g=this._sources.at(g),g=t.computeSourceURL(this.sourceRoot,g,this._sourceMapURL));var v=t.getArg(f,\"name\",null);return v!==null&&(v=this._names.at(v)),{source:g,line:t.getArg(f,\"originalLine\",null),column:t.getArg(f,\"originalColumn\",null),name:v}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return a==null}):!1},c.prototype.sourceContentFor=function(a,d){if(!this.sourcesContent)return null;var l=this._findSourceIndex(a);if(l>=0)return this.sourcesContent[l];var f=a;this.sourceRoot!=null&&(f=t.relative(this.sourceRoot,f));var g;if(this.sourceRoot!=null&&(g=t.urlParse(this.sourceRoot))){var v=f.replace(/^file:\\/\\//,\"\");if(g.scheme==\"file\"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!g.path||g.path==\"/\")&&this._sources.has(\"/\"+f))return this.sourcesContent[this._sources.indexOf(\"/\"+f)]}if(d)return null;throw new Error('\"'+f+'\" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(a){var d=t.getArg(a,\"source\");if(d=this._findSourceIndex(d),d<0)return{line:null,column:null,lastColumn:null};var l={source:d,originalLine:t.getArg(a,\"line\"),originalColumn:t.getArg(a,\"column\")},f=this._findMapping(l,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(a,\"bias\",o.GREATEST_LOWER_BOUND));if(f>=0){var g=this._originalMappings[f];if(g.source===l.source)return{line:t.getArg(g,\"generatedLine\",null),column:t.getArg(g,\"generatedColumn\",null),lastColumn:t.getArg(g,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=c;function h(p,a){var d=p;typeof p==\"string\"&&(d=t.parseSourceMapInput(p));var l=t.getArg(d,\"version\"),f=t.getArg(d,\"sections\");if(l!=this._version)throw new Error(\"Unsupported version: \"+l);this._sources=new r,this._names=new r;var g={line:-1,column:0};this._sections=f.map(function(v){if(v.url)throw new Error(\"Support for url field in sections not implemented.\");var b=t.getArg(v,\"offset\"),S=t.getArg(b,\"line\"),y=t.getArg(b,\"column\");if(S<g.line||S===g.line&&y<g.column)throw new Error(\"Section offsets must be ordered and non-overlapping.\");return g=b,{generatedOffset:{generatedLine:S+1,generatedColumn:y+1},consumer:new o(t.getArg(v,\"map\"),a)}})}h.prototype=Object.create(o.prototype),h.prototype.constructor=o,h.prototype._version=3,Object.defineProperty(h.prototype,\"sources\",{get:function(){for(var p=[],a=0;a<this._sections.length;a++)for(var d=0;d<this._sections[a].consumer.sources.length;d++)p.push(this._sections[a].consumer.sources[d]);return p}}),h.prototype.originalPositionFor=function(a){var d={generatedLine:t.getArg(a,\"line\"),generatedColumn:t.getArg(a,\"column\")},l=s.search(d,this._sections,function(g,v){var b=g.generatedLine-v.generatedOffset.generatedLine;return b||g.generatedColumn-v.generatedOffset.generatedColumn}),f=this._sections[l];return f?f.consumer.originalPositionFor({line:d.generatedLine-(f.generatedOffset.generatedLine-1),column:d.generatedColumn-(f.generatedOffset.generatedLine===d.generatedLine?f.generatedOffset.generatedColumn-1:0),bias:a.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})},h.prototype.sourceContentFor=function(a,d){for(var l=0;l<this._sections.length;l++){var f=this._sections[l].consumer.sourceContentFor(a,!0);if(f)return f}if(d)return null;throw new Error('\"'+a+'\" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(a){for(var d=0;d<this._sections.length;d++){var l=this._sections[d];if(l.consumer._findSourceIndex(t.getArg(a,\"source\"))!==-1){var f=l.consumer.generatedPositionFor(a);if(f)return{line:f.line+(l.generatedOffset.generatedLine-1),column:f.column+(l.generatedOffset.generatedLine===f.line?l.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(a,d){this.__generatedMappings=[],this.__originalMappings=[];for(var l=0;l<this._sections.length;l++)for(var f=this._sections[l],g=f.consumer._generatedMappings,v=0;v<g.length;v++){var b=g[v],S=f.consumer._sources.at(b.source);S=t.computeSourceURL(f.consumer.sourceRoot,S,this._sourceMapURL),this._sources.add(S),S=this._sources.indexOf(S);var y=null;b.name&&(y=f.consumer._names.at(b.name),this._names.add(y),y=this._names.indexOf(y));var m={source:S,generatedLine:b.generatedLine+(f.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(f.generatedOffset.generatedLine===b.generatedLine?f.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:y};this.__generatedMappings.push(m),typeof m.originalLine==\"number\"&&this.__originalMappings.push(m)}n(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),n(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=h})),Vl=ue((e=>{var t=gn().SourceMapGenerator,s=_s(),r=/(\\r?\\n)/,i=10,n=\"$$$isSourceNode$$$\";function o(c,u,h,p,a){this.children=[],this.sourceContents={},this.line=c??null,this.column=u??null,this.source=h??null,this.name=a??null,this[n]=!0,p!=null&&this.add(p)}o.fromStringWithSourceMap=function(u,h,p){var a=new o,d=u.split(r),l=0,f=function(){return y()+(y()||\"\");function y(){return l<d.length?d[l++]:void 0}},g=1,v=0,b=null;return h.eachMapping(function(y){if(b!==null)if(g<y.generatedLine)S(b,f()),g++,v=0;else{var m=d[l]||\"\",_=m.substr(0,y.generatedColumn-v);d[l]=m.substr(y.generatedColumn-v),v=y.generatedColumn,S(b,_),b=y;return}for(;g<y.generatedLine;)a.add(f()),g++;if(v<y.generatedColumn){var m=d[l]||\"\";a.add(m.substr(0,y.generatedColumn)),d[l]=m.substr(y.generatedColumn),v=y.generatedColumn}b=y},this),l<d.length&&(b&&S(b,f()),a.add(d.splice(l).join(\"\"))),h.sources.forEach(function(y){var m=h.sourceContentFor(y);m!=null&&(p!=null&&(y=s.join(p,y)),a.setSourceContent(y,m))}),a;function S(y,m){if(y===null||y.source===void 0)a.add(m);else{var _=p?s.join(p,y.source):y.source;a.add(new o(y.originalLine,y.originalColumn,_,m,y.name))}}},o.prototype.add=function(u){if(Array.isArray(u))u.forEach(function(h){this.add(h)},this);else if(u[n]||typeof u==\"string\")u&&this.children.push(u);else throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \"+u);return this},o.prototype.prepend=function(u){if(Array.isArray(u))for(var h=u.length-1;h>=0;h--)this.prepend(u[h]);else if(u[n]||typeof u==\"string\")this.children.unshift(u);else throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \"+u);return this},o.prototype.walk=function(u){for(var h,p=0,a=this.children.length;p<a;p++)h=this.children[p],h[n]?h.walk(u):h!==\"\"&&u(h,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(u){var h,p,a=this.children.length;if(a>0){for(h=[],p=0;p<a-1;p++)h.push(this.children[p]),h.push(u);h.push(this.children[p]),this.children=h}return this},o.prototype.replaceRight=function(u,h){var p=this.children[this.children.length-1];return p[n]?p.replaceRight(u,h):typeof p==\"string\"?this.children[this.children.length-1]=p.replace(u,h):this.children.push(\"\".replace(u,h)),this},o.prototype.setSourceContent=function(u,h){this.sourceContents[s.toSetString(u)]=h},o.prototype.walkSourceContents=function(u){for(var h=0,p=this.children.length;h<p;h++)this.children[h][n]&&this.children[h].walkSourceContents(u);for(var a=Object.keys(this.sourceContents),h=0,p=a.length;h<p;h++)u(s.fromSetString(a[h]),this.sourceContents[a[h]])},o.prototype.toString=function(){var u=\"\";return this.walk(function(h){u+=h}),u},o.prototype.toStringWithSourceMap=function(u){var h={code:\"\",line:1,column:0},p=new t(u),a=!1,d=null,l=null,f=null,g=null;return this.walk(function(v,b){h.code+=v,b.source!==null&&b.line!==null&&b.column!==null?((d!==b.source||l!==b.line||f!==b.column||g!==b.name)&&p.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:h.line,column:h.column},name:b.name}),d=b.source,l=b.line,f=b.column,g=b.name,a=!0):a&&(p.addMapping({generated:{line:h.line,column:h.column}}),d=null,a=!1);for(var S=0,y=v.length;S<y;S++)v.charCodeAt(S)===i?(h.line++,h.column=0,S+1===y?(d=null,a=!1):a&&p.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:h.line,column:h.column},name:b.name})):h.column++}),this.walkSourceContents(function(v,b){p.setSourceContent(v,b)}),{code:h.code,map:p}},e.SourceNode=o})),zl=ue((e=>{e.SourceMapGenerator=gn().SourceMapGenerator,e.SourceMapConsumer=Fl().SourceMapConsumer,e.SourceNode=Vl().SourceNode})),Ul=ue((e=>{e.__esModule=!0,e.safeJsonLiteral=o;var t=Ze(),s=/[\\x00-\\x1f\\\\\"\\u2028\\u2029<\\ud800-\\udfff]/,r=/<(?=!--|\\/?script)/gi;function i(p){return p.replace(r,\"\\\\u003C\")}function n(p){return\"\\\\u\"+p.charCodeAt(0).toString(16)}function o(p){return i(JSON.stringify(p).replace(/\\u2028/g,\"\\\\u2028\").replace(/\\u2029/g,\"\\\\u2029\").replace(/[\\ud800-\\udfff]/g,n))}var c=void 0;try{(typeof define!=\"function\"||!define.amd)&&(c=zl().SourceNode)}catch{}c||(c=function(p,a,d,l){this.src=\"\",l&&this.add(l)},c.prototype={add:function(a){t.isArray(a)&&(a=a.join(\"\")),this.src+=a},prepend:function(a){t.isArray(a)&&(a=a.join(\"\")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function u(p,a,d){if(t.isArray(p)){for(var l=[],f=0,g=p.length;f<g;f++)l.push(a.wrap(p[f],d));return l}else if(typeof p==\"boolean\"||typeof p==\"number\")return p+\"\";return p}function h(p){this.srcFile=p,this.source=[]}h.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,d){this.source.unshift(this.wrap(a,d))},push:function(a,d){this.source.push(this.wrap(a,d))},merge:function(){var a=this.empty();return this.each(function(d){a.add([\" \",d,`\n`])}),a},each:function(a){for(var d=0,l=this.source.length;d<l;d++)a(this.source[d])},empty:function(){var a=this.currentLocation||{start:{}};return new c(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var d=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return a instanceof c?a:(a=u(a,this,d),new c(d.start.line,d.start.column,this.srcFile,a))},functionCall:function(a,d,l){return l=this.generateList(l),this.wrap([a,d?\".\"+d+\"(\":\"(\",l,\")\"])},quotedString:function(a){return a=a+\"\",s.test(a)?o(a):'\"'+a+'\"'},objectLiteral:function(a){var d=this,l=[];Object.keys(a).forEach(function(g){var v=u(a[g],d);v!==\"undefined\"&&l.push([d.quotedString(g),\":\",v])});var f=this.generateList(l);return f.prepend(\"{\"),f.add(\"}\"),f},generateList:function(a){for(var d=this.empty(),l=0,f=a.length;l<f;l++)l&&d.add(\",\"),d.add(u(a[l],this));return d},generateArray:function(a){var d=this.generateList(a);return d.prepend(\"[\"),d.add(\"]\"),d}},e.default=h})),Wl=ue(((e,t)=>{e.__esModule=!0;function s(d){return d&&d.__esModule?d:{default:d}}var r=Fr(),i=s(yt()),n=Ze(),o=Ul(),c=s(o);function u(d){this.value=d}function h(){}h.prototype={nameLookup:function(l,f){return this.internalNameLookup(l,f)},depthedLookup:function(l){return[this.aliasable(\"container.lookup\"),\"(depths, \",this.quotedString(l),\")\"]},compilerInfo:function(){var l=r.COMPILER_REVISION;return[l,r.REVISION_CHANGES[l]]},appendToBuffer:function(l,f,g){return n.isArray(l)||(l=[l]),l=this.source.wrap(l,f),this.environment.isSimple?[\"return \",l,\";\"]:g?[\"buffer += \",l,\";\"]:(l.appendToBuffer=!0,l)},initializeBuffer:function(){return this.quotedString(\"\")},internalNameLookup:function(l,f){return this.lookupPropertyFunctionIsUsed=!0,[\"lookupProperty(\",l,\",\",this.quotedString(f),\")\"]},lookupPropertyFunctionIsUsed:!1,compile:function(l,f,g,v){this.environment=l,this.options=f,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!v,this.name=this.environment.name,this.isChild=!!g,this.context=g||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(l,f),this.useDepths=this.useDepths||l.useDepths||l.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||l.useBlockParams;var b=l.opcodes,S=void 0,y=void 0,m=void 0,_=void 0;for(m=0,_=b.length;m<_;m++)S=b[m],this.source.currentLocation=S.loc,y=y||S.loc,this[S.opcode].apply(this,S.args);if(this.source.currentLocation=y,this.pushSource(\"\"),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default(\"Compile completed with content left on stack\");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend([\"var decorators = container.decorators, \",this.lookupPropertyFunctionVarDeclaration(),`;\n`]),this.decorators.push(\"return fn;\"),v?this.decorators=Function.apply(this,[\"fn\",\"props\",\"container\",\"depth0\",\"data\",\"blockParams\",\"depths\",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {\n`),this.decorators.push(`}\n`),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(v);if(this.isChild)return k;var w={compiler:this.compilerInfo(),main:k};this.decorators&&(w.main_d=this.decorators,w.useDecorators=!0);var C=this.context,O=C.programs,E=C.decorators;for(m=0,_=O.length;m<_;m++)w[m]=O[m],E[m]&&(w[m+\"_d\"]=E[m],w.useDecorators=!0);return this.environment.usePartial&&(w.usePartial=!0),this.options.data&&(w.useData=!0),this.useDepths&&(w.useDepths=!0),this.useBlockParams&&(w.useBlockParams=!0),this.options.compat&&(w.compat=!0),v?w.compilerOptions=this.options:(w.compiler=JSON.stringify(w.compiler),this.source.currentLocation={start:{line:1,column:0}},w=this.objectLiteral(w),f.srcName?(w=w.toStringWithSourceMap({file:f.destName}),w.map=w.map&&w.map.toString()):w=w.toString()),w},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(l){var f=this,g=\"\",v=this.stackVars.concat(this.registers.list);v.length>0&&(g+=\", \"+v.join(\", \"));var b=0;Object.keys(this.aliases).forEach(function(m){var _=f.aliases[m];_.children&&_.referenceCount>1&&(g+=\", alias\"+ ++b+\"=\"+m,_.children[0]=\"alias\"+b)}),this.lookupPropertyFunctionIsUsed&&(g+=\", \"+this.lookupPropertyFunctionVarDeclaration());var S=[\"container\",\"depth0\",\"helpers\",\"partials\",\"data\"];(this.useBlockParams||this.useDepths)&&S.push(\"blockParams\"),this.useDepths&&S.push(\"depths\");var y=this.mergeSource(g);return l?(S.push(y),Function.apply(this,S)):this.source.wrap([\"function(\",S.join(\",\"),`) {\n `,y,\"}\"])},mergeSource:function(l){var f=this.environment.isSimple,g=!this.forceBuffer,v=void 0,b=void 0,S=void 0,y=void 0;return this.source.each(function(m){m.appendToBuffer?(S?m.prepend(\" + \"):S=m,y=m):(S&&(b?S.prepend(\"buffer += \"):v=!0,y.add(\";\"),S=y=void 0),b=!0,f||(g=!1))}),g?S?(S.prepend(\"return \"),y.add(\";\")):b||this.source.push('return \"\";'):(l+=\", buffer = \"+(v?\"\":this.initializeBuffer()),S?(S.prepend(\"return buffer + \"),y.add(\";\")):this.source.push(\"return buffer;\")),l&&this.source.prepend(\"var \"+l.substring(2)+(v?\"\":`;\n`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n `.trim()},blockValue:function(l){var f=this.aliasable(\"container.hooks.blockHelperMissing\"),g=[this.contextName(0)];this.setupHelperArgs(l,0,g);var v=this.popStack();g.splice(1,0,v),this.push(this.source.functionCall(f,\"call\",g))},ambiguousBlockValue:function(){var l=this.aliasable(\"container.hooks.blockHelperMissing\"),f=[this.contextName(0)];this.setupHelperArgs(\"\",0,f,!0),this.flushInline();var g=this.topStack();f.splice(1,0,g),this.pushSource([\"if (!\",this.lastHelper,\") { \",g,\" = \",this.source.functionCall(l,\"call\",f),\"}\"])},appendContent:function(l){this.pendingContent?l=this.pendingContent+l:this.pendingLocation=this.source.currentLocation,this.pendingContent=l},append:function(){if(this.isInline())this.replaceStack(function(f){return[\" != null ? \",f,' : \"\"']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var l=this.popStack();this.pushSource([\"if (\",l,\" != null) { \",this.appendToBuffer(l,void 0,!0),\" }\"]),this.environment.isSimple&&this.pushSource([\"else { \",this.appendToBuffer(\"''\",void 0,!0),\" }\"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(\"container.escapeExpression\"),\"(\",this.popStack(),\")\"]))},getContext:function(l){this.lastContext=l},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(l,f,g,v){var b=0;!v&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(l[b++])):this.pushContext(),this.resolvePath(\"context\",l,b,f,g)},lookupBlockParam:function(l,f){this.useBlockParams=!0,this.push([\"blockParams[\",l[0],\"][\",l[1],\"]\"]),this.resolvePath(\"context\",f,1)},lookupData:function(l,f,g){l?this.pushStackLiteral(\"container.data(data, \"+l+\")\"):this.pushStackLiteral(\"data\"),this.resolvePath(\"data\",f,0,!0,g)},resolvePath:function(l,f,g,v,b){var S=this;if(this.options.strict||this.options.assumeObjects){this.push(a(this.options.strict&&b,this,f,g,l));return}for(var y=f.length,m=function(k){S.replaceStack(function(w){var C=S.nameLookup(w,f[k],l);return v?[\" && \",C]:[\" != null ? \",C,\" : \",w]})},_=g;_<y;_++)m(_)},resolvePossibleLambda:function(){this.push([this.aliasable(\"container.lambda\"),\"(\",this.popStack(),\", \",this.contextName(0),\")\"])},pushStringParam:function(l,f){this.pushContext(),this.pushString(f),f!==\"SubExpression\"&&(typeof l==\"string\"?this.pushString(l):this.pushStackLiteral(l))},emptyHash:function(l){this.trackIds&&this.push(\"{}\"),this.stringParams&&(this.push(\"{}\"),this.push(\"{}\")),this.pushStackLiteral(l?\"undefined\":\"{}\")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var l=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(l.ids)),this.stringParams&&(this.push(this.objectLiteral(l.contexts)),this.push(this.objectLiteral(l.types))),this.push(this.objectLiteral(l.values))},pushString:function(l){this.pushStackLiteral(this.quotedString(l))},pushLiteral:function(l){this.pushStackLiteral(l)},pushProgram:function(l){l!=null?this.pushStackLiteral(this.programExpression(l)):this.pushStackLiteral(null)},registerDecorator:function(l,f){var g=this.nameLookup(\"decorators\",f,\"decorator\"),v=this.setupHelperArgs(f,l);this.decorators.push([\"var decorator = \",g,\";\"]),this.decorators.push(['if (typeof decorator !== \"function\") { throw new Error(',this.quotedString('Missing decorator: \"'+f+'\"'),\"); }\"]),this.decorators.push([\"fn = \",this.decorators.functionCall(\"decorator\",\"\",[\"fn\",\"props\",\"container\",v]),\" || fn;\"])},invokeHelper:function(l,f,g){var v=this.popStack(),b=this.setupHelper(l,f),S=[];g&&S.push(b.name),S.push(v),this.options.strict||S.push(this.aliasable(\"container.hooks.helperMissing\"));var y=[\"(\",this.itemsSeparatedBy(S,\"||\"),\")\"],m=this.source.functionCall(y,\"call\",b.callParams);this.push(m)},itemsSeparatedBy:function(l,f){var g=[];g.push(l[0]);for(var v=1;v<l.length;v++)g.push(f,l[v]);return g},invokeKnownHelper:function(l,f){var g=this.setupHelper(l,f);this.push(this.source.functionCall(g.name,\"call\",g.callParams))},invokeAmbiguous:function(l,f){this.useRegister(\"helper\");var g=this.popStack();this.emptyHash();var v=this.setupHelper(0,l,f),b=[\"(\",\"(helper = \",this.lastHelper=this.nameLookup(\"helpers\",l,\"helper\"),\" || \",g,\")\"];this.options.strict||(b[0]=\"(helper = \",b.push(\" != null ? helper : \",this.aliasable(\"container.hooks.helperMissing\"))),this.push([\"(\",b,v.paramsInit?[\"),(\",v.paramsInit]:[],\"),\",\"(typeof helper === \",this.aliasable('\"function\"'),\" ? \",this.source.functionCall(\"helper\",\"call\",v.callParams),\" : helper))\"])},invokePartial:function(l,f,g){var v=[],b=this.setupParams(f,1,v);l&&(f=this.popStack(),delete b.name),g&&(b.indent=this.quotedString(g)),b.helpers=\"helpers\",b.partials=\"partials\",b.decorators=\"container.decorators\",l?v.unshift(f):v.unshift(this.nameLookup(\"partials\",f,\"partial\")),this.options.compat&&(b.depths=\"depths\"),b=this.objectLiteral(b),v.push(b),this.push(this.source.functionCall(\"container.invokePartial\",\"\",v))},assignToHash:function(l){var f=this.popStack(),g=void 0,v=void 0,b=void 0;this.trackIds&&(b=this.popStack()),this.stringParams&&(v=this.popStack(),g=this.popStack());var S=this.hash;g&&(S.contexts[l]=g),v&&(S.types[l]=v),b&&(S.ids[l]=b),S.values[l]=f},pushId:function(l,f,g){l===\"BlockParam\"?this.pushStackLiteral(\"blockParams[\"+f[0]+\"].path[\"+f[1]+\"]\"+(g?\" + \"+this.quotedString(\".\"+g):\"\")):l===\"PathExpression\"?this.pushString(f):l===\"SubExpression\"?this.pushStackLiteral(\"true\"):this.pushStackLiteral(\"null\")},compiler:h,compileChildren:function(l,f){for(var g=l.children,v=void 0,b=void 0,S=0,y=g.length;S<y;S++){v=g[S],b=new this.compiler;var m=this.matchExistingProgram(v);if(m==null){var _=this.context.programs.push(\"\")-1;v.index=_,v.name=\"program\"+_,this.context.programs[_]=b.compile(v,f,this.context,!this.precompile),this.context.decorators[_]=b.decorators,this.context.environments[_]=v,this.useDepths=this.useDepths||b.useDepths,this.useBlockParams=this.useBlockParams||b.useBlockParams,v.useDepths=this.useDepths,v.useBlockParams=this.useBlockParams}else v.index=m.index,v.name=\"program\"+m.index,this.useDepths=this.useDepths||m.useDepths,this.useBlockParams=this.useBlockParams||m.useBlockParams}},matchExistingProgram:function(l){for(var f=0,g=this.context.environments.length;f<g;f++){var v=this.context.environments[f];if(v&&v.equals(l))return v}},programExpression:function(l){var f=this.environment.children[l],g=[f.index,\"data\",f.blockParams];return(this.useBlockParams||this.useDepths)&&g.push(\"blockParams\"),this.useDepths&&g.push(\"depths\"),\"container.program(\"+g.join(\", \")+\")\"},useRegister:function(l){this.registers[l]||(this.registers[l]=!0,this.registers.list.push(l))},push:function(l){return l instanceof u||(l=this.source.wrap(l)),this.inlineStack.push(l),l},pushStackLiteral:function(l){this.push(new u(l))},pushSource:function(l){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),l&&this.source.push(l)},replaceStack:function(l){var f=[\"(\"],g=void 0,v=void 0,b=void 0;if(!this.isInline())throw new i.default(\"replaceStack on non-inline\");var S=this.popStack(!0);if(S instanceof u)g=[S.value],f=[\"(\",g],b=!0;else{v=!0;var y=this.incrStack();f=[\"((\",this.push(y),\" = \",S,\")\"],g=this.topStack()}var m=l.call(this,g);b||this.popStack(),v&&this.stackSlot--,this.push(f.concat(m,\")\"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(\"stack\"+this.stackSlot),this.topStackName()},topStackName:function(){return\"stack\"+this.stackSlot},flushInline:function(){var l=this.inlineStack;this.inlineStack=[];for(var f=0,g=l.length;f<g;f++){var v=l[f];if(v instanceof u)this.compileStack.push(v);else{var b=this.incrStack();this.pushSource([b,\" = \",v,\";\"]),this.compileStack.push(b)}}},isInline:function(){return this.inlineStack.length},popStack:function(l){var f=this.isInline(),g=(f?this.inlineStack:this.compileStack).pop();if(!l&&g instanceof u)return g.value;if(!f){if(!this.stackSlot)throw new i.default(\"Invalid stack pop\");this.stackSlot--}return g},topStack:function(){var l=this.isInline()?this.inlineStack:this.compileStack,f=l[l.length-1];return f instanceof u?f.value:f},contextName:function(l){return this.useDepths&&l?\"depths[\"+l+\"]\":\"depth\"+l},quotedString:function(l){return this.source.quotedString(l)},objectLiteral:function(l){return this.source.objectLiteral(l)},aliasable:function(l){var f=this.aliases[l];return f?(f.referenceCount++,f):(f=this.aliases[l]=this.source.wrap(l),f.aliasable=!0,f.referenceCount=1,f)},setupHelper:function(l,f,g){var v=[];return{params:v,paramsInit:this.setupHelperArgs(f,l,v,g),name:this.nameLookup(\"helpers\",f,\"helper\"),callParams:[this.aliasable(this.contextName(0)+\" != null ? \"+this.contextName(0)+\" : (container.nullContext || {})\")].concat(v)}},setupParams:function(l,f,g){var v={},b=[],S=[],y=[],m=!g,_=void 0;m&&(g=[]),v.name=this.quotedString(l),v.hash=this.popStack(),this.trackIds&&(v.hashIds=this.popStack()),this.stringParams&&(v.hashTypes=this.popStack(),v.hashContexts=this.popStack());var k=this.popStack(),w=this.popStack();(w||k)&&(v.fn=w||\"container.noop\",v.inverse=k||\"container.noop\");for(var C=f;C--;)_=this.popStack(),g[C]=_,this.trackIds&&(y[C]=this.popStack()),this.stringParams&&(S[C]=this.popStack(),b[C]=this.popStack());return m&&(v.args=this.source.generateArray(g)),this.trackIds&&(v.ids=this.source.generateArray(y)),this.stringParams&&(v.types=this.source.generateArray(S),v.contexts=this.source.generateArray(b)),this.options.data&&(v.data=\"data\"),this.useBlockParams&&(v.blockParams=\"blockParams\"),v},setupHelperArgs:function(l,f,g,v){var b=this.setupParams(l,f,g);return b.loc=p(this),b=this.objectLiteral(b),v?(this.useRegister(\"options\"),g.push(\"options\"),[\"options=\",b]):g?(g.push(b),\"\"):b}},(function(){for(var d=\"break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false\".split(\" \"),l=h.RESERVED_WORDS={},f=0,g=d.length;f<g;f++)l[d[f]]=!0})(),h.isValidJavaScriptVariableName=function(d){return!h.RESERVED_WORDS[d]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(d)};function p(d){var l=d.source.currentLocation;return l?o.safeJsonLiteral(l):\"undefined\"}function a(d,l,f,g,v){var b=l.popStack(),S=f.length;d&&S--;for(var y=g;y<S;y++)b=l.nameLookup(b,f[y],v);return d?[l.aliasable(\"container.strict\"),\"(\",b,\", \",l.quotedString(f[S]),\", \",p(l),\" )\"]:b}e.default=h,t.exports=e.default})),Xl=ue(((e,t)=>{e.__esModule=!0;function s(l){return l&&l.__esModule?l:{default:l}}var r=s(Rl()),i=s(un()),n=Nl(),o=Dl(),c=s(Wl()),u=s(pn()),h=s(cn()),p=r.default.create;function a(){var l=p();return l.compile=function(f,g){return o.compile(f,g,l)},l.precompile=function(f,g){return o.precompile(f,g,l)},l.AST=i.default,l.Compiler=o.Compiler,l.JavaScriptCompiler=c.default,l.Parser=n.parser,l.parse=n.parse,l.parseWithoutProcessing=n.parseWithoutProcessing,l}var d=a();d.create=a,h.default(d),d.Visitor=u.default,d.default=d,e.default=d,t.exports=e.default})),et=ha(Xl(),1),Vr={\"=\":\"eq\",\"==\":\"eq\",\"!=\":\"ne\",\">\":\"gt\",\"<\":\"lt\",\">=\":\"gte\",\"<=\":\"lte\"},Yl={\"+\":\"add\",\"-\":\"sub\",\"*\":\"mul\",\"/\":\"div\",\"%\":\"mod\"},Gl=[\"==\",\"!=\",\">=\",\"<=\",\"&&\",\"||\",\"=\",\">\",\"<\",\"!\",\"+\",\"*\",\"%\",\"-\",\"/\"],Zl=[\"and\",\"or\",\"not\"],mn=[\"true\",\"false\",\"null\",\"undefined\"],jl=new Set([...` \t\\r\n!\"'()<>=&|{}~+*%`]),zr=/^-?\\d+(\\.\\d+)?$/,ze=class extends Error{};function Ql(e){const t=[];let s=0;for(;s<e.length;){const r=e[s];if(/\\s/.test(r)){s++;continue}if(r===\"(\"||r===\")\"){t.push({type:r,text:r}),s++;continue}if(r==='\"'||r===\"'\"){let c=s+1;for(;c<e.length&&e[c]!==r;)e[c]===\"\\\\\"&&c++,c++;if(c>=e.length)throw new ze(\"unterminated string\");t.push({type:\"value\",text:e.slice(s,c+1)}),s=c+1;continue}const i=Gl.find(c=>e.startsWith(c,s)&&!(c===\"-\"&&/\\d/.test(e[s+1]??\"\")));if(i){t.push({type:\"op\",text:i}),s+=i.length;continue}let n=s;for(;n<e.length&&!jl.has(e[n]);){if(e[n]===\"[\"){const c=e.indexOf(\"]\",n);if(c===-1)throw new ze(\"missing ']'\");n=c}n++}if(n===s)throw new ze(`unexpected '${r}'`);const o=e.slice(s,n);Zl.includes(o)?t.push({type:\"op\",text:o}):mn.includes(o)||zr.test(o)?t.push({type:\"value\",text:o}):t.push({type:\"ident\",text:o}),s=n}return t}var Jl=class{constructor(e){this.tokens=e,this.pos=0,this.usedInfix=!1}peek(e=0){return this.tokens[this.pos+e]}next(){return this.tokens[this.pos++]}isOp(e,...t){return e?.type===\"op\"&&t.includes(e.text)}startsPrimary(e){return e?.type===\"ident\"||e?.type===\"value\"||e?.type===\"(\"}describe(e){return e?`'${e.text}'`:\"end of expression\"}parseExpression(){const e=this.parseOr();if(this.peek())throw new ze(`unexpected ${this.describe(this.peek())}`);return e}parseArguments(e){const t=[];for(let s=0;s<e;s++)t.push(this.parsePrimary());if(!this.peek())throw new ze(\"expected a value\");return t.push(this.parseExpression()),t}parseCondition(){const e=[this.parseOr()];for(;this.peek()?.type===\"ident\"&&this.isOp(this.peek(1),\"=\");)e.push(this.parseHashPair());if(this.peek())throw new ze(`unexpected ${this.describe(this.peek())}`);return e}parseHashPair(){const e=this.next().text;return this.next(),{kind:\"raw\",text:`${e}=${ns(this.parsePrimary())}`}}parseOr(){return this.parseChain([\"or\",\"||\"],\"or\",()=>this.parseAnd())}parseAnd(){return this.parseChain([\"and\",\"&&\"],\"and\",()=>this.parseNot())}parseChain(e,t,s){const r=[s()];for(;this.isOp(this.peek(),...e);){const i=this.next().text;if(!this.peek())throw new ze(`expected a value after '${i}'`);r.push(s())}return r.length===1?r[0]:(this.usedInfix=!0,{kind:\"call\",name:t,args:r})}parseNot(){if(this.isOp(this.peek(),\"not\",\"!\")){const e=this.next().text;if(!this.peek())throw new ze(`expected a value after '${e}'`);return this.usedInfix=!0,{kind:\"call\",name:\"not\",args:[this.parseNot()]}}return this.parseComparison()}parseComparison(){const e=this.parseAdditive(),t=this.peek();if(t?.type!==\"op\"||!(t.text in Vr))return e;if(this.next(),!this.peek())throw new ze(`expected a value after '${t.text}'`);const s=this.parseAdditive(),r=this.peek();if(r?.type===\"op\"&&r.text in Vr)throw new ze(`comparisons can't be chained (at '${r.text}'), use \"and\" to combine them`);return this.usedInfix=!0,{kind:\"call\",name:Vr[t.text],args:[e,s]}}parseAdditive(){return this.parseArithmetic([\"+\",\"-\"],()=>this.parseMultiplicative())}parseMultiplicative(){return this.parseArithmetic([\"*\",\"/\",\"%\"],()=>this.parseUnary())}parseArithmetic(e,t){let s=t();for(;;){let r;const i=this.peek();if(this.isOp(i,...e)){if(r=this.next().text,!this.peek())throw new ze(`expected a value after '${r}'`)}else if(e.includes(\"-\")&&i?.type===\"value\"&&i.text.startsWith(\"-\")&&zr.test(i.text))r=\"-\",this.tokens[this.pos]={type:\"value\",text:i.text.slice(1)};else return s;this.usedInfix=!0,s={kind:\"call\",name:Yl[r],args:[s,t()]}}}parseUnary(){if(this.isOp(this.peek(),\"-\")){if(this.next(),!this.peek())throw new ze(\"expected a value after '-'\");return this.usedInfix=!0,{kind:\"call\",name:\"sub\",args:[{kind:\"raw\",text:\"0\"},this.parseUnary()]}}return this.parsePrimary()}parsePrimary(){const e=this.peek();if(e?.type===\"ident\"||e?.type===\"value\")return this.next(),{kind:\"raw\",text:e.text};if(e?.type===\"(\"){this.next();const t=this.isHelperCall()?this.parseHelperCall():this.parseOr();if(this.peek()?.type!==\")\")throw new ze(`expected ')' but found ${this.describe(this.peek())}`);return this.next(),t}if(this.isOp(e,\"not\",\"!\")){const t=e?.text===\"!\"?\"!value\":\"not value\";throw new ze(`'${e?.text}' must be inside parentheses here, e.g. (${t})`)}throw e?.type===\"op\"?new ze(`expected a value before '${e.text}'`):new ze(e?`unexpected ${this.describe(e)}`:\"expected a value\")}isHelperCall(){const e=this.peek(),t=this.peek(1);return this.isOp(e,\"and\",\"or\")?!0:e?.type===\"ident\"&&this.startsPrimary(t)}parseHelperCall(){const e=this.next().text,t=[];for(;this.peek()&&this.peek()?.type!==\")\";)this.peek()?.type===\"ident\"&&this.isOp(this.peek(1),\"=\")?t.push(this.parseHashPair()):t.push(this.parsePrimary());return{kind:\"call\",name:e,args:t}}};function ns(e){return e.kind===\"raw\"?e.text:`(${e.name} ${e.args.map(ns).join(\" \")})`}function Xs(e,t,s){const r=t===\"display\"||t===\"value\";let i=null,n=[];try{n=Ql(e)}catch(h){if(!r||!(h instanceof ze))return null;i=h}const o=n.some(h=>h.type===\"op\"),c=new Jl(n);let u=[];if(!i)try{u=t===\"condition\"?c.parseCondition():t===\"arguments\"?c.parseArguments(1):[c.parseExpression()]}catch(h){if(!(h instanceof ze)||!o&&!r)return null;i=h}if(i)throw new Error(`Invalid ${s} \"${e.trim()}\": ${i.message}`);return!c.usedInfix&&!r?null:u}function Kl(e){const t=Xs(e,\"condition\",\"condition\");return t&&t.map(ns).join(\" \")}function ec(e){const t=Xs(e,\"arguments\",\"expression\");return t&&t.map(ns).join(\" \")}function tc(e){const t=Xs(e,\"display\",\"expression\")[0];if(t.kind===\"call\")return`${t.name} ${t.args.map(ns).join(\" \")}`;if(mn.includes(t.text)||zr.test(t.text)||/^[\"']/.test(t.text))throw new Error(`Invalid expression \"${e.trim()}\": expected an attribute or a calculation`);return t.text}function sc(e){return ns(Xs(e,\"value\",\"expression\")[0])}function rc(e){const t=[];let s=0,r=null,i=0;for(let n=0;n<e.length;n++){const o=e[n];r?o===\"\\\\\"?n++:o===r&&(r=null):o==='\"'||o===\"'\"?r=o:o===\"(\"?s++:o===\")\"?s=Math.max(0,s-1):o===\",\"&&s===0&&(t.push(e.slice(i,n)),i=n+1)}return t.push(e.slice(i)),t.map(n=>n.trim()).filter(n=>n!==\"\")}var Ur=/(\\\\*)\\{\\{(~?\\s*)(?:(#if|#unless|else\\s+if|else\\s+unless)(?=[\\s(!])|(set|inc|dec)(?=\\s)|(=))/g;function ic(e,t){let s=null;for(let r=t;r<e.length;r++){const i=e[r];if(s)i===\"\\\\\"?r++:i===s&&(s=null);else if(i==='\"'||i===\"'\")s=i;else{if(e.startsWith(\"~}}\",r))return r;if(e.startsWith(\"}}\",r))return r}}return-1}function nc(e){if(!e.includes(\"{{\"))return e;let t=\"\",s=0;Ur.lastIndex=0;let r;for(;(r=Ur.exec(e))!==null;){if(r[1].length%2===1)continue;const i=r.index+r[0].length,n=ic(e,i);if(n===-1)break;const o=e.slice(i,n);if(r[5]){const c=r.index+r[1].length;t+=e.slice(s,c)+\"{{\"+r[2]+tc(o),s=n}else{const c=r[3]?Kl(o):ec(o);c!==null&&(t+=e.slice(s,i)+\" \"+c,s=n)}Ur.lastIndex=n}return t+e.slice(s)}var Wr=e=>e==null||e===!1||e===\"\",Xr=e=>typeof e==\"number\"||Wr(e)||typeof e==\"string\"&&e.trim()!==\"\"&&!isNaN(Number(e));function Mt(e,t){if(!Xr(t))throw new Error(`\"${e}\" needs numbers, but was given ${JSON.stringify(t)}`);return Wr(t)?0:Number(t)}var oc=class{constructor(e,t,s){this.expressionCache=new Map,this.getStory=e,this.state=t,this.getCurrentSection=s,this.handlebars=et.default.create(),this.handlebars.registerHelper(\"embed\",u=>{const h=this.getCurrentSection();if(h.passages&&u in h.passages)return new et.default.SafeString(this.process(h.passages[u].text||\"\",!0));const p=this.getStory();if(u in p.sections)return new et.default.SafeString(this.process(p.sections[u].text||\"\",!0))}),this.handlebars.registerHelper(\"seen\",u=>this.state.getSeen(u)),this.handlebars.registerHelper(\"get\",u=>this.state.get(u)),this.handlebars.registerHelper(\"at\",u=>{const h=this.state.get(\"_section\");return Array.isArray(u)?u.includes(h):h===u});const r=u=>u&&typeof u==\"object\"&&typeof u.toString==\"function\"&&!Array.isArray(u)?u.toString():u;this.handlebars.registerHelper(\"set\",(u,h)=>(this.state.set(u,r(h)),\"\")),this.handlebars.registerHelper(\"__value\",u=>(this.evaluated=r(u),\"\")),this.handlebars.registerHelper(\"unset\",u=>(this.state.set(u,!1),\"\"));const i=(u,h)=>{this.handlebars.registerHelper(u,(p,...a)=>{const d=a.length>1?Mt(u,r(a[0])):1,l=Mt(u,this.state.get(p));return this.state.set(p,l+h*d),\"\"})};i(\"inc\",1),i(\"dec\",-1),this.handlebars.registerHelper(\"and\",(...u)=>u.slice(0,-1).every(Boolean)),this.handlebars.registerHelper(\"or\",(...u)=>u.slice(0,-1).some(Boolean)),this.handlebars.registerHelper(\"not\",u=>!u),this.handlebars.registerHelper(\"eq\",(u,h)=>u==h),this.handlebars.registerHelper(\"ne\",(u,h)=>u!=h),this.handlebars.registerHelper(\"gt\",(u,h)=>u>h),this.handlebars.registerHelper(\"lt\",(u,h)=>u<h),this.handlebars.registerHelper(\"gte\",(u,h)=>u>=h),this.handlebars.registerHelper(\"lte\",(u,h)=>u<=h);const n=(u,h)=>{this.handlebars.registerHelper(u,(...p)=>{const a=p.slice(0,-1).map(r);if(a.length!==2)throw new Error(`\"${u}\" needs two values, but was given ${a.length}`);return h(Mt(u,a[0]),Mt(u,a[1]))})};this.handlebars.registerHelper(\"add\",(...u)=>{const h=u.slice(0,-1).map(r);if(h.length!==2)throw new Error(`\"add\" needs two values, but was given ${h.length}`);const[p,a]=h;if(Xr(p)&&Xr(a))return Mt(\"add\",p)+Mt(\"add\",a);const d=l=>{if(Wr(l))return\"\";if(typeof l==\"object\")throw new Error(`\"add\" can't add ${Array.isArray(l)?\"a list\":\"an object\"}`);return String(l)};return d(p)+d(a)}),n(\"sub\",(u,h)=>u-h),n(\"mul\",(u,h)=>u*h),n(\"div\",(u,h)=>{if(h===0)throw new Error(\"division by zero\");return u/h}),n(\"mod\",(u,h)=>{if(h===0)throw new Error(\"division by zero\");return u%h}),this.handlebars.registerHelper(\"array\",function(...u){return u.pop(),u}),this.handlebars.registerHelper(\"append\",(u,h)=>{const p=this.state.get(u)||[],a=Array.isArray(p)?[...p]:[p],d=r(h);return Array.isArray(d)?a.push(...d.map(r)):a.push(d),this.state.set(u,a),\"\"}),this.handlebars.registerHelper(\"prepend\",(u,h)=>{const p=this.state.get(u)||[],a=Array.isArray(p)?[...p]:[p],d=r(h);return Array.isArray(d)?a.unshift(...d.map(r)):a.unshift(d),this.state.set(u,a),\"\"}),this.handlebars.registerHelper(\"pop\",u=>{const h=this.state.get(u)||[];if(!Array.isArray(h)||h.length===0)return\"\";const p=[...h],a=p.shift();return this.state.set(u,p),a}),this.handlebars.registerHelper(\"remove\",(u,h)=>{const p=this.state.get(u)||[];if(!Array.isArray(p))return\"\";const a=r(h),d=p.findIndex(l=>r(l)===a);if(d!==-1){const l=[...p];l.splice(d,1),this.state.set(u,l)}return\"\"}),this.handlebars.registerHelper(\"contains\",(u,h)=>{let p;if(typeof u==\"string\"){const d=this.state.get(u);p=Array.isArray(d)?d:[]}else if(Array.isArray(u))p=u;else return!1;const a=r(h);return p.some(d=>r(d)===a)}),this.handlebars.registerHelper(\"length\",u=>{let h;if(typeof u==\"string\"){const p=this.state.get(u);h=Array.isArray(p)?p:[]}else if(Array.isArray(u))h=u;else return 0;return h.length});const o=u=>String(u).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),c=u=>{let h=\"\";const p=u.hash.set||\"\";if(p){const a=this.getStory().expressions?rc(p):p.split(\",\").map(d=>d.trim());h+=` data-set=\"${o(JSON.stringify(a))}\"`}return h};this.handlebars.registerHelper(\"section\",(u,h)=>{const p=h.hash.text||u;return new et.default.SafeString(`<a class=\"squiffy-link link-section\" data-section=\"${o(u)}\"${c(h)} role=\"link\" tabindex=\"0\">${p}</a>`)}),this.handlebars.registerHelper(\"passage\",(u,h)=>{const p=h.hash.text||u;return new et.default.SafeString(`<a class=\"squiffy-link link-passage\" data-passage=\"${o(u)}\"${c(h)} role=\"link\" tabindex=\"0\">${p}</a>`)})}evaluate(e){let t=this.expressionCache.get(e);return t||(t=this.handlebars.compile(`{{__value ${sc(e)}}}`),this.expressionCache.set(e,t)),this.evaluated=void 0,t(this.state.getStore()),this.evaluated}process(e,t){try{return e=this.handlebars.compile(nc(e))(this.state.getStore()),t?Hr(e,{async:!1}).trim():qr(e,{async:!1}).trim()}catch(s){const r=s instanceof Error?s.message:String(s);return console.error(\"Squiffy template error:\",r),vn(\"Template error:\",r)}}};function vn(e,t){const s=r=>r.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\");return`<div class=\"squiffy-error\" style=\"color: red; background: #ffe0e0; padding: 8px; border: 1px solid red; margin: 4px 0; font-family: monospace; white-space: pre-wrap;\"><strong>${s(e)}</strong> ${s(t)}</div>`}var ac=class{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>this.off(e,t)}off(e,t){this.listeners.get(e)?.delete(t)}once(e,t){const s=this.on(e,r=>{s(),t(r)});return s}emit(e,t){this.listeners.get(e)?.forEach(s=>{try{s(t)}catch(r){console.error(`[Squiffy] handler for \"${String(e)}\" failed`,r)}})}},lc=class{constructor(e,t,s,r,i){this.store={},this.persist=e,this.storyId=t,this.onSet=s,this.emitter=r,this.onSetInternal=i}usePersistentStorage(){return this.persist&&window.localStorage&&this.storyId}set(e,t){this.setInternal(e,t,!0)}setInternal(e,t,s){typeof t>\"u\"&&(t=!0),s&&this.onSetInternal&&this.onSetInternal(e,this.get(e),structuredClone(t)),this.store[e]=structuredClone(t),this.usePersistentStorage()&&(localStorage[this.storyId+\"-\"+e]=JSON.stringify(t)),s&&this.emitter.emit(\"set\",{attribute:e,value:t}),this.onSet(e,t)}get(e){return e in this.store?structuredClone(this.store[e]):null}getStore(){return new Proxy({},{get:(e,t)=>this.get(String(t)),has:(e,t)=>String(t)in this.store,ownKeys:()=>Object.keys(this.store),getOwnPropertyDescriptor:(e,t)=>{const s=String(t);if(s in this.store)return{enumerable:!0,configurable:!0,value:this.get(s)}}})}load(){if(!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)if(t.startsWith(this.storyId+\"-\")){const s=t.substring(this.storyId.length+1);this.store[s]=JSON.parse(localStorage[t])}}reset(){if(this.store={},!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)t.startsWith(this.storyId)&&localStorage.removeItem(t)}setSeen(e){let t=this.get(\"_seen_sections\");t||(t=[]),t.indexOf(e)==-1&&(t.push(e),this.set(\"_seen_sections\",t))}getSeen(e){const t=this.get(\"_seen_sections\");return t?t.indexOf(e)>-1:!1}};function yn(e,t){return!e&&!t?!0:!e||!t||e.length!==t.length?!1:e.every((s,r)=>s===t[r])}function cc(e,t,s,r,i,n){function o(p){return p.replace(/'/g,\"\\\\'\")}function c(p){return s.querySelectorAll(`[data-source='[[${o(p)}]]']`)}function u(p,a){return s.querySelectorAll(`[data-source='[[${o(p)}]][${o(a)}]']`)}function h(p,a){const d=Array.from(p.querySelectorAll(\"a.link-passage.disabled\")).map(l=>l.getAttribute(\"data-passage\"));p.innerHTML=a;for(const l of d){const f=p.querySelector(`a.link-passage[data-passage=\"${l}\"]`);f&&i(f)}}for(const p of Object.keys(e.sections)){const a=c(p);if(a.length){const d=t.sections[p];if(d){const l=e.sections[p],f=!yn(l.attributes,d.attributes),g=d.text!=l.text;if(f&&n(d.attributes||[]),g||f)for(const v of a)h(v,r(d.text||\"\",d))}else for(const l of a)l.closest(\".squiffy-output-section\")?.remove()}if(e.sections[p].passages)for(const d of Object.keys(e.sections[p].passages)){const l=u(p,d);if(!l.length)continue;const f=t.sections[p]?.passages&&t.sections[p]?.passages[d];if(f){const g=e.sections[p].passages[d],v=!yn(g.attributes,f.attributes),b=f.text!=g.text;if(v&&n(f.attributes||[]),b||v)for(const S of l)h(S,r(f.text||\"\",t.sections[p]))}else for(const g of l)g.closest(\".squiffy-output-passage\")?.remove()}}}var uc=class{constructor(e,t,s,r,i,n,o,c,u,h,p){this.plugins=[],this.outputElement=e,this.textProcessor=t,this.state=s,this.linkHandler=r,this.getSectionText=i,this.getPassageText=n,this.processText=o,this.addTransition=c,this.animation=u,this.emitter=h,this.resolveAssetsInHtml=p}add(e){const t=e.init({outputElement:this.outputElement,registerHelper:(s,r)=>{this.textProcessor.handlebars.registerHelper(s,r)},registerLinkHandler:(s,r)=>{this.linkHandler.registerLinkHandler(s,r)},get:s=>this.state.get(s),set:(s,r)=>this.state.set(s,r),getSectionText:this.getSectionText,getPassageText:this.getPassageText,processText:this.processText,resolveAssetsInHtml:this.resolveAssetsInHtml,addTransition:this.addTransition,animation:this.animation,on:(s,r)=>this.emitter.on(s,r),off:(s,r)=>this.emitter.off(s,r),once:(s,r)=>this.emitter.once(s,r)});return this.plugins.push(e),t}onWrite(e){this.plugins.forEach(t=>t.onWrite?.(e))}onLoad(){this.plugins.forEach(e=>e.onLoad?.())}};function bn(e,t){return new Promise(s=>{e.addEventListener(\"transitionend\",function(){e.innerHTML=t,e.addEventListener(\"transitionend\",function(){e.classList.remove(\"fade-in\"),s()},{once:!0}),e.classList.remove(\"fade-out\"),e.classList.add(\"fade-in\")},{once:!0}),e.classList.add(\"fade-out\")})}function hc(){return{name:\"replaceLabel\",init(e){e.registerHelper(\"label\",function(t,s){return new et.default.SafeString(`<span class=\"squiffy-label-${t}\">${s.fn(this)}</span>`)}),e.registerHelper(\"replace\",function(t,s){const r=s.fn(this),i=e.outputElement.querySelector(`.squiffy-label-${t}`);if(i){const n=r.includes(`\n\n`)?qr(r,{async:!1}).trim():Hr(r,{async:!1}).trim();e.addTransition(()=>bn(i,n))}return\"\"})}}}function pc(){const e=i=>i.replace(/&/g,\"&amp;\").replace(/'/g,\"&#39;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"),t=(i,n,o,c)=>{const u=o.map(l=>l.toString()),h=r(u,null),p=c.hash.set||\"\";p&&i.set(p,h[0]);const a=e(JSON.stringify(h.slice(1))||\"\"),d=c.hash.show==\"next\"?h[1]:h[0];return new et.default.SafeString(`<a class=\"squiffy-link\" data-handler=\"${n}\" data-value=\"${e(h[0])}\" data-show=\"${c.hash.show||\"\"}\" data-options='${a}' data-attribute=\"${p}\" role=\"link\">${d}</a>`)},s=(i,n,o)=>{const c={},u=JSON.parse(n.getAttribute(\"data-options\")??\"[]\")||[],h=r(u,o?n.getAttribute(\"data-value\"):\"\");n.innerHTML=n.getAttribute(\"data-show\")==\"next\"?h[1]:h[0],n.setAttribute(\"data-value\",h[0]),n.setAttribute(\"data-options\",JSON.stringify(h.slice(1))||\"\"),h[1]||(c.disableLink=!0);const p=n.getAttribute(\"data-attribute\");return p&&i.set(p,n.getAttribute(\"data-value\")),window.getSelection()?.removeAllRanges(),c},r=(i,n)=>{const o=i[0],c=i.slice(1);return n&&c.push(n),[o,...c]};return{name:\"rotateSequence\",init(i){i.registerHelper(\"rotate\",(n,o)=>t(i,\"rotate\",n,o)),i.registerHelper(\"sequence\",(n,o)=>t(i,\"sequence\",n,o)),i.registerLinkHandler(\"rotate\",n=>s(i,n,!0)),i.registerLinkHandler(\"sequence\",n=>s(i,n,!1))}}}function dc(){return{name:\"random\",init(e){e.registerHelper(\"random\",(t,s)=>{const r=t.map(o=>o.toString()),i=r[Math.floor(Math.random()*r.length)],n=s.hash.set||\"\";return n&&e.set(n,i),new et.default.SafeString(i)})}}}function fc(){let e;return{name:\"live\",init(t){e=t,e.registerHelper(\"live\",(r,i)=>{const n=i.hash.section||\"\";if(n)return new et.default.SafeString(`<span class=\"squiffy-live\" data-attribute=\"${r}\" data-section=\"${n}\"></span>`);const o=i.hash.passage||\"\";return o?new et.default.SafeString(`<span class=\"squiffy-live\" data-attribute=\"${r}\" data-passage=\"${o}\"></span>`):new et.default.SafeString(`<span class=\"squiffy-live\" data-attribute=\"${r}\"></span>`)});const s=async r=>{const i=[],n=`.squiffy-live[data-attribute=\"${CSS.escape(r.attribute)}\"]`;for(const o of e.outputElement.querySelectorAll(n)){const c=o.innerHTML;let u=\"\";if(o.dataset.section){const h=e.getSectionText(o.dataset.section);h&&(u=e.processText(h,!0))}else if(o.dataset.passage){const h=e.getPassageText(o.dataset.passage);h&&(u=e.processText(h,!0))}else u=r.value;c!==u&&i.push(bn(o,u))}await Promise.all(i)};e.on(\"set\",async r=>{await s(r)})},onWrite(t){e&&t.querySelectorAll(\".squiffy-live\").forEach(s=>{if(s.dataset.section){const r=e.getSectionText(s.dataset.section);r&&(s.innerHTML=e.processText(r,!0))}else if(s.dataset.passage){const r=e.getPassageText(s.dataset.passage);r&&(s.innerHTML=e.processText(r,!0))}else{const r=s.dataset.attribute;s.textContent=r?e.get(r):\"\"}})}}}function gc(){let e;const t=r=>{const i={};for(const[n,o]of Object.entries(r)){if(o==null){i[n]=o;continue}try{i[n]=JSON.parse(o)}catch{i[n]=o}}return i},s=r=>{for(const i of r.querySelectorAll(\".squiffy-animate\")){const n=t(i.dataset);if(!n.content)continue;const o=n.content.includes(`\n\n`)?qr(n.content,{async:!1}):Hr(n.content,{async:!1});if(i.innerHTML=e.resolveAssetsInHtml(o.trim()),!n.name)continue;const c=i.innerHTML;let u=[];const h=()=>{for(const d of u)e.animation.removeLinkAnimation(d);u=[...i.querySelectorAll(\"a\")];for(const d of u)e.animation.addLinkAnimation(d,a)},p=()=>{if(n.trigger!==\"link\"){i.innerHTML=c;return}const d=u;i.innerHTML=c,h(),u.forEach((l,f)=>{const g=d[f];if(!g)return;g.classList.contains(\"disabled\")&&l.classList.add(\"disabled\");const v=g.getAttribute(\"tabindex\");v!==null&&l.setAttribute(\"tabindex\",v)})},a=()=>{n.loop?e.animation.runAnimation(n.name,i,n,()=>{},!0):(e.animation.isInitiallyHidden(n.name)&&(i.style.opacity=\"0\"),e.addTransition(()=>new Promise(d=>{i.style.opacity=\"\",e.animation.runAnimation(n.name,i,n,()=>{i.classList.remove(\"squiffy-animate\"),p(),d()},!1)})))};n.trigger===\"link\"?h():a()}};return{name:\"animate\",init(r){e=r,e.registerHelper(\"animate\",function(i,n){const o=n.fn(this),c={name:i,content:o,...n.hash},u=Object.entries(c).map(([p,a])=>` data-${et.default.escapeExpression(p)}=\"${et.default.escapeExpression(JSON.stringify(a))}\"`).join(\"\"),h=o.includes(`\n\n`)?\"div\":\"span\";return new et.default.SafeString(`<${h} class=\"squiffy-animate\"${u}></${h}>`)})},onWrite(r){s(r)},onLoad(){s(e.outputElement)}}}var Ss={ReplaceLabel:hc,RotateSequencePlugin:pc,RandomPlugin:dc,LivePlugin:fc,AnimatePlugin:gc},mc=class{constructor(){this.linkHandlers={}}registerLinkHandler(e,t){this.linkHandlers[e]=t}handleLink(e){const t=e.getAttribute(\"data-handler\")||\"\",s=this.linkHandlers[t];return s?[!0,t,s(e)]:[!1,t,{}]}},wt=typeof window<\"u\",je=wt?window:null,Q=wt?document:null,Oe={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},ve={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},nt={NONE:0,AUTO:1,FORCE:2},Fe={replace:0,none:1,blend:2},_n=Symbol(),Wt=Symbol(),Yr=Symbol(),ks=Symbol(),Sn=Symbol(),Me=1e-11,bt=1e12,Qe=1e3,oh=\"var(\",Ys=[],Gr=(()=>{const e=new Map;return e.set(\"x\",\"translateX\"),e.set(\"y\",\"translateY\"),e.set(\"z\",\"translateZ\"),e})(),Xt=[\"perspective\",\"translateX\",\"translateY\",\"translateZ\",\"rotate\",\"rotateX\",\"rotateY\",\"rotateZ\",\"scale\",\"scaleX\",\"scaleY\",\"scaleZ\",\"skew\",\"skewX\",\"skewY\"],kn=Xt.reduce((e,t)=>({...e,[t]:t+\"(\"}),{}),ne=()=>{},vc=e=>e,yc=/\\)\\s*[-.\\d]/,bc=/(^#([\\da-f]{3}){1,2}$)|(^#([\\da-f]{4}){1,2}$)/i,_c=/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i,Sc=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,kc=/hsl\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*\\)/i,wc=/hsla\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,wn=/[-+]?\\d*\\.?\\d+(?:e[-+]?\\d)?/gi,xn=/^([-+]?\\d*\\.?\\d+(?:e[-+]?\\d+)?)([a-z]+|%)$/i,xc=/([a-z])([A-Z])/g,Tn=/(\\*=|\\+=|-=)/,Tc=/var\\(\\s*(--[\\w-]+)(?:\\s*,\\s*([^)]+))?\\s*\\)/,ws={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:Qe,delay:0,loopDelay:0,ease:\"out(2)\",composition:Fe.replace,modifier:vc,onBegin:ne,onBeforeUpdate:ne,onUpdate:ne,onLoop:ne,onPause:ne,onComplete:ne,onRender:ne},Ne={current:null,root:Q},U={defaults:ws,precision:4,timeScale:1,tickThreshold:200,editor:null},Cn={version:\"4.5.0\",engine:null};wt&&(je.AnimeJS||(je.AnimeJS=[]),je.AnimeJS.push(Cn));var Gs=e=>e.replace(xc,\"$1-$2\").toLowerCase(),Be=(e,t)=>e.indexOf(t)===0,Nt=Date.now,Ve=Array.isArray,$e=e=>e&&e.constructor===Object,Ue=e=>typeof e==\"number\"&&!isNaN(e),He=e=>typeof e==\"string\",Ie=e=>typeof e==\"function\",$=e=>typeof e>\"u\",Yt=e=>$(e)||e===null,Zs=e=>wt&&e instanceof SVGElement,Pn=e=>bc.test(e),En=e=>Be(e,\"rgb\"),An=e=>Be(e,\"hsl\"),Cc=e=>Pn(e)||(En(e)||An(e))&&(e[e.length-1]===\")\"||!yc.test(e)),os=e=>!U.defaults.hasOwnProperty(e),Pc=[\"opacity\",\"rotate\",\"overflow\",\"color\"],Ec=(e,t)=>{if(Pc.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===\"scale\"){const s=e.parentNode;return s&&s.tagName===\"filter\"}return!0}},Gt=e=>He(e)?parseFloat(e):e,Zt=Math.pow,ut=Math.sqrt,Zr=Math.sin,jr=Math.cos,ht=Math.abs,js=Math.exp,Ac=Math.ceil,as=Math.floor,Lc=Math.asin,Ln=Math.max,Qs=Math.atan2,xt=Math.PI,Qr=Math.round,Z=(e,t,s)=>e<t?t:e>s?s:e,F=(e,t)=>{if(t<0)return e;if(!t)return Qr(e);const s=10**t;return Qr(e*s)/s},jt=(e,t)=>Ve(t)?t.reduce((s,r)=>ht(r-e)<ht(s-e)?r:s):t?Qr(e/t)*t:e,Dt=(e,t,s)=>s===1?t:s===0?e:e+(t-e)*s,Js=e=>e===1/0?bt:e===-1/0?-bt:e,ls=e=>e<=1e-11?Me:Js(F(e,11)),Ge=e=>Ve(e)?[...e]:e,pt=(e,t)=>{const s={...e};for(let r in t){const i=e[r];s[r]=$(i)?t[r]:i}return s},Pe=(e,t,s,r=\"_prev\",i=\"_next\")=>{let n=e._head,o=i;for(s&&(n=e._tail,o=r);n;){const c=n[o];t(n),n=c}},_t=(e,t,s=\"_prev\",r=\"_next\")=>{const i=t[s],n=t[r];i?i[r]=n:e._head=n,n?n[s]=i:e._tail=i,t[s]=null,t[r]=null},St=(e,t,s,r=\"_prev\",i=\"_next\")=>{let n=e._tail;for(;n&&s&&s(n,t);)n=n[r];const o=n?n[i]:e._head;n?n[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=n,t[i]=o},Rc=(e,t,s)=>{const r=e.style.transform;if(r){const i=e[ks];let n=0;const o=r.length;let c;for(;n<o;){for(;n<o&&r.charCodeAt(n)===32;)n++;if(n>=o)break;const h=n;for(;n<o&&r.charCodeAt(n)!==40;)n++;if(n>=o)break;const p=r.substring(h,n);let a=1;const d=n+1;let l=-1,f=-1;for(n++;n<o&&a>0;){const v=r.charCodeAt(n);v===40?a++:v===41?a--:v===44&&a===1&&(l===-1?l=n:f===-1&&(f=n)),n++}const g=n-1;p===\"translate\"||p===\"translate3d\"?(l===-1?i.translateX=r.substring(d,g).trim():(i.translateX=r.substring(d,l).trim(),f===-1?i.translateY=r.substring(l+1,g).trim():(i.translateY=r.substring(l+1,f).trim(),i.translateZ=r.substring(f+1,g).trim())),c=r.substring(d,g)):p===\"scale\"||p===\"scale3d\"?l===-1?i.scale=r.substring(d,g).trim():(i.scaleX=r.substring(d,l).trim(),f===-1?i.scaleY=r.substring(l+1,g).trim():(i.scaleY=r.substring(l+1,f).trim(),i.scaleZ=r.substring(f+1,g).trim())):i[p]=r.substring(d,g)}if(t===\"translate3d\"&&c)return s&&(s[t]=c),c;const u=i[t];if(!$(u))return s&&(s[t]=u),u}return t===\"translate3d\"?\"0px, 0px, 0px\":t===\"rotate3d\"?\"0, 0, 0, 0deg\":Be(t,\"scale\")?\"1\":Be(t,\"rotate\")||Be(t,\"skew\")?\"0deg\":\"0px\"},Rn=e=>{let t=\"\";for(let s=0,r=Xt.length;s<r;s++){const i=Xt[s],n=e[i];if(n!==void 0){if(i===\"translateX\"){const o=e.translateY;if(o!==void 0){const c=e.translateZ;c!==void 0?(t+=`translate3d(${n},${o},${c}) `,s+=2):(t+=`translate(${n},${o}) `,s+=1);continue}}if(i===\"scaleX\"&&e.scale===void 0){const o=e.scaleY;if(o!==void 0){const c=e.scaleZ;c!==void 0?(t+=`scale3d(${n},${o},${c}) `,s+=2):(t+=`scale(${n},${o}) `,s+=1);continue}}t+=`${kn[i]}${n}) `}i===\"rotateZ\"&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},Jr=[];function In(e,t){if(!e)return null;const s=Jr.length;e:for(let r=0;r<s;r++){const i=Jr[r];if(i.detect&&!i.detect(e))continue;const n=i.targetAdapters;for(let o=0,c=n.length;o<c;o++){const u=n[o];if(u.detect(e)){const h=u.props[t];if(h&&(!h.gate||h.gate(e)))return h;break e}}}for(let r=0;r<s;r++){const i=Jr[r];if(i.detect&&!i.detect(e))continue;const n=i.propertyResolvers;for(let o=0,c=n.length;o<c;o++){const u=n[o](e,t);if(u)return u}}return null}var Ic=e=>{const t=_c.exec(e)||Sc.exec(e),s=$(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],s]},Oc=e=>{const t=e.length,s=t===4||t===5;return[+(\"0x\"+e[1]+e[s?1:2]),+(\"0x\"+e[s?2:3]+e[s?2:4]),+(\"0x\"+e[s?3:5]+e[s?3:6]),t===5||t===9?+(+(\"0x\"+e[s?4:7]+e[s?4:8])/255).toFixed(3):1]},Kr=(e,t,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e),Mc=e=>{const t=kc.exec(e)||wc.exec(e),s=+t[1]/360,r=+t[2]/100,i=+t[3]/100,n=$(t[4])?1:+t[4];let o,c,u;if(r===0)o=c=u=i;else{const h=i<.5?i*(1+r):i+r-i*r,p=2*i-h;o=F(Kr(p,h,s+1/3)*255,0),c=F(Kr(p,h,s)*255,0),u=F(Kr(p,h,s-1/3)*255,0)}return[o,c,u,n]},Nc=e=>En(e)?Ic(e):Pn(e)?Oc(e):An(e)?Mc(e):[0,0,0,1],W=(e,t)=>$(e)?t:e,On=(e,t)=>{const s=e.match(Tc),r=t[Wt]?t:document.documentElement;let i=getComputedStyle(r)?.getPropertyValue(s[1]);return(!i||i.trim()===\"\")&&s[2]&&(i=s[2].trim()),i||0},De=(e,t,s,r,i,n)=>{if(Ie(e)){if(!i){const c=e(t,s,r,n);return isNaN(+c)?c||0:+c}const o=()=>{const c=e(t,s,r,n);return isNaN(+c)?c||0:+c};return i.func=o,o()}if(He(e)&&Be(e,\"var(\")){if(!i)return On(e,t);const o=()=>On(e,t);return i.func=o,o()}return e},ei=(e,t)=>e[Wt]?e[Yr]&&Ec(e,t)?Oe.ATTRIBUTE:Xt.includes(t)||Gr.get(t)?Oe.TRANSFORM:Be(t,\"--\")?Oe.CSS_VAR:t in e.style?Oe.CSS:t in e?Oe.OBJECT:Oe.ATTRIBUTE:Oe.OBJECT,Mn=(e,t,s)=>{const r=e.style[t];r&&s&&(s[t]=r);const i=r||getComputedStyle(e[Sn]||e).getPropertyValue(t);return i===\"auto\"?\"0\":i},Qt=(e,t,s,r)=>{const i=$(s)?ei(e,t):s,n=In(e,t);if(n){const o=n.get(e);return o&&r&&(r[t]=o),o??0}if(i===Oe.OBJECT){const o=e[t];return o&&r&&(r[t]=o),o||0}if(i===Oe.ATTRIBUTE){const o=e.getAttribute(t);return o&&r&&(r[t]=o),o}return i===Oe.TRANSFORM?Rc(e,t,r):i===Oe.CSS_VAR?Mn(e,t,r).trimStart():Mn(e,t,r)},Jt=(e,t,s)=>s===\"-\"?e-t:s===\"+\"?e+t:e*t,ti=()=>({t:ve.NUMBER,n:0,u:null,o:null,d:null,s:null}),tt=(e,t)=>{if(t.t=ve.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;const s=+e;if(!isNaN(s))return t.n=s,t;let r=e;r[1]===\"=\"&&(t.o=r[0],r=r.slice(2));const i=r.includes(\" \")?!1:xn.exec(r);if(i)return t.t=ve.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Cc(r))return t.t=ve.COLOR,t.d=Nc(r),t;{const n=r.match(wn);return t.t=ve.COMPLEX,t.d=n?n.map(Number):[],t.s=r.split(wn)||[],t}},Nn=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=Ge(e._toNumbers),t.s=Ge(e._strings),t),We=ti(),Dn=(e,t,s)=>{const r=e._modifier,i=e._fromNumbers,n=e._toNumbers,o=e._strings;let c=o[0];for(let u=0,h=n.length;u<h;u++){const p=r(F(Dt(i[u],n[u],t),s)),a=o[u+1];c+=`${a?p+a:p}`,e._numbers[u]=p}return c},Ks=(e,t,s,r,i)=>{const n=e.parent,o=e.duration,c=e.completed,u=e.iterationDuration,h=e.iterationCount,p=e._currentIteration,a=e._loopDelay,d=e._reversed,l=e._alternate,f=e._hasChildren,g=e._delay,v=e._currentTime,b=g+u,S=t-g,y=Z(v,-g,o),m=Z(S,-g,o),_=S-v,k=m>0,w=m>=o,C=o<=Me,O=i===nt.FORCE;let E=0,A=S,P=0;if(h>1){const M=u+(w?0:a),R=~~(m/M);e._currentIteration=Z(R,0,h),w&&e._currentIteration--,E=e._currentIteration%2,A=m-R*M||0}const B=d^(l&&E),H=e._ease;let z=w?B?0:o:B?u-A:A;H&&(z=u*H(z/u)||0);const T=(n?n.backwards:S<v)?!B:!!B;if(e._currentTime=S,e._iterationTime=z,e.backwards=T,k&&!e.began?(e.began=!0,!s&&!(n&&(T||!n.began))&&e.onBegin(e)):S<=0&&(e.began=!1),!s&&!f&&k&&e._currentIteration!==p&&e.onLoop(e),O||i===nt.AUTO&&(t>=(n&&g>0?0:g)&&t<=b||t<=g&&y>g||t>=b&&y!==o)||z>=b&&y!==o||z<=g&&y>0&&!w||t<=y&&y===o&&c||w&&!c&&C){if(k&&(e.computeDeltaTime(y),s||e.onBeforeUpdate(e)),!f){const M=O||(T?_*-1:_)>=U.tickThreshold,R=F(e._offset+(n?n._offset:0)+g+z,12);let L=e._head,q,G,j,X,J=0;for(;L;){const oe=L._composition,he=L._currentTime,fe=L._changeDuration,ge=L._absoluteStartTime+L._changeDuration,ae=L._nextRep,V=L._prevRep,le=oe!==Fe.none,me=V?V._absoluteStartTime+V._changeDuration:0,Se=V&&V.parent!==L.parent,we=!ae||ae._isOverridden?ge:ae.parent===L.parent?ge+ae._delay:ae._absoluteStartTime<ae._absoluteUpdateStartTime?ae._absoluteStartTime:ae._absoluteUpdateStartTime;if((M||(he!==fe||R<=we||V&&!Se&&(!ae||ae.parent!==L.parent))&&(he!==0||R>=L._absoluteStartTime||Se&&!L._hasFromValue&&!V._isOverridden&&R>=me||ae&&!ae._isOverridden&&ae.parent===L.parent&&ae._currentTime!==0&&z<ae._startTime))&&(!V||Se||z>=L._startTime)&&(!le||!L._isOverridden&&(!L._isOverlapped||R<=ge)&&(!ae||ae._isOverridden||R<=we)&&(!V||V._isOverridden||(Se?R>=L._absoluteStartTime||!L._hasFromValue&&R>=me:R>=me+L._delay)))){const Le=L._currentTime=Z(z-L._startTime,0,fe),ye=L._ease(Le/L._updateDuration),Te=L._modifier,pe=L._valueType,K=L._tweenType,ee=K===Oe.OBJECT,te=pe===ve.NUMBER,ke=te&&ee||ye===0||ye===1?-1:U.precision;let xe,Re;if(te)xe=Re=Te(F(Dt(L._fromNumber,L._toNumber,ye),ke));else if(pe===ve.UNIT)Re=Te(F(Dt(L._fromNumber,L._toNumber,ye),ke)),xe=`${Re}${L._unit}`;else if(pe===ve.COLOR){const D=L._numbers,se=L._fromNumbers,ie=L._toNumbers,x=1-ye,I=se[0],N=se[1],Y=se[2],be=ie[0],_e=ie[1],rt=ie[2];D[0]=Te(Math.sqrt(I*I*x+be*be*ye)),D[1]=Te(Math.sqrt(N*N*x+_e*_e*ye)),D[2]=Te(Math.sqrt(Y*Y*x+rt*rt*ye)),D[3]=Te(Dt(se[3],ie[3],ye)),(!L._setter||r)&&(xe=`rgba(${F(D[0],0)},${F(D[1],0)},${F(D[2],0)},${D[3]})`)}else pe===ve.COMPLEX&&(xe=Dn(L,ye,ke));if(le&&(L._number=Re),!r&&oe!==Fe.blend){const D=L.property;q=L.target,L._setter?L._setter(q,Re,L):ee?q[D]=xe:K===Oe.ATTRIBUTE?q.setAttribute(D,xe):(G=q.style,K===Oe.TRANSFORM?(q!==j&&(j=q,X=q[ks]),X[D]=xe,J=1):K===Oe.CSS?G[D]=xe:K===Oe.CSS_VAR&&G.setProperty(D,xe)),k&&(P=1)}else L._value=xe}else he&&V&&!Se&&z<L._startTime&&(L._currentTime=0);J&&L._renderTransforms&&(G.transform=Rn(X),J=0),L=L._next}!s&&P&&e.onRender(e)}!s&&k&&e.onUpdate(e)}return n&&C?!s&&(n.began&&!T&&S>0&&!c||T&&S<=1e-11&&c)&&(e.onComplete(e),e.completed=!T):k&&w?h===1/0?e._startTime+=e.duration:e._currentIteration>=h-1&&(e.paused=!0,!c&&!f&&(e.completed=!0,!s&&!(n&&(T||!n.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,P},Kt=(e,t,s,r,i)=>{const n=e._currentIteration;if(Ks(e,t,s,r,i),e._hasChildren){const o=e,c=o.backwards,u=r?t:o._iterationTime,h=Nt();let p=0,a=!0;if(!r&&o._currentIteration!==n){const d=o.iterationDuration;Pe(o,l=>{if(!c)!l.completed&&!l.backwards&&l._currentTime<l.iterationDuration&&Ks(l,d,s,1,nt.FORCE),l.began=!1,l.completed=!1;else{const f=l.duration,g=l._offset+l._delay,v=g+f;!s&&f<=1e-11&&(!g||v===d)&&l.onComplete(l)}}),s||o.onLoop(o)}Pe(o,d=>{const l=F((u-d._offset)*d._speed,12);if(c&&l>d._delay+d.duration)return;const f=d._fps<o._fps?d.requestTick(h):i;p+=Ks(d,l,s,r,f),!d.completed&&a&&(a=!1)},c),!s&&p&&o.onRender(o),(a||c)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},Bn={},si=(e,t,s)=>{if(s===Oe.TRANSFORM){const r=Gr.get(e);return r||e}else if(s===Oe.CSS||s===Oe.ATTRIBUTE&&Zs(t)&&e in t.style){const r=Bn[e];if(r)return r;{const i=e&&Gs(e);return Bn[e]=i,i}}else return e},er=(e,t=!1)=>{if(e._hasChildren)Pe(e,s=>er(s,t),!0);else{const s=e;s.pause(),Pe(s,r=>{const i=r.property,n=r.target,o=r._tweenType,c=r._inlineValue,u=Yt(c)||c===\"\";if(r._setter){if(!t&&!u){if(tt(c,We),We.d){const h=We.d,p=r._numbers;for(let a=0,d=h.length;a<d;a++)p[a]=h[a]}else r._number=We.n;r._setter(r.target,r._number,r)}}else if(o===Oe.OBJECT)!t&&!u&&(n[i]=c);else if(n[Wt])if(o===Oe.ATTRIBUTE)t||(u?n.removeAttribute(i):n.setAttribute(i,c));else{const h=n.style;if(o===Oe.TRANSFORM){const p=n[ks];u?delete p[i]:p[i]=c,r._renderTransforms&&(Object.keys(p).length?h.transform=Rn(p):h.removeProperty(\"transform\"))}else u?h.removeProperty(Gs(i)):h[i]=c}n[Wt]&&s._tail===r&&s.targets.forEach(h=>{h.getAttribute&&h.getAttribute(\"style\")===\"\"&&h.removeAttribute(\"style\")})})}return e},$n=e=>er(e,!0),Hn=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=Qe/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=+e,s=t<1e-11?Me:t,r=Qe/s;s>ws.frameRate&&(ws.frameRate=s),this._fps=s,this._frameDuration=r}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<1e-11?Me:t}requestTick(e){const t=this._frameDuration,s=e-this._lastTickTime,r=t*.25;return s+(r<4?r:4)<t?nt.NONE:(this._lastTickTime=s>=t?e-s%t:e,nt.AUTO)}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},cs={animation:null,update:ne},Dc=e=>{let t=cs.animation;return t||(t={duration:Me,computeDeltaTime:ne,_offset:0,_delay:0,_head:null,_tail:null},cs.animation=t,cs.update=()=>{e.forEach(s=>{for(let r in s){const i=s[r],n=i._head;if(n){const o=n._valueType,c=o===ve.COMPLEX||o===ve.COLOR?Ge(n._fromNumbers):null;let u=n._fromNumber,h=i._tail;for(;h&&h!==n;){if(c)for(let p=0,a=h._numbers.length;p<a;p++)c[p]+=h._numbers[p];else u+=h._number;h=h._prevAdd}n._toNumber=u,n._toNumbers=c}}}),Ks(t,1,1,0,nt.FORCE)}),t},qn=wt?requestAnimationFrame:setImmediate,Bc=wt?cancelAnimationFrame:clearImmediate,$c=class extends Hn{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=ws,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=Nt();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,s=this._fps;let r=this._head;for(;r;){const i=r._next;r.paused?(_t(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Kt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<s?r.requestTick(e):nt.AUTO),r=i}cs.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Nt()),this.reqId=qn(Fn)),this}pause(){if(this.reqId)return this.paused=!0,Hc()}resume(){if(this.paused)return this.paused=!1,Pe(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(U.timeScale===1?1:Qe)}set speed(e){const t=e*U.timeScale;this._speed!==t&&(this._speed=t,Pe(this,s=>s.speed=s._speed))}get timeUnit(){return U.timeScale===1?\"ms\":\"s\"}set timeUnit(e){const s=e===\"s\",r=s?.001:1;if(U.timeScale!==r){U.timeScale=r,U.tickThreshold=200*r;const i=s?.001:Qe;this.defaults.duration*=i,this._speed*=i}}get precision(){return U.precision}set precision(e){U.precision=e}},Xe=(()=>{const e=new $c(Nt());return wt&&(Cn.engine=e,Q.addEventListener(\"visibilitychange\",()=>{e.pauseOnDocumentHidden&&(Q.hidden?e.pause():e.resume())})),e})(),Fn=()=>{Xe._head?(Xe.reqId=qn(Fn),Xe.update()):Xe.reqId=0},Hc=()=>(Bc(Xe.reqId),Xe.reqId=0,Xe),tr={_rep:new WeakMap,_add:new Map},ri=(e,t,s=\"_rep\")=>{const r=tr[s];let i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},qc=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,sr=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=Me,e._currentTime=Me},Vn=(e,t)=>{const s=e._composition;if(s===Fe.replace){const r=e._absoluteStartTime;St(t,e,qc,\"_prevRep\",\"_nextRep\");const i=e._prevRep;if(i){const n=i.parent,o=i._absoluteEndTime;if(e.parent.id!==n.id&&n.iterationCount>1&&o+(n.duration-n.iterationDuration)>r){sr(i);let h=i._prevRep;for(;h&&h.parent.id===n.id;)sr(h),h=h._prevRep}const c=e._absoluteUpdateStartTime;if(o>c){const h=i._startTime,p=o-(h+i._updateDuration),a=F(c-p-h,12);i._changeDuration=a,i._currentTime=a,i._isOverlapped=1,a<1e-11&&sr(i)}const u=e.parent.parent;if(!u||u!==n.parent){let h=!0;if(Pe(n,p=>{p._isOverlapped||(h=!1)}),h){const p=n.parent;if(p){let a=!0;Pe(p,d=>{d!==n&&Pe(d,l=>{l._isOverlapped||(a=!1)})}),a&&p.cancel()}else n.cancel()}}}}else if(s===Fe.blend){const r=ri(e.target,e.property,\"_add\"),i=Dc(tr._add);let n=r._head;n||(n={...e},n._composition=Fe.replace,n._updateDuration=Me,n._startTime=0,n._numbers=Ge(e._fromNumbers),n._number=0,n._next=null,n._prev=null,St(r,n),St(i,n));const o=e._toNumber;if(e._fromNumber=n._fromNumber-o,e._toNumber=0,e._numbers=Ge(e._fromNumbers),e._number=0,n._fromNumber=o,e._toNumbers.length){const c=Ge(e._toNumbers);c.forEach((u,h)=>{e._fromNumbers[h]=n._fromNumbers[h]-u,e._toNumbers[h]=0}),n._fromNumbers=c}St(r,e,null,\"_prevAdd\",\"_nextAdd\")}return e},zn=e=>{const t=e._composition;if(t!==Fe.none){const s=e.target,r=e.property,i=tr._rep.get(s)[r];if(_t(i,e,\"_prevRep\",\"_nextRep\"),t===Fe.blend){const n=tr._add,o=n.get(s);if(!o)return;const c=o[r],u=cs.animation;_t(c,e,\"_prevAdd\",\"_nextAdd\");const h=c._head;if(h&&h===c._tail){_t(c,h,\"_prevAdd\",\"_nextAdd\"),_t(u,h);let p=!0;for(let a in o)if(o[a]._head){p=!1;break}p&&n.delete(s)}}}return e},Un=(e,t,s)=>{let r=!1;return Pe(t,i=>{const n=i.target;if(e.includes(n)){const o=i.property,c=i._tweenType,u=si(s,n,c);(!u||u&&u===o)&&(i.parent._tail===i&&i._tweenType===Oe.TRANSFORM&&i._prev&&i._prev._tweenType===Oe.TRANSFORM&&(i._prev._renderTransforms=1),_t(t,i),zn(i),r=!0)}},!0),r},Pt=(e,t,s)=>{const r=t||Xe;let i;if(r._hasChildren){let n=0;Pe(r,o=>{if(!o._hasChildren)if(i=Un(e,o,s),i&&!o._head)o.cancel(),_t(r,o);else{const c=o._offset+o._delay+o.duration;c>n&&(n=c)}o._head?Pt(e,o,s):o._hasChildren=!1},!0),$(r.iterationDuration)||(r.iterationDuration=n)}else i=Un(e,r,s);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},Wn=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),ii=e=>(e._cancelled&&(e._hasChildren?Pe(e,ii):Pe(e,t=>{t._composition!==Fe.none&&Vn(t,ri(t.target,t.property))}),e._cancelled=0),e),Xn=0,Fc=(e,t)=>e._priority>t._priority,ot=class extends Hn{constructor(e={},t=null,s=0){super(0),++Xn;const{id:r,delay:i,duration:n,reversed:o,alternate:c,loop:u,loopDelay:h,autoplay:p,frameRate:a,playbackRate:d,priority:l,onComplete:f,onLoop:g,onPause:v,onBegin:b,onBeforeUpdate:S,onUpdate:y}=e;Ne.current&&Ne.current.register(this);const m=t?0:Xe._lastTickTime,_=t?t.defaults:U.defaults,k=Ie(i)||$(i)?_.delay:+i,w=Ie(n)||$(n)?1/0:+n,C=W(u,_.loop),O=W(h,_.loopDelay);let E=C===!0||C===1/0||C<0?1/0:C+1,A=0;t?A=s:(Xe.reqId||Xe.requestTick(Nt()),A=(Xe._lastTickTime-Xe._startTime)*U.timeScale),this.id=$(r)?Xn:r,this.parent=t,this.duration=Js((w+O)*E-O)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=b||_.onBegin,this.onBeforeUpdate=S||_.onBeforeUpdate,this.onUpdate=y||_.onUpdate,this.onLoop=g||_.onLoop,this.onPause=v||_.onPause,this.onComplete=f||_.onComplete,this.iterationDuration=w,this.iterationCount=E,this._autoplay=t?!1:W(p,_.autoplay),this._offset=A,this._delay=k,this._loopDelay=O,this._iterationTime=0,this._currentIteration=0,this._resolve=ne,this._running=!1,this._reversed=+W(o,_.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=W(c,_.alternate),this._prev=null,this._next=null,this._lastTickTime=m,this._startTime=m,this._lastTime=m,this._fps=W(a,_.frameRate),this._speed=W(d,_.playbackRate),this._priority=+W(l,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Z(F(this._currentTime,U.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return Z(F(this._iterationTime,U.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Z(F(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Z(F(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Z(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return ii(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Kt(this,0,1,~~e,nt.FORCE),Wn(this),this._hasChildren&&Pe(this,Wn),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Kt(this,this.duration,1,~~e,nt.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!$(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Xe._speed);return this._startTime=Nt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?Kt(this,Me,0,0,nt.FORCE):(this._running||(St(Xe,this,Fc),Xe._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Xe.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,s=0){ii(this),this.completed=!1;const r=this.paused;return this.paused=!0,Kt(this,e+this._delay,~~t,~~s,nt.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,s=this.iterationDuration,r=t===1/0?as(bt/s):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Pe(this,e=>e.cancel(),!0):Pe(this,zn),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,s=ls(e);if(t===s)return this;const r=e/t,i=e<=Me;return this.duration=i?Me:s,this.iterationDuration=i?Me:ls(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Kt(this,0,1,0,nt.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=ne){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ne};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},Vc=e=>new ot(e,null,0).init();function ni(e){const t=He(e)?Ne.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function at(e){if(Yt(e))return[];if(!wt)return Ve(e)&&e.flat(1/0)||[e];if(Ve(e)){const s=e.flat(1/0),r=[];for(let i=0,n=s.length;i<n;i++){const o=s[i];if(!Yt(o)){const c=ni(o);if(c)for(let u=0,h=c.length;u<h;u++){const p=c[u];if(!Yt(p)){let a=!1;for(let d=0,l=r.length;d<l;d++)if(r[d]===p){a=!0;break}a||r.push(p)}}else{let u=!1;for(let h=0,p=r.length;h<p;h++)if(r[h]===o){u=!0;break}u||r.push(o)}}}return r}const t=ni(e);return t?Array.from(t):[e]}function Bt(e){const t=at(e),s=t.length;for(let r=0;r<s;r++){const i=t[r];if(!i[_n]){i[_n]=!0;const n=Zs(i);(i.nodeType||n)&&(i[Wt]=!0,i[Yr]=n,i[ks]={})}}return t}var oi={deg:1,rad:180/xt,turn:360},Yn={},rr=(e,t,s,r=!1)=>{const i=t.u,n=t.n;if(t.t===ve.UNIT&&i===s)return t;const o=n+i+s,c=Yn[o];if(!$(c)&&!r)t.n=c;else{let u;if(i in oi)u=n*oi[i]/oi[s];else{const p=e.cloneNode(),a=e.parentNode,d=a&&a!==Q?a:Q.body;d.appendChild(p);const l=p.style;l.width=100+i;const f=p.offsetWidth||100;l.width=100+s;const g=f/(p.offsetWidth||100);d.removeChild(p),u=g*n}t.n=u,Yn[o]=u}return t.t,ve.UNIT,t.u=s,t},lt=e=>e,xs=(e=1.68)=>t=>Zt(t,+e),ai={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},zc=xt/2,Gn=xt*2,Zn={\"\":xs,Quad:xs(2),Cubic:xs(3),Quart:xs(4),Quint:xs(5),Sine:e=>1-jr(e*zc),Circ:e=>1-ut(1-e*e),Expo:e=>e?Zt(2,10*e-10):0,Bounce:e=>{let t,s=4;for(;e<((t=Zt(2,--s))-1)/11;);return 1/Zt(4,3-s)-7.5625*Zt((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{const s=Z(+e,1,10),r=Z(+t,Me,2),i=r/Gn*Lc(1/s),n=Gn/r;return o=>o===0||o===1?o:-s*Zt(2,-10*(1-o))*Zr((1-o-i)*n)}},Et=(()=>{const e={linear:lt,none:lt};for(let t in ai)for(let s in Zn){const r=Zn[s],i=ai[t];e[t+s]=s===\"\"||s===\"Back\"||s===\"Elastic\"?(n,o)=>i(r(n,o)):i(r)}return e})(),ir={linear:lt,none:lt},jn=e=>{if(ir[e])return ir[e];if(e.indexOf(\"(\")<=-1){const t=ai[e]||e.includes(\"Back\")||e.includes(\"Elastic\")?Et[e]():Et[e];return t?ir[e]=t:lt}else{const t=e.slice(0,-1).split(\"(\"),s=Et[t[0]];return s?ir[e]=s(...t[1].split(\",\")):lt}},Qn=[\"steps(\",\"irregular(\",\"linear(\",\"cubicBezier(\"],At=e=>{if(He(e)){for(let t=0,s=Qn.length;t<s;t++)if(Be(e,Qn[t]))return console.warn(`String syntax for \\`ease: \"${e}\"\\` has been removed from the core and replaced by importing and passing the easing function directly: \\`ease: ${e}\\``),lt}return Ie(e)?e:He(e)?jn(e):lt},re=ti(),de=ti(),us={},nr={func:null},or={func:null},ar=[null],hs=[null,null],lr={to:null},Uc=0,Jn=0,$t,Tt,Wc=(e,t)=>{const s={};if(Ve(e)){const r=[].concat(...e.map(i=>Object.keys(i))).filter(os);for(let i=0,n=r.length;i<n;i++){const o=r[i];s[o]=e.map(c=>{const u={};for(let h in c){const p=c[h];os(h)?h===o&&(u.to=p):u[h]=p}return u})}}else{const r=W(t.duration,U.defaults.duration);Object.keys(e).map(i=>({o:parseFloat(i)/100,p:e[i]})).sort((i,n)=>i.o-n.o).forEach(i=>{const n=i.o,o=i.p;for(let c in o)if(os(c)){let u=s[c];u||(u=s[c]=[]);const h=n*r;let p=u.length,a=u[p-1];const d={to:o[c]};let l=0;for(let f=0;f<p;f++)l+=u[f].duration;p===1&&(d.from=a.to),o.ease&&(d.ease=o.ease),d.duration=h-(p?l:0),u.push(d)}return i});for(let i in s){const n=s[i];let o;for(let c=0,u=n.length;c<u;c++){const h=n[c],p=h.ease;h.ease=o||void 0,o=p}n[0].duration||n.shift()}}return s},Lt=class extends ot{constructor(e,t,s,r,i=!1,n=0,o){super(t,s,r),this._head,this._tail,++Jn;const c=Bt(e),u=c.length,h=t.keyframes,p=h?pt(Wc(h,t),t):t,{id:a,delay:d,duration:l,ease:f,playbackEase:g,modifier:v,composition:b,onRender:S}=p,y=s?s.defaults:U.defaults,m=W(f,y.ease),_=W(g,y.playbackEase),k=_?At(_):null,w=!$(m.ease),C=w?m.ease:W(f,k?\"linear\":y.ease),O=w?m.settlingDuration:W(l,y.duration),E=W(d,y.delay),A=v||y.modifier,P=$(b)&&u>=1e3?Fe.none:$(b)?y.composition:b,B=this._offset+(s?s._offset:0);w&&(m.parent=this);let H=NaN,z=NaN,T=0,M=0;for(let R=0;R<u;R++){const L=c[R],q=n||R,G=o||c;let j=NaN,X=NaN;for(let J in p)if(os(J)){const oe=ei(L,J),he=In(L,J),fe=si(J,L,oe);let ge=p[J];const ae=Ve(ge);if(i&&!ae&&(hs[0]=ge,hs[1]=ge,ge=hs),ae){const Le=ge.length,ye=!$e(ge[0]);Le===2&&ye?(lr.to=ge,ar[0]=lr,$t=ar):Le>2&&ye?($t=[],ge.forEach((Te,pe)=>{pe?pe===1?(hs[1]=Te,$t.push(hs)):$t.push(Te):hs[0]=Te})):$t=ge}else ar[0]=ge,$t=ar;let V=null,le=null,me=NaN,Se=0,we=0;for(let Le=$t.length;we<Le;we++){const ye=$t[we];$e(ye)?Tt=ye:(lr.to=ye,Tt=lr),nr.func=null,or.func=null;const Te=De(W(Tt.composition,P),L,q,G,null,null),pe=Ue(Te)?Te:Fe[Te];!V&&pe!==Fe.none&&(V=ri(L,fe));const K=V?V._tail:null,ee=s&&K&&K.parent.parent===s?K:le,te=De(Tt.to,L,q,G,nr,ee);let ke;$e(te)&&!$(te.to)?(Tt=te,ke=te.to):ke=te;const xe=De(Tt.from,L,q,G,or,ee),Re=Tt.ease||C,D=De(Re,L,q,G,null,ee),se=Ie(D)||He(D)?D:Re,ie=!$(se)&&!$(se.ease),x=ie?se.ease:se,I=ie?se.settlingDuration:De(W(Tt.duration,Le>1?De(O,L,q,G,null,ee)/Le:O),L,q,G,null,ee),N=De(W(Tt.delay,we?0:E),L,q,G,null,ee),Y=Tt.modifier||A,be=!$(xe),_e=!$(ke),rt=Ve(ke),It=rt||be&&_e,Pr=le?Se:0,Ye=le?Se+N:N,Oi=F(B+Ye,12),Ku=F(B+Pr,12);!M&&(be||rt)&&(M=1);let gt=le;if(pe!==Fe.none){let Ce=V._head;for(;Ce&&Ce._absoluteStartTime<=Oi;)if(Ce._isOverridden||(gt=Ce),Ce=Ce._nextRep,Ce&&Ce._absoluteStartTime>=Oi)for(;Ce;)sr(Ce),Ce=Ce._nextRep}if(It){tt(rt?De(ke[0],L,q,G,or,ee):xe,re),tt(rt?De(ke[1],L,q,G,nr,ee):ke,de);const Ce=Qt(L,fe,oe,us);re.t===ve.NUMBER&&(gt?gt._valueType===ve.UNIT&&(re.t=ve.UNIT,re.u=gt._unit):(tt(Ce,We),We.t===ve.UNIT&&(re.t=ve.UNIT,re.u=We.u)))}else _e?tt(ke,de):le?Nn(le,de):tt(s&&gt&&gt.parent.parent===s?gt._value:Qt(L,fe,oe,us),de),be?tt(xe,re):le?Nn(le,re):tt(s&&gt&&gt.parent.parent===s?gt._value:Qt(L,fe,oe,us),re);if(re.o&&(re.n=Jt(gt?gt._toNumber:tt(Qt(L,fe,oe,us),We).n,re.n,re.o)),de.o&&(de.n=Jt(re.n,de.n,de.o)),re.t!==de.t){if(re.t===ve.COMPLEX||de.t===ve.COMPLEX){const Ce=re.t===ve.COMPLEX?re:de,Ke=re.t===ve.COMPLEX?de:re;Ke.t=ve.COMPLEX,Ke.s=Ge(Ce.s),Ke.d=Ce.d.map(()=>Ke.n)}else if(re.t===ve.UNIT||de.t===ve.UNIT){const Ce=re.t===ve.UNIT?re:de,Ke=re.t===ve.UNIT?de:re;Ke.t=ve.UNIT,Ke.u=Ce.u}else if(re.t===ve.COLOR||de.t===ve.COLOR){const Ce=re.t===ve.COLOR?re:de,Ke=re.t===ve.COLOR?de:re;Ke.t=ve.COLOR,Ke.d=Ce.d.map(()=>0)}}if(re.u!==de.u){let Ce=de.u?re:de;Ce=rr(L,Ce,de.u?de.u:re.u,!1)}if(de.d&&re.d&&de.d.length!==re.d.length){const Ce=re.d.length>de.d.length?re:de,Ke=Ce===re?de:re;Ke.d=Ce.d.map((ah,na)=>$(Ke.d[na])?0:Ke.d[na]),Ke.s=Ge(Ce.s)}const Mi=F(+I||1e-11,12);let sa=us[fe];Yt(sa)||(us[fe]=null);const eh=he?he.set:null;Se=F(Ye+Mi,12);const Er=re.d,ra=de.d,ia=de.s,ct={parent:this,id:Uc++,property:fe,target:L,_value:null,_toFunc:nr.func,_fromFunc:or.func,_ease:At(x),_fromNumbers:Er?Ge(Er):Ys,_toNumbers:ra?Ge(ra):Ys,_strings:ia?Ge(ia):Ys,_fromNumber:re.n,_toNumber:de.n,_numbers:Er?Ge(Er):Ys,_number:re.n,_unit:de.u,_modifier:Y,_currentTime:0,_startTime:Ye,_delay:+N,_updateDuration:Mi,_changeDuration:Mi,_absoluteStartTime:Oi,_absoluteUpdateStartTime:Ku,_absoluteEndTime:F(B+Se,12),_hasFromValue:be||rt?1:0,_tweenType:oe,_setter:eh,_valueType:de.t,_composition:pe,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:sa,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};pe!==Fe.none&&Vn(ct,V);const Ni=ct._valueType;if(Ni===ve.COMPLEX)ct._value=Dn(ct,1,-1);else if(Ni===ve.UNIT)ct._value=`${Y(ct._toNumber)}${ct._unit}`;else if(Ni===ve.COLOR){const Ce=de.d;ct._value=`rgba(${F(Ce[0],0)},${F(Ce[1],0)},${F(Ce[2],0)},${Ce[3]})`}else ct._value=Y(ct._toNumber);isNaN(me)&&(me=ct._startTime),le=ct,T++,St(this,ct)}(isNaN(z)||me<z)&&(z=me),(isNaN(H)||Se>H)&&(H=Se),oe===Oe.TRANSFORM&&(j=T-we,X=T)}if(!isNaN(j)){let J=0;Pe(this,oe=>{J>=j&&J<X&&(oe._renderTransforms=1,oe._composition===Fe.blend&&Pe(cs.animation,he=>{he.id===oe.id&&(he._renderTransforms=1)})),J++})}}u||console.warn(\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\"),z?(Pe(this,R=>{R._startTime-R._delay||(R._delay-=z),R._startTime-=z}),H-=z):z=0,H||(H=Me,this.iterationCount=0),this.targets=c,this.id=$(a)?Jn:a,this.duration=H===1e-11?Me:Js((H+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=S||y.onRender,this._ease=k,this._delay=z,this.iterationDuration=H,!this._autoplay&&M&&this.onRender(this)}stretch(e){const t=this.duration;if(t===ls(e))return this;const s=e/t;return Pe(this,r=>{r._updateDuration=ls(r._updateDuration*s),r._changeDuration=ls(r._changeDuration*s),r._currentTime*=s,r._delay*=s,r._startTime*=s,r._absoluteStartTime*=s,r._absoluteUpdateStartTime*=s,r._absoluteEndTime*=s}),super.stretch(e)}refresh(){return Pe(this,e=>{const t=e._toFunc,s=e._fromFunc;(t||s)&&(s?(tt(s(),re),re.u!==e._unit&&e.target[Wt]&&rr(e.target,re,e._unit,!0),e._fromNumbers=Ge(re.d),e._fromNumber=re.n):t&&(tt(Qt(e.target,e.property,e._tweenType),We),e._fromNumbers=Ge(We.d),e._fromNumber=We.n),t&&(tt(t(),de),e._toNumbers=Ge(de.d),e._strings=Ge(de.s),e._toNumber=de.o?Jt(e._fromNumber,de.n,de.o):de.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),er(this)}then(e){return super.then(e)}},Ts=(e,t)=>U.editor?U.editor.addAnimation(e,t):new Lt(e,t,null,0,!1).init(),Xc=(e,t)=>{if(Be(t,\"<\")){const s=t[1]===\"<\",r=e._tail,i=r?r._offset+r._delay:0;return s?i:i+r.duration}},Cs=(e,t)=>{let s=e.iterationDuration;if(s===1e-11&&(s=0),$(t))return s;if(Ue(+t))return+t;const r=t,i=e?e.labels:null,n=!Yt(i),o=Xc(e,r),c=!$(o),u=Tn.exec(r);if(u){const h=u[0],p=r.split(h),a=n&&p[0]?i[p[0]]:s,d=c?o:n?a:s,l=+p[1];return Jt(d,l,h[0])}else return c?o:n?$(i[r])?s:i[r]:s};function Yc(e){return Js((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function li(e,t,s,r,i,n){const o=Ue(e.duration)&&e.duration<=1e-11?s-Me:s;t.composition&&Kt(t,o,1,1,nt.AUTO);const c=r?new Lt(r,e,t,o,!1,i,n):new ot(e,t,o);return t.composition&&c.init(!0),St(t,c),Pe(t,u=>{const h=u._offset+u._delay+u.duration;h>t.iterationDuration&&(t.iterationDuration=h)}),t.duration=Yc(t),t}var Kn=0,eo=class extends ot{constructor(e={}){super(e,null,0),++Kn,this.id=$(e.id)?Kn:e.id,this.duration=0,this.labels={};const t=e.defaults,s=U.defaults;this.defaults=t?pt(t,s):s,this.composition=W(e.composition,!0),this.onRender=e.onRender||s.onRender;const r=W(e.playbackEase,s.playbackEase);this._ease=r?At(r):null,this.iterationDuration=0}add(e,t,s){const r=$e(t),i=$e(e);if(r||i){if(this._hasChildren=!0,r){const n=t,o=U.editor&&U.editor.addTimelineChild,c=s&&s.type===\"Stagger\"&&U.editor,u=Ie(s)?s:null;if(u||c){const h=at(e),p=this.duration,a=this.iterationDuration,d=n.id;let l=0;const f=h.length,g=o?o(e,n,this.id,s,f):null,v=u||U.editor.resolveStagger(s.defaultValue);h.forEach(b=>{const S={...g||n};this.duration=p,this.iterationDuration=a,$(d)||(S.id=d+\"-\"+l);const y=Cs(this,v(b,l,h,null,this));li(S,this,y,b,l,h),l++})}else{const h=o?o(e,n,this.id,s):n,p=s&&s.type?s.defaultValue:s;li(h,this,Cs(this,p),e)}}else li(e,this,Cs(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if($(e)||e&&$(e.pause))return this;e.pause();const s=+(e.effect?e.effect.getTiming().duration:e.duration);!$(e)&&!$(e.persist)&&(e.persist=!0);const r=U.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);const n=this.add(e,{currentTime:[0,s],duration:s,delay:0,ease:\"linear\",playbackEase:\"linear\"},t);return r&&(r.addTimelineChild=i),n}set(e,t,s){return $(t)?this:(t.duration=Me,t.composition=Fe.replace,this.add(e,t,s))}call(e,t){return $(e)||e&&!Ie(e)?this:(U.editor&&U.editor.addTimelineCall&&(t=U.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return $(e)||e&&!He(e)?this:(U.editor&&U.editor.addTimelineLabel&&(t=U.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=Cs(this,t),this)}remove(e,t){return Pt(at(e),this,t),this}stretch(e){const t=this.duration;if(t===ls(e))return this;const s=e/t,r=this.labels;Pe(this,i=>i.stretch(i.duration*s));for(let i in r)r[i]*=s;return super.stretch(e)}refresh(){return Pe(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),Pe(this,e=>e.revert,!0),er(this)}then(e){return super.then(e)}},to=e=>U.editor?U.editor.addTimeline(e):new eo(e).init(),ci=class{constructor(e,t){Ne.current&&Ne.current.register(this);const s=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let c=!0;for(let u in this.animations)if(!this.animations[u].paused&&c){c=!1;break}c&&this.callbacks.complete()},i={onBegin:s,onComplete:r,onPause:r},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!($(e)||$(t))){for(let c in t){const u=t[c];os(c)?o[c]=u:Be(c,\"on\")?n[c]=u:i[c]=u}this.callbacks=new Lt({v:0},n);for(let c in o){const u=o[c],h=$e(u);let p={},a=\"+=0\";if(h){const f=u.unit;He(f)&&(a+=f)}else p.duration=u;p[c]=h?pt({to:a},u):a;const d=pt(i,p);d.composition=Fe.replace,d.autoplay=!1;const l=this.animations[c]=new Lt(e,d,null,0,!1).init();this.targets.length||this.targets.push(...l.targets),this[c]=(f,g,v)=>{const b=l._head;if($(f)&&b){const S=b._numbers;return S&&S.length?S:b._modifier(b._number)}else return Pe(l,S=>{if(Ve(f))for(let y=0,m=f.length;y<m;y++)$(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=f[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=f;$(v)||(S._ease=At(v)),S._currentTime=0}),$(g)||l.stretch(g),l.reset(!0).resume(),this}}}}revert(){for(let e in this.animations)this[e]=ne,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}},Gc=(e,t)=>new ci(e,t),Zc=es({clamp:()=>Z,damp:()=>su,degToRad:()=>eu,lerp:()=>Dt,mapRange:()=>Ps,padEnd:()=>Jc,padStart:()=>Qc,radToDeg:()=>tu,round:()=>F,roundPad:()=>jc,snap:()=>jt,wrap:()=>Kc}),jc=(e,t)=>(+e).toFixed(t),Qc=(e,t,s)=>`${e}`.padStart(t,s),Jc=(e,t,s)=>`${e}`.padEnd(t,s),Kc=(e,t,s)=>((e-t)%(s-t)+(s-t))%(s-t)+t,Ps=(e,t,s,r,i)=>r+(e-t)/(s-t)*(i-r),eu=e=>e*Math.PI/180,tu=e=>e*180/Math.PI,su=(e,t,s,r)=>r?r===1?t:Dt(e,t,1-Math.exp(-r*s*.1)):e,st=Qe*10,cr=class{constructor(e={}){const t=!$(e.bounce)||!$(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Qe,this.maxIterations=this.maxDuration/this.timeStep/Qe,this.bn=Z(W(e.bounce,.5),-1,1),this.pd=Z(W(e.duration,628),10*U.timeScale,st*U.timeScale),this.m=Z(W(e.mass,1),1,st),this.s=Z(W(e.stiffness,100),Me,st),this.d=Z(W(e.damping,10),Me,st),this.v=Z(W(e.velocity,0),-st,st),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||ne,t&&this.calculateSDFromBD(),this.compute(),this.ease=s=>{const r=s*this.settlingDuration,i=this.completed,n=this.pd;return r>=n&&!i&&(this.completed=!0,this.onComplete(this.parent)),r<n&&i&&(this.completed=!1),s===0||s===1?s:this.solve(s*this.solverDuration)}}solve(e){const{zeta:t,w0:s,wd:r,b:i}=this;let n=e;return t<1?n=js(-n*t*s)*(1*jr(r*n)+i*Zr(r*n)):t===1?n=(1+i*n)*js(-n*s):n=((1+i)*js((-t*s+r)*n)+(1-i)*js((-t*s-r)*n))/2,1-n}calculateSDFromBD(){const e=U.timeScale===1?this.pd/Qe:this.pd;this.m=1,this.v=0,this.s=Zt(2*xt/e,2),this.bn>=0?this.d=(1-this.bn)*4*xt/e:this.d=4*xt/(e*(1+this.bn)),this.s=F(Z(this.s,Me,st),3),this.d=F(Z(this.d,Me,300),3)}calculateBDFromSD(){const e=2*xt/ut(this.s);this.pd=e*(U.timeScale===1?Qe:1),this.d/(2*ut(this.s))<=1?this.bn=1-this.d*e/(4*xt):this.bn=4*xt/(this.d*e)-1,this.bn=F(Z(this.bn,-1,1),3),this.pd=F(Z(this.pd,10*U.timeScale,st*U.timeScale),3)}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:s,timeStep:r,m:i,d:n,s:o,v:c}=this,u=this.w0=Z(ut(o/i),Me,Qe),h=this.zeta=n/(2*ut(o*i));h<1?(this.wd=u*ut(1-h*h),this.b=(h*u+-c)/this.wd):h===1?(this.wd=0,this.b=-c+u):(this.wd=u*ut(h*h-1),this.b=(h*u+-c)/this.wd);let p=0,a=0,d=0;for(;a<=e&&d<=t;)ht(1-this.solve(p))<s?a++:a=0,this.solverDuration=p,p+=r,d++;this.settlingDuration=F(this.solverDuration*Qe,0)*U.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=Z(W(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=Z(W(e,1),10*U.timeScale,st*U.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=Z(W(e,100),Me,st),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=Z(W(e,10),Me,st),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=Z(W(e,1),1,st),this.compute()}get velocity(){return this.v}set velocity(e){this.v=Z(W(e,0),-st,st),this.compute()}},ur=e=>new cr(e),so=e=>(console.warn(\"createSpring() is deprecated use spring() instead\"),new cr(e)),ui={_head:null,_tail:null},hi=(e,t,s)=>{let r=ui._head,i;for(;r;){const n=r._next,o=r.$el===e,c=!t||r.property===t,u=!s||r.parent===s;if(o&&c&&u){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),_t(ui,r);const h=r.parent;h&&(h._completed++,h.animations.length===h._completed&&(h.completed=!0,h.paused=!0,h.muteCallbacks||(h.onComplete(h),h._resolve(h))))}r=n}return i},ro=(e,t,s,r,i)=>{const n=t.animate(r,i),o=i.delay+ +i.duration*i.iterations;n.playbackRate=e._speed,e.paused&&n.pause(),e.duration<o&&(e.duration=o,e.controlAnimation=n),e.animations.push(n),hi(t,s),St(ui,{parent:e,animation:n,$el:t,property:s,_next:null,_prev:null});const c=()=>hi(t,s,e);return n.oncancel=c,n.onremove=c,e.persist||(n.onfinish=c),n};function Ht(e,t,s){const r=Bt(e);if(!r.length)return;const[i]=r,n=ei(i,t),o=si(t,i,n);let c=Qt(i,o);if($(s))return c;if(tt(c,We),We.t===ve.NUMBER||We.t===ve.UNIT){if(s===!1)return We.n;{const u=rr(i,We,s,!1);return`${F(u.n,U.precision)}${u.u}`}}}var Rt=(e,t)=>{if(!$(t))return U.editor&&U.editor.addSet?U.editor.addSet(e,t):(t.duration=Me,t.composition=W(t.composition,Fe.none),new Lt(e,t,null,0,!0).resume())},io=(e,t,s)=>{const r=at(e);for(let i=0,n=r.length;i<n;i++)hi(r[i],s,t&&t.controlAnimation&&t);return Pt(r,t,s),r},qt=e=>{e.cancelable&&e.preventDefault()},ru=class{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:ne,remove:ne}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}},iu=class{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,s=0;for(;t&&t!==Q;)e(t,s),t=t.parentElement,s++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const s=getComputedStyle(t).transform;if(s){const r=new DOMMatrix(s);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform=\"none\"})}revert(){this.traverseUp((e,t)=>{const s=this.inlineTransforms[t];s===\"\"?e.style.removeProperty(\"transform\"):e.style.transform=s})}},Je=(e,t)=>e&&Ie(e)?e(t):e,hr=0,no=class{constructor(e,t={}){if(!e)return;Ne.current&&Ne.current.register(this);const s=t.x,r=t.y,i=t.trigger,n=t.modifier,o=t.releaseEase,c=o&&At(o),u=!$(o)&&!$(o.ease),h=$e(s)&&!$(s.mapTo)?s.mapTo:\"translateX\",p=$e(r)&&!$(r.mapTo)?r.mapTo:\"translateY\",a=Je(t.container,this);this.containerArray=Ve(a)?a:null,this.$container=a&&!this.containerArray?at(a)[0]:Q.body,this.useWin=this.$container===Q.body,this.$scrollContainer=this.useWin?je:this.$container,this.$target=$e(e)?new ru(e):at(e)[0],this.$trigger=at(i||e)[0],this.fixed=Ht(this.$target,\"position\")===\"fixed\",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=u?o:ur({mass:W(t.releaseMass,1),stiffness:W(t.releaseStiffness,80),damping:W(t.releaseDamping,20)}),this.releaseYSpring=u?o:ur({mass:W(t.releaseMass,1),stiffness:W(t.releaseStiffness,80),damping:W(t.releaseDamping,20)}),this.releaseEase=c||Et.outQuint,this.hasReleaseSpring=u,this.onGrab=t.onGrab||ne,this.onDrag=t.onDrag||ne,this.onRelease=t.onRelease||ne,this.onUpdate=t.onUpdate||ne,this.onSettle=t.onSettle||ne,this.onSnap=t.onSnap||ne,this.onResize=t.onResize||ne,this.onAfterResize=t.onAfterResize||ne,this.disabled=[0,0];const d={};if(n&&(d.modifier=n),$(s)||s===!0)d[h]=0;else if($e(s)){const l=s,f={};l.modifier&&(f.modifier=l.modifier),l.composition&&(f.composition=l.composition),d[h]=f}else s===!1&&(d[h]=0,this.disabled[0]=1);if($(r)||r===!0)d[p]=0;else if($e(r)){const l=r,f={};l.modifier&&(f.modifier=l.modifier),l.composition&&(f.composition=l.composition),d[p]=f}else r===!1&&(d[p]=0,this.disabled[1]=1);this.animate=new ci(this.$target,d),this.xProp=h,this.yProp=p,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-bt,bt,bt,-bt],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=Nt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new iu(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ot({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new ot({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!$(a),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?h:p,this.animate.callbacks.onRender=()=>{const l=this.updated,f=!(this.grabbed&&l)&&this.released,g=this.x,v=this.y,b=g-this.coords[2],S=v-this.coords[3];this.deltaX=b,this.deltaY=S,this.coords[2]=g,this.coords[3]=v,l&&(b||S)&&this.onUpdate(this),f?(this.computeVelocity(b,S),this.angle=Qs(S,b)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new ot({autoplay:!1,duration:150*U.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),$e(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const s=this.velocityTime,r=Nt(),i=r-s;if(i<17)return this.velocity;this.velocityTime=r;const n=this.velocityStack,o=this.velocityMultiplier,c=this.minVelocity,u=this.maxVelocity,h=this.velocityStackIndex;n[h]=F(Z(ut(e*e+t*t)/i*o,c,u),5);const p=Ln(n[0],n[1],n[2]);return this.velocity=p,this.velocityStackIndex=(h+1)%3,p}setX(e,t=!1){if(this.disabled[0])return;const s=F(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=s,this.snapped[0]=jt(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const s=F(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=s,this.snapped[1]=jt(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return F(this.animate[this.xProp](),U.precision)}set x(e){this.setX(e,!1)}get y(){return F(this.animate[this.yProp](),U.precision)}set y(e){this.setY(e,!1)}get progressX(){return Ps(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(Ps(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return Ps(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(Ps(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=F(this.useWin?je.scrollX:this.$container.scrollLeft,0),t=F(this.useWin?je.scrollY:this.$container.scrollTop,0),[s,r,i,n]=this.containerPadding,o=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+s-o,this.scrollBounds[1]=e-this.targetBounds[1]-r+o,this.scrollBounds[2]=t-this.targetBounds[2]-i+o,this.scrollBounds[3]=e-this.targetBounds[3]+n-o}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,s=this.y,r=this.coords[2],i=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const n=this.window[0]=je.innerWidth,o=this.window[1]=je.innerHeight,c=this.useWin,u=e.scrollWidth,h=e.scrollHeight,p=this.fixed,a=e.getBoundingClientRect(),[d,l,f,g]=this.containerPadding;this.dragArea[0]=c?0:a.left,this.dragArea[1]=c?0:a.top,this.scrollView[0]=c?Z(u,n,u):u,this.scrollView[1]=c?Z(h,o,h):h,this.updateScrollCoords();const{width:v,height:b,left:S,top:y,right:m,bottom:_}=e.getBoundingClientRect();this.dragArea[2]=F(c?Z(v,n,n):v,0),this.dragArea[3]=F(c?Z(b,o,o):b,0);const k=Ht(e,\"overflow\"),w=k===\"visible\",C=k===\"hidden\";if(this.canScroll=p?!1:this.contained&&(e===Q.body&&w||!C&&!w)&&(u>this.dragArea[2]+g-l||h>this.dragArea[3]+d-f)&&(!this.containerArray||this.containerArray&&!Ve(this.containerArray)),this.contained){const O=this.scroll.x,E=this.scroll.y,A=this.canScroll,P=this.$target.getBoundingClientRect(),B=A?c?0:e.scrollLeft:0,H=A?c?0:e.scrollTop:0,z=A?this.scrollView[0]-B-v:0,T=A?this.scrollView[1]-H-b:0;this.targetBounds[0]=F(P.top+E-(c?0:y),0),this.targetBounds[1]=F(P.right+O-(c?n:m),0),this.targetBounds[2]=F(P.bottom+E-(c?o:_),0),this.targetBounds[3]=F(P.left+O-(c?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+d,this.containerBounds[1]=this.containerArray[1]-l,this.containerBounds[2]=this.containerArray[2]-f,this.containerBounds[3]=this.containerArray[3]+g):(this.containerBounds[0]=-F(P.top-(p?Z(y,0,o):y)+H-d,0),this.containerBounds[1]=-F(P.right-(p?Z(m,0,n):m)-z+l,0),this.containerBounds[2]=-F(P.bottom-(p?Z(_,0,o):_)-T+f,0),this.containerBounds[3]=-F(P.left-(p?Z(S,0,n):S)+B-g,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=i,this.setX(t,!0),this.setY(s,!0)}isOutOfBounds(e,t,s){if(!this.contained)return 0;const[r,i,n,o]=e,[c,u]=this.disabled,h=!c&&t<o||!c&&t>i,p=!u&&s<r||!u&&s>n;return h&&!p?1:!h&&p?2:h&&p?3:0}refresh(){const e=this.parameters,t=e.x,s=e.y,r=Je(e.container,this),i=Je(e.containerPadding,this)||0,n=Ve(i)?i:[i,i,i,i],o=this.x,c=this.y,u=Je(e.cursor,this),h={onHover:\"grab\",onGrab:\"grabbing\"};if(u){const{onHover:v,onGrab:b}=u;v&&(h.onHover=v),b&&(h.onGrab=b)}const p=Je(e.dragThreshold,this),a={mouse:3,touch:7};if(Ue(p))a.mouse=p,a.touch=p;else if(p){const{mouse:v,touch:b}=p;$(v)||(a.mouse=v),$(b)||(a.touch=b)}this.containerArray=Ve(r)?r:null,this.$container=r&&!this.containerArray?at(r)[0]:Q.body,this.useWin=this.$container===Q.body,this.$scrollContainer=this.useWin?je:this.$container,this.isFinePointer=matchMedia(\"(pointer:fine)\").matches,this.containerPadding=W(n,[0,0,0,0]),this.containerFriction=Z(W(Je(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=Z(W(Je(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Je($e(t)&&!$(t.snap)?t.snap:e.snap,this),this.snapY=Je($e(s)&&!$(s.snap)?s.snap:e.snap,this),this.scrollSpeed=W(Je(e.scrollSpeed,this),1.5),this.scrollThreshold=W(Je(e.scrollThreshold,this),20),this.dragSpeed=W(Je(e.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?a.mouse:a.touch,this.minVelocity=W(Je(e.minVelocity,this),0),this.maxVelocity=W(Je(e.maxVelocity,this),50),this.velocityMultiplier=W(Je(e.velocityMultiplier,this),1),this.cursor=u===!1?!1:h,this.updateBoundingValues();const[d,l,f,g]=this.containerBounds;this.setX(Z(o,g,l),!0),this.setY(Z(c,d,f),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[b,S,y,m]=this.containerPadding,[_,k]=this.scrollView,w=this.dragArea[2],C=this.dragArea[3],O=this.scroll.x,E=this.scroll.y,A=this.$container.scrollWidth,P=this.$container.scrollHeight,B=this.useWin?Z(A,this.window[0],A):A,H=this.useWin?Z(P,this.window[1],P):P,z=_-B,T=k-H;this.dragged&&z>0&&(this.coords[0]-=z,this.scrollView[0]=B),this.dragged&&T>0&&(this.coords[1]-=T,this.scrollView[1]=H);const M=this.scrollSpeed*10,R=this.scrollThreshold,[L,q]=this.coords,[G,j,X,J]=this.scrollBounds,oe=F(Z((q-G+b)/R,-1,0)*M,0),he=F(Z((L-j-S)/R,0,1)*M,0),fe=F(Z((q-X-y)/R,0,1)*M,0),ge=F(Z((L-J+m)/R,-1,0)*M,0);if(oe||fe||ge||he){const[ae,V]=this.disabled;let le=O,me=E;ae||(le=F(Z(O+(ge||he),0,_-w),0),this.coords[0]-=O-le),V||(me=F(Z(E+(oe||fe),0,k-C),0),this.coords[1]-=E-me),this.useWin?this.$scrollContainer.scrollBy(-(O-le),-(E-me)):this.$scrollContainer.scrollTo(le,me)}}const[e,t,s,r]=this.containerBounds,[i,n,o,c,u,h]=this.pointer;this.coords[0]+=(i-u)*this.dragSpeed,this.coords[1]+=(n-h)*this.dragSpeed,this.pointer[4]=i,this.pointer[5]=n;const[p,a]=this.coords,[d,l]=this.snapped,f=(1-this.containerFriction)*this.dragSpeed;this.setX(p>t?t+(p-t)*f:p<r?r+(p-r)*f:p,!1),this.setY(a>s?s+(a-s)*f:a<e?e+(a-e)*f:a,!1),this.computeVelocity(i-u,n-h),this.angle=Qs(n-c,i-o);const[g,v]=this.snapped;(g!==d&&this.snapX||v!==l&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return Pt([this],null,\"x\"),Pt([this],null,\"y\"),Pt([this],null,\"progressX\"),Pt([this],null,\"progressY\"),Pt([this.scroll]),Pt([this.overshootCoords]),this}scrollInView(e,t=0,s=Et.inOutQuad){this.updateScrollCoords();const r=this.destX,i=this.destY,n=this.scroll,o=this.scrollBounds,c=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,r,i)){const[u,h,p,a]=o,d=F(Z(i-u,-bt,0),0),l=F(Z(r-h,0,bt),0),f=F(Z(i-p,0,bt),0),g=F(Z(r-a,-bt,0),0);new Lt(n,{x:F(n.x+(g?g-t:l?l+t:0),0),y:F(n.y+(d?d-t:f?f+t:0),0),duration:$(e)?350*U.timeScale:e,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=c})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Rt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,s=Et.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,i=this.y,[n,o,c,u]=this.containerPadding,h=this.scroll.y-this.targetBounds[0]+n+t,p=this.scroll.x-this.targetBounds[1]-o-t,a=this.scroll.y-this.targetBounds[2]-c-t,d=this.scroll.x-this.targetBounds[3]+u+t,l=this.isOutOfBounds([h,p,a,d],r,i);if(l){const[f,g]=this.disabled,v=Z(jt(r,this.snapX),d,p),b=Z(jt(i,this.snapY),h,a),S=$(e)?350*U.timeScale:e;!f&&(l===1||l===3)&&this.animate[this.xProp](v,S,s),!g&&(l===2||l===3)&&this.animate[this.yProp](b,S,s)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type===\"range\")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const s=e.changedTouches,r=s?s[0].clientX:e.clientX,i=s?s[0].clientY:e.clientY,{x:n,y:o}=this.transforms.normalizePoint(r,i),[c,u,h,p]=this.containerBounds,a=(1-this.containerFriction)*this.dragSpeed,d=this.x,l=this.y;this.coords[0]=this.coords[2]=a?d>u?u+(d-u)/a:d<p?p+(d-p)/a:d:d,this.coords[1]=this.coords[3]=a?l>h?h+(l-h)/a:l<c?c+(l-c)/a:l:l,this.pointer[0]=n,this.pointer[1]=o,this.pointer[2]=n,this.pointer[3]=o,this.pointer[4]=n,this.pointer[5]=o,this.pointer[6]=n,this.pointer[7]=o,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const f=Ht(this.$target,\"zIndex\",!1);hr=(f>hr?f:hr)+1,this.targetStyles=Rt(this.$target,{zIndex:hr}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Rt(Q.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Et.out(3)),this.onGrab(this),Q.addEventListener(\"touchmove\",this),Q.addEventListener(\"touchend\",this),Q.addEventListener(\"touchcancel\",this),Q.addEventListener(\"mousemove\",this),Q.addEventListener(\"mouseup\",this),Q.addEventListener(\"selectstart\",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,s=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:i,y:n}=this.transforms.normalizePoint(s,r),o=i-this.pointer[6],c=n-this.pointer[7];let u=e.target,h=!1,p=!1,a=!1;for(;t&&u&&u!==this.$trigger;){const d=Ht(u,\"overflow-y\");if(d!==\"hidden\"&&d!==\"visible\"){const{scrollTop:l,scrollHeight:f,clientHeight:g}=u;if(f>g){a=!0,h=l<=3,p=l>=f-g-3;break}}u=u.parentElement}a&&(!h&&!p||h&&c<0||p&&c>0)?(this.pointer[0]=i,this.pointer[1]=n,this.pointer[2]=i,this.pointer[3]=n,this.pointer[4]=i,this.pointer[5]=n,this.pointer[6]=i,this.pointer[7]=n):(qt(e),this.triggerStyles||(this.triggerStyles=Rt(this.$trigger,{pointerEvents:\"none\"})),this.$trigger.addEventListener(\"touchstart\",qt,{passive:!1}),this.$trigger.addEventListener(\"touchmove\",qt,{passive:!1}),this.$trigger.addEventListener(\"touchend\",qt),(this.dragged||!this.disabled[0]&&ht(o)>this.dragThreshold||!this.disabled[1]&&ht(c)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=i,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[e,t]=this.disabled,[s,r,i,n,o,c]=this.pointer,[u,h,p,a]=this.containerBounds,[d,l]=this.snapped,f=this.releaseXSpring,g=this.releaseYSpring,v=this.releaseEase,b=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,m=this.y,_=this.computeVelocity(s-o,r-c),k=this.angle=Qs(r-n,s-i),w=_*150,C=(1-this.releaseContainerFriction)*this.dragSpeed,O=y+jr(k)*w,E=m+Zr(k)*w,A=O>h?h+(O-h)*C:O<a?a+(O-a)*C:O,P=E>p?p+(E-p)*C:E<u?u+(E-u)*C:E,B=this.destX=Z(F(jt(A,this.snapX),5),a,h),H=this.destY=Z(F(jt(P,this.snapY),5),u,p),z=this.isOutOfBounds(this.containerBounds,O,E);let T=0,M=0,R=v,L=v,q=0;if(S.x=y,S.y=m,!e){const j=B===h?y>h?-1:1:y<a?-1:1,X=F(y-B,0);f.velocity=t&&b?X?w*j/ht(X):0:_;const{ease:J,settlingDuration:oe,restDuration:he}=f;T=y===B?0:b?oe:oe-he*U.timeScale,b&&(R=J),T>q&&(q=T)}if(!t){const j=H===p?m>p?-1:1:m<u?-1:1,X=F(m-H,0);g.velocity=e&&b?X?w*j/ht(X):0:_;const{ease:J,settlingDuration:oe,restDuration:he}=g;M=m===H?0:b?oe:oe-he*U.timeScale,b&&(L=J),M>q&&(q=M)}if(!b&&z&&C&&(T||M)){const j=Fe.blend;new Lt(S,{x:{to:A,duration:T*.65},y:{to:P,duration:M*.65},ease:v,composition:j}).init(),new Lt(S,{x:{to:B,duration:T},y:{to:H,duration:M},ease:v,composition:j}).init(),this.overshootTicker.stretch(Ln(T,M)).restart()}else e||this.animate[this.xProp](B,T,R),t||this.animate[this.yProp](H,M,L);this.scrollInView(q,this.scrollThreshold,v);let G=!1;B!==d&&(this.snapped[0]=B,this.snapX&&(G=!0)),H!==l&&this.snapY&&(this.snapped[1]=H,this.snapY&&(G=!0)),G&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener(\"touchstart\",qt),this.$trigger.removeEventListener(\"touchmove\",qt),this.$trigger.removeEventListener(\"touchend\",qt),Q.removeEventListener(\"touchmove\",this),Q.removeEventListener(\"touchend\",this),Q.removeEventListener(\"touchcancel\",this),Q.removeEventListener(\"mousemove\",this),Q.removeEventListener(\"mouseup\",this),Q.removeEventListener(\"selectstart\",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove(\"is-disabled\"),this.touchActionStyles=Rt(this.$trigger,{touchAction:this.disabled[0]?\"pan-x\":this.disabled[1]?\"pan-y\":\"none\"}),this.$trigger.addEventListener(\"touchstart\",this,{passive:!0}),this.$trigger.addEventListener(\"mousedown\",this,{passive:!0}),this.$trigger.addEventListener(\"mouseenter\",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add(\"is-disabled\"),this.$trigger.removeEventListener(\"touchstart\",this),this.$trigger.removeEventListener(\"mousedown\",this),this.$trigger.removeEventListener(\"mouseenter\",this),Q.removeEventListener(\"touchmove\",this),Q.removeEventListener(\"touchend\",this),Q.removeEventListener(\"touchcancel\",this),Q.removeEventListener(\"mousemove\",this),Q.removeEventListener(\"mouseup\",this),Q.removeEventListener(\"selectstart\",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove(\"is-disabled\"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(e){switch(e.type){case\"mousedown\":this.handleDown(e);break;case\"touchstart\":this.handleDown(e);break;case\"mousemove\":this.handleMove(e);break;case\"touchmove\":this.handleMove(e);break;case\"mouseup\":this.handleUp();break;case\"touchend\":this.handleUp();break;case\"touchcancel\":this.handleUp();break;case\"mouseenter\":this.handleHover();break;case\"selectstart\":qt(e)}}},nu=(e,t)=>new no(e,t),pi=(e=ne)=>new ot({duration:1*U.timeScale,onComplete:e},null,0).resume(),pr=e=>{let t;return((...s)=>{let r,i,n,o,c;t&&(r=t.currentIteration,i=t.iterationProgress,n=t.reversed,o=t._alternate,c=t._startTime,t.revert());const u=e(...s);return u&&!Ie(u)&&u.revert&&(t=u),$(i)||(t.currentIteration=r,t.iterationProgress=(o&&r%2?!n:n)?1-i:i,t._startTime=c),u||ne})},oo=class{constructor(e={}){Ne.current&&Ne.current.register(this);const t=e.root;let s=Q;t&&(s=t.current||t.nativeElement||at(t)[0]||Q);const r=e.defaults,i=U.defaults,n=e.mediaQueries;if(this.defaults=r?pt(r,i):i,this.root=s,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},n)for(let o in n){const c=je.matchMedia(n[o]);this.mediaQueryLists[o]=c,c.addEventListener(\"change\",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=Ne.current,s=Ne.root,r=U.defaults;Ne.current=this,Ne.root=this.root,U.defaults=this.defaults;const i=this.mediaQueryLists;for(let o in i)this.matches[o]=i[o].matches;const n=e(this);return Ne.current=t,Ne.root=s,U.defaults=r,n}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(s=>{const r=s(this);Ie(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,Ie(e)){const s=e;this.constructors.push(s),this.execute(()=>{const r=s(this);Ie(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...s)=>this.execute(()=>t(...s));return this}addOnce(e){if(this.once=!0,Ie(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const s=e;this.constructorsOnce[t]=s,this.execute(()=>{const r=s(this);Ie(r)&&this.revertConstructorsOnce.push(r)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,s=this.constructorsOnce[t];if(Ie(s))return s(this);const r=pr(e);this.constructorsOnce[t]=r;let i;return this.execute(()=>{i=r(this)}),i}handleEvent(e){e.type===\"change\"&&this.refresh()}revert(){const e=this.revertibles,t=this.revertConstructors,s=this.revertiblesOnce,r=this.revertConstructorsOnce,i=this.mediaQueryLists;let n=e.length,o=t.length,c=s.length,u=r.length;for(;n--;)e[n].revert();for(;o--;)t[o](this);for(;c--;)s[c].revert();for(;u--;)r[u](this);for(let h in i)i[h].removeEventListener(\"change\",this);e.length=0,t.length=0,this.constructors.length=0,s.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}},ou=e=>new oo(e),au=()=>{const e=Q.createElement(\"div\");Q.body.appendChild(e),e.style.height=\"100lvh\";const t=e.offsetHeight;return Q.body.removeChild(e),t},dr=(e,t)=>e&&Ie(e)?e(t):e,fr=new Map,lu=class{constructor(e){this.element=e,this.useWin=this.element===Q.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new ot({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Pe(this,s=>s.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ot({autoplay:!1,frameRate:30,onUpdate:t=>{const s=t.deltaTime,r=this.prevScrollX,i=this.prevScrollY,n=this.scrollX,o=this.scrollY,c=r-n,u=i-o;this.prevScrollX=n,this.prevScrollY=o,c&&(this.backwardX=r>n),u&&(this.backwardY=i>o),this.velocity=F(s>0?Math.sqrt(c*c+u*u)/s:0,5)}}).init(),this.resizeTicker=new ot({autoplay:!1,duration:250*U.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ot({autoplay:!1,duration:500*U.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?je:this.element).addEventListener(\"scroll\",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=F(e?je.scrollX:t.scrollLeft,0),this.scrollY=F(e?je.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=je.innerWidth,this.winHeight=au()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let s,r;if(this.useWin)s=this.winWidth,r=this.winHeight;else{const i=t.getBoundingClientRect();s=t.clientWidth,r=t.clientHeight,this.top=i.top,this.left=i.left,this.scale=i.width?s/i.width:i.height?r/i.height:1}this.width=s,this.height=r}refreshScrollObservers(){Pe(this,e=>{e.ready&&e._debug&&e.removeDebug()}),this.updateBounds(),Pe(this,e=>{e.ready&&(e.refresh(),e.onResize(e),e._debug&&e.debug())})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){e.type===\"scroll\"&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?je:this.element).removeEventListener(\"scroll\",this),fr.delete(this.element)}},cu=e=>{const t=e&&at(e)[0]||Q.body;let s=fr.get(t);return s||(s=new lu(t),fr.set(t,s)),s},Es=(e,t,s,r,i)=>{const n=t===\"min\",o=t===\"max\",{n:c,u}=tt(t===\"top\"||t===\"left\"||t===\"start\"||n?0:t===\"bottom\"||t===\"right\"||t===\"end\"||o?\"100%\":t===\"center\"?\"50%\":t,We);let h=c;return u===\"%\"?h=c/100*s:u&&(h=rr(e,We,\"px\",!0).n),o&&r<0&&(h+=r),n&&i>0&&(h+=i),h},gr=(e,t,s,r,i)=>{let n;if(He(t)){const o=Tn.exec(t);if(o){const c=o[0],u=c[0],h=t.split(c),p=h[0]===\"min\",a=h[0]===\"max\",d=Es(e,h[0],s,r,i),l=Es(e,h[1],s,r,i);if(p){const f=Jt(Es(e,\"min\",s),l,u);n=f<d?d:f}else if(a){const f=Jt(Es(e,\"max\",s),l,u);n=f>d?d:f}else n=Jt(d,l,u)}else n=Es(e,t,s,r,i)}else n=t;return F(n,0)},ao=e=>{let t;const s=e.targets;for(let r=0,i=s.length;r<i;r++){const n=s[r];if(n[Wt]){t=n;break}}return t},uu=0,lo=[\"#FF4B4B\",\"#FF971B\",\"#FFC730\",\"#F9F640\",\"#7AFF5A\",\"#18FF74\",\"#17E09B\",\"#3CFFEC\",\"#05DBE9\",\"#33B3F1\",\"#638CF9\",\"#C563FE\",\"#FF4FCF\",\"#F93F8A\"],co=class{constructor(e={}){Ne.current&&Ne.current.register(this);const t=W(e.sync,\"play pause\"),s=t?At(t):null,r=t&&(t===\"linear\"||t===lt),i=t&&!(s===lt&&!r),n=t&&(Ue(t)||t===!0||r),o=t&&He(t)&&!i&&!n,c=o?t.split(\" \").map(h=>()=>{const p=this.linked;return p&&p[h]?p[h]():null}):null,u=o&&c.length>2;this.index=uu++,this.id=$(e.id)?this.index:e.id,this.container=cu(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=i||n||!!c,this.syncEase=i?s:null,this.syncSmooth=n?t===!0||r?1:t:null,this.onSyncEnter=c&&!u&&c[0]?c[0]:ne,this.onSyncLeave=c&&!u&&c[1]?c[1]:ne,this.onSyncEnterForward=c&&u&&c[0]?c[0]:ne,this.onSyncLeaveForward=c&&u&&c[1]?c[1]:ne,this.onSyncEnterBackward=c&&u&&c[2]?c[2]:ne,this.onSyncLeaveBackward=c&&u&&c[3]?c[3]:ne,this.onEnter=e.onEnter||ne,this.onLeave=e.onLeave||ne,this.onEnterForward=e.onEnterForward||ne,this.onLeaveForward=e.onLeaveForward||ne,this.onEnterBackward=e.onEnterBackward||ne,this.onLeaveBackward=e.onLeaveBackward||ne,this.onUpdate=e.onUpdate||ne,this.onResize=e.onResize||ne,this.onSyncComplete=e.onSyncComplete||ne,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=[\"start\",\"end\",\"end\",\"start\"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=W(e.debug,!1),this._next=null,this._prev=null,St(this.container,this),pi(()=>{if(!this.reverted){if(!this.target){const h=at(e.target)[0];this.target=h||Q.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!$(e)&&!$(e.persist)&&(e.persist=!0),!this._params.target)){let t;$(e.targets)?Pe(e,s=>{s.targets&&!t&&(t=ao(s))}):t=ao(e),this.target=t||Q.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:F(Z(e,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const e=this._params;return this.repeat=W(dr(e.repeat,this),!0),this.horizontal=W(dr(e.axis,this),\"y\")===\"x\",this.enter=W(dr(e.enter,this),\"end start\"),this.leave=W(dr(e.leave,this),\"start end\"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,s=e.element.querySelector(\":scope > .animejs-onscroll-debug\"),r=Q.createElement(\"div\"),i=Q.createElement(\"div\"),n=Q.createElement(\"div\"),o=lo[this.index%lo.length],c=e.useWin,u=c?e.winWidth:e.width,h=c?e.winHeight:e.height,p=e.scrollWidth,a=e.scrollHeight,d=this.container.width>360?320:260,l=t?0:10,f=t?10:0,g=t?24:d/2,v=t?g:15,b=t?60:g,S=t?b:v,y=t?\"repeat-x\":\"repeat-y\",m=C=>t?\"0px \"+C+\"px\":C+\"px 2px\",_=C=>`linear-gradient(${t?90:0}deg, ${C} 2px, transparent 1px)`,k=(C,O,E,A,P)=>`position:${C};left:${O}px;top:${E}px;width:${A}px;height:${P}px;`;r.style.cssText=`${k(\"absolute\",l,f,t?p:d,t?d:a)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${t?\"column\":\"row\"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,i.style.cssText=`${k(\"sticky\",0,0,t?u:g,t?g:h)}`,s||(i.style.cssText+=`background:\n ${_(\"#FFFF\")}${m(g-10)} / 100px 100px ${y},\n ${_(\"#FFF8\")}${m(g-10)} / 10px 10px ${y};\n `),n.style.cssText=`${k(\"relative\",0,0,t?p:g,t?g:a)}`,s||(n.style.cssText+=`background:\n ${_(\"#FFFF\")}${m(0)} / ${t?\"100px 10px\":\"10px 100px\"} ${y},\n ${_(\"#FFF8\")}${m(0)} / ${t?\"10px 0px\":\"0px 10px\"} ${y};\n `);const w=[\" enter: \",\" leave: \"];this.coords.forEach((C,O)=>{const E=O>1,A=(E?0:this.offset)+C,P=O%2,B=A<S,H=A>(E?t?u:h:t?p:a)-S,z=(E?P&&!B:!P&&!B)||H,T=Q.createElement(\"div\"),M=Q.createElement(\"div\"),R=t?z?\"right\":\"left\":z?\"bottom\":\"top\",L=z?(t?b:v)+(E?t?-1:H?0:-2:t?-1:-2):t?1:0;M.innerHTML=`${this.id}${w[P]}${this.thresholds[O]}`,T.style.cssText=`${k(\"absolute\",0,0,b,v)}\n display: flex;\n flex-direction: ${t?\"column\":\"row\"};\n justify-content: flex-${E?\"start\":\"end\"};\n align-items: flex-${z?\"end\":\"start\"};\n border-${R}: 2px solid ${o};\n `,M.style.cssText=`\n overflow: hidden;\n max-width: ${d/2-10}px;\n height: ${v};\n margin-${t?z?\"right\":\"left\":z?\"bottom\":\"top\"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${t&&z||!t&&!E?\"right\":\"left\"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${P?o:\"rgba(0,0,0,.75)\"};\n background-color: ${P?\"rgba(0,0,0,.65)\":o};\n border: 2px solid ${P?o:\"transparent\"};\n border-${t?z?\"top-left\":\"top-right\":z?\"top-left\":\"bottom-left\"}-radius: 5px;\n border-${t?z?\"bottom-left\":\"bottom-right\":z?\"top-right\":\"bottom-right\"}-radius: 5px;\n `,T.appendChild(M);let q=A-L+(t?1:0);T.style[t?\"left\":\"top\"]=`${q}px`,(E?i:n).appendChild(T)}),r.appendChild(i),r.appendChild(n),e.element.appendChild(r),s||r.classList.add(\"animejs-onscroll-debug\"),this.$debug=r,Ht(e.element,\"position\")===\"static\"&&(this.debugStyles=Rt(e.element,{position:\"relative \"}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,s=this.container,r=this.horizontal,i=this.linked;let n,o=t;for(i&&(n=i.currentTime,i.seek(0,!0));o&&o!==s.element&&o!==Q.body;){const P=Ht(o,\"position\")===\"sticky\"?Rt(o,{position:\"static\"}):!1;o=o.parentElement,P&&(e||(e=[]),e.push(P))}const c=t.getBoundingClientRect(),u=s.scale,h=(r?c.left+s.scrollX-s.left:c.top+s.scrollY-s.top)*u,p=(r?c.width:c.height)*u,a=r?s.width:s.height,d=(r?s.scrollWidth:s.scrollHeight)-a,l=this.enter,f=this.leave;let g=\"start\",v=\"end\",b=\"end\",S=\"start\";if(He(l)){const P=l.split(\" \");b=P[0],g=P.length>1?P[1]:g}else if($e(l)){const P=l;$(P.container)||(b=P.container),$(P.target)||(g=P.target)}else Ue(l)&&(b=l);if(He(f)){const P=f.split(\" \");S=P[0],v=P.length>1?P[1]:v}else if($e(f)){const P=f;$(P.container)||(S=P.container),$(P.target)||(v=P.target)}else Ue(f)&&(S=f);const y=gr(t,g,p),m=gr(t,v,p),_=y+h-a,k=m+h-d,w=gr(t,b,a,_,k),C=gr(t,S,a,_,k),O=y+h-w,E=m+h-C,A=E-O;this.offset=h,this.offsetStart=O,this.offsetEnd=E,this.distance=A<=0?0:A,this.thresholds=[g,v,b,S],this.coords=[y,m,w,C],e&&e.forEach(P=>P.revert()),i&&i.seek(n,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const e=this.linked,t=this.sync,s=this.syncEase,r=this.syncSmooth,i=e&&(s||r),n=this.horizontal,o=this.container,c=this.scroll,u=c<=this.offsetStart,h=c>=this.offsetEnd,p=!u&&!h,a=c===this.offsetStart||c===this.offsetEnd,d=!this.hasEntered&&a,l=this._debug&&this.$debug;let f=!1,g=!1,v=this.progress;if(u&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),i){const b=e.progress;if(r&&Ue(r)){if(r<1){const S=b<v&&v===1?1e-4:b>v&&!v?-1e-4:0;v=F(Dt(b,v,Dt(.01,.2,r))+S,6)}}else s&&(v=s(v));f=v!==this.prevProgress,g=b===1,f&&!g&&r&&b&&o.wakeTicker.restart()}if(l){const b=n?o.scrollY:o.scrollX;l.style[n?\"top\":\"left\"]=b+10+\"px\"}(p&&!this.isInView||d&&!this.forceEnter&&!this.hasEntered)&&(p&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(l&&p&&(l.style.zIndex=`${this.container.zIndex++}`),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,d&&(this.forceEnter=!0)):p&&(this.forceEnter=!1)),(p||!p&&this.isInView)&&(f=!0),f&&(i&&e.seek(e.duration*v),this.onUpdate(this)),!p&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(g=!0)),v>=1&&this.began&&!this.completed&&(t&&g||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return _t(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}},hu=(e={})=>new co(e),uo=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,pu=(e,t,s)=>{let r=0,i=1,n,o,c=0;do o=r+(i-r)/2,n=uo(o,t,s)-e,n>0?i=o:r=o;while(ht(n)>1e-7&&++c<100);return o},ho=(e=.5,t=0,s=.5,r=1)=>e===t&&s===r?lt:i=>i===0||i===1?i:uo(pu(i,e,s),t,r),po=(e=10,t)=>{const s=t?Ac:as;return r=>s(Z(r,0,1)*e)*(1/e)},di=(...e)=>{const t=e.length;if(!t)return lt;const s=t-1,r=e[0],i=e[s],n=[0],o=[Gt(r)];for(let c=1;c<s;c++){const u=e[c],h=He(u)?u.trim().split(\" \"):[u],p=h[0],a=h[1];n.push($(a)?c/s:Gt(a)/100),o.push(Gt(p))}return o.push(Gt(i)),n.push(1),function(u){for(let h=1,p=n.length;h<p;h++){const a=n[h];if(u<=a){const d=n[h-1],l=o[h-1];return l+(o[h]-l)*(u-d)/(a-d)}}return o[o.length-1]}},fo=(e=10,t=1)=>{const s=[0],r=e-1;for(let i=1;i<r;i++){const n=s[i-1],o=i/r,c=o+((i+1)/r-o)*Math.random(),u=o*(1-t)+c*t;s.push(Z(u,n,1))}return s.push(1),di(...s)},du=es({Spring:()=>cr,createSpring:()=>so,cubicBezier:()=>ho,eases:()=>Et,irregular:()=>fo,linear:()=>di,spring:()=>ur,steps:()=>po}),mr=(e,t=100)=>{const s=[];for(let r=0;r<=t;r++)s.push(F(e(r/t),4));return`linear(${s.join(\", \")})`},go={},mo=e=>{let t=go[e];if(t)return t;if(t=\"linear\",He(e)){if(Be(e,\"linear\")||Be(e,\"cubic-\")||Be(e,\"steps\")||Be(e,\"ease\"))t=e;else if(Be(e,\"cubicB\"))t=Gs(e);else{const s=jn(e);Ie(s)&&(t=s===lt?\"linear\":mr(s))}go[e]=t}else if(Ie(e)){const s=mr(e);s&&(t=s)}else e.ease&&(t=mr(e.ease));return t},vo=[\"x\",\"y\",\"z\"],fu=[\"perspective\",\"width\",\"height\",\"margin\",\"padding\",\"top\",\"right\",\"bottom\",\"left\",\"borderWidth\",\"fontSize\",\"borderRadius\",...vo],gu=[...vo,...Xt.filter(e=>[\"X\",\"Y\",\"Z\"].some(t=>e.endsWith(t)))],fi=null,As=(e,t,s,r,i)=>{let n=He(t)?t:De(t,s,r,i,null,null);return Ue(n)?fu.includes(e)||Be(e,\"translate\")?`${n}px`:Be(e,\"rotate\")||Be(e,\"skew\")?`${n}deg`:`${n}`:n},yo=(e,t,s,r,i,n)=>{let o=\"0\";const c=$(r)?getComputedStyle(e)[t]:As(t,r,e,i,n);return $(s)?o=Ve(r)?r.map(u=>As(t,u,e,i,n)):c:o=[As(t,s,e,i,n),c],o},bo=class{constructor(e,t){Ne.current&&Ne.current.register(this),Yt(fi)&&(wt&&($(CSS)||!Object.hasOwnProperty.call(CSS,\"registerProperty\"))?fi=!1:(Xt.forEach(d=>{const l=Be(d,\"skew\"),f=Be(d,\"scale\"),g=Be(d,\"rotate\"),v=Be(d,\"translate\"),b=g||l,S=b?\"<angle>\":f?\"<number>\":v?\"<length-percentage>\":\"*\";try{CSS.registerProperty({name:\"--\"+d,syntax:S,inherits:!1,initialValue:v?\"0px\":b?\"0deg\":f?\"1\":\"0\"})}catch{}}),fi=!0));const s=Bt(e);s.length||console.warn(\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\");const r=W(t.autoplay,U.defaults.autoplay),i=r&&r.link?r:!1,n=t.alternate&&t.alternate===!0,o=t.reversed&&t.reversed===!0,c=W(t.loop,U.defaults.loop),u=c===!0||c===1/0?1/0:Ue(c)?c+1:1,h=n?o?\"alternate-reverse\":\"alternate\":o?\"reverse\":\"normal\",p=\"both\",a=U.timeScale===1?1:Qe;this.targets=s,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||U.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!r||i!==!1,this.reversed=o,this.persist=W(t.persist,U.defaults.persist),this.autoplay=r,this._speed=W(t.playbackRate,U.defaults.playbackRate),this._resolve=ne,this._completed=0,this._inlineStyles=[],s.forEach((d,l)=>{const f=d[ks],g=gu.some(E=>t.hasOwnProperty(E)),v=d.style,b=this._inlineStyles[l]={},S=W(t.ease,U.defaults.ease),y=De(S,d,l,s,null,null),m=Ie(y)||He(y)?y:S,_=S.ease&&S,k=mo(m),w=(_?_.settlingDuration:De(W(t.duration,U.defaults.duration),d,l,s,null,null))*a,C=De(W(t.delay,U.defaults.delay),d,l,s,null,null)*a,O=W(t.composition,\"replace\");for(let E in t){if(!os(E))continue;const A={},P={iterations:u,direction:h,fill:p,easing:k,duration:w,delay:C,composite:O},B=t[E],H=g?Xt.includes(E)?E:Gr.get(E):!1,z=H?\"transform\":E;b[z]||(b[z]=v[z]);let T;if($e(B)){const M=B,R=W(M.ease,k),L=R.ease&&R,q=M.to,G=M.from;if(P.duration=(L?L.settlingDuration:De(W(M.duration,w),d,l,s,null,null))*a,P.delay=De(W(M.delay,C),d,l,s,null,null)*a,P.composite=W(M.composition,O),P.easing=mo(R),T=yo(d,E,G,q,l,s),H?(A[`--${H}`]=T,f[H]=T):A[E]=yo(d,E,G,q,l,s),ro(this,d,E,A,P),!$(G))if(!H)v[E]=A[E][0];else{const j=`--${H}`;v.setProperty(j,A[j][0])}}else T=Ve(B)?B.map(M=>As(E,M,d,l,s)):As(E,B,d,l,s),H?(A[`--${H}`]=T,f[H]=T):A[E]=T,ro(this,d,E,A,P)}if(g){let E=\"\";for(let A in f)E+=`${kn[A]}var(--${A})) `;v.transform=E}}),i&&this.autoplay.link(this)}forEach(e){try{const t=He(e)?s=>s[e]():e;this.animations.forEach(t)}catch{}return this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=U.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(U.timeScale===1?1:Qe);this.forEach(s=>{!this.persist&&t>=this.duration&&s.play(),s.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach(\"play\")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach(\"pause\"))}alternate(){return this.reversed=!this.reversed,this.forEach(\"reverse\"),this.paused&&this.forEach(\"pause\"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach(\"commitStyles\")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach(\"cancel\"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(e=>{e.style.transform===\"none\"&&e.style.removeProperty(\"transform\")})}),this}revert(){return this.cancel().targets.forEach((e,t)=>{const s=e.style,r=this._inlineStyles[t];for(let i in r){const n=r[i];$(n)||n===\"\"?s.removeProperty(Gs(i)):e.style[i]=n}e.getAttribute(\"style\")===\"\"&&e.removeAttribute(\"style\")}),this}then(e=ne){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ne};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},_o={animate:(e,t)=>new bo(e,t),convertEase:mr},mu=0,vu=0,vr=(e,t)=>!e||!t?!1:e===t||e.contains(t),ps=e=>{if(!e)return null;const t=e.style,s=t.transition||\"\";return t.setProperty(\"transition\",\"none\",\"important\"),s},yr=(e,t)=>{if(!e)return;const s=e.style;t?s.transition=t:s.removeProperty(\"transition\")},yu=e=>{const t=e.layout.transitionMuteStore,s=e.$el,r=e.$measure;s&&!t.has(s)&&t.set(s,ps(s)),r&&!t.has(r)&&t.set(r,ps(r))},br=e=>{e.forEach((t,s)=>yr(s,t)),e.clear()},bu={display:\"none\",visibility:\"hidden\",opacity:\"0\",transform:\"none\",position:\"static\"},_u=e=>{if(!e)return;const t=e.parentNode;t&&(t._head===e&&(t._head=e._next),t._tail===e&&(t._tail=e._prev),e._prev&&(e._prev._next=e._next),e._next&&(e._next._prev=e._prev),e._prev=null,e._next=null,e.parentNode=null)},So=(e,t,s,r)=>{let i=e.dataset.layoutId;i||(i=e.dataset.layoutId=`node-${vu++}`);const n=r||{};return n.$el=e,n.$measure=e,n.id=i,n.index=0,n.targets=null,n.delay=0,n.duration=0,n.ease=null,n.state=s,n.layout=s.layout,n.parentNode=t||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:\"none\",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(o=>n.properties[o]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},ko=(e,t,s,r)=>{const i=e.$el,n=e.layout.root,o=n===i,c=e.properties,u=e.state.rootNode,h=e.parentNode,p=s.transform,a=i.style.transform,d=h?h.measuredIsRemoved:!1,l=s.position;o&&(e.layout.absoluteCoords=l===\"fixed\"||l===\"absolute\"),e.$measure=t,e.inlineTransforms=a,e.hasTransform=p&&p!==\"none\",e.measuredIsInsideRoot=vr(n,t),e.measuredInlineTransform=null,e.measuredDisplay=s.display,e.measuredVisibility=s.visibility,e.measuredPosition=l,e.measuredHasDisplayNone=s.display===\"none\",e.measuredHasVisibilityHidden=s.visibility===\"hidden\",e.measuredIsVisible=!(e.measuredHasDisplayNone||e.measuredHasVisibilityHidden),e.measuredIsRemoved=e.measuredHasDisplayNone||e.measuredHasVisibilityHidden||d;let f=!1,g=i.previousSibling;for(;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.previousSibling;if(g&&g.nodeType===Node.TEXT_NODE)f=!0;else{for(g=i.nextSibling;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.nextSibling;f=g!==null&&g.nodeType===Node.TEXT_NODE}if(e.isInlined=f,e.hasTransform&&!r){const k=e.layout.transitionMuteStore;k.get(i)||(e.inlineTransition=ps(i)),t===i?i.style.transform=\"none\":(k.get(t)||(e.measuredInlineTransition=ps(t)),e.measuredInlineTransform=t.style.transform,t.style.transform=\"none\")}let v=0,b=0,S=0,y=0;if(!r){const k=t.getBoundingClientRect();v=k.left,b=k.top,S=k.width,y=k.height}for(let k in c){const w=k===\"transform\"?p:s[k]||s.getPropertyValue&&s.getPropertyValue(k);$(w)||(c[k]=w)}c.left=v,c.top=b,c.clientLeft=r?0:t.clientLeft,c.clientTop=r?0:t.clientTop;let m,_;if(o)e.layout.absoluteCoords?(m=v,_=b):(m=0,_=0);else{const k=h||u,w=k.properties.left,C=k.properties.top,O=k.properties.clientLeft,E=k.properties.clientTop;if(e.layout.absoluteCoords)m=v-w-O,_=b-C-E;else if(k===u){const A=u.properties.left,P=u.properties.top,B=u.properties.clientLeft,H=u.properties.clientTop;m=v-A-B,_=b-P-H}else m=v-w-O,_=b-C-E}return c.x=m,c.y=_,c.width=S,c.height=y,e},wo=(e,t)=>{if(t)for(let s in t)e.properties[s]=t[s]},Ls=(e,t)=>{const s=De(t.ease,e.$el,e.index,e.targets,null,null),r=Ie(s)?s:t.ease,i=!$(r)&&!$(r.ease);e.ease=i?r.ease:r,e.duration=i?r.settlingDuration:De(t.duration,e.$el,e.index,e.targets,null,null),e.delay=De(t.delay,e.$el,e.index,e.targets,null,null)},Su=e=>{const t=e.$el.style,s=e.inlineStyles;s.length=0,e.layout.recordedProperties.forEach(r=>{s.push(r,t[r]||\"\")})},xo=e=>{const t=e.$el.style,s=e.inlineStyles;for(let r=0,i=s.length;r<i;r+=2){const n=s[r],o=s[r+1];o&&o!==\"\"?t[n]=o:(t[n]=\"\",t.removeProperty(n))}},ku=e=>{const t=e.inlineTransforms,s=e.$el.style;!e.hasTransform||!t||e.hasTransform&&s.transform===\"none\"||t&&t===\"none\"?s.removeProperty(\"transform\"):t&&(s.transform=t);const r=e.$measure;if(e.hasTransform&&r!==e.$el){const i=r.style,n=e.measuredInlineTransform;n&&n!==\"\"?i.transform=n:i.removeProperty(\"transform\")}e.measuredInlineTransform=null,e.inlineTransition!==null&&(yr(e.$el,e.inlineTransition),e.inlineTransition=null),r!==e.$el&&e.measuredInlineTransition!==null&&(yr(r,e.measuredInlineTransition),e.measuredInlineTransition=null)},To=e=>{(e.measuredIsRemoved||e.hasVisibilitySwap)&&(e.$el.style.removeProperty(\"display\"),e.$el.style.removeProperty(\"visibility\"),e.hasVisibilitySwap&&(e.$measure.style.removeProperty(\"display\"),e.$measure.style.removeProperty(\"visibility\"))),e.layout.pendingRemoval.delete(e.$el)},gi=(e,t,s)=>(t.properties={...e.properties},t.state=s,t.isTarget=e.isTarget,t.hasTransform=e.hasTransform,t.inlineTransforms=e.inlineTransforms,t.measuredIsVisible=e.measuredIsVisible,t.measuredDisplay=e.measuredDisplay,t.measuredIsRemoved=e.measuredIsRemoved,t.measuredHasDisplayNone=e.measuredHasDisplayNone,t.measuredHasVisibilityHidden=e.measuredHasVisibilityHidden,t.hasDisplayNone=e.hasDisplayNone,t.isInlined=e.isInlined,t.hasVisibilityHidden=e.hasVisibilityHidden,t),Co=class{constructor(e){this.layout=e,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(e=>{this.layout.pendingRemoval.delete(e.$el),e.$el.removeAttribute(\"data-layout-id\"),e.$measure.removeAttribute(\"data-layout-id\")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(e){if(!(!e||!e.dataset))return this.nodes.get(e.dataset.layoutId)}getComputedValue(e,t){const s=this.getNode(e);if(s)return s.properties[t]}forEach(e,t){let s=e,r=0;for(;s;)if(t(s,r++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(e){this.forEach(this.rootNode,e)}forEachNode(e){for(const t of this.rootNodes)this.forEach(t,e)}registerElement(e,t){if(!e||e.nodeType!==1)return null;this.layout.transitionMuteStore.has(e)||this.layout.transitionMuteStore.set(e,ps(e));const s=[e,t],r=this.layout.root;let i=null;for(;s.length;){const n=s.pop(),o=s.pop();if(!o||o.nodeType!==1||Zs(o))continue;const c=n?n.measuredIsRemoved:!1,u=c?bu:getComputedStyle(o),h=c?!0:u.display===\"none\",p=c?!0:u.visibility===\"hidden\",a=!h&&!p,d=o.dataset.layoutId,l=vr(r,o);let f=d?this.nodes.get(d):null;if(f&&f.$el!==o){const v=vr(r,f.$el),b=f.measuredIsVisible,S=!v&&(l||!l&&!b&&a),y=v&&!b&&a;if(S)_u(f),f=So(o,n,this,f);else if(y){ko(f,o,u,c);let m=o.lastElementChild;for(;m;)s.push(m,f),m=m.previousElementSibling;i||(i=f);continue}else{let m=o.lastElementChild;for(;m;)s.push(m,n),m=m.previousElementSibling;i||(i=f);continue}}else f=So(o,n,this,f);f.branchAdded=!1,f.branchRemoved=!1,f.branchNotRendered=!1,f.isTarget=!1,f.sizeChanged=!1,f.hasVisibilityHidden=p,f.hasDisplayNone=h,f.hasVisibilitySwap=p&&!f.measuredHasVisibilityHidden||h&&!f.measuredHasDisplayNone,this.nodes.set(f.id,f),f.parentNode=n||null,f._prev=null,f._next=null,n?(this.rootNodes.delete(f),n._head?(n._tail._next=f,f._prev=n._tail,n._tail=f):(n._head=f,n._tail=f)):this.rootNodes.add(f),ko(f,f.$el,u,c);let g=o.lastElementChild;for(;g;)s.push(g,f),g=g.previousElementSibling;i||(i=f)}return i}ensureDetachedNode(e,t){if(!e||e===this.layout.root)return null;const s=e.dataset.layoutId,r=s?this.nodes.get(s):null;if(r&&r.$el===e)return r;let i=null,n=e.parentElement;for(;n&&n!==this.layout.root;){if(t.has(n)){i=this.ensureDetachedNode(n,t);break}n=n.parentElement}return this.registerElement(e,i)}record(){const e=this.layout,t=e.children,s=e.root,r=Ve(t)?t:[t],i=[],n=t===\"*\"?s:Ne.root,o=[];let c=s.parentElement;for(;c&&c.nodeType===1;){const g=getComputedStyle(c);if(g.transform&&g.transform!==\"none\"){const v=c.style.transform||\"\",b=ps(c);o.push(c,v,b),c.style.transform=\"none\"}c=c.parentElement}for(let g=0,v=r.length;g<v;g++){const b=r[g];i[g]=He(b)?n.querySelectorAll(b):b}const u=Bt(i);this.nodes.clear(),this.rootNodes.clear();const h=this.registerElement(s,null);h.isTarget=!0,this.rootNode=h;const p=new Set;let a=0;const d=[];this.nodes.forEach(g=>{d.push(g.$el)}),this.nodes.forEach((g,v)=>{g.index=a++,g.targets=d,g&&g.measuredIsInsideRoot&&p.add(v)});const l=new Set,f=[];for(let g=0,v=u.length;g<v;g++){const b=u[g];if(!(!b||b.nodeType!==1||b===s)){if(!vr(s,b)){const S=b.dataset.layoutId;if(!S||!p.has(S))continue}l.has(b)||(l.add(b),f.push(b))}}for(let g=0,v=f.length;g<v;g++)this.ensureDetachedNode(f[g],l);for(let g=0,v=u.length;g<v;g++){const b=u[g],S=this.getNode(b);if(S){let y=S;for(;y&&!y.isTarget;)y.isTarget=!0,y=y.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(ku);for(let g=0,v=o.length;g<v;g+=3){const b=o[g],S=o[g+1],y=o[g+2];S&&S!==\"\"?b.style.transform=S:b.style.removeProperty(\"transform\"),yr(b,y)}return this}};function ds(e){const t={},s={};for(let r in e){const i=e[r],n=r===\"ease\";r===\"duration\"||r===\"delay\"||n?s[r]=i:t[r]=i}return[t,s]}var Po=class{constructor(e,t={}){Ne.current&&Ne.current.register(this);const s=ds(t.swapAt),r=ds(t.enterFrom),i=ds(t.leaveTo),n=t.properties;if(t.duration=W(t.duration,350),t.delay=W(t.delay,0),t.ease=W(t.ease,\"inOut(3.5)\"),this.params=t,this.root=Bt(e)[0],this.id=t.id||mu++,this.children=t.children||\"*\",this.absoluteCoords=!1,this.swapAtParams=pt(t.swapAt||{opacity:0},{ease:\"inOut(1.75)\"}),this.enterFromParams=t.enterFrom||{opacity:0},this.leaveToParams=t.leaveTo||{opacity:0},this.properties=new Set([\"opacity\",\"fontSize\",\"color\",\"backgroundColor\",\"borderRadius\",\"border\",\"filter\",\"clipPath\"]),s[0])for(let o in s[0])this.properties.add(o);if(r[0])for(let o in r[0])this.properties.add(o);if(i[0])for(let o in i[0])this.properties.add(o);if(n)for(let o=0,c=n.length;o<c;o++)this.properties.add(n[o]);this.recordedProperties=new Set([\"display\",\"visibility\",\"translate\",\"position\",\"left\",\"top\",\"marginLeft\",\"marginTop\",\"width\",\"height\",\"maxWidth\",\"maxHeight\",\"minWidth\",\"minHeight\"]),this.properties.forEach(o=>this.recordedProperties.add(o)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Co(this),this.newState=new Co(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),br(this.transitionMuteStore)}revert(){return this.root.classList.remove(\"is-animated\"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>br(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(xo),this}animate(e={}){const t={ease:W(e.ease,this.params.ease),delay:W(e.delay,this.params.delay),duration:W(e.duration,this.params.duration)},s={id:this.id},r=W(e.onComplete,this.params.onComplete),i=W(e.onPause,this.params.onPause);for(let T in ws)T!==\"ease\"&&T!==\"duration\"&&T!==\"delay\"&&($(e[T])?$(this.params[T])||(s[T]=this.params[T]):s[T]=e[T]);s.onComplete=()=>{const T=e.autoplay,M=U.editor;if(T&&T.linked||M&&M.showPanel){r&&r(this.timeline);return}this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(R=>{To(R),xo(R)});for(let R=0,L=w.length;R<L;R++){const q=w[R];q.style.transform=g.getComputedValue(q,\"transform\")}this.root.classList.contains(\"is-animated\")&&(this.root.classList.remove(\"is-animated\"),r&&r(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains(\"is-animated\")||br(this.transitionMuteStore)})},s.onPause=()=>{const T=e.autoplay;if(T&&T.linked){r&&r(this.timeline),i&&i(this.timeline);return}this.root.classList.contains(\"is-animated\")&&(this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(To),this.root.classList.remove(\"is-animated\"),r&&r(this.timeline),i&&i(this.timeline))},s.composition=!1;const n=pt(pt(e.swapAt||{},this.swapAtParams),t),o=pt(pt(e.enterFrom||{},this.enterFromParams),t),c=pt(pt(e.leaveTo||{},this.leaveToParams),t),[u,h]=ds(n),[p,a]=ds(o),[d,l]=ds(c),f=this.oldState,g=this.newState,v=this.animating,b=this.swapping,S=this.entering,y=this.leaving,m=this.pendingRemoval;v.length=b.length=S.length=y.length=0,f.forEachRootNode(yu),g.record(),g.forEachRootNode(Su);const _=[],k=[],w=[],C=[],O=g.rootNode,E=O.$el;g.forEachRootNode(T=>{const M=T.$el,R=T.id,L=T.parentNode,q=L?L.branchAdded:!1,G=L?L.branchRemoved:!1,j=L?L.branchNotRendered:!1;let X=f.nodes.get(R);const J=!X;J?(X=gi(T,{},f),f.nodes.set(R,X),X.measuredIsRemoved=!0):X.measuredIsRemoved&&!T.measuredIsRemoved&&(gi(T,X,f),X.measuredIsRemoved=!0);const oe=X.parentNode,he=(oe?oe.id:null)!==(L?L.id:null),fe=X.$el!==T.$el,ge=X.measuredIsRemoved,ae=T.measuredIsRemoved;if(!X.measuredIsRemoved&&!ae&&!J&&(he||fe)){const Te=X.properties.left,pe=X.properties.top,K=L||g.rootNode,ee=K.id?f.nodes.get(K.id):null,te=ee?ee.properties.left:K.properties.left,ke=ee?ee.properties.top:K.properties.top,xe=ee?ee.properties.clientLeft:K.properties.clientLeft,Re=ee?ee.properties.clientTop:K.properties.clientTop;X.properties.x=Te-te-xe,X.properties.y=pe-ke-Re}T.hasVisibilitySwap&&(T.hasVisibilityHidden&&(T.$el.style.visibility=\"visible\",T.$measure.style.visibility=\"hidden\"),T.hasDisplayNone&&(T.$el.style.display=X.measuredDisplay||T.measuredDisplay||\"\",T.$measure.style.visibility=\"hidden\"));const V=m.has(M),le=X.measuredIsVisible,me=T.measuredIsVisible,Se=!le&&me&&!j,we=!ae&&(ge||V)&&!q,Le=ae&&!ge&&!G,ye=Le||ae&&V&&!G;T.branchAdded=q||we,T.branchRemoved=G||ye,T.branchNotRendered=j||ae,ae&&le&&(T.$el.style.display=X.measuredDisplay,T.$el.style.visibility=\"visible\",gi(X,T,g)),Le?(T.isTarget&&(y.push(M),T.isLeaving=!0),m.add(M)):!ae&&V&&m.delete(M),we&&!j||Se?(wo(X,p),T.isTarget&&(S.push(M),T.isEntering=!0)):ye&&!j&&wo(T,d),T!==O&&T.isTarget&&!T.isEntering&&!T.isLeaving&&v.push(M),_.push(M)});let A=0,P=0,B=0;g.forEachRootNode(T=>{const M=T.$el,R=T.parentNode,L=f.nodes.get(T.id),q=T.properties,G=L.properties;let j=R!==O&&R;for(;j&&!j.isTarget&&j!==O;)j=j.parentNode;T===O?(T.index=0,T.targets=v,Ls(T,t)):T.isEntering?(T.index=j?j.index:A,T.targets=j?v:S,Ls(T,a),A++):T.isLeaving?(T.index=j?j.index:P,T.targets=j?v:y,P++,Ls(T,l)):T.isTarget?(T.index=B++,T.targets=v,Ls(T,t)):(T.index=j?j.index:0,T.targets=v,Ls(T,h)),L.index=T.index,L.targets=T.targets;for(let he in q)q[he]=De(q[he],M,T.index,T.targets,null,null),G[he]=De(G[he],M,L.index,L.targets,null,null);const X=1,J=Math.abs(q.width-G.width)>X,oe=Math.abs(q.height-G.height)>X;if(T.sizeChanged=J||oe,T.isTarget&&(!T.measuredIsRemoved&&L.measuredIsVisible||T.measuredIsRemoved&&T.measuredIsVisible)){(q.transform!==\"none\"||G.transform!==\"none\")&&(T.hasTransform=!0,w.push(M));for(let he in q)if(he!==\"transform\"&&q[he]!==G[he]){k.push(M);break}}T.isTarget||(b.push(M),T.sizeChanged&&R&&R.isTarget&&R.sizeChanged&&(u.transform&&(T.hasTransform=!0,w.push(M)),C.push(M)))});const H={delay:T=>g.getNode(T).delay,duration:T=>g.getNode(T).duration,ease:T=>g.getNode(T).ease};if(s.defaults=H,this.timeline=to(s),!k.length&&!w.length&&!b.length)return br(this.transitionMuteStore),this.timeline.complete();if(_.length){this.root.classList.add(\"is-animated\");for(let T=0,M=_.length;T<M;T++){const R=_[T],L=R.dataset.layoutId,q=f.nodes.get(L),G=g.nodes.get(L),j=q.properties;G.isInlined||((q.measuredDisplay===\"grid\"||G.measuredDisplay===\"grid\")&&R.style.setProperty(\"display\",\"block\",\"important\"),(R!==E||this.absoluteCoords)&&(R.style.position=this.absoluteCoords?\"fixed\":\"absolute\",R.style.left=\"0px\",R.style.top=\"0px\",R.style.marginLeft=\"0px\",R.style.marginTop=\"0px\",R.style.translate=`${j.x}px ${j.y}px`),R===E&&G.measuredPosition===\"static\"&&(R.style.position=\"relative\",R.style.left=\"0px\",R.style.top=\"0px\")),R.style.width=`${j.width}px`,R.style.height=`${j.height}px`,R.style.minWidth=\"auto\",R.style.minHeight=\"auto\",R.style.maxWidth=\"none\",R.style.maxHeight=\"none\"}(f.scrollX!==window.scrollX||f.scrollY!==window.scrollY)&&requestAnimationFrame(()=>window.scrollTo(f.scrollX,f.scrollY));for(let T=0,M=k.length;T<M;T++){const R=k[T],L=R.dataset.layoutId,q=f.nodes.get(L),G=g.nodes.get(L),j=q.properties,X=G.properties;let J=!1;const oe={composition:\"none\"};j.width!==X.width&&(oe.width=[j.width,X.width],J=!0),j.height!==X.height&&(oe.height=[j.height,X.height],J=!0),!G.hasTransform&&!G.isInlined&&(oe.translate=[`${j.x}px ${j.y}px`,`${X.x}px ${X.y}px`],J=!0),this.properties.forEach(he=>{const fe=j[he],ge=X[he];he!==\"transform\"&&fe!==ge&&(oe[he]=[fe,ge],J=!0)}),J&&this.timeline.add(R,oe,0)}}if(b.length){for(let T=0,M=b.length;T<M;T++){const R=b[T],L=f.getNode(R),q=L.properties;R.style.width=`${q.width}px`,R.style.height=`${q.height}px`,R.style.minWidth=\"auto\",R.style.minHeight=\"auto\",R.style.maxWidth=\"none\",R.style.maxHeight=\"none\",L.isInlined||(R.style.translate=`${q.x}px ${q.y}px`),this.properties.forEach(G=>{G!==\"transform\"&&(R.style[G]=`${f.getComputedValue(R,G)}`)})}for(let T=0,M=b.length;T<M;T++){const R=b[T],L=g.getNode(R),q=L.properties;this.timeline.call(()=>{R.style.width=`${q.width}px`,R.style.height=`${q.height}px`,R.style.minWidth=\"auto\",R.style.minHeight=\"auto\",R.style.maxWidth=\"none\",R.style.maxHeight=\"none\",L.isInlined||(R.style.translate=`${q.x}px ${q.y}px`),this.properties.forEach(G=>{G!==\"transform\"&&(R.style[G]=`${g.getComputedValue(R,G)}`)})},L.delay+L.duration/2)}if(C.length){const T=At(g.nodes.get(C[0].dataset.layoutId).ease),M=L=>1-T(1-L),R={};if(u)for(let L in u)L!==\"transform\"&&(R[L]=[{from:q=>f.getComputedValue(q,L),to:u[L]},{from:u[L],to:q=>g.getComputedValue(q,L),ease:M}]);this.timeline.add(C,R,0)}}const z=w.length;if(z){for(let T=0;T<z;T++){const M=w[T],R=g.getNode(M);R.isInlined||(M.style.translate=`${f.getComputedValue(M,\"x\")}px ${f.getComputedValue(M,\"y\")}px`),M.style.transform=f.getComputedValue(M,\"transform\"),C.includes(M)&&(R.ease=De(n.ease,M,R.index,R.targets,null,null),R.duration=De(n.duration,M,R.index,R.targets,null,null))}this.transformAnimation=_o.animate(w,{translate:T=>g.getNode(T).isInlined?\"0px 0px\":`${g.getComputedValue(T,\"x\")}px ${g.getComputedValue(T,\"y\")}px`,transform:T=>{const M=g.getComputedValue(T,\"transform\");if(!C.includes(T))return M;const R=f.getComputedValue(T,\"transform\"),L=g.getNode(T);return[R,De(u.transform,T,L.index,L.targets,null,null),M]},autoplay:!1,...H}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(e,t={}){return this.record(),e(this),this.animate(t)}},wu=(e,t)=>new Po(e,t),dt=Zc,_r={},xu=(e,t=0)=>(...s)=>t?r=>e(...s,r):r=>e(r,...s),Eo=e=>(...t)=>{const s=e(...t);return new Proxy(ne,{apply:(r,i,[n])=>s(n),get:(r,i)=>{if(_r[i])return Eo((...n)=>{const o=_r[i](...n);return c=>o(s(c))})}})},ft=(e,t,s=0)=>{const r=(...i)=>(i.length<t.length?Eo(xu(t,s)):t)(...i);return _r[e]||(_r[e]=r),r},Ao=ft(\"roundPad\",dt.roundPad),Lo=ft(\"padStart\",dt.padStart),Ro=ft(\"padEnd\",dt.padEnd),Io=ft(\"wrap\",dt.wrap),Oo=ft(\"mapRange\",dt.mapRange),Mo=ft(\"degToRad\",dt.degToRad),No=ft(\"radToDeg\",dt.radToDeg),Do=ft(\"snap\",dt.snap),Bo=ft(\"clamp\",dt.clamp),$o=ft(\"round\",dt.round),Ho=ft(\"lerp\",dt.lerp,1),qo=ft(\"damp\",dt.damp,1),Rs=(e=0,t=1,s=0)=>{const r=10**s;return Math.floor((Math.random()*(t-e+1/r)+e)*r)/r},Tu=0,Is=(e,t=0,s=1,r=0)=>{let i=e===void 0?Tu++:e;return(n=t,o=s,c=r)=>{i+=1831565813,i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61);const u=10**c;return Math.floor((((i^i>>>14)>>>0)/4294967296*(o-n+1/u)+n)*u)/u}},Fo=e=>e[Rs(0,e.length-1)],mi=(e,t=Rs)=>{let s=e.length,r,i;for(;s;)i=t(0,--s),r=e[s],e[s]=e[i],e[i]=r;return e},Os=(e,t={})=>{let s=[],r=0,i,n=null;const o=t.from,c=t.reversed,u=t.ease,h=!$(u),p=h&&!$(u.ease)?u.ease:h?At(u):null,a=t.grid,d=a===!0,l=t.axis,f=t.total,g=$(o)||o===0||o===\"first\",v=o===\"center\",b=o===\"last\",S=o===\"random\",y=Ve(o),m=Ve(e),_=t.use,k=Gt(m?e[0]:e),w=m?Gt(e[1]):0,C=xn.exec((m?e[1]:e)+\"\"),O=t.start||0+(m?k:0),E=t.seed,A=!$(E)&&E!==!1?Is(E===!0?0:E):Rs,P=t.jitter,B=!$(P),H=Ve(P),z=H?P[0]:P||0,T=H?P[1]:P||0;let M=g?0:Ue(o)?o:0;return(R,L,q,G,j)=>{const[X]=Bt(R),J=$(f)?q.length:f,oe=$(_)?!1:Ie(_)?_(X,L,J):Qt(X,_),he=Ue(oe)||He(oe)&&Ue(+oe)?+oe:L,fe=he>=0&&he<J?he:L;if(v&&(M=(J-1)/2),b&&(M=J-1),!s.length){if(d){let V=!0,le=!1,me=1/0,Se=1/0,we=1/0,Le=-1/0,ye=-1/0,Te=-1/0;const pe=[],K=[],ee=[];for(let te=0;te<J;te++){const ke=q[te];let xe=0,Re=0,D=0,se=!1;if(ke&&Ie(ke.getBoundingClientRect)){const ie=ke.getBoundingClientRect();xe=ie.left+ie.width/2,Re=ie.top+ie.height/2,se=!0}else{const ie=ke;ie&&Ue(ie.x)&&Ue(ie.y)&&(xe=ie.x,Re=ie.y,Ue(ie.z)&&(D=ie.z,le=!0),se=!0)}if(!se){V=!1;break}pe.push(xe),K.push(Re),ee.push(D),xe<me&&(me=xe),Re<Se&&(Se=Re),D<we&&(we=D),xe>Le&&(Le=xe),Re>ye&&(ye=Re),D>Te&&(Te=D)}if(V){let te=pe[0],ke=K[0],xe=ee[0];y?(te=me+o[0]*(Le-me),ke=Se+o[1]*(ye-Se),xe=le?we+(o.length>=3?o[2]:.5)*(Te-we):0):v?(te=(me+Le)/2,ke=(Se+ye)/2,xe=(we+Te)/2):b?(te=pe[J-1],ke=K[J-1],xe=ee[J-1]):Ue(o)&&(te=pe[o],ke=K[o],xe=ee[o]);for(let D=0;D<J;D++){const se=te-pe[D],ie=ke-K[D],x=xe-ee[D];let I=ut(se*se+ie*ie+(le?x*x:0));l===\"x\"&&(I=-se),l===\"y\"&&(I=-ie),l===\"z\"&&(I=-x),s.push(I)}let Re=1/0;for(let D=0;D<J;D++){const se=ht(s[D]);se>0&&se<Re&&(Re=se)}if(Re>0&&Re<1/0)for(let D=0;D<J;D++)s[D]=s[D]/Re}else for(let te=0;te<J;te++)s.push(ht(M-te))}else for(let V=0;V<J;V++)if(!a)s.push(ht(M-V));else{const le=a.length,me=a[0]*a[1];let Se,we,Le;y?(Se=o[0]*(a[0]-1),we=o[1]*(a[1]-1),Le=le===3?(o.length>=3?o[2]:.5)*(a[2]-1):0):v?(Se=(a[0]-1)/2,we=(a[1]-1)/2,Le=le===3?(a[2]-1)/2:0):(Se=M%a[0],we=as(M/a[0])%a[1],Le=le===3?as(M/me):0);const ye=V%a[0],Te=as(V/a[0])%a[1],pe=le===3?as(V/me):0,K=Se-ye,ee=we-Te,te=Le-pe;let ke=ut(K*K+ee*ee+(le===3?te*te:0));l===\"x\"&&(ke=-K),l===\"y\"&&(ke=-ee),l===\"z\"&&(ke=-te),s.push(ke)}r=s[0];for(let V=1;V<J;V++)s[V]>r&&(r=s[V]);if(p||c)for(let V=0;V<J;V++){let le=s[V];p&&(le=p(le/r)*r),c&&(le=l?-le:ht(r-le)),s[V]=le}if(B){n=new Array(J);for(let V=0;V<J;V++)n[V]=A(-1,1,4)}S&&(s=mi(s,A))}const ge=m?(w-k)/r:k;$(i)&&(i=j?Cs(j,$(t.start)?j.iterationDuration:O):O);let ae=i+(ge*F(s[fe],2)||0);if(B){const V=r?s[fe]/r:0,le=z+(T-z)*V;ae=ae+n[fe]*le}return t.modifier&&(ae=t.modifier(ae)),C&&(ae=`${ae}${C[2]}`),ae}},Cu=es({$:()=>Bt,addChild:()=>St,clamp:()=>Bo,cleanInlineStyles:()=>$n,createSeededRandom:()=>Is,damp:()=>qo,degToRad:()=>Mo,forEachChildren:()=>Pe,get:()=>Ht,keepTime:()=>pr,lerp:()=>Ho,mapRange:()=>Oo,padEnd:()=>Ro,padStart:()=>Lo,radToDeg:()=>No,random:()=>Rs,randomPick:()=>Fo,remove:()=>io,removeChild:()=>_t,round:()=>$o,roundPad:()=>Ao,set:()=>Rt,shuffle:()=>mi,snap:()=>Do,stagger:()=>Os,sync:()=>pi,wrap:()=>Io}),Vo=e=>{const t=at(e)[0];return!t||!Zs(t)?console.warn(`${e} is not a valid SVGGeometryElement`):t},vi=(e,t,s,r,i)=>{const n=s+r,o=i?Math.max(0,Math.min(n,t)):(n%t+t)%t;return e.getPointAtLength(o)},yi=(e,t,s=0)=>r=>{const i=+e.getTotalLength(),n=r[Yr],o=e.getCTM(),c=s===0;return{from:0,to:i,modifier:u=>{const h=u+s*i;if(t===\"a\"){const p=vi(e,i,h,-1,c),a=vi(e,i,h,1,c);return Qs(a.y-p.y,a.x-p.x)*180/xt}else{const p=vi(e,i,h,0,c);return t===\"x\"?n||!o?p.x:p.x*o.a+p.y*o.c+o.e:n||!o?p.y:p.x*o.b+p.y*o.d+o.f}}}},zo=(e,t=0)=>{const s=Vo(e);if(s)return{translateX:yi(s,\"x\",t),translateY:yi(s,\"y\",t),rotate:yi(s,\"a\",t)}},Pu=e=>{let t=1;if(e&&e.getCTM){const s=e.getCTM();s&&(t=(ut(s.a*s.a+s.b*s.b)+ut(s.c*s.c+s.d*s.d))/2)}return t},Eu=(e,t,s)=>{const r=Qe,i=getComputedStyle(e),n=i.strokeLinecap,o=i.vectorEffect===\"non-scaling-stroke\"?e:null;let c=n;const u=new Proxy(e,{get(h,p){const a=h[p];return p===Sn?h:p===\"setAttribute\"?(...d)=>{if(d[0]===\"draw\"){const l=d[1].split(\" \"),f=+l[0],g=+l[1],v=Pu(o),b=f*-r*v,S=g*r*v+b,y=r*v+(f===0&&g===1||f===1&&g===0?0:10*v)-S;if(n!==\"butt\"){const m=f===g?\"butt\":n;c!==m&&(h.style.strokeLinecap=`${m}`,c=m)}h.setAttribute(\"stroke-dashoffset\",`${b}`),h.setAttribute(\"stroke-dasharray\",`${S} ${y}`)}return Reflect.apply(a,h,d)}:Ie(a)?(...d)=>Reflect.apply(a,h,d):a}});return e.getAttribute(\"pathLength\")!==`${r}`&&(e.setAttribute(\"pathLength\",`${r}`),u.setAttribute(\"draw\",`${t} ${s}`)),u},Uo=(e,t=0,s=0)=>at(e).map(r=>Eu(r,t,s)),Wo=(e,t=.33)=>(s,r,i,n)=>{if(!(s.tagName||\"\").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const o=Vo(e);if(!o)throw new Error(\"Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.\");if(!(o.tagName||\"\").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${o.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const c=s.tagName===\"path\",u=c?\" \":\",\",h=n?n._value:null;h&&s.setAttribute(c?\"d\":\"points\",h);let p=\"\",a=\"\";if(!t)p=s.getAttribute(c?\"d\":\"points\"),a=o.getAttribute(c?\"d\":\"points\");else{const d=s.getTotalLength(),l=o.getTotalLength(),f=Math.max(Math.ceil(d*t),Math.ceil(l*t));for(let g=0;g<f;g++){const v=g/(f-1),b=s.getPointAtLength(d*v),S=o.getPointAtLength(l*v),y=c?g===0?\"M\":\"L\":\"\";p+=y+F(b.x,3)+u+b.y+\" \",a+=y+F(S.x,3)+u+S.y+\" \"}}return[p,a]},Au=es({createDrawable:()=>Uo,createMotionPath:()=>zo,morphTo:()=>Wo}),Sr=typeof Intl<\"u\"&&Intl.Segmenter,Lu=/\\{value\\}/g,Ru=/\\{i\\}/g,bi=/(\\s+)/,_i=/^\\s+$/,Si=\"line\",Ms=\"word\",Ns=\"char\",Ds=\"data-line\",ki=null,wi=null,kr=null,Xo=e=>e.isWordLike||e.segment===\" \"||Ue(+e.segment),xi=e=>e.setAttribute(\"aria-hidden\",\"true\"),wr=(e,t)=>[...e.querySelectorAll(`[data-${t}]:not([data-${t}] [data-${t}])`)],Iu={line:\"#00D672\",word:\"#FF4B4B\",char:\"#5A87FF\"},Yo=e=>{if(!e.childElementCount&&!e.textContent.trim()){const t=e.parentElement;e.remove(),t&&Yo(t)}},Go=(e,t,s)=>{const r=e.getAttribute(Ds);if(r!==null&&+r!==t||e.tagName===\"BR\"){s.add(e);const n=e.previousSibling,o=e.nextSibling;n&&n.nodeType===3&&_i.test(n.textContent)&&s.add(n),o&&o.nodeType===3&&_i.test(o.textContent)&&s.add(o)}let i=e.childElementCount;for(;i--;)Go(e.children[i],t,s);return s},Ti=(e,t={})=>{let s=\"\";t||(t={});const r=He(t.class)?` class=\"${t.class}\"`:\"\",i=W(t.clone,!1),n=W(t.wrap,!1),o=n?n===!0?\"clip\":n:i?\"clip\":!1;if(n&&(s+=`<span${o?` style=\"overflow:${o};\"`:\"\"}>`),s+=`<span${r}${i?' style=\"position:relative;\"':\"\"} data-${e}=\"{i}\">`,i){const c=i===\"left\"?\"-100%\":i===\"right\"?\"100%\":\"0\",u=i===\"top\"?\"-100%\":i===\"bottom\"?\"100%\":\"0\";s+=\"<span>{value}</span>\",s+=`<span inert style=\"position:absolute;top:${u};left:${c};white-space:nowrap;\">{value}</span>`}else s+=\"{value}\";return s+=\"</span>\",n&&(s+=\"</span>\"),s},Ci=(e,t,s,r,i,n,o,c,u)=>{const h=i===Si,p=i===Ns,a=`_${i}_`,d=Ie(e)?e(s):e,l=h?\"block\":\"inline-block\";kr.innerHTML=d.replace(Lu,`<i class=\"${a}\"></i>`).replace(Ru,`${p?u:h?o:c}`);const f=kr.content,g=f.firstElementChild,v=f.querySelector(`[data-${i}]`)||g,b=f.querySelectorAll(`i.${a}`),S=b.length;if(S){g.style.display=l,v.style.display=l,v.setAttribute(Ds,`${o}`),h||(v.setAttribute(\"data-word\",`${c}`),p&&v.setAttribute(\"data-char\",`${u}`));let y=S;for(;y--;){const m=b[y],_=m.parentElement;_.style.display=l,h?_.innerHTML=s.innerHTML:_.replaceChild(s.cloneNode(!0),m)}t.push(v),r.appendChild(f)}else console.warn('The expression \"{value}\" is missing from the provided template.');return n&&(g.style.outline=`1px dotted ${Iu[i]}`),g},xr=class{constructor(e,t={}){ki||(ki=Sr?new Sr([],{granularity:Ms}):{segment:l=>{const f=[],g=l.split(bi);for(let v=0,b=g.length;v<b;v++){const S=g[v];f.push({segment:S,isWordLike:!_i.test(S)})}return f}}),wi||(wi=Sr?new Sr([],{granularity:\"grapheme\"}):{segment:l=>[...l].map(f=>({segment:f}))}),!kr&&wt&&(kr=Q.createElement(\"template\")),Ne.current&&Ne.current.register(this);const{words:s,chars:r,lines:i,accessible:n,includeSpaces:o,debug:c}=t,u=(e=Ve(e)?e[0]:e)&&e.nodeType?e:(ni(e)||[])[0],h=i===!0?{}:i,p=s===!0||$(s)?{}:s,a=r===!0?{}:r;this.debug=W(c,!1),this.includeSpaces=W(o,!1),this.accessible=W(n,!0),this.linesOnly=h&&!p&&!a,this.lineTemplate=$e(h)?Ti(Si,h):h,this.wordTemplate=$e(p)||this.linesOnly?Ti(Ms,p):p,this.charTemplate=$e(a)?Ti(Ns,a):a,this.$target=u,this.html=u&&u.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const d=()=>this.html&&(h||p||a)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const l=u.offsetWidth;l!==this.width&&(this.width=l,d())},150)}),this.lineTemplate&&!this.ready?Q.fonts.ready.then(d):d(),u?this.resizeObserver.observe(u):console.warn(\"No Text Splitter target found.\")}addEffect(e){if(!Ie(e))return console.warn(\"Effect must return a function.\"),this;const t=pr(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>Ie(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,s=this.charTemplate,r=this.includeSpaces,i=this.debug,n=e.nodeType;if(n===3){const o=e.nodeValue;if(o.trim()){const c=[],u=this.words,h=this.chars,p=ki.segment(o),a=Q.createDocumentFragment();let d=null;for(const l of p){const f=l.segment,g=Xo(l);if(!d||g&&d&&Xo(d))c.push(f);else{const v=c.length-1,b=c[v];!bi.test(b)&&!bi.test(f)?c[v]+=f:c.push(f)}d=l}for(let l=0,f=c.length;l<f;l++){const g=c[l];if(g.trim()){const v=c[l+1],b=r&&v&&!v.trim(),S=g,y=s?wi.segment(S):null,m=s?Q.createDocumentFragment():Q.createTextNode(b?g+\" \":g);if(s){const _=[...y];for(let k=0,w=_.length;k<w;k++){const C=_[k],O=k===w-1&&b?C.segment+\" \":C.segment,E=Q.createTextNode(O);Ci(s,h,E,m,Ns,i,-1,u.length,h.length)}}t?Ci(t,u,m,a,Ms,i,-1,u.length,h.length):s?a.appendChild(m):a.appendChild(Q.createTextNode(g)),b&&l++}else{if(l&&r)continue;a.appendChild(Q.createTextNode(g))}}e.parentNode.replaceChild(a,e)}}else if(n===1){const o=[...e.childNodes];for(let c=0,u=o.length;c<u;c++)this.splitNode(o[c])}}split(e=!1){const t=this.$target,s=!!this.cache&&!e,r=this.lineTemplate,i=this.wordTemplate,n=this.charTemplate,o=Q.fonts.status!==\"loading\",c=r&&o;this.ready=!r||o,(c||e)&&this.effectsCleanups.forEach(a=>Ie(a)&&a(this)),s||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),c&&(s&&(t.innerHTML=this.cache),this.lines.length=0,i&&(this.words=wr(t,Ms))),n&&(c||i)&&(this.chars=wr(t,Ns));const u=this.words.length?this.words:this.chars;let h,p=0;for(let a=0,d=u.length;a<d;a++){const l=u[a],{top:f,height:g}=l.getBoundingClientRect();!$(h)&&f-h>g*.5&&p++,l.setAttribute(Ds,`${p}`);const v=l.querySelectorAll(`[${Ds}]`);let b=v.length;for(;b--;)v[b].setAttribute(Ds,`${p}`);h=f}if(c){const a=Q.createDocumentFragment(),d=new Set,l=[];for(let f=0;f<p+1;f++){const g=t.cloneNode(!0);Go(g,f,new Set).forEach(v=>{const b=v.parentNode;b&&(v.nodeType===1&&d.add(b),b.removeChild(v))}),l.push(g)}d.forEach(Yo);for(let f=0,g=l.length;f<g;f++)Ci(r,this.lines,l[f],a,Si,this.debug,f);t.innerHTML=\"\",t.appendChild(a),i&&(this.words=wr(t,Ms)),n&&(this.chars=wr(t,Ns))}if(this.linesOnly){const a=this.words;let d=a.length;for(;d--;){const l=a[d];l.replaceWith(l.textContent)}a.length=0}if(this.accessible&&(c||!s)){const a=Q.createElement(\"span\");a.style.cssText=\"position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;\",a.innerHTML=this.html,t.insertBefore(a,t.firstChild),this.lines.forEach(xi),this.words.forEach(xi),this.chars.forEach(xi)}return this.width=t.offsetWidth,(c||e)&&this.effects.forEach((a,d)=>this.effectsCleanups[d]=a(this)),this}refresh(){this.split(!0)}},Zo=(e,t)=>new xr(e,t),Bs=(e,t)=>(console.warn(\"text.split() is deprecated, import splitText() directly, or text.splitText()\"),new xr(e,t)),jo=e=>{let t=\"\";for(let s=0,r=e.length;s<r;s++)if(s+2<r&&e[s+1]===\"-\"&&e.charCodeAt(s)<e.charCodeAt(s+2)){const i=e.charCodeAt(s),n=e.charCodeAt(s+2);for(let o=i;o<=n;o++)t+=String.fromCharCode(o);s+=2}else t+=e[s];return t},Qo={lowercase:\"a-z\",uppercase:\"A-Z\",numbers:\"0-9\",symbols:\"!%#_|*+=\",braille:\"⠀-⣿\",blocks:\"▀-▟\",shades:\"░-▓\"},Pi=new WeakMap,Jo=(e={})=>{e||(e={});const t=e.chars,s=At(e.ease||\"linear\"),r=e.text,i=e.from,n=e.reversed||!1,o=e.perturbation||0,c=e.cursor,u=c===!0?\"_\":typeof c==\"number\"?String.fromCharCode(c):typeof c==\"string\"?c:\"\",h=u.length,p=e.seed||0,a=e.override!==void 0?e.override:!0,d=e.revealRate||60,l=1e3*U.timeScale/d,f=e.settleDuration||300*U.timeScale,g=e.settleRate||30,v=e.duration,b=e.revealDelay,S=e.delay,y=e.onChange||ne;return(m,_,k,w)=>{const C=typeof t==\"function\"?t(m,_,k):t||\"a-zA-Z0-9!%#_\",O=jo(Qo[C]||C),E=O.length-1,A=typeof v==\"function\"?v(m,_,k):v,P=typeof b==\"function\"?b(m,_,k):b||0,B=typeof S==\"function\"?S(m,_,k):S||0,H=p?Is(p):Is();Pi.has(m)||Pi.set(m,m.textContent);const z=w?w._value:m.textContent,T=r!==void 0?typeof r==\"function\"?r(m,_,k):r:w?w._value:Pi.get(m),M=T===\" \"||T===\"&nbsp;\"?\" \":T,R=z===\" \"?0:z.length,L=M.length,q=a===!0?O:typeof a==\"string\"&&a.length>0?jo(Qo[a]||a):null,G=q?q.length-1:0,j=a===\" \"?\" \":null,X=a===\"\"?L:Math.max(R,L),J=A>0?A:(X-1)*l+f,oe=F((J+P)/U.timeScale,0)*U.timeScale,he=P>0?F(P/oe,12):0,fe=i===void 0||i===\"auto\"?L<R?\"right\":\"left\":i,ge=new Int32Array(X);if(fe===\"random\"){for(let D=0;D<X;D++)ge[D]=D;for(let D=X-1;D>0;D--){const se=H(0,D),ie=ge[D];ge[D]=ge[se],ge[se]=ie}}else{const D=fe===\"right\"?(a===\"\"||!R?X:R)-1:fe===\"center\"?((a===\"\"||!R?X:R)-1)/2:typeof fe==\"number\"?fe:0,se=Math.abs,ie=new Array(X);for(let x=0;x<X;x++)ie[x]=x;ie.sort((x,I)=>se(x-D)-se(I-D));for(let x=0;x<X;x++)ge[ie[x]]=x}if(n){const D=X-1;for(let se=0;se<X;se++)ge[se]=D-ge[se]}const ae=F(f/J,12),V=F((1-ae)/X,12),le=h*V,me=F(1e3*U.timeScale/(g*oe),12),Se=new Float32Array(X),we=new Float32Array(X),Le=o>0?o*ae:0;for(let D=0;D<X;D++){const se=Le>0?(H(0,2e3)-1e3)/1e3*Le:0,ie=Le>0?(H(0,2e3)-1e3)/1e3*Le:0;Se[D]=ge[D]*V+se,we[D]=Math.ceil((Se[D]+ae+ie)/me)*me}if(L<X&&fe!==\"left\"&&fe!==\"right\"&&fe!==\"random\"){let D=0;for(let x=L;x<X;x++)we[x]>D&&(D=we[x]);const se=new Array(L);for(let x=0;x<L;x++)se[x]=x;se.sort((x,I)=>ge[x]-ge[I]);const ie=(1-D)/L;for(let x=0;x<L;x++){const I=D+x*ie;I>we[se[x]]&&(we[se[x]]=I)}}const ye=new Array(X);for(let D=0;D<X;D++)ye[D]=O[H(0,E)];const Te=q?q===O?ye:new Array(X):null;if(Te&&Te!==ye)for(let D=0;D<X;D++)Te[D]=j||q[H(0,q.length-1)];let pe=z;if(!w){if(a===\"\")pe=\"\";else if(q){pe=\"\";for(let D=0;D<R;D++)pe+=z[D]===\" \"?\" \":Te[D]}}let K=-1,ee=-1,te=\"\";const ke=a!==\"\",xe=!!q,Re=h>0;return{from:0,to:1,duration:oe,delay:B,ease:\"linear\",modifier:D=>{if(D===K)return te;if(K=D,B>0&&D<=0)return te=z,z;if(D<=0)return te=pe,pe;if(D>=1)return te=M,M;te=\"\";const se=D/me|0,ie=se!==ee;ie&&(ee=se);const x=he>0?(D-he)/(1-he):D,I=x>0?s(x):0;for(let N=0;N<X;N++){const Y=Se[N];if(I>=we[N]){N<L&&(te+=M[N]);continue}if(I<=0||I<Y){ke&&N<R&&(xe?z[N]===\" \"?te+=\" \":(ie&&(Te[N]=j||q[H(0,G)]),te+=Te[N]):te+=z[N]);continue}N<L&&M[N]===\" \"||N<R&&z[N]===\" \"?te+=\" \":Re&&I-Y<le?te+=u[h-1-((I-Y)/V|0)]:(ie&&(ye[N]=O[H(0,E)]),te+=ye[N])}return ie&&y(te,I),te}}}},Ou=es({TextSplitter:()=>xr,scrambleText:()=>Jo,split:()=>Bs,splitText:()=>Zo}),Mu=es({$:()=>Bt,Animatable:()=>ci,AutoLayout:()=>Po,Draggable:()=>no,JSAnimation:()=>Lt,Scope:()=>oo,ScrollObserver:()=>co,Spring:()=>cr,TextSplitter:()=>xr,Timeline:()=>eo,Timer:()=>ot,WAAPIAnimation:()=>bo,addChild:()=>St,animate:()=>Ts,clamp:()=>Bo,cleanInlineStyles:()=>$n,createAnimatable:()=>Gc,createDraggable:()=>nu,createDrawable:()=>Uo,createLayout:()=>wu,createMotionPath:()=>zo,createScope:()=>ou,createSeededRandom:()=>Is,createSpring:()=>so,createTimeline:()=>to,createTimer:()=>Vc,cubicBezier:()=>ho,damp:()=>qo,degToRad:()=>Mo,eases:()=>Et,easings:()=>du,engine:()=>Xe,forEachChildren:()=>Pe,get:()=>Ht,globals:()=>U,irregular:()=>fo,keepTime:()=>pr,lerp:()=>Ho,linear:()=>di,mapRange:()=>Oo,morphTo:()=>Wo,onScroll:()=>hu,padEnd:()=>Ro,padStart:()=>Lo,radToDeg:()=>No,random:()=>Rs,randomPick:()=>Fo,remove:()=>io,removeChild:()=>_t,round:()=>$o,roundPad:()=>Ao,scrambleText:()=>Jo,scrollContainers:()=>fr,set:()=>Rt,shuffle:()=>mi,snap:()=>Do,split:()=>Bs,splitText:()=>Zo,spring:()=>ur,stagger:()=>Os,steps:()=>po,svg:()=>Au,sync:()=>pi,text:()=>Ou,utils:()=>Cu,waapi:()=>_o,wrap:()=>Io}),Nu=class{registerAnimation(e,t,s={}){this.animations[e]={handler:t,options:s}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,s,r,i){const n=this.animations[e];n?n.handler(t,s,r,i):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}removeLinkAnimation(e){this.linkAnimations.delete(e)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation(\"typewriter\",function(e,t,s,r){const{chars:i}=Bs(e,{words:!1,chars:!0}),n=t.fadeDuration||100,o=t.interval||100;Ts(i,{opacity:[0,1],easing:\"linear\",duration:n,delay:Os(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation(\"toast\",function(e,t,s,r){const{words:i}=Bs(e,{words:!0,chars:!1}),n=t.fadeDuration||100,o=t.interval||200;Ts(i,{opacity:[0,1],y:[{to:[\"100%\",\"0%\"]}],easing:\"linear\",duration:n,delay:Os(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation(\"fadeIn\",function(e,t,s,r){const i=t.duration||500;Ts(e,{opacity:[0,1],easing:t.easing||\"easeOutQuad\",duration:i,delay:t.start||0,loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation(\"continue\",function(e,t,s){e.classList.add(\"squiffy-continue\");const r=t.style||\"pulse\";let i=null,n=null;r===\"wave\"?(e.classList.add(\"squiffy-continue-wave\"),n=Bs(e,{words:!1,chars:!0}).chars,i=Ts(n,{opacity:[1,.3,1],easing:\"easeInOutSine\",duration:1200,delay:Os(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const o=()=>{if(e.classList.remove(\"squiffy-continue\",\"squiffy-continue-wave\",`squiffy-continue-${r}`),e.removeEventListener(\"click\",o),i&&(i.pause(),n))for(const c of n)c.style.opacity=\"1\";s()};e.addEventListener(\"click\",o)})}},Du={animejs:Mu},Ko=\"input:not([disabled]), textarea:not([disabled]), select:not([disabled])\",Bu=\"a.squiffy-link[data-section], a.squiffy-link[data-passage]\";function ea(e){if(!e)return!0;const t=e.querySelectorAll(Ko);for(const s of t)if(!s.checkValidity())return!1;return!0}function Ei(e){if(!e)return;const t=ea(e),s=e.querySelectorAll(Bu);for(const r of s)t?(r.classList.remove(\"validation-disabled\"),r.removeAttribute(\"aria-disabled\")):(r.classList.add(\"validation-disabled\"),r.setAttribute(\"aria-disabled\",\"true\"))}function Tr(e){if(!e)return;const t=e.querySelectorAll(Ko);for(const s of t)s.addEventListener(\"input\",()=>Ei(e)),s.addEventListener(\"change\",()=>Ei(e)),s.addEventListener(\"invalid\",r=>{r.preventDefault(),s.classList.add(\"squiffy-invalid\")}),s.addEventListener(\"input\",()=>{s.checkValidity()&&s.classList.remove(\"squiffy-invalid\")});Ei(e)}var ta=[\"src\",\"poster\"],$u=\"data-squiffy-asset-\",Hu=[...ta,\"srcset\",\"style\"].map(e=>`[${e}]`).join(\",\"),qu=e=>/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(\"//\")||e.startsWith(\"#\"),Ai=(e,t)=>{const s=e.trim();if(!s||qu(s))return e;let r=s;try{r=decodeURI(s)}catch{}return t(r)},Fu=(e,t)=>e.split(\",\").map(s=>{const r=s.match(/^(\\s*)(\\S+)(.*)$/s);return r?r[1]+Ai(r[2],t)+r[3]:s}).join(\",\"),Vu=(e,t)=>e.replace(/url\\(\\s*(['\"]?)(.*?)\\1\\s*\\)/gi,(s,r,i)=>{const n=Ai(i,t);return n===i?s:`url(\"${n.replace(/[\"\\\\\\n]/g,o=>\"\\\\\"+(o===`\n`?\"a \":o))}\")`}),zu=(e,t,s)=>{const r=$u+t,i=e.getAttribute(r)??e.getAttribute(t);if(i===null)return;let n;t===\"srcset\"?n=Fu(i,s):t===\"style\"?n=Vu(i,s):n=Ai(i,s),n===i?e.removeAttribute(r):e.setAttribute(r,i),e.setAttribute(t,n)},Uu=e=>t=>{if(!e||!/\\b(src|srcset|poster|style)\\s*=/i.test(t))return t;const s=document.createElement(\"template\");s.innerHTML=t;for(const r of s.content.querySelectorAll(Hu))for(const i of[...ta,\"srcset\",\"style\"])r.hasAttribute(i)&&zu(r,i,e);return s.innerHTML},Wu=async e=>{let t,s,r,i,n,o=0,c=!1;const u=[],h=new ac,p=[];let a=!1;async function d(x){if(a||x.closest(\".squiffy-output-section\")!==r||x.classList.contains(\"disabled\")||!ea(r))return!1;const I=x.getAttribute(\"data-passage\"),N=x.getAttribute(\"data-section\");if(I!==null)return f(x),ee(\"_turncount\",K(\"_turncount\")+1),await b(x),I&&(n=null,await E(I)),h.emit(\"linkClick\",{linkType:\"passage\"}),!0;if(N!==null)return await b(x),N&&await k(N),h.emit(\"linkClick\",{linkType:\"section\"}),!0;const[Y,be,_e]=ke.handleLink(x);return Y?(_e?.disableLink&&f(x),B(),h.emit(\"linkClick\",{linkType:be}),!0):!1}async function l(x){const I=x.target;I.classList.contains(\"squiffy-link\")&&await d(I)}function f(x){x.classList.add(\"disabled\"),x.setAttribute(\"tabindex\",\"-1\")}function g(x){x.classList.remove(\"disabled\"),x.removeAttribute(\"tabindex\")}async function v(x){if(x&&x.section in t.sections){await k(x.section),x.passage!==void 0&&K(\"_section\")==x.section&&await E(x.passage);return}H()||await k(t.start)}async function b(x){se.runLinkAnimation(x),await O();const I=x.getAttribute(\"data-set\");if(I){const N=JSON.parse(I);for(const Y of N)S(Y)}}function S(x){try{t.expressions?m(x):_(x)}catch(I){const N=I instanceof Error?I.message:String(I);console.error(`Squiffy error in \"${x}\":`,N),u.push(vn(`Error in \"${x}\":`,N))}}function y(x,I,N){const Y=I+\"=\",be=Mt(Y,N);let _e=Mt(Y,K(x));I==\"+\"&&(_e+=be),I==\"-\"&&(_e-=be),I==\"*\"&&(_e*=be),I==\"/\"&&(_e/=be),ee(x,_e)}function m(x){const I=/^(\\w+)\\s*:=(.*)$/.exec(x);if(I){ee(I[1],G.processText(I[2],!0));return}const N=/^(\\w+)\\s*([+\\-*/]?)=(?!=)(.*)$/.exec(x);if(N){const[,be,_e,rt]=N,It=te.evaluate(rt);_e?y(be,_e,It):ee(be,It);return}const Y=/^(not\\s+)?(\\w+)$/.exec(x.trim());if(!Y)throw new Error(\"expected an attribute name, e.g. gold = 10, gold += 5, has_key or not has_key\");ee(Y[2],!Y[1])}function _(x){x=x.replace(/^(\\w*\\s*):=(.*)$/,(N,Y,be)=>Y+\"=\"+G.processText(be,!0));const I=/^([\\w]*)\\s*=\\s*(.*)$/.exec(x);if(I){const N=I[1];let Y=I[2];Y===\"true\"?ee(N,!0):Y===\"false\"?ee(N,!1):isNaN(Y)?(Y.startsWith(\"@\")&&(Y=K(Y.substring(1))),ee(N,Y)):ee(N,parseFloat(Y))}else{const N=/^([\\w]*)\\s*([+\\-*/])=\\s*(.*)$/.exec(x);if(N){const Y=N[1],be=N[2],_e=N[3].trim();y(Y,be,_e.startsWith(\"@\")?K(_e.substring(1)):_e)}else{let Y=!0;x.startsWith(\"not \")&&(x=x.substring(4),Y=!1),ee(x,Y)}}}async function k(x){const I=fe();if(s=t.sections[x],!s)return;ee(\"_section\",x),pe.setSeen(x);const N=t.sections[\"\"];(N?.clear||s.clear)&&L(),T(x);const Y=r;if(N&&(await C(N,\"[[]]\"),K(\"_section\")!==x)){Y.remove();return}if(await C(s,`[[${x}]]`),K(\"_section\")!==x){Y.remove();return}Tr(r),ee(\"_turncount\",0),ye(),B();const be=fe();be!=I&&h.emit(\"canGoBackChanged\",{canGoBack:be}),h.emit(\"navigated\",{section:x})}function w(x,I=null){const N={get:K,set:ee,ui:{transition:D,write:G.write,scrollToEnd:G.scrollToEnd},story:{go:k,seen:Y=>pe.getSeen(Y)},element:ae,import:Du,...I};t.js[x](N,K,ee)}async function C(x,I){if(x.attributes&&await A(x.attributes),x.jsIndex!==void 0){const N=K(\"_section\");if(w(x.jsIndex),K(\"_section\")!==N)return}G.write(x.text||\"\",I),await O()}async function O(){a=!0,r.classList.add(\"links-disabled\");for(const x of p)await x();p.length=0,a=!1,r.classList.remove(\"links-disabled\")}async function E(x){const I=fe();let N=s.passages&&s.passages[x];const Y=t.sections[\"\"];if(!N&&Y&&Y.passages&&(N=Y.passages[x]),!N)throw`No passage named ${x} in the current section or master section`;pe.setSeen(x);const be=[],_e=[];if(Y&&Y.passages){const Ye=Y.passages[\"\"];Ye&&(be.push(Ye),_e.push(()=>C(Ye,\"[[]][]\")))}const rt=s.passages&&s.passages[\"\"];rt&&(be.push(rt),_e.push(()=>C(rt,`[[${K(\"_section\")}]][]`))),be.push(N),_e.push(()=>C(N,`[[${K(\"_section\")}]][${x}]`));const It=\"@\"+K(\"_turncount\");if(s.passages){if(It in s.passages){const Ye=s.passages[It];be.push(Ye),_e.push(()=>C(Ye,`[[${K(\"_section\")}]][${It}]`))}if(\"@last\"in s.passages&&K(\"_turncount\")>=(s.passageCount||0)){const Ye=s.passages[\"@last\"];be.push(Ye),_e.push(()=>C(Ye,`[[${K(\"_section\")}]][${It}]`))}}be.some(Ye=>Ye.clear)&&(L(),M()),i=document.createElement(\"div\"),i.classList.add(\"squiffy-output-passage\"),i.setAttribute(\"data-passage\",`${x}`),r.appendChild(i);for(const Ye of _e)await Ye();Tr(r),ye(),B();const Pr=fe();Pr!=I&&h.emit(\"canGoBackChanged\",{canGoBack:Pr}),h.emit(\"navigated\",{section:K(\"_section\"),passage:x})}async function A(x){for(const I of x)S(I)}function P(){pe.reset(),me.scroll===\"element\"||me.scroll===\"none\"?(V.innerHTML=\"\",v()):location.reload()}function B(){ee(\"_output\",V.innerHTML)}function H(){const x=()=>{t.uiJsIndex!==void 0&&w(t.uiJsIndex,{registerAnimation:se.registerAnimation.bind(se),registerHelper:te.handlebars.registerHelper.bind(te.handlebars),SafeString:te.handlebars.SafeString})};pe.load();const I=K(\"_output\");return I?(V.innerHTML=le(I),X(),J(),n=V.querySelector(\".squiffy-output-block:last-child\"),s=t.sections[K(\"_section\")],x(),ie.onLoad(),Tr(r),!0):(x(),!1)}function z(){n=document.createElement(\"div\"),n.classList.add(\"squiffy-output-block\"),(i||r)?.appendChild(n)}function T(x){r&&(r.querySelectorAll(\"input, textarea, select\").forEach(I=>{const N=I,Y=N.getAttribute(\"data-attribute\")||N.id;Y&&ee(Y,N.value),N.disabled||(N.disabled=!0,N.setAttribute(\"data-squiffy-disabled\",\"\"))}),r.querySelectorAll(\"[contenteditable]\").forEach(I=>{const N=I.getAttribute(\"data-attribute\")||I.id;N&&ee(N,I.innerHTML),I.getAttribute(\"contenteditable\")!==\"false\"&&(I.setAttribute(\"contenteditable\",\"false\"),I.setAttribute(\"data-squiffy-disabled\",\"\"))})),i=null,M(x),z()}function M(x){r=document.createElement(\"div\"),r.classList.add(\"squiffy-output-section\"),r.setAttribute(\"data-section\",x??K(\"_section\")),x||r.setAttribute(\"data-clear\",\"true\"),V.appendChild(r)}function R(){return V.querySelector(\".squiffy-clear-stack\")}function L(){let x=R();x||(x=document.createElement(\"div\"),x.classList.add(\"squiffy-clear-stack\"),x.style.display=\"none\",V.prepend(x));const I=document.createElement(\"div\");x.appendChild(I),c=!0;for(const N of[...V.children])N!==x&&I.appendChild(N)}function q(){const x=R();if(!x)return;for(const N of[...V.children])N!==x&&N.remove();const I=x.children[x.children.length-1];for(const N of[...I.children])V.appendChild(N);I.remove()}const G={write:(x,I)=>{o=V.scrollHeight;const N=u.splice(0).join(\"\")+G.renderHtml(x,!1).trim();n||z();const Y=document.createElement(\"div\");I&&Y.setAttribute(\"data-source\",I),Y.innerHTML=N,ie.onWrite(Y),n.appendChild(Y),Tr(r),G.scrollToEnd()},clearScreen:()=>{L(),M()},scrollToEnd:()=>{if(me.scroll!==\"none\")if(c)if(c=!1,me.scroll===\"element\")r.scrollIntoView({block:\"start\",inline:\"nearest\",behavior:\"smooth\"});else{const x=Math.max(document.body.scrollTop,document.documentElement.scrollTop),I=V.getBoundingClientRect().top+x;I<x&&window.scrollTo({top:I,behavior:\"smooth\"})}else if(me.scroll===\"element\")V.lastElementChild?.scrollIntoView({block:\"end\",inline:\"nearest\",behavior:\"smooth\"});else{let x=o;const I=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(x>I){const N=document.documentElement.scrollHeight-window.innerHeight;x>N&&(x=N),window.scrollTo({top:x,behavior:\"smooth\"})}}},processText:(x,I)=>te.process(x,I),renderHtml:(x,I)=>le(G.processText(x,I))};function j(x){if(x.start!=t.start){t=x,pe.reset(),V.innerHTML=\"\",k(t.start);return}const I=t;t=x,cc(I,x,V,(Y,be)=>{const _e=s;s=be;try{return G.renderHtml(Y,!1)}finally{s=_e}},f,Y=>A(Y)),X(),J()}function X(){const x=V.querySelectorAll(\".squiffy-output-section:last-child\");r=x[x.length-1];const I=r.getAttribute(\"data-section\");s=t.sections[I]}function J(){i=r.querySelector(\".squiffy-output-passage:last-child\")}function oe(){const x=R(),I=V.querySelectorAll(\".squiffy-output-section\").length+V.querySelectorAll(\".squiffy-output-passage\").length;return x?I+x.children.length:I}function he(x){x.querySelectorAll(\"[data-squiffy-disabled]\").forEach(I=>{I.hasAttribute(\"contenteditable\")?I.setAttribute(\"contenteditable\",\"true\"):I.disabled=!1,I.removeAttribute(\"data-squiffy-disabled\")})}function fe(){return oe()>1}function ge(){if(a||!fe())return;const x=R();if(i){const N=i.getAttribute(\"data-passage\");Te(i.getAttribute(\"data-undo\")),i.remove();let Y=!1,be=!1;for(const _e of V.children)if(_e!==x){if(_e.getAttribute(\"data-clear\")==\"true\"&&_e.children.length==0){Y=!0;continue}be=!0;break}Y&&!be&&(q(),X());for(const _e of r.querySelectorAll(\"a.squiffy-link[data-passage]\"))_e.getAttribute(\"data-passage\")==N&&g(_e);J()}else{Te(r.getAttribute(\"data-undo\")),r.remove();let N=!1;for(const Y of[...V.children])if(Y!==x){N=!0;break}N||q(),X(),J(),he(r)}fe()||h.emit(\"canGoBackChanged\",{canGoBack:!1});const I=i?.getAttribute(\"data-passage\");h.emit(\"navigated\",I?{section:K(\"_section\"),passage:I}:{section:K(\"_section\")})}const ae=e.element,V=document.createElement(\"div\");ae.appendChild(V),t=e.story;const le=Uu(e.resolveAssetUrl),me={scroll:e.scroll||\"body\",persist:e.persist===void 0?!0:e.persist,onSet:e.onSet||(()=>{})};let Se=\"\";me.persist&&(e.storyId!==void 0?Se=e.storyId:window.location.protocol===\"file:\"?Se=t.id||\"\":Se=window.location.pathname,Se||(console.warn(\"Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled.\"),me.persist=!1)),me.scroll===\"element\"&&(V.style.overflowY=\"auto\"),V.addEventListener(\"click\",l),V.addEventListener(\"keypress\",async function(x){x.key===\"Enter\"&&await l(x)});let we={};const Le=function(x,I){x!=\"_output\"&&(x in we||(we[x]=I))},ye=function(){(i??r).setAttribute(\"data-undo\",JSON.stringify(we)),we={}},Te=function(x){if(!x)return;const I=JSON.parse(x);if(I)for(const N of Object.keys(I))pe.setInternal(N,I[N],!1)},pe=new lc(me.persist,Se,me.onSet,h,Le),K=pe.get.bind(pe),ee=pe.set.bind(pe),te=new oc(()=>t,pe,()=>s),ke=new mc,xe=x=>x in t.sections&&t.sections[x].text||null,Re=x=>s.passages&&x in s.passages?s.passages[x].text||null:\"passages\"in t.sections[\"\"]&&t.sections[\"\"].passages&&x in t.sections[\"\"].passages&&t.sections[\"\"].passages[x].text||null,D=x=>{p.push(x)},se=new Nu,ie=new uc(V,te,pe,ke,xe,Re,G.renderHtml,D,se,h,le);return ie.add(Ss.ReplaceLabel()),ie.add(Ss.RotateSequencePlugin()),ie.add(Ss.RandomPlugin()),ie.add(Ss.LivePlugin()),ie.add(Ss.AnimatePlugin()),{begin:v,restart:P,get:K,set:ee,clickLink:d,update:j,goBack:ge,on:(x,I)=>h.on(x,I),off:(x,I)=>h.off(x,I),once:(x,I)=>h.once(x,I)}},Xu={png:\"image/png\",jpg:\"image/jpeg\",jpeg:\"image/jpeg\",gif:\"image/gif\",webp:\"image/webp\",avif:\"image/avif\",svg:\"image/svg+xml\",ico:\"image/x-icon\",bmp:\"image/bmp\",mp3:\"audio/mpeg\",ogg:\"audio/ogg\",oga:\"audio/ogg\",wav:\"audio/wav\",m4a:\"audio/mp4\",flac:\"audio/flac\",mp4:\"video/mp4\",webm:\"video/webm\",ogv:\"video/ogg\",woff:\"font/woff\",woff2:\"font/woff2\",ttf:\"font/ttf\",otf:\"font/otf\",pdf:\"application/pdf\",vtt:\"text/vtt\"},Yu=e=>Xu[e.substring(e.lastIndexOf(\".\")+1).toLowerCase()]??\"\",Li=e=>e.replace(/^(\\.\\/)+/,\"\");async function Gu(e){const t=URL.createObjectURL(new Blob([e],{type:\"text/javascript\"}));try{return await import(t)}finally{URL.revokeObjectURL(t)}}function Ri(e){return e instanceof Error?{type:\"runtimeError\",message:e.message,...e.stack?{stack:e.stack}:{}}:{type:\"runtimeError\",message:String(e)}}function Zu(e){const t=e.loadModule??Gu;let s,r=0;const i=new Map,n=[],o=[],c=document.createElement(\"style\");document.head.appendChild(c);const u=f=>{try{e.send(f)}catch{f.type==\"attributeSet\"&&e.send({...f,value:String(f.value)})}},h=f=>i.get(Li(f))??f;function p(f){for(const g of n.splice(0))URL.revokeObjectURL(g);i.clear();for(const[g,v]of Object.entries(f.urls??{}))i.set(Li(g),v);for(const[g,v]of Object.entries(f.files??{})){const b=v instanceof Blob?v:new Blob([v],{type:Yu(g)}),S=URL.createObjectURL(b);n.push(S),i.set(Li(g),S)}}async function a(f){for(const g of o.splice(0))g.remove();for(const g of f.css??[]){const v=document.createElement(\"style\");v.textContent=g,document.head.appendChild(v),o.push(v)}for(const g of f.scripts??[]){const v=document.createElement(\"script\"),b=URL.createObjectURL(new Blob([g],{type:\"text/javascript\"}));await new Promise(S=>{v.onload=v.onerror=()=>S(),v.src=b,document.head.appendChild(v)}),URL.revokeObjectURL(b),o.push(v)}}async function d(f){const g=++r;s=void 0,e.element.innerHTML=\"\",await a(f.story);const{story:v}=await t(f.story.js);if(g!=r)return;const b=document.createElement(\"div\");b.className=\"squiffy-preview-story\",e.element.appendChild(b);const S=await Wu({element:b,story:v,persist:!1,scroll:\"element\",resolveAssetUrl:h,onSet:(y,m)=>{g==r&&!y.startsWith(\"_\")&&u({type:\"attributeSet\",name:y,value:m})}});S.on(\"canGoBackChanged\",y=>{g==r&&u({type:\"canGoBackChanged\",canGoBack:y.canGoBack})}),S.on(\"navigated\",y=>{g==r&&u({type:\"navigated\",...y})}),s=S,u({type:\"canGoBackChanged\",canGoBack:!1}),await S.begin(f.startAt),g==r&&u({type:\"loaded\"})}async function l(f){try{switch(f.type){case\"load\":await d(f);break;case\"update\":s&&s.update((await t(f.js)).story);break;case\"restart\":s?.restart();break;case\"back\":s?.goBack();break;case\"assets\":p(f.assets);break;case\"theme\":c.textContent=f.theme==\"system\"?\"\":`:root { color-scheme: ${f.theme}; }`}}catch(g){u(Ri(g))}}return{receive:l}}var ju=\"squiffy-preview\",Qu=e=>typeof e==\"object\"&&e!==null&&e.channel===\"squiffy-preview\"&&typeof e.type==\"string\",Ii=typeof acquireVsCodeApi==\"function\"?acquireVsCodeApi():void 0,Cr=e=>{const t={channel:ju,...e};Ii?Ii.postMessage(t):window.parent.postMessage(t,\"*\")},Ju=Zu({element:document.getElementById(\"squiffy\"),send:Cr});window.addEventListener(\"message\",e=>{!Ii&&e.source!==window.parent||Qu(e.data)&&Ju.receive(e.data)}),window.addEventListener(\"error\",e=>Cr(Ri(e.error??e.message))),window.addEventListener(\"unhandledrejection\",e=>Cr(Ri(e.reason))),Cr({type:\"ready\"})})();\n\n</script>\n</body>\n</html>\n";
2
+ export const previewHtml = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Squiffy preview</title>\n<style>\n/* Core Squiffy Runtime Styles. See https://squiffystory.com/styling/ for how to customise these. */\n\n/* Colours. Each has a light and a dark value, and light-dark() picks one from the page's\n color-scheme. This file doesn't set color-scheme itself, so a story embedded in a page stays\n light unless the page opts in to dark mode. The exported story's page (squiffy.page.css) sets\n \"color-scheme: light dark\", so it follows the reader's system setting. */\n:root\n{\n --squiffy-text: light-dark(#1f2328, #e4e4e7);\n --squiffy-background: light-dark(#ffffff, #18181b);\n /* Secondary text: the header buttons, and links waiting for valid input */\n --squiffy-muted: light-dark(#6b6f76, #9a9ca3);\n /* The lines between sections */\n --squiffy-border: light-dark(#e2e2e6, #34343a);\n --squiffy-link: light-dark(#1d5fd6, #7aa7ff);\n --squiffy-link-hover: light-dark(#0f3f99, #b0cbff);\n --squiffy-error: light-dark(#c62828, #ff7b72);\n --squiffy-success: light-dark(#2e7d32, #6cc070);\n}\n\n/* Link styles */\na.squiffy-link\n{\n color: var(--squiffy-link);\n text-decoration: underline;\n text-decoration-color: currentColor;\n text-decoration-thickness: from-font;\n text-underline-offset: 0.15em;\n cursor: pointer;\n transition: color 0.4s ease-in-out, text-decoration-color 0.4s ease-in-out;\n}\n\na.squiffy-link:hover\n{\n color: var(--squiffy-link-hover);\n}\n\na.squiffy-link:focus-visible,\nbutton.squiffy-header-button:focus-visible,\n.squiffy-continue:focus-visible\n{\n outline: 2px solid var(--squiffy-link);\n outline-offset: 2px;\n border-radius: 2px;\n}\n\n/* Rotate/sequence links - visually distinct as they update in-place rather than advancing the story */\na.squiffy-link[data-handler=\"rotate\"],\na.squiffy-link[data-handler=\"sequence\"] {\n text-decoration-style: dotted;\n}\n\n/* Disabled link states */\na.squiffy-link.disabled,\ndiv.squiffy-output-section:not(:last-child) a.squiffy-link,\ndiv.squiffy-output-section.links-disabled a.squiffy-link\n{\n text-decoration: inherit;\n text-decoration-color: transparent;\n color: inherit !important;\n cursor: inherit;\n pointer-events: none;\n}\n\n/* Links disabled due to input validation */\na.squiffy-link.validation-disabled\n{\n text-decoration: inherit;\n text-decoration-color: transparent;\n color: var(--squiffy-muted) !important;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* Invalid input field states */\ninput.squiffy-invalid,\ntextarea.squiffy-invalid,\nselect.squiffy-invalid\n{\n border-color: var(--squiffy-error) !important;\n box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--squiffy-error) 25%, transparent);\n}\n\n/* Valid input field states (optional, provides positive feedback) */\ninput:not([disabled]):valid,\ntextarea:not([disabled]):valid,\nselect:not([disabled]):valid\n{\n border-color: var(--squiffy-success);\n}\n\n/* Focus state for invalid inputs */\ninput.squiffy-invalid:focus,\ntextarea.squiffy-invalid:focus,\nselect.squiffy-invalid:focus\n{\n outline: none;\n border-color: var(--squiffy-error) !important;\n box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--squiffy-error) 50%, transparent);\n}\n\n/* Header button styles: the Back, Restart and light/dark buttons, which are icons */\nbutton.squiffy-header-button\n{\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--squiffy-muted);\n cursor: pointer;\n background: none;\n border: none;\n border-radius: 0.375em;\n padding: 0.375em;\n font: inherit;\n vertical-align: middle;\n transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;\n}\n\nbutton.squiffy-header-button:hover:not(:disabled)\n{\n color: var(--squiffy-text);\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n}\n\nbutton.squiffy-header-button svg\n{\n width: 1.25em;\n height: 1.25em;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* The light/dark button, when the story's CSS fixes the theme */\nbutton.squiffy-header-button[hidden]\n{\n display: none;\n}\n\n/* The Back button, when there's nothing to go back to */\nbutton.squiffy-header-button:disabled\n{\n cursor: default;\n opacity: 0.5;\n}\n\n/* Output block spacing */\ndiv.squiffy-output-block:not(:last-child),\ndiv.squiffy-output-passage:not(:last-child),\ndiv.squiffy-output-section:not(:last-child)\n{\n margin-bottom: 1em;\n border-bottom: 1px solid var(--squiffy-border);\n}\n\n/* ...but a block, passage or section that output no text (such as a passage that only does\n {{replace}}) gets no line, and nor does one followed only by those, so they don't add extra lines */\ndiv.squiffy-output-block:not(:has(> div:not(:empty))),\ndiv.squiffy-output-block:not(:has(~ div.squiffy-output-block > div:not(:empty), ~ div.squiffy-output-passage > div.squiffy-output-block > div:not(:empty))),\ndiv.squiffy-output-passage:not(:has(> div.squiffy-output-block > div:not(:empty))),\ndiv.squiffy-output-passage:not(:has(~ div.squiffy-output-block > div:not(:empty), ~ div.squiffy-output-passage > div.squiffy-output-block > div:not(:empty))),\ndiv.squiffy-output-section:not(:has(div.squiffy-output-block > div:not(:empty))),\ndiv.squiffy-output-section:not(:has(~ div.squiffy-output-section div.squiffy-output-block > div:not(:empty)))\n{\n margin-bottom: 0;\n border-bottom: none;\n}\n\n/* Fade animations */\n.fade-out {\n opacity: 0;\n transition: opacity 200ms;\n}\n\n.fade-in {\n opacity: 1;\n transition: opacity 200ms;\n}\n\n/* Continue animation - click to proceed */\n.squiffy-continue {\n color: var(--squiffy-link);\n text-decoration: underline;\n text-decoration-color: currentColor;\n text-decoration-thickness: from-font;\n text-underline-offset: 0.15em;\n cursor: pointer;\n}\n\n/* Style: pulse - fades in and out */\n.squiffy-continue-pulse {\n animation: squiffy-pulse 1.5s ease-in-out infinite;\n}\n\n@keyframes squiffy-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.4; }\n}\n\n/* Style: glow - pulsing glow effect */\n.squiffy-continue-glow {\n animation: squiffy-glow 1.5s ease-in-out infinite;\n}\n\n@keyframes squiffy-glow {\n 0%, 100% { text-shadow: 0 0 4px color-mix(in srgb, currentColor 50%, transparent); }\n 50% { text-shadow: 0 0 12px color-mix(in srgb, currentColor 80%, transparent), 0 0 20px color-mix(in srgb, currentColor 40%, transparent); }\n}\n\n/* Style: bounce - subtle vertical bounce */\n.squiffy-continue-bounce {\n display: inline-block;\n animation: squiffy-bounce 0.6s ease-in-out infinite;\n}\n\n@keyframes squiffy-bounce {\n 0%, 100% { transform: translateY(0); }\n 50% { transform: translateY(-4px); }\n}\n\n/* Style: wave - character spans need special handling for underline */\n.squiffy-continue-wave {\n text-decoration: none;\n border-bottom: 1px solid currentColor;\n}\n\n/* Respect the reader's reduced-motion setting */\n@media (prefers-reduced-motion: reduce)\n{\n .squiffy-continue-pulse,\n .squiffy-continue-glow,\n .squiffy-continue-bounce\n {\n animation: none;\n }\n}\n\n/* The Saved games dialog, opened by the page's Save button */\ndialog.squiffy-saves\n{\n width: min(28rem, calc(100vw - 2rem));\n max-height: calc(100vh - 2rem);\n box-sizing: border-box;\n padding: 1rem 1.25rem 1.25rem;\n border: 1px solid var(--squiffy-border);\n border-radius: 0.75rem;\n background-color: var(--squiffy-background);\n color: var(--squiffy-text);\n font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n font-size: 0.9375rem;\n line-height: 1.4;\n box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.25);\n}\n\ndialog.squiffy-saves::backdrop\n{\n background-color: rgb(0 0 0 / 0.4);\n}\n\ndialog.squiffy-saves svg\n{\n width: 1.25em;\n height: 1.25em;\n flex: none;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.squiffy-saves-header\n{\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n}\n\n.squiffy-saves-header h2\n{\n margin: 0;\n font-size: 1.125rem;\n}\n\n.squiffy-saves button\n{\n font: inherit;\n color: inherit;\n cursor: pointer;\n}\n\n.squiffy-saves button:focus-visible,\n.squiffy-saves input:focus-visible\n{\n outline: 2px solid var(--squiffy-link);\n outline-offset: 2px;\n}\n\n.squiffy-saves-button\n{\n flex: none;\n padding: 0.3em 0.8em;\n border: 1px solid var(--squiffy-border);\n border-radius: 0.375em;\n background: none;\n}\n\n.squiffy-saves-button:hover\n{\n background-color: color-mix(in srgb, currentColor 8%, transparent);\n}\n\n.squiffy-saves .squiffy-saves-primary\n{\n border-color: var(--squiffy-link);\n background-color: var(--squiffy-link);\n color: var(--squiffy-background);\n}\n\n.squiffy-saves .squiffy-saves-danger-button\n{\n border-color: var(--squiffy-error);\n background-color: var(--squiffy-error);\n color: var(--squiffy-background);\n}\n\n.squiffy-saves-icon-button\n{\n display: inline-flex;\n padding: 0.3em;\n border: none;\n border-radius: 0.375em;\n background: none;\n color: var(--squiffy-muted) !important;\n}\n\n.squiffy-saves-icon-button:hover,\n.squiffy-saves-icon-button[aria-expanded=\"true\"]\n{\n color: var(--squiffy-text) !important;\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n}\n\n.squiffy-saves-error\n{\n margin: 0 0 0.75rem;\n color: var(--squiffy-error);\n}\n\n.squiffy-saves-new\n{\n display: flex;\n gap: 0.5rem;\n}\n\n.squiffy-saves input[type=\"text\"]\n{\n flex: 1;\n min-width: 0;\n padding: 0.3em 0.6em;\n border: 1px solid var(--squiffy-border);\n border-radius: 0.375em;\n background-color: var(--squiffy-background);\n color: inherit;\n font: inherit;\n}\n\n.squiffy-saves-list\n{\n list-style: none;\n margin: 0.75rem 0 0;\n padding: 0;\n max-height: 50vh;\n overflow-y: auto;\n}\n\n.squiffy-saves-empty\n{\n padding: 0.75rem 0;\n color: var(--squiffy-muted);\n}\n\n.squiffy-saves-row\n{\n padding: 0.5rem 0;\n border-top: 1px solid var(--squiffy-border);\n}\n\n.squiffy-saves-line\n{\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.squiffy-saves-info\n{\n flex: 1;\n min-width: 0;\n}\n\n.squiffy-saves-title\n{\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.squiffy-saves-meta\n{\n color: var(--squiffy-muted);\n font-size: 0.8125rem;\n}\n\n.squiffy-saves-options\n{\n position: relative;\n}\n\n.squiffy-saves-menu\n{\n position: absolute;\n right: 0;\n top: 100%;\n z-index: 1;\n display: flex;\n flex-direction: column;\n min-width: 10rem;\n margin-top: 0.25rem;\n padding: 0.25rem;\n border: 1px solid var(--squiffy-border);\n border-radius: 0.5rem;\n background-color: var(--squiffy-background);\n box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.2);\n}\n\n.squiffy-saves-menu[hidden]\n{\n display: none;\n}\n\n/* In the top layer, placed by the script */\n.squiffy-saves-menu:popover-open\n{\n position: fixed;\n right: auto;\n bottom: auto;\n margin: 0;\n color: inherit;\n}\n\n.squiffy-saves-menu button\n{\n padding: 0.4em 0.75em;\n border: none;\n border-radius: 0.25em;\n background: none;\n text-align: left;\n}\n\n.squiffy-saves-menu button:hover,\n.squiffy-saves-menu button:focus-visible\n{\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n}\n\n.squiffy-saves .squiffy-saves-danger\n{\n color: var(--squiffy-error);\n}\n\n.squiffy-saves-confirm\n{\n margin-top: 0.5rem;\n padding: 0.75rem;\n border: 1px solid var(--squiffy-border);\n border-radius: 0.5rem;\n background-color: color-mix(in srgb, var(--squiffy-text) 5%, transparent);\n}\n\n.squiffy-saves-confirm p\n{\n margin: 0 0 0.5rem;\n}\n\n.squiffy-saves-confirm-buttons\n{\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n}\n\n.squiffy-saves-footer\n{\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem 1.25rem;\n margin-top: 0.75rem;\n padding-top: 0.75rem;\n border-top: 1px solid var(--squiffy-border);\n}\n\n.squiffy-saves-link\n{\n display: inline-flex;\n align-items: center;\n gap: 0.375em;\n padding: 0;\n border: none;\n background: none;\n color: var(--squiffy-link) !important;\n}\n\n.squiffy-saves-link:hover\n{\n text-decoration: underline;\n}\n\n/* Panels (squiffy.json's \"panels\"): passages always to hand, beside the story or in a dialog */\n:root\n{\n /* The width of a side panel */\n --squiffy-side-width: 16rem;\n}\n\n/* A panel's button in the header, when it has a label rather than an icon */\nbutton.squiffy-panel-text-button\n{\n padding: 0.375em 0.625em;\n line-height: 1.25;\n}\n\n/* Space between the panels' buttons and the page's own */\nbutton.squiffy-panel-button:not(:has(+ button.squiffy-panel-button))\n{\n margin-right: 0.5em;\n}\n\n/* The side panels. Like the header, they're smaller than the story text. */\naside.squiffy-panels-side\n{\n font-size: 0.9375rem;\n line-height: 1.5;\n}\n\naside.squiffy-panels-side[hidden],\naside.squiffy-panels-side > section.squiffy-panel[hidden]\n{\n display: none;\n}\n\naside.squiffy-panels-side > section.squiffy-panel + section.squiffy-panel\n{\n margin-top: 1rem;\n padding-top: 1rem;\n border-top: 1px solid var(--squiffy-border);\n}\n\n.squiffy-panel > :first-child\n{\n margin-top: 0;\n}\n\n.squiffy-panel > :last-child\n{\n margin-bottom: 0;\n}\n\n.squiffy-panel img\n{\n max-width: 100%;\n height: auto;\n}\n\n/* On a screen too narrow for the story and a side panel, the panel is a button in the header,\n which shows it in a dialog */\n@media (min-width: 64rem)\n{\n button.squiffy-panel-side-button\n {\n display: none;\n }\n}\n\n@media (max-width: 63.99rem)\n{\n aside.squiffy-panels-side\n {\n display: none;\n }\n}\n\n/* The dialog a panel's button opens */\ndialog.squiffy-panel-dialog\n{\n width: min(28rem, calc(100vw - 2rem));\n max-height: calc(100vh - 2rem);\n box-sizing: border-box;\n padding: 1rem 1.25rem 1.25rem;\n border: 1px solid var(--squiffy-border);\n border-radius: 0.75rem;\n background-color: var(--squiffy-background);\n color: var(--squiffy-text);\n font-family: var(--squiffy-font-family, inherit);\n font-size: var(--squiffy-font-size, 1rem);\n line-height: var(--squiffy-line-height, 1.5);\n box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.25);\n}\n\ndialog.squiffy-panel-dialog::backdrop\n{\n background-color: rgb(0 0 0 / 0.4);\n}\n\n.squiffy-panel-dialog-header\n{\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n margin-bottom: 0.75rem;\n font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n}\n\n.squiffy-panel-dialog-header h2\n{\n margin: 0;\n font-size: 1.125rem;\n}\n\nbutton.squiffy-panel-dialog-close\n{\n display: inline-flex;\n padding: 0.25em;\n border: none;\n border-radius: 0.375em;\n background: none;\n color: var(--squiffy-muted);\n cursor: pointer;\n}\n\nbutton.squiffy-panel-dialog-close:hover\n{\n color: var(--squiffy-text);\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n}\n\nbutton.squiffy-panel-dialog-close:focus-visible\n{\n outline: 2px solid var(--squiffy-link);\n outline-offset: 2px;\n}\n\nbutton.squiffy-panel-dialog-close svg\n{\n width: 1.25em;\n height: 1.25em;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* Page layout styles for an exported story. See https://squiffystory.com/styling/ for how to customise these. */\n\n:root\n{\n /* The width of the story text */\n --squiffy-max-width: 42rem;\n /* The story's font. Charter, Sitka Text, Cambria or Georgia, whichever the reader has */\n --squiffy-font-family: Charter, \"Bitstream Charter\", \"Sitka Text\", Cambria, Georgia, serif;\n /* The size of the story text. The header's buttons are smaller, and don't change with it */\n --squiffy-font-size: 1.125rem;\n /* The space between lines of text */\n --squiffy-line-height: 1.6;\n}\n\n/* Follow the reader's light or dark system setting, or what they chose with the theme button.\n To keep a story light (or dark) whatever the setting, set \":root { color-scheme: light; }\"\n (or dark). These rules use :where() so that a :root rule like that overrides them, and the\n theme button is hidden. */\n:where(:root)\n{\n color-scheme: light dark;\n}\n\n:where(:root[data-squiffy-theme=\"light\"])\n{\n color-scheme: light;\n}\n\n:where(:root[data-squiffy-theme=\"dark\"])\n{\n color-scheme: dark;\n}\n\nbody\n{\n margin: 0;\n background-color: var(--squiffy-background);\n color: var(--squiffy-text);\n}\n\n/* Wraps the header and the story: sets the page width and font */\ndiv#squiffy-container\n{\n max-width: var(--squiffy-max-width);\n margin-left: auto;\n margin-right: auto;\n padding: 0 1.25rem 3rem;\n font-family: var(--squiffy-font-family);\n line-height: var(--squiffy-line-height);\n}\n\n/* The bar above the story containing the Back, Restart and light/dark buttons. It stays at the\n top of the window as the story scrolls under it. */\ndiv#squiffy-header\n{\n position: sticky;\n top: 0;\n z-index: 1;\n padding: 0.5rem 0;\n background-color: var(--squiffy-background);\n font-size: 0.875rem;\n text-align: right;\n white-space: nowrap;\n}\n\n/* A short fade under the header, so the story scrolls under it rather than being cut off */\ndiv#squiffy-header::after\n{\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n top: 100%;\n height: 0.75rem;\n background: linear-gradient(var(--squiffy-background), transparent);\n pointer-events: none;\n}\n\n/* Space between the Back, Restart and light/dark buttons */\nbutton.squiffy-header-button + button.squiffy-header-button\n{\n margin-left: 0.25em;\n}\n\n/* The button that switches between light and dark mode. It shows a moon in light mode and a sun\n in dark mode. */\nbutton#squiffy-theme:not([data-next=\"light\"]) .squiffy-icon-light,\nbutton#squiffy-theme[data-next=\"light\"] .squiffy-icon-dark\n{\n display: none;\n}\n\n/* With a side panel (squiffy.json's \"panels\"), the page is wider, with the panel to the right of\n the story. It stays in view as the story scrolls, under the header. On a narrower screen, it's a\n button in the header instead. */\n@media (min-width: 64rem)\n{\n div#squiffy-container.squiffy-has-side\n {\n display: grid;\n grid-template-columns: minmax(0, 1fr) var(--squiffy-side-width);\n column-gap: 2.5rem;\n align-items: start;\n max-width: calc(var(--squiffy-max-width) + var(--squiffy-side-width) + 2.5rem);\n }\n\n div#squiffy-container.squiffy-has-side > div#squiffy-header\n {\n grid-column: 1 / -1;\n }\n\n div#squiffy-container.squiffy-has-side > aside.squiffy-panels-side\n {\n position: sticky;\n top: 3.5rem;\n padding-left: 1.25rem;\n border-left: 1px solid var(--squiffy-border);\n max-height: calc(100vh - 4.5rem);\n overflow-y: auto;\n }\n}\n\n/* The story text */\ndiv#squiffy\n{\n font-size: var(--squiffy-font-size);\n}\n\ndiv#squiffy :is(h1, h2, h3, h4, h5, h6)\n{\n line-height: 1.25;\n}\n\ndiv#squiffy p\n{\n text-wrap: pretty;\n}\n\n/* Stop images overflowing the page */\ndiv#squiffy img\n{\n max-width: 100%;\n height: auto;\n}\n\n/* The preview scrolls the story within the frame, with the text centred as on the exported page */\nhtml, body { height: 100%; }\ndiv#squiffy-container { max-width: none; height: 100%; padding: 0; }\n#squiffy, .squiffy-preview-story, .squiffy-preview-story > div { height: 100%; box-sizing: border-box; }\n.squiffy-preview-story > div { padding: 1em max(1.25rem, calc((100% - var(--squiffy-max-width)) / 2)); }\n/* The story's panels: their buttons above the story, and side panels to its right */\n#squiffy { display: flex; flex-direction: column; }\n.squiffy-preview-header { flex: none; padding: 0.5rem 0.75rem 0; font-family: system-ui, sans-serif; font-size: 0.875rem; text-align: right; }\n.squiffy-preview-header:empty { display: none; }\n.squiffy-preview-body { flex: 1; min-height: 0; display: flex; }\n#squiffy .squiffy-preview-body > .squiffy-preview-story { flex: 1; min-width: 0; height: 100%; }\n.squiffy-preview-body > aside.squiffy-panels-side { flex: none; width: var(--squiffy-side-width); box-sizing: border-box; overflow-y: auto; padding: 1em 1.25rem 1em 0; }\n</style>\n</head>\n<body>\n<div id=\"squiffy-container\"><div id=\"squiffy\"></div></div>\n<script>\n(function(){var ga=Object.create,Js=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,va=Object.getOwnPropertyNames,ya=Object.getPrototypeOf,ji=Object.prototype.hasOwnProperty,he=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),hs=(e,t)=>{let s={};for(var r in e)Js(s,r,{get:e[r],enumerable:!0});return t||Js(s,Symbol.toStringTag,{value:\"Module\"}),s},ba=(e,t,s,r)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(var i=va(t),n=0,o=i.length,c;n<o;n++)c=i[n],!ji.call(e,c)&&c!==s&&Js(e,c,{get:(f=>t[f]).bind(null,c),enumerable:!(r=ma(t,c))||r.enumerable});return e},_a=(e,t,s)=>(s=e!=null?ga(ya(e)):{},ba(t||!e||!e.__esModule||!ji.call(e,\"default\")?Js(s,\"default\",{value:e,enumerable:!0}):s,e));function Cs(e){\"@babel/helpers - typeof\";return Cs=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Cs(e)}function Sa(e,t){if(Cs(e)!=\"object\"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||\"default\");if(Cs(r)!=\"object\")return r;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function ka(e){var t=Sa(e,\"string\");return Cs(t)==\"symbol\"?t:t+\"\"}function Ie(e,t,s){return(t=ka(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function wa(e,t){if(t.has(e))throw new TypeError(\"Cannot initialize the same private elements twice on an object\")}function xa(e,t){wa(e,t),t.add(e)}function Qs(e,t,s){if(typeof e==\"function\"?e===t:e.has(t))return arguments.length<3?t:s;throw new TypeError(\"Private element is not present on this object\")}var ds,Ks;function Vr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Zt=Vr();function Zi(e){Zt=e}var Jt={exec:()=>null};function Qt(e){let t=[];return s=>{let r=Math.max(0,Math.min(3,s-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function le(e,t=\"\"){let s=typeof e==\"string\"?e:e.source,r={replace:(i,n)=>{let o=typeof n==\"string\"?n:n.source;return o=o.replace(Ge.caret,\"$1\"),s=s.replace(i,o),r},getRegex:()=>new RegExp(s,t)};return r}var Ji=((e=\"\")=>{try{return!!new RegExp(\"(?<=1)(?<!1)\"+e)}catch{return!1}})(),Ge={codeRemoveIndent:/^(?: {0,3}\\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \\t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,leadingSpaceTab:/^[ \\t]+/,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+)[ \\t]*)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \\t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\][ \\t]+\\S/,listReplaceTask:/^\\[[ xX]\\][ \\t]+/,listTaskCheckbox:/\\[[ xX]\\]/,anyLine:/\\n.*\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\||\\| *$/g,tableRowBlankLine:/\\n[ \\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\s|>)/i,endPreScriptTag:/^<\\/(pre|code|kbd|script)(\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/,unicodeAlphaNumeric:/[\\p{L}\\p{N}]/u,numericCharacterReference:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,escapeTest:/[&<>\"']/,escapeReplace:/[&<>\"']/g,escapeTestNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,escapeReplaceNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,caret:/(^|[^\\[])\\^/g,percentDecode:/%25/g,findPipe:/\\|/g,splitPipe:/ \\|/,slashPipe:/\\\\\\|/g,carriageReturn:/\\r\\n|\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\S*/,endingNewline:/\\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\\\n]*)?(?:\\\\n|$))`),nextBulletRegex:Qt(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \t][^\\\\n]*)?(?:\\\\n|$))`)),hrRegex:Qt(e=>new RegExp(`^ {0,${e}}((?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\\\\*[ \t]*){3,})(?:\\\\n+|$)`)),fencesBeginRegex:Qt(e=>new RegExp(`^ {0,${e}}(?:\\`\\`\\`|~~~)`)),headingBeginRegex:Qt(e=>new RegExp(`^ {0,${e}}#{1,6}(?:\\\\s|$)`)),pedanticHeadingBeginRegex:Qt(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Qt(e=>new RegExp(`^ {0,${e}}(?:</?(?:${Es})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)`,\"i\")),blockquoteBeginRegex:Qt(e=>new RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\\d{1,9}[.)])[ \\t]+|>[ \\t]?))+/},Ta=/^(?:[ \\t]*(?:\\n|$))+/,Ca=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,Pa=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}(?:(?=`)\\1`*|(?=~)\\1~*) *(?=\\n|$)|$)/,Ps=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,Ea=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,zr=/ {0,3}(?:[*+-]|\\d{1,9}[.)])/,Qi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |fences|blockquote|heading|hr|html|table))+?)\\n {0,3}(=+|-+)[ \\t]*(?:\\n+|$)/,Ki=le(Qi).replace(/bull/g,zr).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,\"\").getRegex(),Aa=le(Qi).replace(/bull/g,zr).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),Ur=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \\t]+\\n)[^\\n]+)*)/,La=/^[^\\n]+/,Wr=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\\\n]|\\n(?![ \\t]*\\n))+/,Ra=le(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace(\"label\",Wr).replace(\"title\",/(?:\"(?:\\\\[\\s\\S]|[^\"\\\\])*\"|'(?:\\\\[\\s\\S]|[^'\\\\\\n]|\\n(?!\\n))*'|\\((?:\\\\[\\s\\S]|[^()\\\\])*\\))/).getRegex(),Ia=le(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/).replace(/bull/g,zr).getRegex(),Es=\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\",Xr=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,Ma=le(\"^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n*|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>[^\\\\n]*\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>[^\\\\n]*\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>[^\\\\n]*\\\\n*|$)|</?(tag)(?:[ \\\\t]+|\\\\n|/?>|$)[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|</[a-z][a-z0-9-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$))\",\"i\").replace(\"comment\",Xr).replace(\"tag\",Es).replace(\"attribute\",/ +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex(),en=e=>le(Ur).replace(\"hr\",Ps).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",e).replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",Es).getRegex(),Oa=en(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/),Na=en(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/),Gr={blockquote:le(/^( {0,3}> ?(?:(?![ \\t]*(?:\\n|$))(paragraph)|[^\\n]*)(?:\\n|$))+/).replace(\"paragraph\",Na).getRegex(),code:Ca,def:Ra,fences:Pa,heading:Ea,hr:Ps,html:Ma,lheading:Ki,list:Ia,newline:Ta,paragraph:Oa,table:Jt,text:La},tn=le(\"^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)\").replace(\"hr\",Ps).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"blockquote\",\" {0,3}>\").replace(\"code\",\"(?: {4}| {0,3}\t)[^\\\\n]\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",Es).getRegex(),Da={...Gr,lheading:Aa,table:tn,paragraph:le(Ur).replace(\"hr\",Ps).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"table\",tn).replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",Es).getRegex()},Ba={...Gr,html:le(`^ *(?:comment(?: *\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1>(?: *\\\\n{2,}|\\\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\\\s[^'\"/>\\\\s]*)*?/?>(?: *\\\\n{2,}|\\\\s*$))`).replace(\"comment\",Xr).replace(/tag/g,\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b\").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:Jt,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:le(Ur).replace(\"hr\",Ps).replace(\"heading\",` *#{1,6} *[^\n]`).replace(\"lheading\",Ki).replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"|fences\",\"\").replace(\"|list\",\"\").replace(\"|html\",\"\").replace(\"|tag\",\"\").getRegex()},$a=/^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,Ha=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,sn=/^( {2,}|\\\\)\\n(?!\\s*$)[ \\t]*/,qa=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,At=/[\\p{P}\\p{S}]/u,fs=/[\\s\\p{P}\\p{S}]/u,As=/[^\\s\\p{P}\\p{S}]/u,Fa=le(/^((?![*_])punctSpace)/,\"u\").replace(/punctSpace/g,fs).getRegex(),Va=/[\\p{Pi}\\p{Ps}\"']/u,rn=/(?!~)[\\p{P}\\p{S}]/u,za=/(?!~)[\\s\\p{P}\\p{S}]/u,Ua=/(?:[^\\s\\p{P}\\p{S}]|~)/u,Wa=le(/link|precode-code|html/,\"g\").replace(\"link\",/\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/).replace(\"precode-\",Ji?\"(?<!`)()\":\"(^^|[^`])\").replace(\"code\",/(?<b>`+)[^`]+\\k<b>(?!`)/).replace(\"html\",/<(?! )[^<>]*?>/).getRegex(),nn=/^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/,Xa=le(nn,\"u\").replace(/punct/g,At).getRegex(),Ga=le(nn,\"u\").replace(/punct/g,rn).getRegex(),Ya=le(/^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/,\"u\").replace(/openQuote/g,Va).replace(/punct/g,At).getRegex(),on=\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)\",ja=le(on,\"gu\").replace(/notPunctSpace/g,As).replace(/punctSpace/g,fs).replace(/punct/g,At).getRegex(),Za=le(on,\"gu\").replace(/notPunctSpace/g,Ua).replace(/punctSpace/g,za).replace(/punct/g,rn).getRegex(),Ja=le(\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)\",\"gu\").replace(/notPunctSpace/g,As).replace(/punctSpace/g,fs).replace(/punct/g,At).getRegex(),Qa=le(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)\",\"gu\").replace(/notPunctSpace/g,As).replace(/punctSpace/g,fs).replace(/punct/g,At).getRegex(),Ka=le(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\\\s](_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)\",\"gu\").replace(/notPunctSpace/g,As).replace(/punctSpace/g,fs).replace(/punct/g,At).getRegex(),el=le(/^~~?(?:((?!~)punct)|[^\\s~])/,\"u\").replace(/punct/g,At).getRegex(),tl=le(\"^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)\",\"gu\").replace(/notPunctSpace/g,As).replace(/punctSpace/g,fs).replace(/punct/g,At).getRegex(),sl=le(/\\\\(punct)/,\"gu\").replace(/punct/g,At).getRegex(),rl=le(/(`+)(?:[^`]|[^`][\\s\\S]*?[^`])\\1(?!`)|`+|\\\\(punct)/,\"gu\").replace(/punct/g,At).getRegex(),il=le(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace(\"scheme\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\"email\",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),nl=le(Xr).replace(\"(?:-->|$)\",\"-->\").getRegex(),ol=le(\"^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\").replace(\"comment\",nl).replace(\"attribute\",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/).getRegex(),an=/\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]/,er=le(/(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/).replace(\"brackets\",an).getRegex(),al=le(/^!?\\[(label)\\]\\([ \\t\\n]*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?[ \\t\\n]*\\)/).replace(\"label\",er).replace(\"href\",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/).replace(\"title\",/\"(?:\\\\[\\s\\S]|[^\"\\\\])*\"|'(?:\\\\[\\s\\S]|[^'\\\\])*'|\\((?:\\\\[\\s\\S]|[^)\\\\])*\\)/).getRegex(),ll=le(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",er).replace(\"ref\",Wr).getRegex(),cl=le(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",Wr).getRegex(),ln=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\]){1,999}/,ul=le(/(?:[^\\[\\]\\\\`]*(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\]))){0,999}?[^\\[\\]\\\\`]*?/).replace(\"brackets\",an).getRegex(),hl=le(\"reflink|nolink(?!\\\\()\",\"g\").replace(\"reflink\",le(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",ul).replace(\"ref\",ln).getRegex()).replace(\"nolink\",le(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",ln).getRegex()).getRegex(),cn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,dl=le(/(?:mailto:email|xmpp:email(?:\\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),Yr={_backpedal:Jt,anyPunctuation:sl,anyPunctuationOutsideCode:rl,autolink:il,blockSkip:Wa,br:sn,code:Ha,del:Jt,delLDelim:Jt,delRDelim:Jt,emStrongLDelim:Xa,emStrongRDelimAst:ja,emStrongRDelimUnd:Qa,escape:$a,link:al,nolink:cl,punctuation:Fa,reflink:ll,reflinkSearch:hl,tag:ol,text:qa,url:Jt},fl={...Yr,emStrongLDelim:Ya,emStrongRDelimAst:Ja,emStrongRDelimUnd:Ka,link:le(/^!?\\[(label)\\]\\((.*?)\\)/).replace(\"label\",er).getRegex(),reflink:le(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace(\"label\",er).getRegex()},jr={...Yr,emStrongRDelimAst:Za,emStrongLDelim:Ga,delLDelim:el,delRDelim:tl,url:le(/^emailProtocol|^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/).replace(\"emailProtocol\",dl).replace(\"protocol\",cn).replace(\"email\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:le(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|wwwStart|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))))/).replace(\"protocol\",cn).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace(\"wwwStart\",Ji?\"(?<![^\\\\s*_~(])www\\\\.\":\"www\\\\.\").getRegex()},pl={...jr,br:le(sn).replace(\"{2,}\",\"*\").getRegex(),text:le(jr.text).replace(\"\\\\b_\",\"\\\\b_| {2,}\\\\n\").replace(/\\{2,\\}/g,\"*\").getRegex()},tr={normal:Gr,gfm:Da,pedantic:Ba},Ls={normal:Yr,gfm:jr,breaks:pl,pedantic:fl},gl={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\"},un=e=>gl[e];function lt(e,t){if(t){if(Ge.escapeTest.test(e))return e.replace(Ge.escapeReplace,un)}else if(Ge.escapeTestNoEncode.test(e))return e.replace(Ge.escapeReplaceNoEncode,un);return e}function ml(e){return Ge.numericCharacterReference.test(e)?e.replace(Ge.numericCharacterReferenceOrAmpersand,(t,s,r)=>{if(s===void 0&&r===void 0)return\"&amp;\";let i=s===void 0?Number.parseInt(r,16):Number.parseInt(s,10);return i===0||i>1114111||i>=55296&&i<=57343?\"�\":i===38?\"&amp;\":String.fromCodePoint(i)}):e}function hn(e){try{e=encodeURI(e).replace(Ge.percentDecode,\"%\")}catch{return null}return e}function dn(e,t){let s=e.replace(Ge.findPipe,(i,n,o)=>{let c=!1,f=n;for(;--f>=0&&o[f]===\"\\\\\";)c=!c;return c?\"|\":\" |\"}).split(Ge.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push(\"\");for(;r<s.length;r++)s[r]=s[r].trim().replace(Ge.slashPipe,\"|\");return s}function Ot(e,t,s){let r=e.length;if(r===0)return\"\";let i=0;for(;i<r;){let n=e.charAt(r-i-1);if(n===t&&!s)i++;else if(n!==t&&s)i++;else break}return e.slice(0,r-i)}function fn(e){let t=e.split(`\n`),s=t.length-1;for(;s>=0&&Ge.blankLine.test(t[s]);)s--;return t.length-s<=2?e:t.slice(0,s+1).join(`\n`)}function sr(e){return e.trim().replace(Ge.multipleSpaceGlobal,\" \").toLowerCase().toUpperCase().toLowerCase()}function pn(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let s=0;for(let r=0;r<e.length;r++)if(e[r]===\"\\\\\")r++;else if(e[r]===t[0])s++;else if(e[r]===t[1]&&(s--,s<0))return r;return s>0?-2:-1}var ps=new WeakMap;function Zr(e){let t={\"*\":-1,_:-1},s=-1,r=e.length;for(let i=0;i<r;i++){let n=e[i];if(n!==\"*\"&&n!==\"_\"&&n!==\"~\")continue;let o=i===0?`\n`:e[i-1],c=i+1;for(;c<r&&e[c]===n;)c++;o!==\" \"&&o!==\"\t\"&&o!==`\n`&&o!==\"\\r\"&&o!==\"\\f\"&&(n===\"~\"?s=i:t[n]=i),i=c-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:s}}function vl(e,t){let s=Zr(t),r=ps.get(e);r?r.push(s):ps.set(e,[s])}function yl(e){let t=ps.get(e);t&&(t.pop(),t.length===0&&ps.delete(e))}function bl(e,t,s){let r=ps.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleEmStrongCloserIndex[s]:Zr(t).lastPossibleEmStrongCloserIndex[s]}function _l(e,t){let s=ps.get(e)?.at(-1);return s&&s.maskedSrc===t?s.lastPossibleDelCloserIndex:Zr(t).lastPossibleDelCloserIndex}function rr(e,t=0){let s=t,r=\"\";for(let i of e)if(i===\"\t\"){let n=4-s%4;r+=\" \".repeat(n),s+=n}else r+=i,s++;return r}function gn(e,t,s,r,i){let n=t.href,o=t.title||null,c=e[1].replace(i.other.outputLinkReplace,\"$1\"),f=e[0].charAt(0)===\"!\",d=r.state.inLink,u=r.state.linkEmitted,a=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let h=r.inlineTokens(c),l=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=d,!f){if(l){r.state.inRawBlock=a;return}r.state.linkEmitted=!0}return{type:f?\"image\":\"link\",raw:s,href:n,title:o,text:c,tokens:h}}function Sl(e,t,s){let r=e.match(s.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`\n`).map(n=>{let o=n.match(s.other.beginningSpace);if(o===null)return n;let[c]=o;return n.slice(Math.min(c.length,i.length))}).join(`\n`)}function mn(e,t,s,r){if(!t.includes(\"<\"))return!1;for(let i=0;i<t.length;i++){if(t[i]===\"\\\\\"){i++;continue}if(t[i]===\"`\"){let c=r.inline.code.exec(t.slice(i));if(c){i+=c[0].length-1;continue}}if(t[i]!==\"<\")continue;let n=e.slice(s+i),o=r.inline.tag.exec(n)||r.inline.autolink.exec(n);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var gs=class{constructor(e){Ie(this,\"options\",void 0),Ie(this,\"rules\",void 0),Ie(this,\"lexer\",void 0),this.options=e||Zt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:\"space\",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let s=this.options.pedantic?t[0]:fn(t[0]);return{type:\"code\",raw:s,codeBlockStyle:\"indented\",text:s.replace(this.rules.other.codeRemoveIndent,\"\")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let s=t[0],r=Sl(s,t[3]||\"\",this.rules);return{type:\"code\",raw:s,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,\"$1\"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(this.rules.other.endingHash.test(s)){let r=Ot(s,\"#\");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(s=r.trim())}return{type:\"heading\",raw:Ot(t[0],`\n`),depth:t[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:\"hr\",raw:Ot(t[0],`\n`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let s=Ot(t[0],`\n`).split(`\n`),r=\"\",i=\"\",n=[];for(;s.length>0;){let o=!1,c=[],f=0;for(;f<s.length;f++)if(this.rules.other.blockquoteStart.test(s[f]))c.push(s[f]),o=!0;else if(!o)c.push(s[f]);else break;s=s.slice(f);let d=c.join(`\n`),u=d.replace(this.rules.other.blockquoteMarkerWhitespace,(l,p,g)=>p+rr(g,p.length)).replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,\"\");r=r?`${r}\n${d}`:d,i=i?`${i}\n${u}`:u;let a=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=a,s.length===0)break;let h=n.at(-1);if(h?.type===\"code\"||h?.type===\"heading\"||h?.type===\"hr\"||h?.type===\"html\"||h?.type===\"table\")break;if(h?.type===\"blockquote\"){let l=h,p=s.join(`\n`),g=l.raw+`\n`+p.replace(this.rules.other.blockquoteSetextReplace2,\"\"),v=this.blockquote(g);n[n.length-1]=v;let _=g.substring(v.raw.length).replace(/^\\n/,\"\"),S=_?_.split(`\n`).length:0,y=S?s.slice(0,-S):s;if(y.length>0&&(r=`${r}\n${y.join(`\n`)}`),i=i.substring(0,i.length-l.text.length)+v.text,s=s.slice(y.length),s.length>0&&this.rules.other.blockquoteStart.test(s[0]))continue;break}else if(h?.type===\"list\"){let l=h,p=l.raw+`\n`+s.join(`\n`),g=this.list(p);n[n.length-1]=g;let v=g.raw.length>l.raw.length?p.slice(l.raw.length+1,g.raw.length).split(`\n`).length:0;if(v>0){let _=s.slice(0,v).join(`\n`);r=`${r}\n${_}`,i=`${i}\n${_}`}s=s.slice(v);continue}}return{type:\"blockquote\",raw:r,tokens:n,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type===\"text\"&&!this.rules.other.listInterruptsParagraph.test(e))return;let s=e,r=()=>s.length-e.length,i=t[1].trim(),n=i.length>1,o={type:\"list\",raw:\"\",ordered:n,start:n?+i.slice(0,-1):\"\",loose:!1,items:[]};i=n?`\\\\d{1,9}\\\\${i.slice(-1)}`:`\\\\${i}`,this.options.pedantic&&(i=n?i:\"[*+-]\");let c=this.rules.other.listItemRegex(i),f=!1;for(;e;){let u=!1,a=\"\";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;let h=r();e=e.substring(t[0].length);let l=t[2].split(`\n`,1)[0],p=t[1].length,g=this.options.pedantic?rr(l,p):l.replace(this.rules.other.leadingSpaceTab,m=>rr(m,p)),v=e.split(`\n`,1)[0],_=!g.trim(),S=0;if(this.options.pedantic?(S=2,a=g.trimStart()):_?S=p+1:(S=g.search(this.rules.other.nonSpaceChar),S=S>4?1:S,a=g.slice(S),S+=p),_&&this.rules.other.blankLine.test(v)&&(e=e.substring(v.length+1),u=!0),!u){let m=this.rules.other.nextBulletRegex(S),b=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),w=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(S):this.rules.other.headingBeginRegex(S),C=this.rules.other.htmlBeginRegex(S),M=this.rules.other.blockquoteBeginRegex(S),P=!1;for(;e;){let A=e.split(`\n`,1)[0],E;if(v=A,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting,\" \"),E=v):E=v.replace(this.rules.other.leadingSpaceTab,B=>rr(B)),k.test(v)||w.test(v)||C.test(v)||M.test(v)||m.test(v)||b.test(v))break;if(E.search(this.rules.other.nonSpaceChar)>=S||!v.trim())a+=`\n`+E.slice(S),P=!1;else{if(_||g.replace(this.rules.other.tabCharGlobal,\" \").search(this.rules.other.nonSpaceChar)>=4||k.test(g)||w.test(g)||C.test(g)||b.test(g))break;if(!this.options.pedantic&&!P){let q=g.replace(this.rules.other.nestedContainerMarkers,\"\");if(this.rules.block.fences.test(q)||this.rules.block.heading.test(q)||this.rules.block.hr.test(q))break}let B=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(v)&&this.rules.block.lheading.test(`${g}\n${v}`)?` ${E.replace(/^ {0,3}/,\"\")}`:v;a+=`\n`+B,P=!0}_=!v.trim(),e=e.substring(A.length+1),g=E.slice(S)}}let y=s.slice(h,r());o.loose||(f?o.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(f=!0)),o.items.push({type:\"list_item\",raw:y,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let d=o.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;o.raw=s.slice(0,r()).trimEnd();for(let u of o.items)if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),!o.loose){let a=u.tokens.filter(h=>h.type===\"space\");o.loose=a.length>0&&a.some(h=>this.rules.other.anyLine.test(h.raw))}for(let u of o.items){let a=u.tokens[0];if(u.task&&(a?.type===\"text\"||a?.type===\"paragraph\")){u.text=u.text.replace(this.rules.other.listReplaceTask,\"\"),a.raw=a.raw.replace(this.rules.other.listReplaceTask,\"\"),a.text=a.text.replace(this.rules.other.listReplaceTask,\"\");for(let l=this.lexer.inlineQueue.length-1;l>=0;l--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[l].src)){this.lexer.inlineQueue[l].src=this.lexer.inlineQueue[l].src.replace(this.rules.other.listReplaceTask,\"\");break}let h=this.rules.other.listTaskCheckbox.exec(u.raw);if(h){let l={type:\"checkbox\",raw:h[0]+\" \",checked:h[0]!==\"[ ]\"};u.checked=l.checked,o.loose?u.tokens[0]&&[\"paragraph\",\"text\"].includes(u.tokens[0].type)&&\"tokens\"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=l.raw+u.tokens[0].raw,u.tokens[0].text=l.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(l)):u.tokens.unshift({type:\"paragraph\",raw:l.raw,text:l.raw,tokens:[l]}):u.tokens.unshift(l)}}else u.task&&(u.task=!1)}if(o.loose)for(let u of o.items){u.loose=!0;for(let a of u.tokens)a.type===\"text\"&&(a.type=\"paragraph\")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let s=fn(t[0]);return{type:\"html\",block:!0,raw:s,pre:t[1]===\"pre\"||t[1]===\"script\"||t[1]===\"style\",text:s}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&pn(t[2],\"()\")!==-1)return;let s=sr(t[1]),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,\"$1\").replace(this.rules.inline.anyPunctuation,\"$1\"):\"\",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,\"$1\"):t[3];return{type:\"def\",tag:s,raw:Ot(t[0],`\n`),href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let s=dn(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,\"\").split(\"|\"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,\"\").split(`\n`):[],n={type:\"table\",raw:Ot(t[0],`\n`),header:[],align:[],rows:[]};if(s.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?n.align.push(\"right\"):this.rules.other.tableAlignCenter.test(o)?n.align.push(\"center\"):this.rules.other.tableAlignLeft.test(o)?n.align.push(\"left\"):n.align.push(null);for(let o=0;o<s.length;o++)n.header.push({text:s[o],tokens:this.lexer.inline(s[o]),header:!0,align:n.align[o]});for(let o of i)n.rows.push(dn(o,n.header.length).map((c,f)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:n.align[f]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let s=t[1].trim();return{type:\"heading\",raw:Ot(t[0],`\n`),depth:t[2].charAt(0)===\"=\"?1:2,text:s,tokens:this.lexer.inline(s)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let s=t[1].charAt(t[1].length-1)===`\n`?t[1].slice(0,-1):t[1];return{type:\"paragraph\",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:\"text\",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:\"escape\",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:\"html\",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let s=t[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&mn(e,t[1],s,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let c=Ot(r.slice(0,-1),\"\\\\\");if((r.length-c.length)%2===0)return}else{let c=pn(t[2],\"()\");if(c===-2)return;if(c>-1){let f=(t[0].indexOf(\"!\")===0?5:4)+t[1].length+c;t[2]=t[2].substring(0,c),t[0]=t[0].substring(0,f).trim(),t[3]=\"\"}}let i=Ot(t[0].slice(0,-1),\"\\\\\");if((t[0].length-i.length)%2===0)return;let n=t[2],o=\"\";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(n);c&&(n=c[1],o=c[3])}else o=t[3]?t[3].slice(1,-1):\"\";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),gn(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,\"$1\"),title:o&&o.replace(this.rules.inline.anyPunctuation,\"$1\")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){let r=s[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&mn(e,s[1],r,this.rules))return;let i=t[sr(s[2]||s[1])];if(!i){let n=s[0].charAt(0);return{type:\"text\",raw:n,text:n}}return gn(s,i,s[0],this.lexer,this.rules)}}emStrong(e,t,s=\"\"){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||!r[1]&&!r[2]&&!r[3]&&!r[4])return;let i=r[0][0],n=s===i,o=t.length-e.length,c=o;for(;!this.options.pedantic&&c>0&&t[c-1]===i;)c--;let f=[...t.slice(Math.max(0,c-2),c)].at(-1)??\"\",d=f===\"*\"||f===\"_\"||!!this.rules.inline.punctuation.exec(f);c<o&&(s=f);let u=c<o?d:s===\"*\"||s===\"_\"||!!this.rules.inline.punctuation.exec(s);if(r[4]&&s.match(this.rules.other.unicodeAlphaNumeric))return;let a=r[1]||r[3]||\"\";if(!a||!s||u){let h=[...r[0]].length-1,l,p,g=h,v=0,_=o-c+h,S=!this.options.pedantic&&!!f.trim()&&(!!a||i===\"*\"&&!d);if(i!==\"*\"&&i!==\"_\")return;let y=i===\"*\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,m=bl(this,t,i),b=t.length-e.length+h;if(m<b)return;t=t.slice(-1*e.length+h);let k=m-b;for(y.lastIndex=0;(r=y.exec(t))!==null&&!(r.index>k);){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(p=[...l].length,r[3]||r[4]){g+=p;continue}else if(r[5]||r[6]||S){if(n&&(r[5]||r[6]))break;if(_%3&&!((_+p)%3)){v+=p;continue}}if(g-=p,g>0)continue;p=Math.min(p,p+g+v);let w=[...r[0]][0].length,C=e.slice(0,h+r.index+w+p);if(Math.min(h,p)%2){let P=C.slice(1,-1);return{type:\"em\",raw:C,text:P,tokens:this.lexer.inlineTokens(P)}}let M=C.slice(2,-2);return{type:\"strong\",raw:C,text:M,tokens:this.lexer.inlineTokens(M)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal,\" \"),r=this.rules.other.nonSpaceChar.test(s),i=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return r&&i&&(s=s.substring(1,s.length-1)),{type:\"codespan\",raw:t[0],text:s}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:\"br\",raw:t[0]}}del(e,t,s=\"\"){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!s||this.rules.inline.punctuation.exec(s))){let i=[...r[0]].length-1,n,o,c=i,f=this.rules.inline.delRDelim,d=_l(this,t),u=t.length-e.length+i;if(d<u)return;t=t.slice(-1*e.length+i);let a=d-u;for(f.lastIndex=0;(r=f.exec(t))!==null&&!(r.index>a);){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(o=[...n].length,o!==i))continue;if(r[3]||r[4]){c+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c);let h=[...r[0]][0].length,l=e.slice(0,i+r.index+h+o),p=l.slice(i,-i);return{type:\"del\",raw:l,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let s,r;return t[2]===\"@\"?(s=t[1],r=\"mailto:\"+s):(s=t[1],r=s),{type:\"link\",raw:t[0],text:s,href:r,autolink:!0,tokens:[{type:\"text\",raw:s,text:s}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let s,r;if(t[2]===\"@\")s=t[0],r=\"mailto:\"+s;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??\"\";while(i!==t[0]);s=t[0],t[1]===\"www.\"?r=\"http://\"+t[0]:r=t[0]}return{type:\"link\",raw:t[0],text:s,href:r,autolink:!0,tokens:[{type:\"text\",raw:s,text:s}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let s=this.lexer.state.inRawBlock;return{type:\"text\",raw:t[0],text:s?t[0]:ml(t[0]),escaped:s}}}},_t=(ds=new WeakSet,class Gi{constructor(t){xa(this,ds),Ie(this,\"tokens\",void 0),Ie(this,\"options\",void 0),Ie(this,\"state\",void 0),Ie(this,\"inlineQueue\",void 0),Ie(this,\"tokenizer\",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Zt,this.options.tokenizer=this.options.tokenizer||new gs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let s={other:Ge,block:tr.normal,inline:Ls.normal};this.options.pedantic?(s.block=tr.pedantic,s.inline=Ls.pedantic):this.options.gfm&&(s.block=tr.gfm,this.options.breaks?s.inline=Ls.breaks:s.inline=Ls.gfm),this.tokenizer.rules=s}static get rules(){return{block:tr,inline:Ls}}static lex(t,s){return new Gi(s).lex(t)}static lexInline(t,s){return new Gi(s).inlineTokens(t)}lex(t){t=t.replace(Ge.carriageReturn,`\n`),this.blockTokens(t,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let r=this.inlineQueue[s];this.state.inRawBlock=!1,this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,s=[],r=!1){this.tokenizer.lexer=this;let i=this.state.lastToken;this.options.pedantic&&(t=t.replace(Ge.tabCharGlobal,\" \").replace(Ge.spaceLine,\"\"));let n=1/0;for(;t;){if(t.length<n)n=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}this.state.lastToken=s.at(-1);let o;if(this.options.extensions?.block?.some(f=>(o=f.call({lexer:this},t,s))?(t=t.substring(o.raw.length),s.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let f=s.at(-1);o.raw.length===1&&f!==void 0?f.raw+=`\n`:s.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let f=s.at(-1);f?.type===\"paragraph\"||f?.type===\"text\"?(f.raw+=(f.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,f.text+=`\n`+o.text,this.inlineQueue.at(-1).src=f.text):s.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let f=s.at(-1);f?.type===\"paragraph\"||f?.type===\"text\"?(f.raw+=(f.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,f.text+=`\n`+o.raw,this.inlineQueue.at(-1).src=f.text):(this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title}),s.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),s.push(o);continue}let c=t;if(this.options.extensions?.startBlock){let f=1/0,d=t.slice(1),u;this.options.extensions.startBlock.forEach(a=>{u=a.call({lexer:this},d),typeof u==\"number\"&&u>=0&&(f=Math.min(f,u))}),f<1/0&&f>=0&&(c=t.substring(0,f+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let f=s.at(-1);r&&f?.type===\"paragraph\"?(f.raw+=(f.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,f.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):s.push(o),r=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let f=s.at(-1);f?.type===\"text\"?(f.raw+=(f.raw.endsWith(`\n`)?\"\":`\n`)+o.raw,f.text+=`\n`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):s.push(o);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=i,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}linkInText(t){if(!t.includes(\"[\"))return!1;let s=this.tokenizer.rules.inline.link;for(let r of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(s.test(r[0])&&t.charAt(r.index-1)!==\"!\")return!0;for(let r of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=r[0],n=i.lastIndexOf(\"[\");if(!(i.charAt(0)===\"!\"||!Object.hasOwn(this.tokens.links,sr(i.slice(n+1,-1))))&&!(n>1&&this.linkInText(i.slice(1,n-1))))return!0}return!1}inlineTokens(t,s=[]){this.tokenizer.lexer=this;let r=this.state.linkParenPossible;this.state.linkParenPossible=r&&t.includes(\")\");try{return Qs(ds,this,kl).call(this,t,s)}finally{this.state.linkParenPossible=r}}infiniteLoopError(t){let s=\"Infinite loop on byte: \"+t;if(this.options.silent)console.error(s);else throw new Error(s)}});function kl(e,t){let s=e.includes(\"*\")||e.includes(\"_\")||e.includes(\"~\")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==gs.prototype.emStrong||this.tokenizer.del!==gs.prototype.del?Qs(ds,this,Tl).call(this,e):e;vl(this.tokenizer,s);try{return Qs(ds,this,wl).call(this,e,s,t)}finally{yl(this.tokenizer)}}function wl(e,t,s){let r=!1,i=\"\",n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=\"\"),r=!1;let o;if(this.options.extensions?.inline?.some(f=>(o=f.call({lexer:this},e,s))?(e=e.substring(o.raw.length),s.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let f=s.at(-1);o.type===\"text\"&&f?.type===\"text\"?(f.raw+=o.raw,f.text+=o.text):s.push(o);continue}if(o=this.tokenizer.emStrong(e,t,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.del(e,t,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),s.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),s.push(o);continue}let c=e;if(this.options.extensions?.startInline){let f=1/0,d=e.slice(1),u;this.options.extensions.startInline.forEach(a=>{u=a.call({lexer:this},d),typeof u==\"number\"&&u>=0&&(f=Math.min(f,u))}),f<1/0&&f>=0&&(c=e.substring(0,f+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!==\"_\"&&(i=o.raw.slice(-1)),r=!0;let f=s.at(-1);f?.type===\"text\"?(f.raw+=o.raw,f.text+=o.text):s.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return s}function xl(e){let{blockSkip:t,tag:s,autolink:r}=this.tokenizer.rules.inline,i=\"\",n=0,o;for(t.lastIndex=0;o=t.exec(e);){let c=o.index+(o[2]?o[2].length:0),f=o.index+o[0].length;if(e.charAt(c)===\"<\"){let d=e.slice(c),u=s.exec(d)||r.exec(d);if(!u){t.lastIndex=c+1;continue}f=c+u[0].length,t.lastIndex=f}i+=e.slice(n,c)+\"[\"+\"a\".repeat(f-c-2)+\"]\",n=f}return i+e.slice(n)}function Tl(e){let t=e;if(this.tokens.links&&e.includes(\"[\")){let s=this.tokenizer.rules.inline.reflinkSearch,r=i=>{let n=i.lastIndexOf(\"[\");if(!Object.hasOwn(this.tokens.links,sr(i.slice(n+1,-1))))return i;if(n>1&&i.charAt(0)!==\"!\"){let o=i.slice(1,n-1);if(this.linkInText(o))return\"[\"+o.replace(s,r)+\"][\"+\"a\".repeat(i.length-n-2)+\"]\"}return\"[\"+\"a\".repeat(i.length-2)+\"]\"};t=t.replace(s,r)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(s,r,i)=>i?\"+\".repeat(s.length):r?r+s.slice(r.length,-r.length).replace(/`/g,\"+\")+r:s),t=Qs(ds,this,xl).call(this,t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}var ir=class{constructor(e){Ie(this,\"options\",void 0),Ie(this,\"parser\",void 0),this.options=e||Zt}space(e){return\"\"}code({text:e,lang:t,escaped:s}){let r=(t||\"\").match(Ge.notSpaceStart)?.[0],i=e?e.replace(Ge.endingNewline,\"\")+`\n`:\"\";return r?'<pre><code class=\"language-'+lt(r)+'\">'+(s?i:lt(i,!0))+`</code></pre>\n`:\"<pre><code>\"+(s?i:lt(i,!0))+`</code></pre>\n`}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return\"\"}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return`<hr>\n`}list(e){let t=e.ordered,s=e.start,r=\"\";for(let o=0;o<e.items.length;o++){let c=e.items[o];r+=this.listitem(c)}let i=t?\"ol\":\"ul\",n=t&&s!==1?' start=\"'+s+'\"':\"\";return\"<\"+i+n+`>\n`+r+\"</\"+i+`>\n`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return\"<input \"+(e?'checked=\"\" ':\"\")+'disabled=\"\" type=\"checkbox\"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t=\"\",s=\"\";for(let i=0;i<e.header.length;i++)s+=this.tablecell(e.header[i]);t+=this.tablerow({text:s});let r=\"\";for(let i=0;i<e.rows.length;i++){let n=e.rows[i];s=\"\";for(let o=0;o<n.length;o++)s+=this.tablecell(n[o]);r+=this.tablerow({text:s})}return r&&(r=`<tbody>${r}</tbody>`),`<table>\n<thead>\n`+t+`</thead>\n`+r+`</table>\n`}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),s=e.header?\"th\":\"td\";return(e.align?`<${s} align=\"${e.align}\">`:`<${s}>`)+t+`</${s}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${lt(e,!0)}</code>`}br(e){return\"<br>\"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:s,tokens:r,autolink:i}){let n=i?lt(s,!0):this.parser.parseInline(r),o=hn(e);if(o===null)return n;e=lt(o,i);let c='<a href=\"'+e+'\"';return t&&(c+=' title=\"'+lt(t)+'\"'),c+=\">\"+n+\"</a>\",c}image({href:e,title:t,text:s,tokens:r}){r&&(s=this.parser.parseInline(r,this.parser.textRenderer));let i=hn(e);if(i===null)return lt(s);e=i;let n=`<img src=\"${lt(e)}\" alt=\"${lt(s)}\"`;return t&&(n+=` title=\"${lt(t)}\"`),n+=\">\",n}text(e){return\"tokens\"in e&&e.tokens?this.parser.parseInline(e.tokens):\"escaped\"in e&&e.escaped?e.text:lt(e.text)}},Jr=class{constructor(){Ie(this,\"parser\",void 0)}strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`\n`}checkbox({raw:e}){return e}},St=class Yi{constructor(t){Ie(this,\"options\",void 0),Ie(this,\"renderer\",void 0),Ie(this,\"textRenderer\",void 0),this.options=t||Zt,this.options.renderer=this.options.renderer||new ir,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Jr,this.textRenderer.parser=this}static parse(t,s){return new Yi(s).parse(t)}static parseInline(t,s){return new Yi(s).parseInline(t)}parse(t){this.renderer.parser=this;let s=\"\";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let o=i,c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||![\"space\",\"hr\",\"heading\",\"code\",\"table\",\"blockquote\",\"list\",\"checkbox\",\"html\",\"def\",\"paragraph\",\"text\"].includes(o.type)){s+=c===!1?\"\":c??\"\";continue}}let n=i;switch(n.type){case\"space\":s+=this.renderer.space(n);break;case\"hr\":s+=this.renderer.hr(n);break;case\"heading\":s+=this.renderer.heading(n);break;case\"code\":s+=this.renderer.code(n);break;case\"table\":s+=this.renderer.table(n);break;case\"blockquote\":s+=this.renderer.blockquote(n);break;case\"list\":s+=this.renderer.list(n);break;case\"checkbox\":s+=this.renderer.checkbox(n);break;case\"html\":s+=this.renderer.html(n);break;case\"def\":s+=this.renderer.def(n);break;case\"paragraph\":s+=this.renderer.paragraph(n);break;case\"text\":s+=this.renderer.text(n);break;default:{let o='Token with \"'+n.type+'\" type was not found.';if(this.options.silent)return console.error(o),\"\";throw new Error(o)}}}return s}parseInline(t,s=this.renderer){this.renderer.parser=this;let r=\"\";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||![\"escape\",\"html\",\"link\",\"image\",\"checkbox\",\"strong\",\"em\",\"codespan\",\"br\",\"del\",\"text\"].includes(n.type)){r+=c===!1?\"\":c??\"\";continue}}let o=n;switch(o.type){case\"escape\":r+=s.text(o);break;case\"html\":r+=s.html(o);break;case\"link\":r+=s.link(o);break;case\"image\":r+=s.image(o);break;case\"checkbox\":r+=s.checkbox(o);break;case\"strong\":r+=s.strong(o);break;case\"em\":r+=s.em(o);break;case\"codespan\":r+=s.codespan(o);break;case\"br\":r+=s.br(o);break;case\"del\":r+=s.del(o);break;case\"text\":r+=s.text(o);break;default:{let c='Token with \"'+o.type+'\" type was not found.';if(this.options.silent)return console.error(c),\"\";throw new Error(c)}}}return r}},Rs=(Ks=class{constructor(e){Ie(this,\"options\",void 0),Ie(this,\"block\",void 0),this.options=e||Zt}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?_t.lex:_t.lexInline}provideParser(e=this.block){return e?St.parse:St.parseInline}},Ie(Ks,\"passThroughHooks\",new Set([\"preprocess\",\"postprocess\",\"processAllTokens\",\"emStrongMask\"])),Ie(Ks,\"passThroughHooksRespectAsync\",new Set([\"preprocess\",\"postprocess\",\"processAllTokens\"])),Ks);function Ft(e,t){if(Array.isArray(t))for(let s=0;s<t.length;s++)e.push(t[s]);else e.push(t)}var Cl=class{constructor(...e){Ie(this,\"defaults\",Vr()),Ie(this,\"options\",this.setOptions),Ie(this,\"parse\",this.parseMarkdown(!0)),Ie(this,\"parseInline\",this.parseMarkdown(!1)),Ie(this,\"Parser\",St),Ie(this,\"Renderer\",ir),Ie(this,\"TextRenderer\",Jr),Ie(this,\"Lexer\",_t),Ie(this,\"Tokenizer\",gs),Ie(this,\"Hooks\",Rs),this.use(...e)}walkTokens(e,t){let s=[];for(let r of e)switch(Ft(s,t.call(this,r)),r.type){case\"table\":{let i=r;for(let n of i.header)Ft(s,this.walkTokens(n.tokens,t));for(let n of i.rows)for(let o of n)Ft(s,this.walkTokens(o.tokens,t));break}case\"list\":{let i=r;Ft(s,this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let o=i[n].flat(1/0);Ft(s,this.walkTokens(o,t))}):i.tokens&&Ft(s,this.walkTokens(i.tokens,t))}}return s}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(s=>{let r={...s};if(r.async=this.defaults.async||r.async||!1,s.extensions&&(s.extensions.forEach(i=>{if(!i.name)throw new Error(\"extension name required\");if(\"renderer\"in i){let n=t.renderers[i.name];n?t.renderers[i.name]=function(...o){let c=i.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:t.renderers[i.name]=i.renderer}if(\"tokenizer\"in i){if(!i.level||i.level!==\"block\"&&i.level!==\"inline\")throw new Error(\"extension level must be 'block' or 'inline'\");let n=t[i.level];n?n.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level===\"block\"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level===\"inline\"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}\"childTokens\"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),s.renderer){let i=this.defaults.renderer||new ir(this.defaults);for(let n in s.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if([\"options\",\"parser\"].includes(n))continue;let o=n,c=s.renderer[o],f=i[o];i[o]=(...d)=>{let u=c.apply(i,d);return u===!1&&(u=f.apply(i,d)),u===!1?\"\":u??\"\"}}r.renderer=i}if(s.tokenizer){let i=this.defaults.tokenizer||new gs(this.defaults);for(let n in s.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if([\"options\",\"rules\",\"lexer\"].includes(n))continue;let o=n,c=s.tokenizer[o],f=i[o];i[o]=(...d)=>{let u=c.apply(i,d);return u===!1&&(u=f.apply(i,d)),u}}r.tokenizer=i}if(s.hooks){let i=this.defaults.hooks||new Rs;for(let n in s.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if([\"options\",\"block\"].includes(n))continue;let o=n,c=s.hooks[o],f=i[o];Rs.passThroughHooks.has(n)?i[o]=d=>{if(i.options.async&&Rs.passThroughHooksRespectAsync.has(n))return(async()=>{let a=await c.call(i,d);return f.call(i,a)})();let u=c.call(i,d);return f.call(i,u)}:i[o]=(...d)=>{if(i.options.async)return(async()=>{let a=await c.apply(i,d);return a===!1&&(a=await f.apply(i,d)),a})();let u=c.apply(i,d);return u===!1&&(u=f.apply(i,d)),u}}r.hooks=i}if(s.walkTokens){let i=this.defaults.walkTokens,n=s.walkTokens;r.walkTokens=function(o){let c=[];return Ft(c,n.call(this,o)),i&&Ft(c,i.call(this,o)),c}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _t.lex(e,t??this.defaults)}parser(e,t){return St.parse(e,t??this.defaults)}parseMarkdown(e){return(t,s)=>{let r={...s},i={...this.defaults,...r},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return n(new Error(\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\"));if(typeof t>\"u\"||t===null)return n(new Error(\"marked(): input parameter is undefined or null\"));if(typeof t!=\"string\")return n(new Error(\"marked(): input parameter is of type \"+Object.prototype.toString.call(t)+\", string expected\"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(t):t,c=await(i.hooks?await i.hooks.provideLexer(e):e?_t.lex:_t.lexInline)(o,i),f=i.hooks?await i.hooks.processAllTokens(c):c;i.walkTokens&&await Promise.all(this.walkTokens(f,i.walkTokens));let d=await(i.hooks?await i.hooks.provideParser(e):e?St.parse:St.parseInline)(f,i);return i.hooks?await i.hooks.postprocess(d):d})().catch(n);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer(e):e?_t.lex:_t.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let c=(i.hooks?i.hooks.provideParser(e):e?St.parse:St.parseInline)(o,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}catch(o){return n(o)}}}onError(e,t){return s=>{if(s.message+=`\nPlease report this to https://github.com/markedjs/marked.`,e){let r=\"<p>An error occurred:</p><pre>\"+lt(s.message+\"\",!0)+\"</pre>\";return t?Promise.resolve(r):r}if(t)return Promise.reject(s);throw s}}},Kt=new Cl;function Me(e,t){return Kt.parse(e,t)}Me.options=Me.setOptions=function(e){return Kt.setOptions(e),Me.defaults=Kt.defaults,Zi(Me.defaults),Me},Me.getDefaults=Vr,Me.defaults=Zt;function Pl(...e){return Kt.use(...e),Me.defaults=Kt.defaults,Zi(Me.defaults),Me}Me.use=Pl,Me.walkTokens=function(e,t){return Kt.walkTokens(e,t)},Me.parseInline=Kt.parseInline,Me.Parser=St,Me.parser=St.parse,Me.Renderer=ir,Me.TextRenderer=Jr,Me.Lexer=_t,Me.lexer=_t.lex,Me.Tokenizer=gs,Me.Hooks=Rs,Me.parse=Me;var fh=Me.options,ph=Me.setOptions,gh=Me.walkTokens,Qr=Me.parseInline,Kr=Me,mh=St.parse,vh=_t.lex,st=he((e=>{e.__esModule=!0,e.extend=n,e.indexOf=d,e.escapeExpression=u,e.isEmpty=a,e.createFrame=h,e.blockParams=l,e.appendContextPath=p;var t={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#x27;\",\"`\":\"&#x60;\",\"=\":\"&#x3D;\"},s=/[&<>\"'`=]/g,r=/[&<>\"'`=]/;function i(g){return t[g]}function n(g){for(var v=1;v<arguments.length;v++)for(var _ in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],_)&&(g[_]=arguments[v][_]);return g}var o=Object.prototype.toString;e.toString=o;var c=function(v){return typeof v==\"function\"};c(/x/)&&(e.isFunction=c=function(g){return typeof g==\"function\"&&o.call(g)===\"[object Function]\"}),e.isFunction=c;var f=Array.isArray||function(g){return g&&typeof g==\"object\"?o.call(g)===\"[object Array]\":!1};e.isArray=f;function d(g,v){for(var _=0,S=g.length;_<S;_++)if(g[_]===v)return _;return-1}function u(g){if(typeof g!=\"string\"){if(g&&typeof g.toHTML==\"function\")return g.toHTML();if(g==null)return\"\";if(!g)return g+\"\";g=\"\"+g}return r.test(g)?g.replace(s,i):g}function a(g){return!g&&g!==0?!0:!!(f(g)&&g.length===0)}function h(g){var v=n({},g);return v._parent=g,v}function l(g,v){return g.path=v,g}function p(g,v){return(g?g+\".\":\"\")+v}})),kt=he(((e,t)=>{e.__esModule=!0;var s=[\"description\",\"fileName\",\"lineNumber\",\"endLineNumber\",\"message\",\"name\",\"number\",\"stack\"];function r(i,n){var o=n&&n.loc,c=void 0,f=void 0,d=void 0,u=void 0;o&&o.start&&(c=o.start.line,d=o.start.column,o.end&&(f=o.end.line,u=o.end.column),i+=\" - \"+c+\":\"+d);for(var a=Error.prototype.constructor.call(this,i),h=0;h<s.length;h++)this[s[h]]=a[s[h]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{o&&(this.lineNumber=c,this.endLineNumber=f,Object.defineProperty?(Object.defineProperty(this,\"column\",{value:d,enumerable:!0}),Object.defineProperty(this,\"endColumn\",{value:u,enumerable:!0})):(this.column=d,this.endColumn=u))}catch{}}r.prototype=new Error,e.default=r,t.exports=e.default})),El=he(((e,t)=>{e.__esModule=!0;var s=st();e.default=function(r){r.registerHelper(\"blockHelperMissing\",function(i,n){var o=n.inverse,c=n.fn;if(i===!0)return c(this);if(i===!1||i==null)return o(this);if(s.isArray(i))return i.length>0?(n.ids&&(n.ids=[n.name]),r.helpers.each(i,n)):o(this);if(n.data&&n.ids){var f=s.createFrame(n.data);f.contextPath=s.appendContextPath(n.data.contextPath,n.name),n={data:f}}return c(i,n)})},t.exports=e.default})),Al=he(((e,t)=>{e.__esModule=!0;function s(o){return o&&o.__esModule?o:{default:o}}var r=st(),i=s(kt());function n(o){try{var c=o.return;r.isFunction(c)&&c.call(o)}catch{}}e.default=function(o){o.registerHelper(\"each\",function(c,f){if(!f)throw new i.default(\"Must pass iterator to #each\");var d=f.fn,u=f.inverse,a=0,h=\"\",l=void 0,p=void 0;f.data&&f.ids&&(p=r.appendContextPath(f.data.contextPath,f.ids[0])+\".\"),r.isFunction(c)&&(c=c.call(this)),f.data&&(l=r.createFrame(f.data));function g(m,b,k,w){l&&(l.key=m,l.index=b,l.first=b===0,l.last=!!k,p&&(l.contextPath=p+m)),h=h+d(w,{data:l,blockParams:r.blockParams([w,m],[p+m,null])})}if(c&&typeof c==\"object\")if(r.isArray(c))for(var v=c.length;a<v;a++)a in c&&g(a,a,a===c.length-1,c[a]);else if(typeof Symbol==\"function\"&&c[Symbol.iterator])for(var _=c[Symbol.iterator](),S=_.next();!S.done;){var y=_.next();try{g(a,a,y.done,S.value)}catch(m){throw y.done||n(_),m}S=y,a++}else(function(){var m=void 0;Object.keys(c).forEach(function(b){m!==void 0&&g(m,a-1,!1,c[m]),m=b,a++}),m!==void 0&&g(m,a-1,!0,c[m])})();return a===0&&(h=u(this)),h})},t.exports=e.default})),Ll=he(((e,t)=>{e.__esModule=!0;function s(i){return i&&i.__esModule?i:{default:i}}var r=s(kt());e.default=function(i){i.registerHelper(\"helperMissing\",function(){if(arguments.length!==1)throw new r.default('Missing helper: \"'+arguments[arguments.length-1].name+'\"')})},t.exports=e.default})),Rl=he(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=st(),i=s(kt());e.default=function(n){n.registerHelper(\"if\",function(o,c){if(arguments.length!=2)throw new i.default(\"#if requires exactly one argument\");return r.isFunction(o)&&(o=o.call(this)),!c.hash.includeZero&&!o||r.isEmpty(o)?c.inverse(this):c.fn(this)}),n.registerHelper(\"unless\",function(o,c){if(arguments.length!=2)throw new i.default(\"#unless requires exactly one argument\");return n.helpers.if.call(this,o,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},t.exports=e.default})),Il=he(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper(\"log\",function(){for(var r=[void 0],i=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)r.push(arguments[n]);var o=1;i.hash.level!=null?o=i.hash.level:i.data&&i.data.level!=null&&(o=i.data.level),r[0]=o,s.log.apply(s,r)})},t.exports=e.default})),Ml=he(((e,t)=>{e.__esModule=!0,e.default=function(s){s.registerHelper(\"lookup\",function(r,i,n){return r&&n.lookupProperty(r,i)})},t.exports=e.default})),Ol=he(((e,t)=>{e.__esModule=!0;function s(n){return n&&n.__esModule?n:{default:n}}var r=st(),i=s(kt());e.default=function(n){n.registerHelper(\"with\",function(o,c){if(arguments.length!=2)throw new i.default(\"#with requires exactly one argument\");r.isFunction(o)&&(o=o.call(this));var f=c.fn;if(r.isEmpty(o))return c.inverse(this);var d=c.data;return c.data&&c.ids&&(d=r.createFrame(c.data),d.contextPath=r.appendContextPath(c.data.contextPath,c.ids[0])),f(o,{data:d,blockParams:r.blockParams([o],[d&&d.contextPath])})})},t.exports=e.default})),vn=he((e=>{e.__esModule=!0,e.registerDefaultHelpers=d,e.moveHelperToHooks=u;function t(a){return a&&a.__esModule?a:{default:a}}var s=t(El()),r=t(Al()),i=t(Ll()),n=t(Rl()),o=t(Il()),c=t(Ml()),f=t(Ol());function d(a){s.default(a),r.default(a),i.default(a),n.default(a),o.default(a),c.default(a),f.default(a)}function u(a,h,l){a.helpers[h]&&(a.hooks[h]=a.helpers[h],l||(a.helpers[h]=void 0))}})),Nl=he(((e,t)=>{e.__esModule=!0;var s=st();e.default=function(r){r.registerDecorator(\"inline\",function(i,n,o,c){var f=i;return n.partials||(n.partials={},f=function(d,u){var a=o.partials;o.partials=s.extend({},a,n.partials);var h=i(d,u);return o.partials=a,h}),n.partials[c.args[0]]=c.fn,f})},t.exports=e.default})),Dl=he((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;function t(i){return i&&i.__esModule?i:{default:i}}var s=t(Nl());function r(i){s.default(i)}})),yn=he(((e,t)=>{e.__esModule=!0;var s=st(),r={methodMap:[\"debug\",\"info\",\"warn\",\"error\"],level:\"info\",lookupLevel:function(n){if(typeof n==\"string\"){var o=s.indexOf(r.methodMap,n.toLowerCase());o>=0?n=o:n=parseInt(n,10)}return n},log:function(n){if(n=r.lookupLevel(n),typeof console<\"u\"&&r.lookupLevel(r.level)<=n){var o=r.methodMap[n];console[o]||(o=\"log\");for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];console[o].apply(console,f)}}};e.default=r,t.exports=e.default})),bn=he((e=>{e.__esModule=!0,e.createProtoAccessControl=n,e.resultIsAllowed=o,e.isPrototypeConstructor=c,e.resetLoggedProperties=u;function t(a){return a&&a.__esModule?a:{default:a}}var s=st(),r=t(yn()),i=Object.create(null);function n(a){var h=Object.create(null);h.__proto__=!1,s.extend(h,a.allowedProtoProperties);var l=Object.create(null);return l.constructor=!1,l.__defineGetter__=!1,l.__defineSetter__=!1,l.__lookupGetter__=!1,l.__lookupSetter__=!1,s.extend(l,a.allowedProtoMethods),{properties:{whitelist:h,defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l,defaultValue:a.allowProtoMethodsByDefault}}}function o(a,h,l){return f(typeof a==\"function\"?h.methods:h.properties,l)}function c(a,h,l){return h===\"constructor\"&&typeof l==\"function\"&&a===l.prototype}function f(a,h){return a.whitelist[h]!==void 0?a.whitelist[h]===!0:a.defaultValue!==void 0?a.defaultValue:(d(h),!1)}function d(a){i[a]!==!0&&(i[a]=!0,r.default.log(\"error\",'Handlebars: Access has been denied to resolve the property \"'+a+`\" because it is not an \"own property\" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function u(){Object.keys(i).forEach(function(a){delete i[a]})}})),ei=he((e=>{e.__esModule=!0,e.HandlebarsEnvironment=l;function t(g){return g&&g.__esModule?g:{default:g}}var s=st(),r=t(kt()),i=vn(),n=Dl(),o=t(yn()),c=bn(),f=\"4.7.10\";e.VERSION=f;var d=8;e.COMPILER_REVISION=d;var u=7;e.LAST_COMPATIBLE_COMPILER_REVISION=u;var a={1:\"<= 1.0.rc.2\",2:\"== 1.0.0-rc.3\",3:\"== 1.0.0-rc.4\",4:\"== 1.x.x\",5:\"== 2.0.0-alpha.x\",6:\">= 2.0.0-beta.1\",7:\">= 4.0.0 <4.3.0\",8:\">= 4.3.0\"};e.REVISION_CHANGES=a;var h=\"[object Object]\";function l(g,v,_){this.helpers=g||{},this.partials=v||{},this.decorators=_||{},i.registerDefaultHelpers(this),n.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:o.default,log:o.default.log,registerHelper:function(v,_){if(s.toString.call(v)===h){if(_)throw new r.default(\"Arg not supported with multiple helpers\");s.extend(this.helpers,v)}else this.helpers[v]=_},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,_){if(s.toString.call(v)===h)s.extend(this.partials,v);else{if(typeof _>\"u\")throw new r.default('Attempting to register a partial called \"'+v+'\" as undefined');this.partials[v]=_}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,_){if(s.toString.call(v)===h){if(_)throw new r.default(\"Arg not supported with multiple decorators\");s.extend(this.decorators,v)}else this.decorators[v]=_},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var p=o.default.log;e.log=p,e.createFrame=s.createFrame,e.logger=o.default})),Bl=he(((e,t)=>{e.__esModule=!0;function s(r){this.string=r}s.prototype.toString=s.prototype.toHTML=function(){return\"\"+this.string},e.default=s,t.exports=e.default})),$l=he((e=>{e.__esModule=!0,e.wrapHelper=t;function t(s,r){return typeof s!=\"function\"?s:function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=r(n),s.apply(this,arguments)}}})),Hl=he((e=>{e.__esModule=!0,e.checkRevision=d,e.template=u,e.wrapProgram=a,e.resolvePartial=h,e.invokePartial=l,e.noop=p;function t(m){return m&&m.__esModule?m:{default:m}}function s(m){if(m&&m.__esModule)return m;var b={};if(m!=null)for(var k in m)Object.prototype.hasOwnProperty.call(m,k)&&(b[k]=m[k]);return b.default=m,b}var r=s(st()),i=t(kt()),n=ei(),o=vn(),c=$l(),f=bn();function d(m){var b=m&&m[0]||1,k=n.COMPILER_REVISION;if(!(b>=n.LAST_COMPATIBLE_COMPILER_REVISION&&b<=n.COMPILER_REVISION))if(b<n.LAST_COMPATIBLE_COMPILER_REVISION){var w=n.REVISION_CHANGES[k],C=n.REVISION_CHANGES[b];throw new i.default(\"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (\"+w+\") or downgrade your runtime to an older version (\"+C+\").\")}else throw new i.default(\"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (\"+m[1]+\").\")}function u(m,b){if(!b)throw new i.default(\"No environment passed to template\");if(!m||!m.main)throw new i.default(\"Unknown template object: \"+typeof m);m.main.decorator=m.main_d,b.VM.checkRevision(m.compiler);var k=m.compiler&&m.compiler[0]===7;function w(P,A,E){E.hash&&(A=r.extend({},A,E.hash),E.ids&&(E.ids[0]=!0)),P=b.VM.resolvePartial.call(this,P,A,E),E.hooks=this.hooks,E.protoAccessControl=this.protoAccessControl;var B=b.VM.invokePartial.call(this,P,A,E);if(B==null&&r.isFunction(P))throw new i.default(\"The partial \"+E.name+\" returned no output: partials must return a string\");if(B==null&&b.compile){if(typeof P!=\"string\")throw new i.default(\"The partial \"+E.name+\" could not be compiled: partials must be strings or functions returning strings\");E.partials[E.name]=b.compile(P,m.compilerOptions,b),B=E.partials[E.name](A,E)}if(B!=null){if(E.indent){for(var q=B.split(`\n`),W=0,T=q.length;W<T&&!(!q[W]&&W+1===T);W++)q[W]=E.indent+q[W];B=q.join(`\n`)}return B}else throw new i.default(\"The partial \"+E.name+\" could not be compiled when running in runtime-only mode\")}var C={strict:function(A,E,B){if(!A||!(E in A))throw new i.default('\"'+E+'\" not defined in '+A,{loc:B});return C.lookupProperty(A,E)},lookupProperty:function(A,E){var B=A[E];if(B==null||Object.prototype.hasOwnProperty.call(A,E)&&!f.isPrototypeConstructor(A,E,B)||f.resultIsAllowed(B,C.protoAccessControl,E))return B},lookup:function(A,E){for(var B=A.length,q=0;q<B;q++){var W=A[q]&&C.lookupProperty(A[q],E);if(W!=null)return W}},lambda:function(A,E){return typeof A==\"function\"?A.call(E):A},escapeExpression:r.escapeExpression,invokePartial:w,fn:function(A){var E=m[A];return E.decorator=m[A+\"_d\"],E},programs:[],program:function(A,E,B,q,W){var T=this.programs[A],D=this.fn(A);return E||W||q||B?T=a(this,A,D,E,B,q,W):T||(T=this.programs[A]=a(this,A,D)),T},data:function(A,E){for(;A&&E--;)A=A._parent;return A},mergeIfNeeded:function(A,E){var B=A||E;return A&&E&&A!==E&&(B=r.extend({},E,A)),B},nullContext:Object.seal({}),noop:b.VM.noop,compilerInfo:m.compiler};function M(P){var A=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],E=A.data;M._setup(A),!A.partial&&m.useData&&(E=v(P,E));var B=void 0,q=m.useBlockParams?[]:void 0;m.useDepths&&(A.depths?B=P!=A.depths[0]?[P].concat(A.depths):A.depths:B=[P]);function W(T){return\"\"+m.main(C,T,C.helpers,C.partials,E,q,B)}return W=_(m.main,W,C,A.depths||[],E,q),W(P,A)}return M.isTop=!0,M._setup=function(P){if(P.partial)C.protoAccessControl=P.protoAccessControl,C.helpers=P.helpers,C.partials=P.partials,C.decorators=P.decorators,C.hooks=P.hooks;else{var A={};S(A,b.helpers,C),S(A,P.helpers,C),C.helpers=A,m.usePartial&&(C.partials=C.mergeIfNeeded(P.partials,b.partials)),(m.usePartial||m.useDecorators)&&(C.decorators=r.extend({},b.decorators,P.decorators)),C.hooks={},C.protoAccessControl=f.createProtoAccessControl(P);var E=P.allowCallsToHelperMissing||k;o.moveHelperToHooks(C,\"helperMissing\",E),o.moveHelperToHooks(C,\"blockHelperMissing\",E)}},M._child=function(P,A,E,B){if(m.useBlockParams&&!E)throw new i.default(\"must pass block params\");if(m.useDepths&&!B)throw new i.default(\"must pass parent depths\");return a(C,P,m[P],A,0,E,B)},M}function a(m,b,k,w,C,M,P){function A(E){var B=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],q=P;return P&&E!=P[0]&&!(E===m.nullContext&&P[0]===null)&&(q=[E].concat(P)),k(m,E,m.helpers,m.partials,B.data||w,M&&[B.blockParams].concat(M),q)}return A=_(k,A,m,P,w,M),A.program=b,A.depth=P?P.length:0,A.blockParams=C||0,A}function h(m,b,k){return m?typeof m!=\"function\"&&!k.name&&(k.name=m,m=g(k.partials,m)):k.name===\"@partial-block\"?m=g(k.data,\"partial-block\"):m=g(k.partials,k.name),m}function l(m,b,k){var w=g(k.data,\"partial-block\");k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var C=void 0;if(k.fn&&k.fn!==p&&(function(){k.data=n.createFrame(k.data);var M=k.fn;C=k.data[\"partial-block\"]=function(A){var E=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return E.data=n.createFrame(E.data),E.data[\"partial-block\"]=w,M(A,E)},M.partials&&(k.partials=r.extend({},k.partials,M.partials))})(),m===void 0&&C&&(m=C),m===void 0)throw new i.default(\"The partial \"+k.name+\" could not be found\");if(m instanceof Function)return m(b,k)}function p(){return\"\"}function g(m,b){if(m&&Object.prototype.hasOwnProperty.call(m,b))return m[b]}function v(m,b){return(!b||!(\"root\"in b))&&(b=b?n.createFrame(b):{},b.root=m),b}function _(m,b,k,w,C,M){if(m.decorator){var P={};b=m.decorator(b,P,k,w&&w[0],C,M,w),r.extend(b,P)}return b}function S(m,b,k){b&&Object.keys(b).forEach(function(w){var C=b[w];m[w]=y(C,k)})}function y(m,b){var k=b.lookupProperty;return c.wrapHelper(m,function(w){return w.lookupProperty=k,w})}})),_n=he(((e,t)=>{e.__esModule=!0,e.default=function(s){(function(){typeof globalThis!=\"object\"&&(Object.prototype.__defineGetter__(\"__magic__\",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var r=globalThis.Handlebars;s.noConflict=function(){return globalThis.Handlebars===s&&(globalThis.Handlebars=r),s}},t.exports=e.default})),ql=he(((e,t)=>{e.__esModule=!0;function s(h){return h&&h.__esModule?h:{default:h}}function r(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(l[p]=h[p]);return l.default=h,l}var i=r(ei()),n=s(Bl()),o=s(kt()),c=r(st()),f=r(Hl()),d=s(_n());function u(){var h=new i.HandlebarsEnvironment;return c.extend(h,i),h.SafeString=n.default,h.Exception=o.default,h.Utils=c,h.escapeExpression=c.escapeExpression,h.VM=f,h.template=function(l){return f.template(l,h)},h}var a=u();a.create=u,d.default(a),a.default=a,e.default=a,t.exports=e.default})),Sn=he(((e,t)=>{e.__esModule=!0;var s={helpers:{helperExpression:function(i){return i.type===\"SubExpression\"||(i.type===\"MustacheStatement\"||i.type===\"BlockStatement\")&&!!(i.params&&i.params.length||i.hash)},scopedId:function(i){return/^\\.|this\\b/.test(i.original)},simpleId:function(i){return i.parts.length===1&&!s.helpers.scopedId(i)&&!i.depth}}};e.default=s,t.exports=e.default})),Fl=he(((e,t)=>{e.__esModule=!0;var s=(function(){var r={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:\"error\",5:\"EOF\",14:\"COMMENT\",15:\"CONTENT\",18:\"END_RAW_BLOCK\",19:\"OPEN_RAW_BLOCK\",23:\"CLOSE_RAW_BLOCK\",29:\"OPEN_BLOCK\",33:\"CLOSE\",34:\"OPEN_INVERSE\",39:\"OPEN_INVERSE_CHAIN\",44:\"INVERSE\",47:\"OPEN_ENDBLOCK\",48:\"OPEN\",51:\"OPEN_UNESCAPED\",54:\"CLOSE_UNESCAPED\",55:\"OPEN_PARTIAL\",60:\"OPEN_PARTIAL_BLOCK\",65:\"OPEN_SEXPR\",68:\"CLOSE_SEXPR\",72:\"ID\",73:\"EQUALS\",75:\"OPEN_BLOCK_PARAMS\",77:\"CLOSE_BLOCK_PARAMS\",80:\"STRING\",81:\"NUMBER\",82:\"BOOLEAN\",83:\"UNDEFINED\",84:\"NULL\",85:\"DATA\",87:\"SEP\"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,c,f,d,u,a,h){var l=a.length-1;switch(u){case 1:return a[l-1];case 2:this.$=d.prepareProgram(a[l]);break;case 3:this.$=a[l];break;case 4:this.$=a[l];break;case 5:this.$=a[l];break;case 6:this.$=a[l];break;case 7:this.$=a[l];break;case 8:this.$=a[l];break;case 9:this.$={type:\"CommentStatement\",value:d.stripComment(a[l]),strip:d.stripFlags(a[l],a[l]),loc:d.locInfo(this._$)};break;case 10:this.$={type:\"ContentStatement\",original:a[l],value:a[l],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(a[l-2],a[l-1],a[l],this._$);break;case 12:this.$={path:a[l-3],params:a[l-2],hash:a[l-1]};break;case 13:this.$=d.prepareBlock(a[l-3],a[l-2],a[l-1],a[l],!1,this._$);break;case 14:this.$=d.prepareBlock(a[l-3],a[l-2],a[l-1],a[l],!0,this._$);break;case 15:this.$={open:a[l-5],path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:d.stripFlags(a[l-5],a[l])};break;case 16:this.$={path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:d.stripFlags(a[l-5],a[l])};break;case 17:this.$={path:a[l-4],params:a[l-3],hash:a[l-2],blockParams:a[l-1],strip:d.stripFlags(a[l-5],a[l])};break;case 18:this.$={strip:d.stripFlags(a[l-1],a[l-1]),program:a[l]};break;case 19:var p=d.prepareBlock(a[l-2],a[l-1],a[l],a[l],!1,this._$),g=d.prepareProgram([p],a[l-1].loc);g.chained=!0,this.$={strip:a[l-2].strip,program:g,chain:!0};break;case 20:this.$=a[l];break;case 21:this.$={path:a[l-1],strip:d.stripFlags(a[l-2],a[l])};break;case 22:this.$=d.prepareMustache(a[l-3],a[l-2],a[l-1],a[l-4],d.stripFlags(a[l-4],a[l]),this._$);break;case 23:this.$=d.prepareMustache(a[l-3],a[l-2],a[l-1],a[l-4],d.stripFlags(a[l-4],a[l]),this._$);break;case 24:this.$={type:\"PartialStatement\",name:a[l-3],params:a[l-2],hash:a[l-1],indent:\"\",strip:d.stripFlags(a[l-4],a[l]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(a[l-2],a[l-1],a[l],this._$);break;case 26:this.$={path:a[l-3],params:a[l-2],hash:a[l-1],strip:d.stripFlags(a[l-4],a[l])};break;case 27:this.$=a[l];break;case 28:this.$=a[l];break;case 29:this.$={type:\"SubExpression\",path:a[l-3],params:a[l-2],hash:a[l-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:\"Hash\",pairs:a[l],loc:d.locInfo(this._$)};break;case 31:this.$={type:\"HashPair\",key:d.id(a[l-2]),value:a[l],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(a[l-1]);break;case 33:this.$=a[l];break;case 34:this.$=a[l];break;case 35:this.$={type:\"StringLiteral\",value:a[l],original:a[l],loc:d.locInfo(this._$)};break;case 36:this.$={type:\"NumberLiteral\",value:Number(a[l]),original:Number(a[l]),loc:d.locInfo(this._$)};break;case 37:this.$={type:\"BooleanLiteral\",value:a[l]===\"true\",original:a[l]===\"true\",loc:d.locInfo(this._$)};break;case 38:this.$={type:\"UndefinedLiteral\",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:\"NullLiteral\",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=a[l];break;case 41:this.$=a[l];break;case 42:this.$=d.preparePath(!0,a[l],this._$);break;case 43:this.$=d.preparePath(!1,a[l],this._$);break;case 44:a[l-2].push({part:d.id(a[l]),original:a[l],separator:a[l-1]}),this.$=a[l-2];break;case 45:this.$=[{part:d.id(a[l]),original:a[l]}];break;case 46:this.$=[];break;case 47:a[l-1].push(a[l]);break;case 48:this.$=[];break;case 49:a[l-1].push(a[l]);break;case 50:this.$=[];break;case 51:a[l-1].push(a[l]);break;case 58:this.$=[];break;case 59:a[l-1].push(a[l]);break;case 64:this.$=[];break;case 65:a[l-1].push(a[l]);break;case 70:this.$=[];break;case 71:a[l-1].push(a[l]);break;case 78:this.$=[];break;case 79:a[l-1].push(a[l]);break;case 82:this.$=[];break;case 83:a[l-1].push(a[l]);break;case 86:this.$=[];break;case 87:a[l-1].push(a[l]);break;case 90:this.$=[];break;case 91:a[l-1].push(a[l]);break;case 94:this.$=[];break;case 95:a[l-1].push(a[l]);break;case 98:this.$=[a[l]];break;case 99:a[l-1].push(a[l]);break;case 100:this.$=[a[l]];break;case 101:a[l-1].push(a[l])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,c){throw new Error(o)},parse:function(o){var c=this,f=[0],d=[null],u=[],a=this.table,h=\"\",l=0,p=0,g=0;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>\"u\"&&(this.lexer.yylloc={});var v=this.lexer.yylloc;u.push(v);var _=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError==\"function\"&&(this.parseError=this.yy.parseError);function S(){var q=c.lexer.lex()||1;return typeof q!=\"number\"&&(q=c.symbols_[q]||q),q}for(var y,m,b,k,w,C={},M,P,A,E;;){if(b=f[f.length-1],this.defaultActions[b]?k=this.defaultActions[b]:((y===null||typeof y>\"u\")&&(y=S()),k=a[b]&&a[b][y]),typeof k>\"u\"||!k.length||!k[0]){var B=\"\";if(!g){E=[];for(M in a[b])this.terminals_[M]&&M>2&&E.push(\"'\"+this.terminals_[M]+\"'\");this.lexer.showPosition?B=\"Parse error on line \"+(l+1)+`:\n`+this.lexer.showPosition()+`\nExpecting `+E.join(\", \")+\", got '\"+(this.terminals_[y]||y)+\"'\":B=\"Parse error on line \"+(l+1)+\": Unexpected \"+(y==1?\"end of input\":\"'\"+(this.terminals_[y]||y)+\"'\"),this.parseError(B,{text:this.lexer.match,token:this.terminals_[y]||y,line:this.lexer.yylineno,loc:v,expected:E})}}if(k[0]instanceof Array&&k.length>1)throw new Error(\"Parse Error: multiple actions possible at state: \"+b+\", token: \"+y);switch(k[0]){case 1:f.push(y),d.push(this.lexer.yytext),u.push(this.lexer.yylloc),f.push(k[1]),y=null,m?(y=m,m=null):(p=this.lexer.yyleng,h=this.lexer.yytext,l=this.lexer.yylineno,v=this.lexer.yylloc,g>0&&g--);break;case 2:if(P=this.productions_[k[1]][1],C.$=d[d.length-P],C._$={first_line:u[u.length-(P||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(P||1)].first_column,last_column:u[u.length-1].last_column},_&&(C._$.range=[u[u.length-(P||1)].range[0],u[u.length-1].range[1]]),w=this.performAction.call(C,h,p,l,this.yy,k[1],d,u),typeof w<\"u\")return w;P&&(f=f.slice(0,-1*P*2),d=d.slice(0,-1*P),u=u.slice(0,-1*P)),f.push(this.productions_[k[1]][0]),d.push(C.$),u.push(C._$),A=a[f[f.length-2]][f[f.length-1]],f.push(A);break;case 3:return!0}}return!0}};r.lexer=(function(){var n={EOF:1,parseError:function(c,f){if(this.yy.parser)this.yy.parser.parseError(c,f);else throw new Error(c)},setInput:function(c){return this._input=c,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=\"\",this.conditionStack=[\"INITIAL\"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var c=this._input[0];return this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c,c.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},unput:function(c){var f=c.length,d=c.split(/(?:\\r\\n?|\\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f-1),this.offset-=f;var u=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===u.length?this.yylloc.first_column:0)+u[u.length-d.length].length-d[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-f]),this},more:function(){return this._more=!0,this},less:function(c){this.unput(this.match.slice(c))},pastInput:function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?\"...\":\"\")+c.substr(-20).replace(/\\n/g,\"\")},upcomingInput:function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?\"...\":\"\")).replace(/\\n/g,\"\")},showPosition:function(){var c=this.pastInput(),f=new Array(c.length+1).join(\"-\");return c+this.upcomingInput()+`\n`+f+\"^\"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,f,d,u,a;this._more||(this.yytext=\"\",this.match=\"\");for(var h=this._currentRules(),l=0;l<h.length&&(d=this._input.match(this.rules[h[l]]),!(d&&(!f||d[0].length>f[0].length)&&(f=d,u=l,!this.options.flex)));l++);return f?(a=f[0].match(/(?:\\r\\n?|\\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(f[0].length),this.matched+=f[0],c=this.performAction.call(this,this.yy,this,h[u],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c||void 0):this._input===\"\"?this.EOF:this.parseError(\"Lexical error on line \"+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:\"\",token:null,line:this.yylineno})},lex:function(){var c=this.next();return typeof c<\"u\"?c:this.lex()},begin:function(c){this.conditionStack.push(c)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(c){this.begin(c)}};return n.options={},n.performAction=function(c,f,d,u){function a(h,l){return f.yytext=f.yytext.substring(h,f.yyleng-l+h)}switch(d){case 0:if(f.yytext.slice(-2)===\"\\\\\\\\\"?(a(0,1),this.begin(\"mu\")):f.yytext.slice(-1)===\"\\\\\"?(a(0,1),this.begin(\"emu\")):this.begin(\"mu\"),f.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(\"raw\"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===\"raw\"?15:(a(5,9),\"END_RAW_BLOCK\");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(\"raw\"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(f.yytext),this.popState(),this.begin(\"com\");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return f.yytext=a(1,2).replace(/\\\\\"/g,'\"'),80;case 32:return f.yytext=a(1,2).replace(/\\\\'/g,\"'\"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return f.yytext=f.yytext.replace(/\\\\([\\\\\\]])/g,\"$1\"),72;case 43:return\"INVALID\";case 44:return 5}},n.rules=[/^(?:[^\\x00]*?(?=(\\{\\{)))/,/^(?:[^\\x00]+)/,/^(?:[^\\x00]{2,}?(?=(\\{\\{|\\\\\\{\\{|\\\\\\\\\\{\\{|$)))/,/^(?:\\{\\{\\{\\{(?=[^\\/]))/,/^(?:\\{\\{\\{\\{\\/[^\\s!\"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=[=}\\s\\/.])\\}\\}\\}\\})/,/^(?:[^\\x00]+?(?=(\\{\\{\\{\\{)))/,/^(?:[\\s\\S]*?--(~)?\\}\\})/,/^(?:\\()/,/^(?:\\))/,/^(?:\\{\\{\\{\\{)/,/^(?:\\}\\}\\}\\})/,/^(?:\\{\\{(~)?>)/,/^(?:\\{\\{(~)?#>)/,/^(?:\\{\\{(~)?#\\*?)/,/^(?:\\{\\{(~)?\\/)/,/^(?:\\{\\{(~)?\\^\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\s*else\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\^)/,/^(?:\\{\\{(~)?\\s*else\\b)/,/^(?:\\{\\{(~)?\\{)/,/^(?:\\{\\{(~)?&)/,/^(?:\\{\\{(~)?!--)/,/^(?:\\{\\{(~)?![\\s\\S]*?\\}\\})/,/^(?:\\{\\{(~)?\\*?)/,/^(?:=)/,/^(?:\\.\\.)/,/^(?:\\.(?=([=~}\\s\\/.)|])))/,/^(?:[\\/.])/,/^(?:\\s+)/,/^(?:\\}(~)?\\}\\})/,/^(?:(~)?\\}\\})/,/^(?:\"(\\\\[\"]|[^\"])*\")/,/^(?:'(\\\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\\s)])))/,/^(?:false(?=([~}\\s)])))/,/^(?:undefined(?=([~}\\s)])))/,/^(?:null(?=([~}\\s)])))/,/^(?:-?[0-9]+(?:\\.[0-9]+)?(?=([~}\\s)])))/,/^(?:as\\s+\\|)/,/^(?:\\|)/,/^(?:([^\\s!\"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=([=~}\\s\\/.)|]))))/,/^(?:\\[(\\\\\\]|[^\\]])*\\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i})();e.default=s,t.exports=e.default})),kn=he((e=>{e.__esModule=!0;var t=[\"Program\",\"BlockStatement\",\"DecoratorBlock\",\"PartialStatement\",\"PartialBlockStatement\",\"Decorator\",\"MustacheStatement\",\"ContentStatement\",\"CommentStatement\",\"SubExpression\",\"PathExpression\",\"StringLiteral\",\"NumberLiteral\",\"BooleanLiteral\",\"UndefinedLiteral\",\"NullLiteral\",\"Hash\",\"HashPair\"];e.NODE_TYPES=t})),wn=he(((e,t)=>{e.__esModule=!0;function s(a){return a&&a.__esModule?a:{default:a}}var r=s(kt()),i=st(),n=kn();function o(){this.parents=[]}function c(a,h){return i.indexOf(n.NODE_TYPES,h)!==-1||!(h in o.prototype)&&typeof a[h]==\"function\"}o.prototype={constructor:o,mutating:!1,acceptKey:function(h,l){var p=this.accept(h[l]);if(this.mutating){if(p&&!c(this,p.type))throw new r.default('Unexpected node type \"'+p.type+'\" found when accepting '+l+\" on \"+h.type);h[l]=p}},acceptRequired:function(h,l){if(this.acceptKey(h,l),!h[l])throw new r.default(h.type+\" requires \"+l)},acceptArray:function(h){for(var l=0,p=h.length;l<p;l++)this.acceptKey(h,l),h[l]||(h.splice(l,1),l--,p--)},accept:function(h){if(h){if(!c(this,h.type)||!this[h.type])throw new r.default(\"Unknown type: \"+h.type,h);this.current&&this.parents.unshift(this.current),this.current=h;var l=this[h.type](h);if(this.current=this.parents.shift(),!this.mutating||l)return l;if(l!==!1)return h}},Program:function(h){this.acceptArray(h.body)},MustacheStatement:f,Decorator:f,BlockStatement:d,DecoratorBlock:d,PartialStatement:u,PartialBlockStatement:function(h){u.call(this,h),this.acceptKey(h,\"program\")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:f,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(h){this.acceptArray(h.pairs)},HashPair:function(h){this.acceptRequired(h,\"value\")}};function f(a){this.acceptRequired(a,\"path\"),this.acceptArray(a.params),this.acceptKey(a,\"hash\")}function d(a){f.call(this,a),this.acceptKey(a,\"program\"),this.acceptKey(a,\"inverse\")}function u(a){this.acceptRequired(a,\"name\"),this.acceptArray(a.params),this.acceptKey(a,\"hash\")}e.default=o,t.exports=e.default})),Vl=he(((e,t)=>{e.__esModule=!0;function s(d){return d&&d.__esModule?d:{default:d}}var r=s(wn());function i(){var d=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=d}i.prototype=new r.default,i.prototype.Program=function(d){var u=!this.options.ignoreStandalone,a=!this.isRootSeen;this.isRootSeen=!0;for(var h=d.body,l=0,p=h.length;l<p;l++){var g=h[l],v=this.accept(g);if(v){var _=n(h,l,a),S=o(h,l,a),y=v.openStandalone&&_,m=v.closeStandalone&&S,b=v.inlineStandalone&&_&&S;v.close&&c(h,l,!0),v.open&&f(h,l,!0),u&&b&&(c(h,l),f(h,l)&&g.type===\"PartialStatement\"&&(g.indent=/(?:^|[^ \\t])([ \\t]+)$/.exec(h[l-1].original)[1])),u&&y&&(c((g.program||g.inverse).body),f(h,l)),u&&m&&(c(h,l),f((g.inverse||g.program).body))}}return d},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(d){this.accept(d.program),this.accept(d.inverse);var u=d.program||d.inverse,a=d.program&&d.inverse,h=a,l=a;if(a&&a.chained)for(h=a.body[0].program;l.chained;)l=l.body[l.body.length-1].program;var p={open:d.openStrip.open,close:d.closeStrip.close,openStandalone:o(u.body),closeStandalone:n((h||u).body)};if(d.openStrip.close&&c(u.body,null,!0),a){var g=d.inverseStrip;g.open&&f(u.body,null,!0),g.close&&c(h.body,null,!0),d.closeStrip.open&&f(l.body,null,!0),!this.options.ignoreStandalone&&n(u.body)&&o(h.body)&&(f(u.body),c(h.body))}else d.closeStrip.open&&f(u.body,null,!0);return p},i.prototype.Decorator=i.prototype.MustacheStatement=function(d){return d.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(d){var u=d.strip||{};return{inlineStandalone:!0,open:u.open,close:u.close}};function n(d,u,a){u===void 0&&(u=d.length);var h=d[u-1],l=d[u-2];if(!h)return a;if(h.type===\"ContentStatement\")return(l||!a?/(?:^|\\S)[^\\S\\n]*\\n\\s*$/:/^\\s*$|(?:^|\\S)[^\\S\\n]*\\n\\s*$/).test(h.original)}function o(d,u,a){u===void 0&&(u=-1);var h=d[u+1],l=d[u+2];if(!h)return a;if(h.type===\"ContentStatement\")return(l||!a?/^\\s*?\\r?\\n/:/^\\s*?(\\r?\\n|$)/).test(h.original)}function c(d,u,a){var h=d[u==null?0:u+1];if(!(!h||h.type!==\"ContentStatement\"||!a&&h.rightStripped)){var l=h.value;h.value=h.value.replace(a?/^\\s+/:/^[ \\t]*\\r?\\n?/,\"\"),h.rightStripped=h.value!==l}}function f(d,u,a){var h=d[u==null?d.length-1:u-1];if(!(!h||h.type!==\"ContentStatement\"||!a&&h.leftStripped)){var l=h.value;return h.value=h.value.replace(a?/(^|\\S)\\s+$/:/(^|[^ \\t])[ \\t]+$/,\"$1\"),h.leftStripped=h.value!==l,h.leftStripped}}e.default=i,t.exports=e.default})),zl=he((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=n,e.stripFlags=o,e.stripComment=c,e.preparePath=f,e.prepareMustache=d,e.prepareRawBlock=u,e.prepareBlock=a,e.prepareProgram=h,e.preparePartialBlock=l;function t(p){return p&&p.__esModule?p:{default:p}}var s=t(kt());function r(p,g){if(g=g.path?g.path.original:g,p.path.original!==g){var v={loc:p.path.loc};throw new s.default(p.path.original+\" doesn't match \"+g,v)}}function i(p,g){this.source=p,this.start={line:g.first_line,column:g.first_column},this.end={line:g.last_line,column:g.last_column}}function n(p){return/^\\[.*\\]$/.test(p)?p.substring(1,p.length-1):p}function o(p,g){return{open:p.charAt(2)===\"~\",close:g.charAt(g.length-3)===\"~\"}}function c(p){return p.replace(/^\\{\\{~?!-?-?/,\"\").replace(/-?-?~?\\}\\}$/,\"\")}function f(p,g,v){v=this.locInfo(v);for(var _=p?\"@\":\"\",S=[],y=0,m=0,b=g.length;m<b;m++){var k=g[m].part,w=g[m].original!==k;if(_+=(g[m].separator||\"\")+k,!w&&(k===\"..\"||k===\".\"||k===\"this\")){if(S.length>0)throw new s.default(\"Invalid path: \"+_,{loc:v});k===\"..\"&&y++}else S.push(k)}return{type:\"PathExpression\",data:p,depth:y,parts:S,original:_,loc:v}}function d(p,g,v,_,S,y){var m=_.charAt(3)||_.charAt(2),b=m!==\"{\"&&m!==\"&\";return{type:/\\*/.test(_)?\"Decorator\":\"MustacheStatement\",path:p,params:g,hash:v,escaped:b,strip:S,loc:this.locInfo(y)}}function u(p,g,v,_){r(p,v),_=this.locInfo(_);var S={type:\"Program\",body:g,strip:{},loc:_};return{type:\"BlockStatement\",path:p.path,params:p.params,hash:p.hash,program:S,openStrip:{},inverseStrip:{},closeStrip:{},loc:_}}function a(p,g,v,_,S,y){_&&_.path&&r(p,_);var m=/\\*/.test(p.open);g.blockParams=p.blockParams;var b=void 0,k=void 0;if(v){if(m)throw new s.default(\"Unexpected inverse block on decorator\",v);v.chain&&(v.program.body[0].closeStrip=_.strip),k=v.strip,b=v.program}return S&&(S=b,b=g,g=S),{type:m?\"DecoratorBlock\":\"BlockStatement\",path:p.path,params:p.params,hash:p.hash,program:g,inverse:b,openStrip:p.strip,inverseStrip:k,closeStrip:_&&_.strip,loc:this.locInfo(y)}}function h(p,g){if(!g&&p.length){var v=p[0].loc,_=p[p.length-1].loc;v&&_&&(g={source:v.source,start:{line:v.start.line,column:v.start.column},end:{line:_.end.line,column:_.end.column}})}return{type:\"Program\",body:p,strip:{},loc:g}}function l(p,g,v,_){return r(p,v),{type:\"PartialBlockStatement\",name:p.path,params:p.params,hash:p.hash,program:g,openStrip:p.strip,closeStrip:v&&v.strip,loc:this.locInfo(_)}}})),Ul=he((e=>{e.__esModule=!0,e.parseWithoutProcessing=f,e.parse=d;function t(u){if(u&&u.__esModule)return u;var a={};if(u!=null)for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(a[h]=u[h]);return a.default=u,a}function s(u){return u&&u.__esModule?u:{default:u}}var r=s(Fl()),i=s(Vl()),n=t(zl()),o=st();e.parser=r.default;var c={};o.extend(c,n);function f(u,a){return u.type===\"Program\"?u:(r.default.yy=c,c.locInfo=function(h){return new c.SourceLocation(a&&a.srcName,h)},r.default.parse(u))}function d(u,a){var h=f(u,a);return new i.default(a).accept(h)}})),Wl=he((e=>{e.__esModule=!0,e.Compiler=c,e.precompile=f,e.compile=d;function t(S){return S&&S.__esModule?S:{default:S}}var s=t(kt()),r=st(),i=t(Sn()),n=kn(),o=[].slice;function c(){}c.prototype={compiler:c,equals:function(y){var m=this.opcodes.length;if(y.opcodes.length!==m)return!1;for(var b=0;b<m;b++){var k=this.opcodes[b],w=y.opcodes[b];if(k.opcode!==w.opcode||!v(k.args,w.args))return!1}m=this.children.length;for(var b=0;b<m;b++)if(!this.children[b].equals(y.children[b]))return!1;return!0},guid:0,compile:function(y,m){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=m,this.stringParams=m.stringParams,this.trackIds=m.trackIds,m.blockParams=m.blockParams||[],m.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},m.knownHelpers),this.accept(y)},compileProgram:function(y){var m=new this.compiler().compile(y,this.options),b=this.guid++;return this.usePartial=this.usePartial||m.usePartial,this.children[b]=m,this.useDepths=this.useDepths||m.useDepths,b},accept:function(y){if(r.indexOf(n.NODE_TYPES,y.type)===-1||!this[y.type])throw new s.default(\"Unknown type: \"+y.type,y);this.sourceNode.unshift(y);var m=this[y.type](y);return this.sourceNode.shift(),m},Program:function(y){g(y),this.options.blockParams.unshift(y.blockParams);for(var m=y.body,b=m.length,k=0;k<b;k++)this.accept(m[k]);return this.options.blockParams.shift(),this.isSimple=b===1,this.blockParams=y.blockParams?y.blockParams.length:0,this},BlockStatement:function(y){_(y);var m=y.program,b=y.inverse;m=m&&this.compileProgram(m),b=b&&this.compileProgram(b);var k=this.classifySexpr(y);k===\"helper\"?this.helperSexpr(y,m,b):k===\"simple\"?(this.simpleSexpr(y),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",b),this.opcode(\"emptyHash\"),this.opcode(\"blockValue\",y.path.original)):(this.ambiguousSexpr(y,m,b),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",b),this.opcode(\"emptyHash\"),this.opcode(\"ambiguousBlockValue\")),this.opcode(\"append\")},DecoratorBlock:function(y){var m=y.program&&this.compileProgram(y.program),b=this.setupFullMustacheParams(y,m,void 0),k=y.path;this.useDecorators=!0,this.opcode(\"registerDecorator\",b.length,k.original)},PartialStatement:function(y){this.usePartial=!0;var m=y.program;m&&(m=this.compileProgram(y.program));var b=y.params;if(b.length>1)throw new s.default(\"Unsupported number of partial arguments: \"+b.length,y);b.length||(this.options.explicitPartialContext?this.opcode(\"pushLiteral\",\"undefined\"):b.push({type:\"PathExpression\",parts:[],depth:0}));var k=y.name.original,w=y.name.type===\"SubExpression\";w&&this.accept(y.name),this.setupFullMustacheParams(y,m,void 0,!0);var C=y.indent||\"\";this.options.preventIndent&&C&&(this.opcode(\"appendContent\",C),C=\"\"),this.opcode(\"invokePartial\",w,k,C),this.opcode(\"append\")},PartialBlockStatement:function(y){this.PartialStatement(y)},MustacheStatement:function(y){this.SubExpression(y),y.escaped&&!this.options.noEscape?this.opcode(\"appendEscaped\"):this.opcode(\"append\")},Decorator:function(y){this.DecoratorBlock(y)},ContentStatement:function(y){if(y.value!=null&&typeof y.value!=\"string\")throw u(y,\"value must be a string\");y.value&&this.opcode(\"appendContent\",y.value)},CommentStatement:function(){},SubExpression:function(y){_(y);var m=this.classifySexpr(y);m===\"simple\"?this.simpleSexpr(y):m===\"helper\"?this.helperSexpr(y):this.ambiguousSexpr(y)},ambiguousSexpr:function(y,m,b){var k=y.path,w=k.parts[0],C=m!=null||b!=null;this.opcode(\"getContext\",a(k)),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",b),k.strict=!0,this.accept(k),this.opcode(\"invokeAmbiguous\",w,C)},simpleSexpr:function(y){var m=y.path;m.strict=!0,this.accept(m),this.opcode(\"resolvePossibleLambda\")},helperSexpr:function(y,m,b){var k=this.setupFullMustacheParams(y,m,b),w=y.path,C=w.parts[0];if(this.options.knownHelpers[C])this.opcode(\"invokeKnownHelper\",k.length,C);else{if(this.options.knownHelpersOnly)throw new s.default(\"You specified knownHelpersOnly, but used the unknown helper \"+C,y);w.strict=!0,w.falsy=!0,this.accept(w),this.opcode(\"invokeHelper\",k.length,w.original,i.default.helpers.simpleId(w))}},PathExpression:function(y){var m=a(y),b=p(y);this.addDepth(m),this.opcode(\"getContext\",m);var k=b[0],w=i.default.helpers.scopedId(y),C=!m&&!w&&this.blockParamIndex(k);C?this.opcode(\"lookupBlockParam\",C,b):k?y.data?(this.options.data=!0,this.opcode(\"lookupData\",m,b,y.strict)):this.opcode(\"lookupOnContext\",b,y.falsy,y.strict,w):this.opcode(\"pushContext\")},StringLiteral:function(y){h(y),this.opcode(\"pushString\",y.value)},NumberLiteral:function(y){h(y),this.opcode(\"pushLiteral\",y.value)},BooleanLiteral:function(y){h(y),this.opcode(\"pushLiteral\",y.value)},UndefinedLiteral:function(){this.opcode(\"pushLiteral\",\"undefined\")},NullLiteral:function(){this.opcode(\"pushLiteral\",\"null\")},Hash:function(y){var m=y.pairs,b=0,k=void 0;if(!r.isArray(m))throw u(y,\"pairs must be an array\");k=m.length;for(var w=0;w<k;w++)if(!m[w]||typeof m[w].key!=\"string\")throw u(y,\"pair keys must be strings\");for(this.opcode(\"pushHash\");b<k;b++)this.pushParam(m[b].value);for(;b--;)this.opcode(\"assignToHash\",m[b].key);this.opcode(\"popHash\")},opcode:function(y){this.opcodes.push({opcode:y,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(y){y&&(this.useDepths=!0)},classifySexpr:function(y){p(y.path);var m=i.default.helpers.simpleId(y.path),b=m&&!!this.blockParamIndex(y.path.parts[0]),k=!b&&i.default.helpers.helperExpression(y),w=!b&&(k||m);if(w&&!k){var C=y.path.parts[0],M=this.options;M.knownHelpers[C]?k=!0:M.knownHelpersOnly&&(w=!1)}return k?\"helper\":w?\"ambiguous\":\"simple\"},pushParams:function(y){for(var m=0,b=y.length;m<b;m++)this.pushParam(y[m])},pushParam:function(y){h(y);var m=y.value!=null?y.value:y.original||\"\",b=a(y);if(this.stringParams)typeof m!=\"number\"&&typeof m!=\"boolean\"&&(m=String(m)),m.replace&&(m=m.replace(/^(\\.?\\.\\/)*/g,\"\").replace(/\\//g,\".\")),b&&this.addDepth(b),this.opcode(\"getContext\",b),this.opcode(\"pushStringParam\",m,y.type),y.type===\"SubExpression\"&&this.accept(y);else{if(this.trackIds){var k=void 0;if(y.parts&&!i.default.helpers.scopedId(y)&&!b&&(k=this.blockParamIndex(p(y)[0])),k){var w=y.parts.slice(1).join(\".\");this.opcode(\"pushId\",\"BlockParam\",k,w)}else m=y.original||m,m.replace&&(m=m.replace(/^this(?:\\.|$)/,\"\").replace(/^\\.\\//,\"\").replace(/^\\.$/,\"\")),this.opcode(\"pushId\",y.type,m)}this.accept(y)}},setupFullMustacheParams:function(y,m,b,k){var w=y.params;return this.pushParams(w),this.opcode(\"pushProgram\",m),this.opcode(\"pushProgram\",b),y.hash?this.accept(y.hash):this.opcode(\"emptyHash\",k),w},blockParamIndex:function(y){for(var m=0,b=this.options.blockParams.length;m<b;m++){var k=this.options.blockParams[m],w=k&&r.indexOf(k,y);if(k&&w>=0)return[m,w]}}};function f(S,y,m){if(S==null||typeof S!=\"string\"&&S.type!==\"Program\")throw new s.default(\"You must pass a string or Handlebars AST to Handlebars.precompile. You passed \"+S);y=y||{},\"data\"in y||(y.data=!0),y.compat&&(y.useDepths=!0);var b=m.parse(S,y),k=new m.Compiler().compile(b,y);return new m.JavaScriptCompiler().compile(k,y)}function d(S,y,m){if(y===void 0&&(y={}),S==null||typeof S!=\"string\"&&S.type!==\"Program\")throw new s.default(\"You must pass a string or Handlebars AST to Handlebars.compile. You passed \"+S);y=r.extend({},y),\"data\"in y||(y.data=!0),y.compat&&(y.useDepths=!0);var b=void 0;function k(){var C=m.parse(S,y),M=new m.Compiler().compile(C,y),P=new m.JavaScriptCompiler().compile(M,y,void 0,!0);return m.template(P)}function w(C,M){return b||(b=k()),b.call(this,C,M)}return w._setup=function(C){return b||(b=k()),b._setup(C)},w._child=function(C,M,P,A){return b||(b=k()),b._child(C,M,P,A)},w}function u(S,y){return new s.default(\"Invalid AST: \"+S.type+\" \"+y,S)}function a(S){var y=S.depth;if(y==null)return 0;if(typeof y!=\"number\"||!isFinite(y)||Math.floor(y)!==y||y<0)throw u(S,\"depth must be a non-negative integer\");return y}function h(S){var y=S.value;if(S.type===\"StringLiteral\"&&typeof y!=\"string\")throw u(S,\"value must be a string\");if(S.type===\"NumberLiteral\"&&typeof y!=\"number\")throw u(S,\"value must be a number\");if(S.type===\"BooleanLiteral\"&&typeof y!=\"boolean\")throw u(S,\"value must be a boolean\")}function l(S,y,m){if(!r.isArray(y))throw u(S,m+\" must be an array\");for(var b=0;b<y.length;b++)if(typeof y[b]!=\"string\")throw u(S,m+\" must only contain strings\");return y}function p(S){return l(S,S.parts,\"parts\")}function g(S){S.blockParams!=null&&l(S,S.blockParams,\"blockParams\")}function v(S,y){if(S===y)return!0;if(r.isArray(S)&&r.isArray(y)&&S.length===y.length){for(var m=0;m<S.length;m++)if(!v(S[m],y[m]))return!1;return!0}}function _(S){if(!S.path.parts){var y=S.path;S.path={type:\"PathExpression\",data:!1,depth:0,parts:[y.original+\"\"],original:y.original+\"\",loc:y.loc}}}})),Xl=he((e=>{var t=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");e.encode=function(s){if(0<=s&&s<t.length)return t[s];throw new TypeError(\"Must be between 0 and 63: \"+s)},e.decode=function(s){var r=65,i=90,n=97,o=122,c=48,f=57,d=43,u=47,a=26,h=52;return r<=s&&s<=i?s-r:n<=s&&s<=o?s-n+a:c<=s&&s<=f?s-c+h:s==d?62:s==u?63:-1}})),xn=he((e=>{var t=Xl(),s=5,r=1<<s,i=r-1,n=r;function o(f){return f<0?(-f<<1)+1:(f<<1)+0}function c(f){var d=(f&1)===1,u=f>>1;return d?-u:u}e.encode=function(d){var u=\"\",a,h=o(d);do a=h&i,h>>>=s,h>0&&(a|=n),u+=t.encode(a);while(h>0);return u},e.decode=function(d,u,a){var h=d.length,l=0,p=0,g,v;do{if(u>=h)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(v=t.decode(d.charCodeAt(u++)),v===-1)throw new Error(\"Invalid base64 digit: \"+d.charAt(u-1));g=!!(v&n),v&=i,l=l+(v<<p),p+=s}while(g);a.value=c(l),a.rest=u}})),Is=he((e=>{function t(m,b,k){if(b in m)return m[b];if(arguments.length===3)return k;throw new Error('\"'+b+'\" is a required argument.')}e.getArg=t;var s=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,r=/^data:.+\\,.+$/;function i(m){var b=m.match(s);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=i;function n(m){var b=\"\";return m.scheme&&(b+=m.scheme+\":\"),b+=\"//\",m.auth&&(b+=m.auth+\"@\"),m.host&&(b+=m.host),m.port&&(b+=\":\"+m.port),m.path&&(b+=m.path),b}e.urlGenerate=n;function o(m){var b=m,k=i(m);if(k){if(!k.path)return m;b=k.path}for(var w=e.isAbsolute(b),C=b.split(/\\/+/),M,P=0,A=C.length-1;A>=0;A--)M=C[A],M===\".\"?C.splice(A,1):M===\"..\"?P++:P>0&&(M===\"\"?(C.splice(A+1,P),P=0):(C.splice(A,2),P--));return b=C.join(\"/\"),b===\"\"&&(b=w?\"/\":\".\"),k?(k.path=b,n(k)):b}e.normalize=o;function c(m,b){m===\"\"&&(m=\".\"),b===\"\"&&(b=\".\");var k=i(b),w=i(m);if(w&&(m=w.path||\"/\"),k&&!k.scheme)return w&&(k.scheme=w.scheme),n(k);if(k||b.match(r))return b;if(w&&!w.host&&!w.path)return w.host=b,n(w);var C=b.charAt(0)===\"/\"?b:o(m.replace(/\\/+$/,\"\")+\"/\"+b);return w?(w.path=C,n(w)):C}e.join=c,e.isAbsolute=function(m){return m.charAt(0)===\"/\"||s.test(m)};function f(m,b){m===\"\"&&(m=\".\"),m=m.replace(/\\/$/,\"\");for(var k=0;b.indexOf(m+\"/\")!==0;){var w=m.lastIndexOf(\"/\");if(w<0||(m=m.slice(0,w),m.match(/^([^\\/]+:\\/)?\\/*$/)))return b;++k}return Array(k+1).join(\"../\")+b.substr(m.length+1)}e.relative=f;var d=(function(){return!(\"__proto__\"in Object.create(null))})();function u(m){return m}function a(m){return l(m)?\"$\"+m:m}e.toSetString=d?u:a;function h(m){return l(m)?m.slice(1):m}e.fromSetString=d?u:h;function l(m){if(!m)return!1;var b=m.length;if(b<9||m.charCodeAt(b-1)!==95||m.charCodeAt(b-2)!==95||m.charCodeAt(b-3)!==111||m.charCodeAt(b-4)!==116||m.charCodeAt(b-5)!==111||m.charCodeAt(b-6)!==114||m.charCodeAt(b-7)!==112||m.charCodeAt(b-8)!==95||m.charCodeAt(b-9)!==95)return!1;for(var k=b-10;k>=0;k--)if(m.charCodeAt(k)!==36)return!1;return!0}function p(m,b,k){var w=v(m.source,b.source);return w!==0||(w=m.originalLine-b.originalLine,w!==0)||(w=m.originalColumn-b.originalColumn,w!==0||k)||(w=m.generatedColumn-b.generatedColumn,w!==0)||(w=m.generatedLine-b.generatedLine,w!==0)?w:v(m.name,b.name)}e.compareByOriginalPositions=p;function g(m,b,k){var w=m.generatedLine-b.generatedLine;return w!==0||(w=m.generatedColumn-b.generatedColumn,w!==0||k)||(w=v(m.source,b.source),w!==0)||(w=m.originalLine-b.originalLine,w!==0)||(w=m.originalColumn-b.originalColumn,w!==0)?w:v(m.name,b.name)}e.compareByGeneratedPositionsDeflated=g;function v(m,b){return m===b?0:m===null?1:b===null?-1:m>b?1:-1}function _(m,b){var k=m.generatedLine-b.generatedLine;return k!==0||(k=m.generatedColumn-b.generatedColumn,k!==0)||(k=v(m.source,b.source),k!==0)||(k=m.originalLine-b.originalLine,k!==0)||(k=m.originalColumn-b.originalColumn,k!==0)?k:v(m.name,b.name)}e.compareByGeneratedPositionsInflated=_;function S(m){return JSON.parse(m.replace(/^\\)]}'[^\\n]*\\n/,\"\"))}e.parseSourceMapInput=S;function y(m,b,k){if(b=b||\"\",m&&(m[m.length-1]!==\"/\"&&b[0]!==\"/\"&&(m+=\"/\"),b=m+b),k){var w=i(k);if(!w)throw new Error(\"sourceMapURL could not be parsed\");if(w.path){var C=w.path.lastIndexOf(\"/\");C>=0&&(w.path=w.path.substring(0,C+1))}b=c(n(w),b)}return o(b)}e.computeSourceURL=y})),Tn=he((e=>{var t=Is(),s=Object.prototype.hasOwnProperty,r=typeof Map<\"u\";function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(o,c){for(var f=new i,d=0,u=o.length;d<u;d++)f.add(o[d],c);return f},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(o,c){var f=r?o:t.toSetString(o),d=r?this.has(o):s.call(this._set,f),u=this._array.length;(!d||c)&&this._array.push(o),d||(r?this._set.set(o,u):this._set[f]=u)},i.prototype.has=function(o){if(r)return this._set.has(o);var c=t.toSetString(o);return s.call(this._set,c)},i.prototype.indexOf=function(o){if(r){var c=this._set.get(o);if(c>=0)return c}else{var f=t.toSetString(o);if(s.call(this._set,f))return this._set[f]}throw new Error('\"'+o+'\" is not in the set.')},i.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error(\"No element indexed by \"+o)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),Gl=he((e=>{var t=Is();function s(i,n){var o=i.generatedLine,c=n.generatedLine,f=i.generatedColumn,d=n.generatedColumn;return c>o||c==o&&d>=f||t.compareByGeneratedPositionsInflated(i,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(n,o){this._array.forEach(n,o)},r.prototype.add=function(n){s(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),Cn=he((e=>{var t=xn(),s=Is(),r=Tn().ArraySet,i=Gl().MappingList;function n(o){o||(o={}),this._file=s.getArg(o,\"file\",null),this._sourceRoot=s.getArg(o,\"sourceRoot\",null),this._skipValidation=s.getArg(o,\"skipValidation\",!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}n.prototype._version=3,n.fromSourceMap=function(c){var f=c.sourceRoot,d=new n({file:c.file,sourceRoot:f});return c.eachMapping(function(u){var a={generated:{line:u.generatedLine,column:u.generatedColumn}};u.source!=null&&(a.source=u.source,f!=null&&(a.source=s.relative(f,a.source)),a.original={line:u.originalLine,column:u.originalColumn},u.name!=null&&(a.name=u.name)),d.addMapping(a)}),c.sources.forEach(function(u){var a=u;f!==null&&(a=s.relative(f,u)),d._sources.has(a)||d._sources.add(a);var h=c.sourceContentFor(u);h!=null&&d.setSourceContent(u,h)}),d},n.prototype.addMapping=function(c){var f=s.getArg(c,\"generated\"),d=s.getArg(c,\"original\",null),u=s.getArg(c,\"source\",null),a=s.getArg(c,\"name\",null);this._skipValidation||this._validateMapping(f,d,u,a),u!=null&&(u=String(u),this._sources.has(u)||this._sources.add(u)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:f.line,generatedColumn:f.column,originalLine:d!=null&&d.line,originalColumn:d!=null&&d.column,source:u,name:a})},n.prototype.setSourceContent=function(c,f){var d=c;this._sourceRoot!=null&&(d=s.relative(this._sourceRoot,d)),f!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(d)]=f):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(d)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(c,f,d){var u=f;if(f==null){if(c.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's \"file\" property. Both were omitted.`);u=c.file}var a=this._sourceRoot;a!=null&&(u=s.relative(a,u));var h=new r,l=new r;this._mappings.unsortedForEach(function(p){if(p.source===u&&p.originalLine!=null){var g=c.originalPositionFor({line:p.originalLine,column:p.originalColumn});g.source!=null&&(p.source=g.source,d!=null&&(p.source=s.join(d,p.source)),a!=null&&(p.source=s.relative(a,p.source)),p.originalLine=g.line,p.originalColumn=g.column,g.name!=null&&(p.name=g.name))}var v=p.source;v!=null&&!h.has(v)&&h.add(v);var _=p.name;_!=null&&!l.has(_)&&l.add(_)},this),this._sources=h,this._names=l,c.sources.forEach(function(p){var g=c.sourceContentFor(p);g!=null&&(d!=null&&(p=s.join(d,p)),a!=null&&(p=s.relative(a,p)),this.setSourceContent(p,g))},this)},n.prototype._validateMapping=function(c,f,d,u){if(f&&typeof f.line!=\"number\"&&typeof f.column!=\"number\")throw new Error(\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\");if(!(c&&\"line\"in c&&\"column\"in c&&c.line>0&&c.column>=0&&!f&&!d&&!u)){if(c&&\"line\"in c&&\"column\"in c&&f&&\"line\"in f&&\"column\"in f&&c.line>0&&c.column>=0&&f.line>0&&f.column>=0&&d)return;throw new Error(\"Invalid mapping: \"+JSON.stringify({generated:c,source:d,original:f,name:u}))}},n.prototype._serializeMappings=function(){for(var c=0,f=1,d=0,u=0,a=0,h=0,l=\"\",p,g,v,_,S=this._mappings.toArray(),y=0,m=S.length;y<m;y++){if(g=S[y],p=\"\",g.generatedLine!==f)for(c=0;g.generatedLine!==f;)p+=\";\",f++;else if(y>0){if(!s.compareByGeneratedPositionsInflated(g,S[y-1]))continue;p+=\",\"}p+=t.encode(g.generatedColumn-c),c=g.generatedColumn,g.source!=null&&(_=this._sources.indexOf(g.source),p+=t.encode(_-h),h=_,p+=t.encode(g.originalLine-1-u),u=g.originalLine-1,p+=t.encode(g.originalColumn-d),d=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),p+=t.encode(v-a),a=v)),l+=p}return l},n.prototype._generateSourcesContent=function(c,f){return c.map(function(d){if(!this._sourcesContents)return null;f!=null&&(d=s.relative(f,d));var u=s.toSetString(d);return Object.prototype.hasOwnProperty.call(this._sourcesContents,u)?this._sourcesContents[u]:null},this)},n.prototype.toJSON=function(){var c={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(c.file=this._file),this._sourceRoot!=null&&(c.sourceRoot=this._sourceRoot),this._sourcesContents&&(c.sourcesContent=this._generateSourcesContent(c.sources,c.sourceRoot)),c},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=n})),Yl=he((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(s,r,i,n,o,c){var f=Math.floor((r-s)/2)+s,d=o(i,n[f],!0);return d===0?f:d>0?r-f>1?t(f,r,i,n,o,c):c==e.LEAST_UPPER_BOUND?r<n.length?r:-1:f:f-s>1?t(s,f,i,n,o,c):c==e.LEAST_UPPER_BOUND?f:s<0?-1:s}e.search=function(r,i,n,o){if(i.length===0)return-1;var c=t(-1,i.length,r,i,n,o||e.GREATEST_LOWER_BOUND);if(c<0)return-1;for(;c-1>=0&&n(i[c],i[c-1],!0)===0;)--c;return c}})),jl=he((e=>{function t(i,n,o){var c=i[n];i[n]=i[o],i[o]=c}function s(i,n){return Math.round(i+Math.random()*(n-i))}function r(i,n,o,c){if(o<c){var f=s(o,c),d=o-1;t(i,f,c);for(var u=i[c],a=o;a<c;a++)n(i[a],u)<=0&&(d+=1,t(i,d,a));t(i,d+1,a);var h=d+1;r(i,n,o,h-1),r(i,n,h+1,c)}}e.quickSort=function(i,n){r(i,n,0,i.length-1)}})),Zl=he((e=>{var t=Is(),s=Yl(),r=Tn().ArraySet,i=xn(),n=jl().quickSort;function o(u,a){var h=u;return typeof u==\"string\"&&(h=t.parseSourceMapInput(u)),h.sections!=null?new d(h,a):new c(h,a)}o.fromSourceMap=function(u,a){return c.fromSourceMap(u,a)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,\"_generatedMappings\",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,\"_originalMappings\",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(a,h){var l=a.charAt(h);return l===\";\"||l===\",\"},o.prototype._parseMappings=function(a,h){throw new Error(\"Subclasses must implement _parseMappings\")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(a,h,l){var p=h||null,g=l||o.GENERATED_ORDER,v;switch(g){case o.GENERATED_ORDER:v=this._generatedMappings;break;case o.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error(\"Unknown order of iteration.\")}var _=this.sourceRoot;v.map(function(S){var y=S.source===null?null:this._sources.at(S.source);return y=t.computeSourceURL(_,y,this._sourceMapURL),{source:y,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:this._names.at(S.name)}},this).forEach(a,p)},o.prototype.allGeneratedPositionsFor=function(a){var h=t.getArg(a,\"line\"),l={source:t.getArg(a,\"source\"),originalLine:h,originalColumn:t.getArg(a,\"column\",0)};if(l.source=this._findSourceIndex(l.source),l.source<0)return[];var p=[],g=this._findMapping(l,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(g>=0){var v=this._originalMappings[g];if(a.column===void 0)for(var _=v.originalLine;v&&v.originalLine===_;)p.push({line:t.getArg(v,\"generatedLine\",null),column:t.getArg(v,\"generatedColumn\",null),lastColumn:t.getArg(v,\"lastGeneratedColumn\",null)}),v=this._originalMappings[++g];else for(var S=v.originalColumn;v&&v.originalLine===h&&v.originalColumn==S;)p.push({line:t.getArg(v,\"generatedLine\",null),column:t.getArg(v,\"generatedColumn\",null),lastColumn:t.getArg(v,\"lastGeneratedColumn\",null)}),v=this._originalMappings[++g]}return p},e.SourceMapConsumer=o;function c(u,a){var h=u;typeof u==\"string\"&&(h=t.parseSourceMapInput(u));var l=t.getArg(h,\"version\"),p=t.getArg(h,\"sources\"),g=t.getArg(h,\"names\",[]),v=t.getArg(h,\"sourceRoot\",null),_=t.getArg(h,\"sourcesContent\",null),S=t.getArg(h,\"mappings\"),y=t.getArg(h,\"file\",null);if(l!=this._version)throw new Error(\"Unsupported version: \"+l);v&&(v=t.normalize(v)),p=p.map(String).map(t.normalize).map(function(m){return v&&t.isAbsolute(v)&&t.isAbsolute(m)?t.relative(v,m):m}),this._names=r.fromArray(g.map(String),!0),this._sources=r.fromArray(p,!0),this._absoluteSources=this._sources.toArray().map(function(m){return t.computeSourceURL(v,m,a)}),this.sourceRoot=v,this.sourcesContent=_,this._mappings=S,this._sourceMapURL=a,this.file=y}c.prototype=Object.create(o.prototype),c.prototype.consumer=o,c.prototype._findSourceIndex=function(u){var a=u;if(this.sourceRoot!=null&&(a=t.relative(this.sourceRoot,a)),this._sources.has(a))return this._sources.indexOf(a);for(var h=0;h<this._absoluteSources.length;++h)if(this._absoluteSources[h]==u)return h;return-1},c.fromSourceMap=function(a,h){var l=Object.create(c.prototype),p=l._names=r.fromArray(a._names.toArray(),!0),g=l._sources=r.fromArray(a._sources.toArray(),!0);l.sourceRoot=a._sourceRoot,l.sourcesContent=a._generateSourcesContent(l._sources.toArray(),l.sourceRoot),l.file=a._file,l._sourceMapURL=h,l._absoluteSources=l._sources.toArray().map(function(w){return t.computeSourceURL(l.sourceRoot,w,h)});for(var v=a._mappings.toArray().slice(),_=l.__generatedMappings=[],S=l.__originalMappings=[],y=0,m=v.length;y<m;y++){var b=v[y],k=new f;k.generatedLine=b.generatedLine,k.generatedColumn=b.generatedColumn,b.source&&(k.source=g.indexOf(b.source),k.originalLine=b.originalLine,k.originalColumn=b.originalColumn,b.name&&(k.name=p.indexOf(b.name)),S.push(k)),_.push(k)}return n(l.__originalMappings,t.compareByOriginalPositions),l},c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){return this._absoluteSources.slice()}});function f(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}c.prototype._parseMappings=function(a,h){for(var l=1,p=0,g=0,v=0,_=0,S=0,y=a.length,m=0,b={},k={},w=[],C=[],M,P,A,E,B;m<y;)if(a.charAt(m)===\";\")l++,m++,p=0;else if(a.charAt(m)===\",\")m++;else{for(M=new f,M.generatedLine=l,E=m;E<y&&!this._charIsMappingSeparator(a,E);E++);if(P=a.slice(m,E),A=b[P],A)m+=P.length;else{for(A=[];m<E;)i.decode(a,m,k),B=k.value,m=k.rest,A.push(B);if(A.length===2)throw new Error(\"Found a source, but no line and column\");if(A.length===3)throw new Error(\"Found a source and line, but no column\");b[P]=A}M.generatedColumn=p+A[0],p=M.generatedColumn,A.length>1&&(M.source=_+A[1],_+=A[1],M.originalLine=g+A[2],g=M.originalLine,M.originalLine+=1,M.originalColumn=v+A[3],v=M.originalColumn,A.length>4&&(M.name=S+A[4],S+=A[4])),C.push(M),typeof M.originalLine==\"number\"&&w.push(M)}n(C,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,n(w,t.compareByOriginalPositions),this.__originalMappings=w},c.prototype._findMapping=function(a,h,l,p,g,v){if(a[l]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+a[l]);if(a[p]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+a[p]);return s.search(a,h,g,v)},c.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var h=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var l=this._generatedMappings[a+1];if(h.generatedLine===l.generatedLine){h.lastGeneratedColumn=l.generatedColumn-1;continue}}h.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(a){var h={generatedLine:t.getArg(a,\"line\"),generatedColumn:t.getArg(a,\"column\")},l=this._findMapping(h,this._generatedMappings,\"generatedLine\",\"generatedColumn\",t.compareByGeneratedPositionsDeflated,t.getArg(a,\"bias\",o.GREATEST_LOWER_BOUND));if(l>=0){var p=this._generatedMappings[l];if(p.generatedLine===h.generatedLine){var g=t.getArg(p,\"source\",null);g!==null&&(g=this._sources.at(g),g=t.computeSourceURL(this.sourceRoot,g,this._sourceMapURL));var v=t.getArg(p,\"name\",null);return v!==null&&(v=this._names.at(v)),{source:g,line:t.getArg(p,\"originalLine\",null),column:t.getArg(p,\"originalColumn\",null),name:v}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return a==null}):!1},c.prototype.sourceContentFor=function(a,h){if(!this.sourcesContent)return null;var l=this._findSourceIndex(a);if(l>=0)return this.sourcesContent[l];var p=a;this.sourceRoot!=null&&(p=t.relative(this.sourceRoot,p));var g;if(this.sourceRoot!=null&&(g=t.urlParse(this.sourceRoot))){var v=p.replace(/^file:\\/\\//,\"\");if(g.scheme==\"file\"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!g.path||g.path==\"/\")&&this._sources.has(\"/\"+p))return this.sourcesContent[this._sources.indexOf(\"/\"+p)]}if(h)return null;throw new Error('\"'+p+'\" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(a){var h=t.getArg(a,\"source\");if(h=this._findSourceIndex(h),h<0)return{line:null,column:null,lastColumn:null};var l={source:h,originalLine:t.getArg(a,\"line\"),originalColumn:t.getArg(a,\"column\")},p=this._findMapping(l,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(a,\"bias\",o.GREATEST_LOWER_BOUND));if(p>=0){var g=this._originalMappings[p];if(g.source===l.source)return{line:t.getArg(g,\"generatedLine\",null),column:t.getArg(g,\"generatedColumn\",null),lastColumn:t.getArg(g,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=c;function d(u,a){var h=u;typeof u==\"string\"&&(h=t.parseSourceMapInput(u));var l=t.getArg(h,\"version\"),p=t.getArg(h,\"sections\");if(l!=this._version)throw new Error(\"Unsupported version: \"+l);this._sources=new r,this._names=new r;var g={line:-1,column:0};this._sections=p.map(function(v){if(v.url)throw new Error(\"Support for url field in sections not implemented.\");var _=t.getArg(v,\"offset\"),S=t.getArg(_,\"line\"),y=t.getArg(_,\"column\");if(S<g.line||S===g.line&&y<g.column)throw new Error(\"Section offsets must be ordered and non-overlapping.\");return g=_,{generatedOffset:{generatedLine:S+1,generatedColumn:y+1},consumer:new o(t.getArg(v,\"map\"),a)}})}d.prototype=Object.create(o.prototype),d.prototype.constructor=o,d.prototype._version=3,Object.defineProperty(d.prototype,\"sources\",{get:function(){for(var u=[],a=0;a<this._sections.length;a++)for(var h=0;h<this._sections[a].consumer.sources.length;h++)u.push(this._sections[a].consumer.sources[h]);return u}}),d.prototype.originalPositionFor=function(a){var h={generatedLine:t.getArg(a,\"line\"),generatedColumn:t.getArg(a,\"column\")},l=s.search(h,this._sections,function(g,v){var _=g.generatedLine-v.generatedOffset.generatedLine;return _||g.generatedColumn-v.generatedOffset.generatedColumn}),p=this._sections[l];return p?p.consumer.originalPositionFor({line:h.generatedLine-(p.generatedOffset.generatedLine-1),column:h.generatedColumn-(p.generatedOffset.generatedLine===h.generatedLine?p.generatedOffset.generatedColumn-1:0),bias:a.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})},d.prototype.sourceContentFor=function(a,h){for(var l=0;l<this._sections.length;l++){var p=this._sections[l].consumer.sourceContentFor(a,!0);if(p)return p}if(h)return null;throw new Error('\"'+a+'\" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(a){for(var h=0;h<this._sections.length;h++){var l=this._sections[h];if(l.consumer._findSourceIndex(t.getArg(a,\"source\"))!==-1){var p=l.consumer.generatedPositionFor(a);if(p)return{line:p.line+(l.generatedOffset.generatedLine-1),column:p.column+(l.generatedOffset.generatedLine===p.line?l.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},d.prototype._parseMappings=function(a,h){this.__generatedMappings=[],this.__originalMappings=[];for(var l=0;l<this._sections.length;l++)for(var p=this._sections[l],g=p.consumer._generatedMappings,v=0;v<g.length;v++){var _=g[v],S=p.consumer._sources.at(_.source);S=t.computeSourceURL(p.consumer.sourceRoot,S,this._sourceMapURL),this._sources.add(S),S=this._sources.indexOf(S);var y=null;_.name&&(y=p.consumer._names.at(_.name),this._names.add(y),y=this._names.indexOf(y));var m={source:S,generatedLine:_.generatedLine+(p.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(p.generatedOffset.generatedLine===_.generatedLine?p.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:y};this.__generatedMappings.push(m),typeof m.originalLine==\"number\"&&this.__originalMappings.push(m)}n(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),n(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=d})),Jl=he((e=>{var t=Cn().SourceMapGenerator,s=Is(),r=/(\\r?\\n)/,i=10,n=\"$$$isSourceNode$$$\";function o(c,f,d,u,a){this.children=[],this.sourceContents={},this.line=c??null,this.column=f??null,this.source=d??null,this.name=a??null,this[n]=!0,u!=null&&this.add(u)}o.fromStringWithSourceMap=function(f,d,u){var a=new o,h=f.split(r),l=0,p=function(){return y()+(y()||\"\");function y(){return l<h.length?h[l++]:void 0}},g=1,v=0,_=null;return d.eachMapping(function(y){if(_!==null)if(g<y.generatedLine)S(_,p()),g++,v=0;else{var m=h[l]||\"\",b=m.substr(0,y.generatedColumn-v);h[l]=m.substr(y.generatedColumn-v),v=y.generatedColumn,S(_,b),_=y;return}for(;g<y.generatedLine;)a.add(p()),g++;if(v<y.generatedColumn){var m=h[l]||\"\";a.add(m.substr(0,y.generatedColumn)),h[l]=m.substr(y.generatedColumn),v=y.generatedColumn}_=y},this),l<h.length&&(_&&S(_,p()),a.add(h.splice(l).join(\"\"))),d.sources.forEach(function(y){var m=d.sourceContentFor(y);m!=null&&(u!=null&&(y=s.join(u,y)),a.setSourceContent(y,m))}),a;function S(y,m){if(y===null||y.source===void 0)a.add(m);else{var b=u?s.join(u,y.source):y.source;a.add(new o(y.originalLine,y.originalColumn,b,m,y.name))}}},o.prototype.add=function(f){if(Array.isArray(f))f.forEach(function(d){this.add(d)},this);else if(f[n]||typeof f==\"string\")f&&this.children.push(f);else throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \"+f);return this},o.prototype.prepend=function(f){if(Array.isArray(f))for(var d=f.length-1;d>=0;d--)this.prepend(f[d]);else if(f[n]||typeof f==\"string\")this.children.unshift(f);else throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \"+f);return this},o.prototype.walk=function(f){for(var d,u=0,a=this.children.length;u<a;u++)d=this.children[u],d[n]?d.walk(f):d!==\"\"&&f(d,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(f){var d,u,a=this.children.length;if(a>0){for(d=[],u=0;u<a-1;u++)d.push(this.children[u]),d.push(f);d.push(this.children[u]),this.children=d}return this},o.prototype.replaceRight=function(f,d){var u=this.children[this.children.length-1];return u[n]?u.replaceRight(f,d):typeof u==\"string\"?this.children[this.children.length-1]=u.replace(f,d):this.children.push(\"\".replace(f,d)),this},o.prototype.setSourceContent=function(f,d){this.sourceContents[s.toSetString(f)]=d},o.prototype.walkSourceContents=function(f){for(var d=0,u=this.children.length;d<u;d++)this.children[d][n]&&this.children[d].walkSourceContents(f);for(var a=Object.keys(this.sourceContents),d=0,u=a.length;d<u;d++)f(s.fromSetString(a[d]),this.sourceContents[a[d]])},o.prototype.toString=function(){var f=\"\";return this.walk(function(d){f+=d}),f},o.prototype.toStringWithSourceMap=function(f){var d={code:\"\",line:1,column:0},u=new t(f),a=!1,h=null,l=null,p=null,g=null;return this.walk(function(v,_){d.code+=v,_.source!==null&&_.line!==null&&_.column!==null?((h!==_.source||l!==_.line||p!==_.column||g!==_.name)&&u.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:d.line,column:d.column},name:_.name}),h=_.source,l=_.line,p=_.column,g=_.name,a=!0):a&&(u.addMapping({generated:{line:d.line,column:d.column}}),h=null,a=!1);for(var S=0,y=v.length;S<y;S++)v.charCodeAt(S)===i?(d.line++,d.column=0,S+1===y?(h=null,a=!1):a&&u.addMapping({source:_.source,original:{line:_.line,column:_.column},generated:{line:d.line,column:d.column},name:_.name})):d.column++}),this.walkSourceContents(function(v,_){u.setSourceContent(v,_)}),{code:d.code,map:u}},e.SourceNode=o})),Ql=he((e=>{e.SourceMapGenerator=Cn().SourceMapGenerator,e.SourceMapConsumer=Zl().SourceMapConsumer,e.SourceNode=Jl().SourceNode})),Kl=he((e=>{e.__esModule=!0,e.safeJsonLiteral=o;var t=st(),s=/[\\x00-\\x1f\\\\\"\\u2028\\u2029<\\ud800-\\udfff]/,r=/<(?=!--|\\/?script)/gi;function i(u){return u.replace(r,\"\\\\u003C\")}function n(u){return\"\\\\u\"+u.charCodeAt(0).toString(16)}function o(u){return i(JSON.stringify(u).replace(/\\u2028/g,\"\\\\u2028\").replace(/\\u2029/g,\"\\\\u2029\").replace(/[\\ud800-\\udfff]/g,n))}var c=void 0;try{(typeof define!=\"function\"||!define.amd)&&(c=Ql().SourceNode)}catch{}c||(c=function(u,a,h,l){this.src=\"\",l&&this.add(l)},c.prototype={add:function(a){t.isArray(a)&&(a=a.join(\"\")),this.src+=a},prepend:function(a){t.isArray(a)&&(a=a.join(\"\")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function f(u,a,h){if(t.isArray(u)){for(var l=[],p=0,g=u.length;p<g;p++)l.push(a.wrap(u[p],h));return l}else if(typeof u==\"boolean\"||typeof u==\"number\")return u+\"\";return u}function d(u){this.srcFile=u,this.source=[]}d.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,h){this.source.unshift(this.wrap(a,h))},push:function(a,h){this.source.push(this.wrap(a,h))},merge:function(){var a=this.empty();return this.each(function(h){a.add([\" \",h,`\n`])}),a},each:function(a){for(var h=0,l=this.source.length;h<l;h++)a(this.source[h])},empty:function(){var a=this.currentLocation||{start:{}};return new c(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var h=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return a instanceof c?a:(a=f(a,this,h),new c(h.start.line,h.start.column,this.srcFile,a))},functionCall:function(a,h,l){return l=this.generateList(l),this.wrap([a,h?\".\"+h+\"(\":\"(\",l,\")\"])},quotedString:function(a){return a=a+\"\",s.test(a)?o(a):'\"'+a+'\"'},objectLiteral:function(a){var h=this,l=[];Object.keys(a).forEach(function(g){var v=f(a[g],h);v!==\"undefined\"&&l.push([h.quotedString(g),\":\",v])});var p=this.generateList(l);return p.prepend(\"{\"),p.add(\"}\"),p},generateList:function(a){for(var h=this.empty(),l=0,p=a.length;l<p;l++)l&&h.add(\",\"),h.add(f(a[l],this));return h},generateArray:function(a){var h=this.generateList(a);return h.prepend(\"[\"),h.add(\"]\"),h}},e.default=d})),ec=he(((e,t)=>{e.__esModule=!0;function s(h){return h&&h.__esModule?h:{default:h}}var r=ei(),i=s(kt()),n=st(),o=Kl(),c=s(o);function f(h){this.value=h}function d(){}d.prototype={nameLookup:function(l,p){return this.internalNameLookup(l,p)},depthedLookup:function(l){return[this.aliasable(\"container.lookup\"),\"(depths, \",this.quotedString(l),\")\"]},compilerInfo:function(){var l=r.COMPILER_REVISION;return[l,r.REVISION_CHANGES[l]]},appendToBuffer:function(l,p,g){return n.isArray(l)||(l=[l]),l=this.source.wrap(l,p),this.environment.isSimple?[\"return \",l,\";\"]:g?[\"buffer += \",l,\";\"]:(l.appendToBuffer=!0,l)},initializeBuffer:function(){return this.quotedString(\"\")},internalNameLookup:function(l,p){return this.lookupPropertyFunctionIsUsed=!0,[\"lookupProperty(\",l,\",\",this.quotedString(p),\")\"]},lookupPropertyFunctionIsUsed:!1,compile:function(l,p,g,v){this.environment=l,this.options=p,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!v,this.name=this.environment.name,this.isChild=!!g,this.context=g||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(l,p),this.useDepths=this.useDepths||l.useDepths||l.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||l.useBlockParams;var _=l.opcodes,S=void 0,y=void 0,m=void 0,b=void 0;for(m=0,b=_.length;m<b;m++)S=_[m],this.source.currentLocation=S.loc,y=y||S.loc,this[S.opcode].apply(this,S.args);if(this.source.currentLocation=y,this.pushSource(\"\"),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default(\"Compile completed with content left on stack\");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend([\"var decorators = container.decorators, \",this.lookupPropertyFunctionVarDeclaration(),`;\n`]),this.decorators.push(\"return fn;\"),v?this.decorators=Function.apply(this,[\"fn\",\"props\",\"container\",\"depth0\",\"data\",\"blockParams\",\"depths\",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {\n`),this.decorators.push(`}\n`),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(v);if(this.isChild)return k;var w={compiler:this.compilerInfo(),main:k};this.decorators&&(w.main_d=this.decorators,w.useDecorators=!0);var C=this.context,M=C.programs,P=C.decorators;for(m=0,b=M.length;m<b;m++)w[m]=M[m],P[m]&&(w[m+\"_d\"]=P[m],w.useDecorators=!0);return this.environment.usePartial&&(w.usePartial=!0),this.options.data&&(w.useData=!0),this.useDepths&&(w.useDepths=!0),this.useBlockParams&&(w.useBlockParams=!0),this.options.compat&&(w.compat=!0),v?w.compilerOptions=this.options:(w.compiler=JSON.stringify(w.compiler),this.source.currentLocation={start:{line:1,column:0}},w=this.objectLiteral(w),p.srcName?(w=w.toStringWithSourceMap({file:p.destName}),w.map=w.map&&w.map.toString()):w=w.toString()),w},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(l){var p=this,g=\"\",v=this.stackVars.concat(this.registers.list);v.length>0&&(g+=\", \"+v.join(\", \"));var _=0;Object.keys(this.aliases).forEach(function(m){var b=p.aliases[m];b.children&&b.referenceCount>1&&(g+=\", alias\"+ ++_+\"=\"+m,b.children[0]=\"alias\"+_)}),this.lookupPropertyFunctionIsUsed&&(g+=\", \"+this.lookupPropertyFunctionVarDeclaration());var S=[\"container\",\"depth0\",\"helpers\",\"partials\",\"data\"];(this.useBlockParams||this.useDepths)&&S.push(\"blockParams\"),this.useDepths&&S.push(\"depths\");var y=this.mergeSource(g);return l?(S.push(y),Function.apply(this,S)):this.source.wrap([\"function(\",S.join(\",\"),`) {\n `,y,\"}\"])},mergeSource:function(l){var p=this.environment.isSimple,g=!this.forceBuffer,v=void 0,_=void 0,S=void 0,y=void 0;return this.source.each(function(m){m.appendToBuffer?(S?m.prepend(\" + \"):S=m,y=m):(S&&(_?S.prepend(\"buffer += \"):v=!0,y.add(\";\"),S=y=void 0),_=!0,p||(g=!1))}),g?S?(S.prepend(\"return \"),y.add(\";\")):_||this.source.push('return \"\";'):(l+=\", buffer = \"+(v?\"\":this.initializeBuffer()),S?(S.prepend(\"return buffer + \"),y.add(\";\")):this.source.push(\"return buffer;\")),l&&this.source.prepend(\"var \"+l.substring(2)+(v?\"\":`;\n`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n `.trim()},blockValue:function(l){var p=this.aliasable(\"container.hooks.blockHelperMissing\"),g=[this.contextName(0)];this.setupHelperArgs(l,0,g);var v=this.popStack();g.splice(1,0,v),this.push(this.source.functionCall(p,\"call\",g))},ambiguousBlockValue:function(){var l=this.aliasable(\"container.hooks.blockHelperMissing\"),p=[this.contextName(0)];this.setupHelperArgs(\"\",0,p,!0),this.flushInline();var g=this.topStack();p.splice(1,0,g),this.pushSource([\"if (!\",this.lastHelper,\") { \",g,\" = \",this.source.functionCall(l,\"call\",p),\"}\"])},appendContent:function(l){this.pendingContent?l=this.pendingContent+l:this.pendingLocation=this.source.currentLocation,this.pendingContent=l},append:function(){if(this.isInline())this.replaceStack(function(p){return[\" != null ? \",p,' : \"\"']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var l=this.popStack();this.pushSource([\"if (\",l,\" != null) { \",this.appendToBuffer(l,void 0,!0),\" }\"]),this.environment.isSimple&&this.pushSource([\"else { \",this.appendToBuffer(\"''\",void 0,!0),\" }\"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(\"container.escapeExpression\"),\"(\",this.popStack(),\")\"]))},getContext:function(l){this.lastContext=l},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(l,p,g,v){var _=0;!v&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(l[_++])):this.pushContext(),this.resolvePath(\"context\",l,_,p,g)},lookupBlockParam:function(l,p){this.useBlockParams=!0,this.push([\"blockParams[\",l[0],\"][\",l[1],\"]\"]),this.resolvePath(\"context\",p,1)},lookupData:function(l,p,g){l?this.pushStackLiteral(\"container.data(data, \"+l+\")\"):this.pushStackLiteral(\"data\"),this.resolvePath(\"data\",p,0,!0,g)},resolvePath:function(l,p,g,v,_){var S=this;if(this.options.strict||this.options.assumeObjects){this.push(a(this.options.strict&&_,this,p,g,l));return}for(var y=p.length,m=function(k){S.replaceStack(function(w){var C=S.nameLookup(w,p[k],l);return v?[\" && \",C]:[\" != null ? \",C,\" : \",w]})},b=g;b<y;b++)m(b)},resolvePossibleLambda:function(){this.push([this.aliasable(\"container.lambda\"),\"(\",this.popStack(),\", \",this.contextName(0),\")\"])},pushStringParam:function(l,p){this.pushContext(),this.pushString(p),p!==\"SubExpression\"&&(typeof l==\"string\"?this.pushString(l):this.pushStackLiteral(l))},emptyHash:function(l){this.trackIds&&this.push(\"{}\"),this.stringParams&&(this.push(\"{}\"),this.push(\"{}\")),this.pushStackLiteral(l?\"undefined\":\"{}\")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var l=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(l.ids)),this.stringParams&&(this.push(this.objectLiteral(l.contexts)),this.push(this.objectLiteral(l.types))),this.push(this.objectLiteral(l.values))},pushString:function(l){this.pushStackLiteral(this.quotedString(l))},pushLiteral:function(l){this.pushStackLiteral(l)},pushProgram:function(l){l!=null?this.pushStackLiteral(this.programExpression(l)):this.pushStackLiteral(null)},registerDecorator:function(l,p){var g=this.nameLookup(\"decorators\",p,\"decorator\"),v=this.setupHelperArgs(p,l);this.decorators.push([\"var decorator = \",g,\";\"]),this.decorators.push(['if (typeof decorator !== \"function\") { throw new Error(',this.quotedString('Missing decorator: \"'+p+'\"'),\"); }\"]),this.decorators.push([\"fn = \",this.decorators.functionCall(\"decorator\",\"\",[\"fn\",\"props\",\"container\",v]),\" || fn;\"])},invokeHelper:function(l,p,g){var v=this.popStack(),_=this.setupHelper(l,p),S=[];g&&S.push(_.name),S.push(v),this.options.strict||S.push(this.aliasable(\"container.hooks.helperMissing\"));var y=[\"(\",this.itemsSeparatedBy(S,\"||\"),\")\"],m=this.source.functionCall(y,\"call\",_.callParams);this.push(m)},itemsSeparatedBy:function(l,p){var g=[];g.push(l[0]);for(var v=1;v<l.length;v++)g.push(p,l[v]);return g},invokeKnownHelper:function(l,p){var g=this.setupHelper(l,p);this.push(this.source.functionCall(g.name,\"call\",g.callParams))},invokeAmbiguous:function(l,p){this.useRegister(\"helper\");var g=this.popStack();this.emptyHash();var v=this.setupHelper(0,l,p),_=[\"(\",\"(helper = \",this.lastHelper=this.nameLookup(\"helpers\",l,\"helper\"),\" || \",g,\")\"];this.options.strict||(_[0]=\"(helper = \",_.push(\" != null ? helper : \",this.aliasable(\"container.hooks.helperMissing\"))),this.push([\"(\",_,v.paramsInit?[\"),(\",v.paramsInit]:[],\"),\",\"(typeof helper === \",this.aliasable('\"function\"'),\" ? \",this.source.functionCall(\"helper\",\"call\",v.callParams),\" : helper))\"])},invokePartial:function(l,p,g){var v=[],_=this.setupParams(p,1,v);l&&(p=this.popStack(),delete _.name),g&&(_.indent=this.quotedString(g)),_.helpers=\"helpers\",_.partials=\"partials\",_.decorators=\"container.decorators\",l?v.unshift(p):v.unshift(this.nameLookup(\"partials\",p,\"partial\")),this.options.compat&&(_.depths=\"depths\"),_=this.objectLiteral(_),v.push(_),this.push(this.source.functionCall(\"container.invokePartial\",\"\",v))},assignToHash:function(l){var p=this.popStack(),g=void 0,v=void 0,_=void 0;this.trackIds&&(_=this.popStack()),this.stringParams&&(v=this.popStack(),g=this.popStack());var S=this.hash;g&&(S.contexts[l]=g),v&&(S.types[l]=v),_&&(S.ids[l]=_),S.values[l]=p},pushId:function(l,p,g){l===\"BlockParam\"?this.pushStackLiteral(\"blockParams[\"+p[0]+\"].path[\"+p[1]+\"]\"+(g?\" + \"+this.quotedString(\".\"+g):\"\")):l===\"PathExpression\"?this.pushString(p):l===\"SubExpression\"?this.pushStackLiteral(\"true\"):this.pushStackLiteral(\"null\")},compiler:d,compileChildren:function(l,p){for(var g=l.children,v=void 0,_=void 0,S=0,y=g.length;S<y;S++){v=g[S],_=new this.compiler;var m=this.matchExistingProgram(v);if(m==null){var b=this.context.programs.push(\"\")-1;v.index=b,v.name=\"program\"+b,this.context.programs[b]=_.compile(v,p,this.context,!this.precompile),this.context.decorators[b]=_.decorators,this.context.environments[b]=v,this.useDepths=this.useDepths||_.useDepths,this.useBlockParams=this.useBlockParams||_.useBlockParams,v.useDepths=this.useDepths,v.useBlockParams=this.useBlockParams}else v.index=m.index,v.name=\"program\"+m.index,this.useDepths=this.useDepths||m.useDepths,this.useBlockParams=this.useBlockParams||m.useBlockParams}},matchExistingProgram:function(l){for(var p=0,g=this.context.environments.length;p<g;p++){var v=this.context.environments[p];if(v&&v.equals(l))return v}},programExpression:function(l){var p=this.environment.children[l],g=[p.index,\"data\",p.blockParams];return(this.useBlockParams||this.useDepths)&&g.push(\"blockParams\"),this.useDepths&&g.push(\"depths\"),\"container.program(\"+g.join(\", \")+\")\"},useRegister:function(l){this.registers[l]||(this.registers[l]=!0,this.registers.list.push(l))},push:function(l){return l instanceof f||(l=this.source.wrap(l)),this.inlineStack.push(l),l},pushStackLiteral:function(l){this.push(new f(l))},pushSource:function(l){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),l&&this.source.push(l)},replaceStack:function(l){var p=[\"(\"],g=void 0,v=void 0,_=void 0;if(!this.isInline())throw new i.default(\"replaceStack on non-inline\");var S=this.popStack(!0);if(S instanceof f)g=[S.value],p=[\"(\",g],_=!0;else{v=!0;var y=this.incrStack();p=[\"((\",this.push(y),\" = \",S,\")\"],g=this.topStack()}var m=l.call(this,g);_||this.popStack(),v&&this.stackSlot--,this.push(p.concat(m,\")\"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(\"stack\"+this.stackSlot),this.topStackName()},topStackName:function(){return\"stack\"+this.stackSlot},flushInline:function(){var l=this.inlineStack;this.inlineStack=[];for(var p=0,g=l.length;p<g;p++){var v=l[p];if(v instanceof f)this.compileStack.push(v);else{var _=this.incrStack();this.pushSource([_,\" = \",v,\";\"]),this.compileStack.push(_)}}},isInline:function(){return this.inlineStack.length},popStack:function(l){var p=this.isInline(),g=(p?this.inlineStack:this.compileStack).pop();if(!l&&g instanceof f)return g.value;if(!p){if(!this.stackSlot)throw new i.default(\"Invalid stack pop\");this.stackSlot--}return g},topStack:function(){var l=this.isInline()?this.inlineStack:this.compileStack,p=l[l.length-1];return p instanceof f?p.value:p},contextName:function(l){return this.useDepths&&l?\"depths[\"+l+\"]\":\"depth\"+l},quotedString:function(l){return this.source.quotedString(l)},objectLiteral:function(l){return this.source.objectLiteral(l)},aliasable:function(l){var p=this.aliases[l];return p?(p.referenceCount++,p):(p=this.aliases[l]=this.source.wrap(l),p.aliasable=!0,p.referenceCount=1,p)},setupHelper:function(l,p,g){var v=[];return{params:v,paramsInit:this.setupHelperArgs(p,l,v,g),name:this.nameLookup(\"helpers\",p,\"helper\"),callParams:[this.aliasable(this.contextName(0)+\" != null ? \"+this.contextName(0)+\" : (container.nullContext || {})\")].concat(v)}},setupParams:function(l,p,g){var v={},_=[],S=[],y=[],m=!g,b=void 0;m&&(g=[]),v.name=this.quotedString(l),v.hash=this.popStack(),this.trackIds&&(v.hashIds=this.popStack()),this.stringParams&&(v.hashTypes=this.popStack(),v.hashContexts=this.popStack());var k=this.popStack(),w=this.popStack();(w||k)&&(v.fn=w||\"container.noop\",v.inverse=k||\"container.noop\");for(var C=p;C--;)b=this.popStack(),g[C]=b,this.trackIds&&(y[C]=this.popStack()),this.stringParams&&(S[C]=this.popStack(),_[C]=this.popStack());return m&&(v.args=this.source.generateArray(g)),this.trackIds&&(v.ids=this.source.generateArray(y)),this.stringParams&&(v.types=this.source.generateArray(S),v.contexts=this.source.generateArray(_)),this.options.data&&(v.data=\"data\"),this.useBlockParams&&(v.blockParams=\"blockParams\"),v},setupHelperArgs:function(l,p,g,v){var _=this.setupParams(l,p,g);return _.loc=u(this),_=this.objectLiteral(_),v?(this.useRegister(\"options\"),g.push(\"options\"),[\"options=\",_]):g?(g.push(_),\"\"):_}},(function(){for(var h=\"break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false\".split(\" \"),l=d.RESERVED_WORDS={},p=0,g=h.length;p<g;p++)l[h[p]]=!0})(),d.isValidJavaScriptVariableName=function(h){return!d.RESERVED_WORDS[h]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(h)};function u(h){var l=h.source.currentLocation;return l?o.safeJsonLiteral(l):\"undefined\"}function a(h,l,p,g,v){var _=l.popStack(),S=p.length;h&&S--;for(var y=g;y<S;y++)_=l.nameLookup(_,p[y],v);return h?[l.aliasable(\"container.strict\"),\"(\",_,\", \",l.quotedString(p[S]),\", \",u(l),\" )\"]:_}e.default=d,t.exports=e.default})),tc=he(((e,t)=>{e.__esModule=!0;function s(l){return l&&l.__esModule?l:{default:l}}var r=s(ql()),i=s(Sn()),n=Ul(),o=Wl(),c=s(ec()),f=s(wn()),d=s(_n()),u=r.default.create;function a(){var l=u();return l.compile=function(p,g){return o.compile(p,g,l)},l.precompile=function(p,g){return o.precompile(p,g,l)},l.AST=i.default,l.Compiler=o.Compiler,l.JavaScriptCompiler=c.default,l.Parser=n.parser,l.parse=n.parse,l.parseWithoutProcessing=n.parseWithoutProcessing,l}var h=a();h.create=a,d.default(h),h.Visitor=f.default,h.default=h,e.default=h,t.exports=e.default})),Ze=_a(tc(),1),ti={\"=\":\"eq\",\"==\":\"eq\",\"!=\":\"ne\",\">\":\"gt\",\"<\":\"lt\",\">=\":\"gte\",\"<=\":\"lte\"},sc={\"+\":\"add\",\"-\":\"sub\",\"*\":\"mul\",\"/\":\"div\",\"%\":\"mod\"},rc=[\"==\",\"!=\",\">=\",\"<=\",\"&&\",\"||\",\"=\",\">\",\"<\",\"!\",\"+\",\"*\",\"%\",\"-\",\"/\"],ic=[\"and\",\"or\",\"not\"],Pn=[\"true\",\"false\",\"null\",\"undefined\"],nc=new Set([...` \t\\r\n!\"'()<>=&|{}~+*%`]),si=/^-?\\d+(\\.\\d+)?$/,Je=class extends Error{};function oc(e){const t=[];let s=0;for(;s<e.length;){const r=e[s];if(/\\s/.test(r)){s++;continue}if(r===\"(\"||r===\")\"){t.push({type:r,text:r}),s++;continue}if(r==='\"'||r===\"'\"){let c=s+1;for(;c<e.length&&e[c]!==r;)e[c]===\"\\\\\"&&c++,c++;if(c>=e.length)throw new Je(\"unterminated string\");t.push({type:\"value\",text:e.slice(s,c+1)}),s=c+1;continue}const i=rc.find(c=>e.startsWith(c,s)&&!(c===\"-\"&&/\\d/.test(e[s+1]??\"\")));if(i){t.push({type:\"op\",text:i}),s+=i.length;continue}let n=s;for(;n<e.length&&!nc.has(e[n]);){if(e[n]===\"[\"){const c=e.indexOf(\"]\",n);if(c===-1)throw new Je(\"missing ']'\");n=c}n++}if(n===s)throw new Je(`unexpected '${r}'`);const o=e.slice(s,n);ic.includes(o)?t.push({type:\"op\",text:o}):Pn.includes(o)||si.test(o)?t.push({type:\"value\",text:o}):t.push({type:\"ident\",text:o}),s=n}return t}var ac=class{constructor(e){this.tokens=e,this.pos=0,this.usedInfix=!1}peek(e=0){return this.tokens[this.pos+e]}next(){return this.tokens[this.pos++]}isOp(e,...t){return e?.type===\"op\"&&t.includes(e.text)}startsPrimary(e){return e?.type===\"ident\"||e?.type===\"value\"||e?.type===\"(\"}describe(e){return e?`'${e.text}'`:\"end of expression\"}parseExpression(){const e=this.parseOr();if(this.peek())throw new Je(`unexpected ${this.describe(this.peek())}`);return e}parseArguments(e){const t=[];for(let s=0;s<e;s++)t.push(this.parsePrimary());if(!this.peek())throw new Je(\"expected a value\");return t.push(this.parseExpression()),t}parseCondition(){const e=[this.parseOr()];for(;this.peek()?.type===\"ident\"&&this.isOp(this.peek(1),\"=\");)e.push(this.parseHashPair());if(this.peek())throw new Je(`unexpected ${this.describe(this.peek())}`);return e}parseHashPair(){const e=this.next().text;return this.next(),{kind:\"raw\",text:`${e}=${ms(this.parsePrimary())}`}}parseOr(){return this.parseChain([\"or\",\"||\"],\"or\",()=>this.parseAnd())}parseAnd(){return this.parseChain([\"and\",\"&&\"],\"and\",()=>this.parseNot())}parseChain(e,t,s){const r=[s()];for(;this.isOp(this.peek(),...e);){const i=this.next().text;if(!this.peek())throw new Je(`expected a value after '${i}'`);r.push(s())}return r.length===1?r[0]:(this.usedInfix=!0,{kind:\"call\",name:t,args:r})}parseNot(){if(this.isOp(this.peek(),\"not\",\"!\")){const e=this.next().text;if(!this.peek())throw new Je(`expected a value after '${e}'`);return this.usedInfix=!0,{kind:\"call\",name:\"not\",args:[this.parseNot()]}}return this.parseComparison()}parseComparison(){const e=this.parseAdditive(),t=this.peek();if(t?.type!==\"op\"||!(t.text in ti))return e;if(this.next(),!this.peek())throw new Je(`expected a value after '${t.text}'`);const s=this.parseAdditive(),r=this.peek();if(r?.type===\"op\"&&r.text in ti)throw new Je(`comparisons can't be chained (at '${r.text}'), use \"and\" to combine them`);return this.usedInfix=!0,{kind:\"call\",name:ti[t.text],args:[e,s]}}parseAdditive(){return this.parseArithmetic([\"+\",\"-\"],()=>this.parseMultiplicative())}parseMultiplicative(){return this.parseArithmetic([\"*\",\"/\",\"%\"],()=>this.parseUnary())}parseArithmetic(e,t){let s=t();for(;;){let r;const i=this.peek();if(this.isOp(i,...e)){if(r=this.next().text,!this.peek())throw new Je(`expected a value after '${r}'`)}else if(e.includes(\"-\")&&i?.type===\"value\"&&i.text.startsWith(\"-\")&&si.test(i.text))r=\"-\",this.tokens[this.pos]={type:\"value\",text:i.text.slice(1)};else return s;this.usedInfix=!0,s={kind:\"call\",name:sc[r],args:[s,t()]}}}parseUnary(){if(this.isOp(this.peek(),\"-\")){if(this.next(),!this.peek())throw new Je(\"expected a value after '-'\");return this.usedInfix=!0,{kind:\"call\",name:\"sub\",args:[{kind:\"raw\",text:\"0\"},this.parseUnary()]}}return this.parsePrimary()}parsePrimary(){const e=this.peek();if(e?.type===\"ident\"||e?.type===\"value\")return this.next(),{kind:\"raw\",text:e.text};if(e?.type===\"(\"){this.next();const t=this.isHelperCall()?this.parseHelperCall():this.parseOr();if(this.peek()?.type!==\")\")throw new Je(`expected ')' but found ${this.describe(this.peek())}`);return this.next(),t}if(this.isOp(e,\"not\",\"!\")){const t=e?.text===\"!\"?\"!value\":\"not value\";throw new Je(`'${e?.text}' must be inside parentheses here, e.g. (${t})`)}throw e?.type===\"op\"?new Je(`expected a value before '${e.text}'`):new Je(e?`unexpected ${this.describe(e)}`:\"expected a value\")}isHelperCall(){const e=this.peek(),t=this.peek(1);return this.isOp(e,\"and\",\"or\")?!0:e?.type===\"ident\"&&this.startsPrimary(t)}parseHelperCall(){const e=this.next().text,t=[];for(;this.peek()&&this.peek()?.type!==\")\";)this.peek()?.type===\"ident\"&&this.isOp(this.peek(1),\"=\")?t.push(this.parseHashPair()):t.push(this.parsePrimary());return{kind:\"call\",name:e,args:t}}};function ms(e){return e.kind===\"raw\"?e.text:`(${e.name} ${e.args.map(ms).join(\" \")})`}function nr(e,t,s){const r=t===\"display\"||t===\"value\";let i=null,n=[];try{n=oc(e)}catch(d){if(!r||!(d instanceof Je))return null;i=d}const o=n.some(d=>d.type===\"op\"),c=new ac(n);let f=[];if(!i)try{f=t===\"condition\"?c.parseCondition():t===\"arguments\"?c.parseArguments(1):[c.parseExpression()]}catch(d){if(!(d instanceof Je)||!o&&!r)return null;i=d}if(i)throw new Error(`Invalid ${s} \"${e.trim()}\": ${i.message}`);return!c.usedInfix&&!r?null:f}function lc(e){const t=nr(e,\"condition\",\"condition\");return t&&t.map(ms).join(\" \")}function cc(e){const t=nr(e,\"arguments\",\"expression\");return t&&t.map(ms).join(\" \")}function uc(e){const t=nr(e,\"display\",\"expression\")[0];if(t.kind===\"call\")return`${t.name} ${t.args.map(ms).join(\" \")}`;if(Pn.includes(t.text)||si.test(t.text)||/^[\"']/.test(t.text))throw new Error(`Invalid expression \"${e.trim()}\": expected an attribute or a calculation`);return t.text}function hc(e){return ms(nr(e,\"value\",\"expression\")[0])}function dc(e){const t=[];let s=0,r=null,i=0;for(let n=0;n<e.length;n++){const o=e[n];r?o===\"\\\\\"?n++:o===r&&(r=null):o==='\"'||o===\"'\"?r=o:o===\"(\"?s++:o===\")\"?s=Math.max(0,s-1):o===\",\"&&s===0&&(t.push(e.slice(i,n)),i=n+1)}return t.push(e.slice(i)),t.map(n=>n.trim()).filter(n=>n!==\"\")}var ri=/(\\\\*)\\{\\{(~?\\s*)(?:(#if|#unless|else\\s+if|else\\s+unless)(?=[\\s(!])|(set|inc|dec)(?=\\s)|(=))/g;function fc(e,t){let s=null;for(let r=t;r<e.length;r++){const i=e[r];if(s)i===\"\\\\\"?r++:i===s&&(s=null);else if(i==='\"'||i===\"'\")s=i;else{if(e.startsWith(\"~}}\",r))return r;if(e.startsWith(\"}}\",r))return r}}return-1}function En(e){if(!e.includes(\"{{\"))return e;let t=\"\",s=0;ri.lastIndex=0;let r;for(;(r=ri.exec(e))!==null;){if(r[1].length%2===1)continue;const i=r.index+r[0].length,n=fc(e,i);if(n===-1)break;const o=e.slice(i,n);if(r[5]){const c=r.index+r[1].length;t+=e.slice(s,c)+\"{{\"+r[2]+uc(o),s=n}else{const c=r[3]?lc(o):cc(o);c!==null&&(t+=e.slice(s,i)+\" \"+c,s=n)}ri.lastIndex=n}return t+e.slice(s)}var ii=e=>e==null||e===!1||e===\"\",ni=e=>typeof e==\"number\"||ii(e)||typeof e==\"string\"&&e.trim()!==\"\"&&!isNaN(Number(e));function Vt(e,t){if(!ni(t))throw new Error(`\"${e}\" needs numbers, but was given ${JSON.stringify(t)}`);return ii(t)?0:Number(t)}var pc=class{constructor(e,t,s){this.goto=null,this.deactivate=new Set,this.expressionCache=new Map,this.getStory=e,this.state=t,this.getCurrentSection=s,this.handlebars=Ze.default.create(),this.handlebars.registerHelper(\"embed\",u=>{const a=this.getCurrentSection();if(a.passages&&u in a.passages)return new Ze.default.SafeString(this.process(a.passages[u].text||\"\",!0));const h=this.getStory();if(u in h.sections)return new Ze.default.SafeString(this.process(h.sections[u].text||\"\",!0))}),this.handlebars.registerHelper(\"seen\",u=>this.state.getSeen(u)),this.handlebars.registerHelper(\"visits\",u=>this.state.getVisits(u)),this.handlebars.registerHelper(\"get\",u=>this.state.get(u)),this.handlebars.registerHelper(\"at\",u=>{const a=this.state.get(\"_section\");return Array.isArray(u)?u.includes(a):a===u});const r=u=>u&&typeof u==\"object\"&&typeof u.toString==\"function\"&&!Array.isArray(u)?u.toString():u;this.handlebars.registerHelper(\"goto\",(...u)=>{const a=u.pop(),h=u.length?r(u[0]):void 0;if(typeof h!=\"string\"||!h||!(h in this.getStory().sections))return new Ze.default.SafeString(zt(\"Error in {{goto}}:\",h===void 0?'expected a section name, e.g. {{goto \"cave\"}}':`there is no section called \"${h}\"`));let l=0;return a.hash.after!==void 0&&(l=Number(r(a.hash.after)),!Number.isFinite(l)||l<0)?new Ze.default.SafeString(zt(\"Error in {{goto}}:\",`after= should be a number of milliseconds, e.g. after=3000, not \"${a.hash.after}\"`)):(this.goto??(this.goto={section:h,after:l}),\"\")}),this.handlebars.registerHelper(\"deactivate\",(...u)=>{u.pop();const a=u.length?u.map(r):[this.state.get(\"_passage\")];for(const h of a){if(typeof h!=\"string\"||!h)return new Ze.default.SafeString(zt(\"Error in {{deactivate}}:\",u.length?'expected a passage name, e.g. {{deactivate \"door\"}}':\"{{deactivate}} with no passage name only works in a passage\"));const l=this.getCurrentSection()?.passages,p=this.getStory().sections[\"\"]?.passages;if(!(l&&h in l)&&!(p&&h in p))return new Ze.default.SafeString(zt(\"Error in {{deactivate}}:\",`there is no passage called \"${h}\" in this section`));this.deactivate.add(h)}return\"\"}),this.handlebars.registerHelper(\"set\",(u,a)=>(this.state.set(u,r(a)),\"\")),this.handlebars.registerHelper(\"__value\",u=>(this.evaluated=r(u),\"\")),this.handlebars.registerHelper(\"unset\",u=>(this.state.set(u,!1),\"\"));const i=(u,a)=>{this.handlebars.registerHelper(u,(h,...l)=>{const p=l.length>1?Vt(u,r(l[0])):1,g=Vt(u,this.state.get(h));return this.state.set(h,g+a*p),\"\"})};i(\"inc\",1),i(\"dec\",-1),this.handlebars.registerHelper(\"and\",(...u)=>u.slice(0,-1).every(Boolean)),this.handlebars.registerHelper(\"or\",(...u)=>u.slice(0,-1).some(Boolean)),this.handlebars.registerHelper(\"not\",u=>!u),this.handlebars.registerHelper(\"eq\",(u,a)=>u==a),this.handlebars.registerHelper(\"ne\",(u,a)=>u!=a),this.handlebars.registerHelper(\"gt\",(u,a)=>u>a),this.handlebars.registerHelper(\"lt\",(u,a)=>u<a),this.handlebars.registerHelper(\"gte\",(u,a)=>u>=a),this.handlebars.registerHelper(\"lte\",(u,a)=>u<=a);const n=(u,a)=>{this.handlebars.registerHelper(u,(...h)=>{const l=h.slice(0,-1).map(r);if(l.length!==2)throw new Error(`\"${u}\" needs two values, but was given ${l.length}`);return a(Vt(u,l[0]),Vt(u,l[1]))})};this.handlebars.registerHelper(\"add\",(...u)=>{const a=u.slice(0,-1).map(r);if(a.length!==2)throw new Error(`\"add\" needs two values, but was given ${a.length}`);const[h,l]=a;if(ni(h)&&ni(l))return Vt(\"add\",h)+Vt(\"add\",l);const p=g=>{if(ii(g))return\"\";if(typeof g==\"object\")throw new Error(`\"add\" can't add ${Array.isArray(g)?\"a list\":\"an object\"}`);return String(g)};return p(h)+p(l)}),n(\"sub\",(u,a)=>u-a),n(\"mul\",(u,a)=>u*a),n(\"div\",(u,a)=>{if(a===0)throw new Error(\"division by zero\");return u/a}),n(\"mod\",(u,a)=>{if(a===0)throw new Error(\"division by zero\");return u%a}),this.handlebars.registerHelper(\"array\",function(...u){return u.pop(),u}),this.handlebars.registerHelper(\"append\",(u,a)=>{const h=this.state.get(u)||[],l=Array.isArray(h)?[...h]:[h],p=r(a);return Array.isArray(p)?l.push(...p.map(r)):l.push(p),this.state.set(u,l),\"\"}),this.handlebars.registerHelper(\"prepend\",(u,a)=>{const h=this.state.get(u)||[],l=Array.isArray(h)?[...h]:[h],p=r(a);return Array.isArray(p)?l.unshift(...p.map(r)):l.unshift(p),this.state.set(u,l),\"\"}),this.handlebars.registerHelper(\"pop\",u=>{const a=this.state.get(u)||[];if(!Array.isArray(a)||a.length===0)return\"\";const h=[...a],l=h.shift();return this.state.set(u,h),l}),this.handlebars.registerHelper(\"remove\",(u,a)=>{const h=this.state.get(u)||[];if(!Array.isArray(h))return\"\";const l=r(a),p=h.findIndex(g=>r(g)===l);if(p!==-1){const g=[...h];g.splice(p,1),this.state.set(u,g)}return\"\"}),this.handlebars.registerHelper(\"contains\",(u,a)=>{let h;if(typeof u==\"string\"){const p=this.state.get(u);h=Array.isArray(p)?p:[]}else if(Array.isArray(u))h=u;else return!1;const l=r(a);return h.some(p=>r(p)===l)}),this.handlebars.registerHelper(\"length\",u=>{let a;if(typeof u==\"string\"){const h=this.state.get(u);a=Array.isArray(h)?h:[]}else if(Array.isArray(u))a=u;else return 0;return a.length});const o=u=>String(u).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),c=new Map,f=(u,a,h,l)=>{if(typeof u!=\"string\"||!u.includes(\"{{\"))return u;const p=(l?\"h:\":\"t:\")+u;let g=c.get(p);return g||(g=this.handlebars.compile(En(u),{compat:!0,noEscape:!l}),c.set(p,g)),g(a,{data:h.data})},d=(u,a)=>{let h=\"\";const l=f(a.hash.set||\"\",u,a,!1);if(l){const p=this.getStory().expressions?dc(l):l.split(\",\").map(g=>g.trim());h+=` data-set=\"${o(JSON.stringify(p))}\"`}return h};this.handlebars.registerHelper(\"section\",function(u,a){const h=f(a.hash.text||u,this,a,!0);return new Ze.default.SafeString(`<a class=\"squiffy-link link-section\" data-section=\"${o(u)}\"${d(this,a)} role=\"link\" tabindex=\"0\">${h}</a>`)}),this.handlebars.registerHelper(\"passage\",function(u,a){const h=f(a.hash.text||u,this,a,!0);return new Ze.default.SafeString(`<a class=\"squiffy-link link-passage\" data-passage=\"${o(u)}\"${d(this,a)} role=\"link\" tabindex=\"0\">${h}</a>`)})}evaluate(e){let t=this.expressionCache.get(e);return t||(t=this.handlebars.compile(`{{__value ${hc(e)}}}`),this.expressionCache.set(e,t)),this.evaluated=void 0,t(this.state.getStore()),this.evaluated}process(e,t){try{return e=this.handlebars.compile(En(e),{compat:!0})(this.state.getStore()),t?Qr(e,{async:!1}).trim():Kr(e,{async:!1}).trim()}catch(s){const r=s instanceof Error?s.message:String(s);return console.error(\"Squiffy template error:\",r),zt(\"Template error:\",r)}}};function zt(e,t){const s=r=>r.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\");return`<div class=\"squiffy-error\" style=\"color: red; background: #ffe0e0; padding: 8px; border: 1px solid red; margin: 4px 0; font-family: monospace; white-space: pre-wrap;\"><strong>${s(e)}</strong> ${s(t)}</div>`}var gc=class{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>this.off(e,t)}off(e,t){this.listeners.get(e)?.delete(t)}once(e,t){const s=this.on(e,r=>{s(),t(r)});return s}emit(e,t){this.listeners.get(e)?.forEach(s=>{try{s(t)}catch(r){console.error(`[Squiffy] handler for \"${String(e)}\" failed`,r)}})}},mc=class{constructor(e,t,s,r,i){this.store={},this.readOnly=!1,this.persist=e,this.storyId=t,this.onSet=s,this.emitter=r,this.onSetInternal=i}usePersistentStorage(){return this.persist&&window.localStorage&&this.storyId}set(e,t){this.readOnly||this.setInternal(e,t,!0)}setInternal(e,t,s){typeof t>\"u\"&&(t=!0),s&&this.onSetInternal&&this.onSetInternal(e,this.get(e),structuredClone(t)),this.store[e]=structuredClone(t),this.usePersistentStorage()&&(localStorage[this.storyId+\"-\"+e]=JSON.stringify(t)),s&&this.emitter.emit(\"set\",{attribute:e,value:t}),this.onSet(e,t)}has(e){return Object.prototype.hasOwnProperty.call(this.store,e)}get(e){return this.has(e)?structuredClone(this.store[e]):null}getStore(){return new Proxy({},{get:(e,t)=>typeof t==\"string\"&&(this.has(t)||!(t in e))?this.get(t):Reflect.get(e,t),has:(e,t)=>this.has(String(t)),ownKeys:()=>Object.keys(this.store),getOwnPropertyDescriptor:(e,t)=>{const s=String(t);if(this.has(s))return{enumerable:!0,configurable:!0,value:this.get(s)}}})}load(){if(!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)if(t.startsWith(this.storyId+\"-\")){const s=t.substring(this.storyId.length+1);this.store[s]=JSON.parse(localStorage[t])}}reset(){if(this.store={},!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)t.startsWith(this.storyId)&&localStorage.removeItem(t)}setSeen(e){let t=this.get(\"_seen_sections\");t||(t=[]);const s=this.get(\"_visits\")||{};s[e]=this.getVisitsFrom(s,t,e)+1,this.set(\"_visits\",s),t.indexOf(e)==-1&&(t.push(e),this.set(\"_seen_sections\",t))}getSeen(e){const t=this.get(\"_seen_sections\");return t?t.indexOf(e)>-1:!1}getVisits(e){return this.getVisitsFrom(this.get(\"_visits\")||{},this.get(\"_seen_sections\")||[],e)}getVisitsFrom(e,t,s){return Object.prototype.hasOwnProperty.call(e,s)?e[s]:t.indexOf(s)>-1?1:0}};function An(e,t){return!e&&!t?!0:!e||!t||e.length!==t.length?!1:e.every((s,r)=>s===t[r])}function vc(e,t,s,r,i,n){function o(u){return u.replace(/'/g,\"\\\\'\")}function c(u){return s.querySelectorAll(`[data-source='[[${o(u)}]]']`)}function f(u,a){return s.querySelectorAll(`[data-source='[[${o(u)}]][${o(a)}]']`)}function d(u,a){const h=Array.from(u.querySelectorAll(\"a.link-passage.disabled\")).map(l=>l.getAttribute(\"data-passage\"));u.innerHTML=a;for(const l of h){const p=u.querySelector(`a.link-passage[data-passage=\"${l}\"]`);p&&i(p)}}for(const u of Object.keys(e.sections)){const a=c(u);if(a.length){const h=t.sections[u];if(h){const l=e.sections[u],p=!An(l.attributes,h.attributes),g=h.text!=l.text;if(p&&n(h.attributes||[]),g||p)for(const v of a)d(v,r(h.text||\"\",h))}else for(const l of a)l.closest(\".squiffy-output-section\")?.remove()}if(e.sections[u].passages)for(const h of Object.keys(e.sections[u].passages)){const l=f(u,h);if(!l.length)continue;const p=t.sections[u]?.passages&&t.sections[u]?.passages[h];if(p){const g=e.sections[u].passages[h],v=!An(g.attributes,p.attributes),_=p.text!=g.text;if(v&&n(p.attributes||[]),_||v)for(const S of l)d(S,r(p.text||\"\",t.sections[u]))}else for(const g of l)g.closest(\".squiffy-output-passage\")?.remove()}}}var yc=class{constructor(e,t,s,r,i,n,o,c,f,d,u){this.plugins=[],this.outputElement=e,this.textProcessor=t,this.state=s,this.linkHandler=r,this.getSectionText=i,this.getPassageText=n,this.processText=o,this.addTransition=c,this.animation=f,this.emitter=d,this.resolveAssetsInHtml=u}add(e){const t=e.init({outputElement:this.outputElement,registerHelper:(s,r)=>{this.textProcessor.handlebars.registerHelper(s,r)},registerLinkHandler:(s,r)=>{this.linkHandler.registerLinkHandler(s,r)},get:s=>this.state.get(s),set:(s,r)=>this.state.set(s,r),getSectionText:this.getSectionText,getPassageText:this.getPassageText,processText:this.processText,resolveAssetsInHtml:this.resolveAssetsInHtml,addTransition:this.addTransition,animation:this.animation,on:(s,r)=>this.emitter.on(s,r),off:(s,r)=>this.emitter.off(s,r),once:(s,r)=>this.emitter.once(s,r)});return this.plugins.push(e),t}onWrite(e){this.plugins.forEach(t=>t.onWrite?.(e))}onLoad(){this.plugins.forEach(e=>e.onLoad?.())}};function Ln(e,t){return new Promise(s=>{e.addEventListener(\"transitionend\",function(){e.innerHTML=t,e.addEventListener(\"transitionend\",function(){e.classList.remove(\"fade-in\"),s()},{once:!0}),e.classList.remove(\"fade-out\"),e.classList.add(\"fade-in\")},{once:!0}),e.classList.add(\"fade-out\")})}function bc(){return{name:\"replaceLabel\",init(e){e.registerHelper(\"label\",function(t,s){return new Ze.default.SafeString(`<span class=\"squiffy-label-${t}\">${s.fn(this)}</span>`)}),e.registerHelper(\"replace\",function(t,s){const r=String(s.fn(this)),i=e.outputElement.querySelectorAll(`.squiffy-label-${t}`),n=i[i.length-1];if(n){const o=r.includes(`\n\n`)?Kr(r,{async:!1}).trim():Qr(r,{async:!1}).trim();e.addTransition(()=>Ln(n,o))}return\"\"})}}}function _c(){const e=i=>i.replace(/&/g,\"&amp;\").replace(/'/g,\"&#39;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"),t=(i,n,o,c)=>{const f=o.map(l=>l.toString()),d=r(f,null),u=c.hash.set||\"\";u&&i.set(u,d[0]);const a=e(JSON.stringify(d.slice(1))||\"\"),h=c.hash.show==\"next\"?d[1]:d[0];return new Ze.default.SafeString(`<a class=\"squiffy-link\" data-handler=\"${n}\" data-value=\"${e(d[0])}\" data-show=\"${c.hash.show||\"\"}\" data-options='${a}' data-attribute=\"${u}\" role=\"link\">${h}</a>`)},s=(i,n,o)=>{const c={},f=JSON.parse(n.getAttribute(\"data-options\")??\"[]\")||[],d=r(f,o?n.getAttribute(\"data-value\"):\"\");n.innerHTML=n.getAttribute(\"data-show\")==\"next\"?d[1]:d[0],n.setAttribute(\"data-value\",d[0]),n.setAttribute(\"data-options\",JSON.stringify(d.slice(1))||\"\"),d[1]||(c.disableLink=!0);const u=n.getAttribute(\"data-attribute\");return u&&i.set(u,n.getAttribute(\"data-value\")),window.getSelection()?.removeAllRanges(),c},r=(i,n)=>{const o=i[0],c=i.slice(1);return n&&c.push(n),[o,...c]};return{name:\"rotateSequence\",init(i){i.registerHelper(\"rotate\",(n,o)=>t(i,\"rotate\",n,o)),i.registerHelper(\"sequence\",(n,o)=>t(i,\"sequence\",n,o)),i.registerLinkHandler(\"rotate\",n=>s(i,n,!0)),i.registerLinkHandler(\"sequence\",n=>s(i,n,!1))}}}function Sc(){return{name:\"random\",init(e){e.registerHelper(\"random\",(t,s)=>{const r=t.map(o=>o.toString()),i=r[Math.floor(Math.random()*r.length)],n=s.hash.set||\"\";return n&&e.set(n,i),new Ze.default.SafeString(i)})}}}function kc(){let e;return{name:\"live\",init(t){e=t,e.registerHelper(\"live\",(r,i)=>{const n=i.hash.section||\"\";if(n)return new Ze.default.SafeString(`<span class=\"squiffy-live\" data-attribute=\"${r}\" data-section=\"${n}\"></span>`);const o=i.hash.passage||\"\";return o?new Ze.default.SafeString(`<span class=\"squiffy-live\" data-attribute=\"${r}\" data-passage=\"${o}\"></span>`):new Ze.default.SafeString(`<span class=\"squiffy-live\" data-attribute=\"${r}\"></span>`)});const s=async r=>{const i=[],n=`.squiffy-live[data-attribute=\"${CSS.escape(r.attribute)}\"]`;for(const o of e.outputElement.querySelectorAll(n)){const c=o.innerHTML;let f=\"\";if(o.dataset.section){const d=e.getSectionText(o.dataset.section);d&&(f=e.processText(d,!0))}else if(o.dataset.passage){const d=e.getPassageText(o.dataset.passage);d&&(f=e.processText(d,!0))}else f=r.value;c!==f&&i.push(Ln(o,f))}await Promise.all(i)};e.on(\"set\",async r=>{await s(r)})},onWrite(t){e&&t.querySelectorAll(\".squiffy-live\").forEach(s=>{if(s.dataset.section){const r=e.getSectionText(s.dataset.section);r&&(s.innerHTML=e.processText(r,!0))}else if(s.dataset.passage){const r=e.getPassageText(s.dataset.passage);r&&(s.innerHTML=e.processText(r,!0))}else{const r=s.dataset.attribute;s.textContent=r?e.get(r):\"\"}})}}}function wc(){let e;const t=r=>{const i={};for(const[n,o]of Object.entries(r)){if(o==null){i[n]=o;continue}try{i[n]=JSON.parse(o)}catch{i[n]=o}}return i},s=r=>{for(const i of r.querySelectorAll(\".squiffy-animate\")){const n=t(i.dataset);if(!n.content)continue;const o=n.content.includes(`\n\n`)?Kr(n.content,{async:!1}):Qr(n.content,{async:!1});if(i.innerHTML=e.resolveAssetsInHtml(o.trim()),!n.name)continue;const c=i.innerHTML;let f=[];const d=()=>{for(const h of f)e.animation.removeLinkAnimation(h);f=[...i.querySelectorAll(\"a\")];for(const h of f)e.animation.addLinkAnimation(h,a)},u=()=>{if(n.trigger!==\"link\"){i.innerHTML=c;return}const h=f;i.innerHTML=c,d(),f.forEach((l,p)=>{const g=h[p];if(!g)return;g.classList.contains(\"disabled\")&&l.classList.add(\"disabled\");const v=g.getAttribute(\"tabindex\");v!==null&&l.setAttribute(\"tabindex\",v)})},a=()=>{n.loop?e.animation.runAnimation(n.name,i,n,()=>{},!0):(e.animation.isInitiallyHidden(n.name)&&(i.style.opacity=\"0\"),e.addTransition(()=>new Promise(h=>{i.style.opacity=\"\",e.animation.runAnimation(n.name,i,n,()=>{i.classList.remove(\"squiffy-animate\"),u(),h()},!1)})))};n.trigger===\"link\"?d():a()}};return{name:\"animate\",init(r){e=r,e.registerHelper(\"animate\",function(i,n){const o=n.fn(this),c={name:i,content:o,...n.hash},f=Object.entries(c).map(([u,a])=>` data-${Ze.default.escapeExpression(u)}=\"${Ze.default.escapeExpression(JSON.stringify(a))}\"`).join(\"\"),d=o.includes(`\n\n`)?\"div\":\"span\";return new Ze.default.SafeString(`<${d} class=\"squiffy-animate\"${f}></${d}>`)})},onWrite(r){s(r)},onLoad(){s(e.outputElement)}}}var Ms={ReplaceLabel:bc,RotateSequencePlugin:_c,RandomPlugin:Sc,LivePlugin:kc,AnimatePlugin:wc},xc=class{constructor(){this.linkHandlers={}}registerLinkHandler(e,t){this.linkHandlers[e]=t}handleLink(e){const t=e.getAttribute(\"data-handler\")||\"\",s=this.linkHandlers[t];return s?[!0,t,s(e)]:[!1,t,{}]}},Lt=typeof window<\"u\",rt=Lt?window:null,j=Lt?document:null,$e={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},ve={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},ct={NONE:0,AUTO:1,FORCE:2},Ye={replace:0,none:1,blend:2},Rn=Symbol(),es=Symbol(),oi=Symbol(),Os=Symbol(),In=Symbol(),He=1e-11,wt=1e12,it=1e3,yh=\"var(\",or=[],ai=(()=>{const e=new Map;return e.set(\"x\",\"translateX\"),e.set(\"y\",\"translateY\"),e.set(\"z\",\"translateZ\"),e})(),ts=[\"perspective\",\"translateX\",\"translateY\",\"translateZ\",\"rotate\",\"rotateX\",\"rotateY\",\"rotateZ\",\"scale\",\"scaleX\",\"scaleY\",\"scaleZ\",\"skew\",\"skewX\",\"skewY\"],Mn=ts.reduce((e,t)=>({...e,[t]:t+\"(\"}),{}),ie=()=>{},Tc=e=>e,Cc=/\\)\\s*[-.\\d]/,Pc=/(^#([\\da-f]{3}){1,2}$)|(^#([\\da-f]{4}){1,2}$)/i,Ec=/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/i,Ac=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,Lc=/hsl\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*\\)/i,Rc=/hsla\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)\\s*\\)/i,On=/[-+]?\\d*\\.?\\d+(?:e[-+]?\\d)?/gi,Nn=/^([-+]?\\d*\\.?\\d+(?:e[-+]?\\d+)?)([a-z]+|%)$/i,Ic=/([a-z])([A-Z])/g,Dn=/(\\*=|\\+=|-=)/,Mc=/var\\(\\s*(--[\\w-]+)(?:\\s*,\\s*([^)]+))?\\s*\\)/,Ns={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:it,delay:0,loopDelay:0,ease:\"out(2)\",composition:Ye.replace,modifier:Tc,onBegin:ie,onBeforeUpdate:ie,onUpdate:ie,onLoop:ie,onPause:ie,onComplete:ie,onRender:ie},qe={current:null,root:j},z={defaults:Ns,precision:4,timeScale:1,tickThreshold:200,editor:null},Bn={version:\"4.5.0\",engine:null};Lt&&(rt.AnimeJS||(rt.AnimeJS=[]),rt.AnimeJS.push(Bn));var ar=e=>e.replace(Ic,\"$1-$2\").toLowerCase(),ze=(e,t)=>e.indexOf(t)===0,Ut=Date.now,je=Array.isArray,We=e=>e&&e.constructor===Object,Qe=e=>typeof e==\"number\"&&!isNaN(e),Xe=e=>typeof e==\"string\",De=e=>typeof e==\"function\",$=e=>typeof e>\"u\",ss=e=>$(e)||e===null,lr=e=>Lt&&e instanceof SVGElement,$n=e=>Pc.test(e),Hn=e=>ze(e,\"rgb\"),qn=e=>ze(e,\"hsl\"),Oc=e=>$n(e)||(Hn(e)||qn(e))&&(e[e.length-1]===\")\"||!Cc.test(e)),vs=e=>!z.defaults.hasOwnProperty(e),Nc=[\"opacity\",\"rotate\",\"overflow\",\"color\"],Dc=(e,t)=>{if(Nc.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===\"scale\"){const s=e.parentNode;return s&&s.tagName===\"filter\"}return!0}},rs=e=>Xe(e)?parseFloat(e):e,is=Math.pow,gt=Math.sqrt,li=Math.sin,ci=Math.cos,mt=Math.abs,cr=Math.exp,Bc=Math.ceil,ys=Math.floor,$c=Math.asin,Fn=Math.max,ur=Math.atan2,Rt=Math.PI,ui=Math.round,G=(e,t,s)=>e<t?t:e>s?s:e,V=(e,t)=>{if(t<0)return e;if(!t)return ui(e);const s=10**t;return ui(e*s)/s},ns=(e,t)=>je(t)?t.reduce((s,r)=>mt(r-e)<mt(s-e)?r:s):t?ui(e/t)*t:e,Wt=(e,t,s)=>s===1?t:s===0?e:e+(t-e)*s,hr=e=>e===1/0?wt:e===-1/0?-wt:e,bs=e=>e<=1e-11?He:hr(V(e,11)),tt=e=>je(e)?[...e]:e,vt=(e,t)=>{const s={...e};for(let r in t){const i=e[r];s[r]=$(i)?t[r]:i}return s},Ce=(e,t,s,r=\"_prev\",i=\"_next\")=>{let n=e._head,o=i;for(s&&(n=e._tail,o=r);n;){const c=n[o];t(n),n=c}},xt=(e,t,s=\"_prev\",r=\"_next\")=>{const i=t[s],n=t[r];i?i[r]=n:e._head=n,n?n[s]=i:e._tail=i,t[s]=null,t[r]=null},Tt=(e,t,s,r=\"_prev\",i=\"_next\")=>{let n=e._tail;for(;n&&s&&s(n,t);)n=n[r];const o=n?n[i]:e._head;n?n[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=n,t[i]=o},Hc=(e,t,s)=>{const r=e.style.transform;if(r){const i=e[Os];let n=0;const o=r.length;let c;for(;n<o;){for(;n<o&&r.charCodeAt(n)===32;)n++;if(n>=o)break;const d=n;for(;n<o&&r.charCodeAt(n)!==40;)n++;if(n>=o)break;const u=r.substring(d,n);let a=1;const h=n+1;let l=-1,p=-1;for(n++;n<o&&a>0;){const v=r.charCodeAt(n);v===40?a++:v===41?a--:v===44&&a===1&&(l===-1?l=n:p===-1&&(p=n)),n++}const g=n-1;u===\"translate\"||u===\"translate3d\"?(l===-1?i.translateX=r.substring(h,g).trim():(i.translateX=r.substring(h,l).trim(),p===-1?i.translateY=r.substring(l+1,g).trim():(i.translateY=r.substring(l+1,p).trim(),i.translateZ=r.substring(p+1,g).trim())),c=r.substring(h,g)):u===\"scale\"||u===\"scale3d\"?l===-1?i.scale=r.substring(h,g).trim():(i.scaleX=r.substring(h,l).trim(),p===-1?i.scaleY=r.substring(l+1,g).trim():(i.scaleY=r.substring(l+1,p).trim(),i.scaleZ=r.substring(p+1,g).trim())):i[u]=r.substring(h,g)}if(t===\"translate3d\"&&c)return s&&(s[t]=c),c;const f=i[t];if(!$(f))return s&&(s[t]=f),f}return t===\"translate3d\"?\"0px, 0px, 0px\":t===\"rotate3d\"?\"0, 0, 0, 0deg\":ze(t,\"scale\")?\"1\":ze(t,\"rotate\")||ze(t,\"skew\")?\"0deg\":\"0px\"},Vn=e=>{let t=\"\";for(let s=0,r=ts.length;s<r;s++){const i=ts[s],n=e[i];if(n!==void 0){if(i===\"translateX\"){const o=e.translateY;if(o!==void 0){const c=e.translateZ;c!==void 0?(t+=`translate3d(${n},${o},${c}) `,s+=2):(t+=`translate(${n},${o}) `,s+=1);continue}}if(i===\"scaleX\"&&e.scale===void 0){const o=e.scaleY;if(o!==void 0){const c=e.scaleZ;c!==void 0?(t+=`scale3d(${n},${o},${c}) `,s+=2):(t+=`scale(${n},${o}) `,s+=1);continue}}t+=`${Mn[i]}${n}) `}i===\"rotateZ\"&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},hi=[];function zn(e,t){if(!e)return null;const s=hi.length;e:for(let r=0;r<s;r++){const i=hi[r];if(i.detect&&!i.detect(e))continue;const n=i.targetAdapters;for(let o=0,c=n.length;o<c;o++){const f=n[o];if(f.detect(e)){const d=f.props[t];if(d&&(!d.gate||d.gate(e)))return d;break e}}}for(let r=0;r<s;r++){const i=hi[r];if(i.detect&&!i.detect(e))continue;const n=i.propertyResolvers;for(let o=0,c=n.length;o<c;o++){const f=n[o](e,t);if(f)return f}}return null}var qc=e=>{const t=Ec.exec(e)||Ac.exec(e),s=$(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],s]},Fc=e=>{const t=e.length,s=t===4||t===5;return[+(\"0x\"+e[1]+e[s?1:2]),+(\"0x\"+e[s?2:3]+e[s?2:4]),+(\"0x\"+e[s?3:5]+e[s?3:6]),t===5||t===9?+(+(\"0x\"+e[s?4:7]+e[s?4:8])/255).toFixed(3):1]},di=(e,t,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e),Vc=e=>{const t=Lc.exec(e)||Rc.exec(e),s=+t[1]/360,r=+t[2]/100,i=+t[3]/100,n=$(t[4])?1:+t[4];let o,c,f;if(r===0)o=c=f=i;else{const d=i<.5?i*(1+r):i+r-i*r,u=2*i-d;o=V(di(u,d,s+1/3)*255,0),c=V(di(u,d,s)*255,0),f=V(di(u,d,s-1/3)*255,0)}return[o,c,f,n]},zc=e=>Hn(e)?qc(e):$n(e)?Fc(e):qn(e)?Vc(e):[0,0,0,1],U=(e,t)=>$(e)?t:e,Un=(e,t)=>{const s=e.match(Mc),r=t[es]?t:document.documentElement;let i=getComputedStyle(r)?.getPropertyValue(s[1]);return(!i||i.trim()===\"\")&&s[2]&&(i=s[2].trim()),i||0},Ve=(e,t,s,r,i,n)=>{if(De(e)){if(!i){const c=e(t,s,r,n);return isNaN(+c)?c||0:+c}const o=()=>{const c=e(t,s,r,n);return isNaN(+c)?c||0:+c};return i.func=o,o()}if(Xe(e)&&ze(e,\"var(\")){if(!i)return Un(e,t);const o=()=>Un(e,t);return i.func=o,o()}return e},fi=(e,t)=>e[es]?e[oi]&&Dc(e,t)?$e.ATTRIBUTE:ts.includes(t)||ai.get(t)?$e.TRANSFORM:ze(t,\"--\")?$e.CSS_VAR:t in e.style?$e.CSS:t in e?$e.OBJECT:$e.ATTRIBUTE:$e.OBJECT,Wn=(e,t,s)=>{const r=e.style[t];r&&s&&(s[t]=r);const i=r||getComputedStyle(e[In]||e).getPropertyValue(t);return i===\"auto\"?\"0\":i},os=(e,t,s,r)=>{const i=$(s)?fi(e,t):s,n=zn(e,t);if(n){const o=n.get(e);return o&&r&&(r[t]=o),o??0}if(i===$e.OBJECT){const o=e[t];return o&&r&&(r[t]=o),o||0}if(i===$e.ATTRIBUTE){const o=e.getAttribute(t);return o&&r&&(r[t]=o),o}return i===$e.TRANSFORM?Hc(e,t,r):i===$e.CSS_VAR?Wn(e,t,r).trimStart():Wn(e,t,r)},as=(e,t,s)=>s===\"-\"?e-t:s===\"+\"?e+t:e*t,pi=()=>({t:ve.NUMBER,n:0,u:null,o:null,d:null,s:null}),ot=(e,t)=>{if(t.t=ve.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;const s=+e;if(!isNaN(s))return t.n=s,t;let r=e;r[1]===\"=\"&&(t.o=r[0],r=r.slice(2));const i=r.includes(\" \")?!1:Nn.exec(r);if(i)return t.t=ve.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Oc(r))return t.t=ve.COLOR,t.d=zc(r),t;{const n=r.match(On);return t.t=ve.COMPLEX,t.d=n?n.map(Number):[],t.s=r.split(On)||[],t}},Xn=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=tt(e._toNumbers),t.s=tt(e._strings),t),Ke=pi(),Gn=(e,t,s)=>{const r=e._modifier,i=e._fromNumbers,n=e._toNumbers,o=e._strings;let c=o[0];for(let f=0,d=n.length;f<d;f++){const u=r(V(Wt(i[f],n[f],t),s)),a=o[f+1];c+=`${a?u+a:u}`,e._numbers[f]=u}return c},dr=(e,t,s,r,i)=>{const n=e.parent,o=e.duration,c=e.completed,f=e.iterationDuration,d=e.iterationCount,u=e._currentIteration,a=e._loopDelay,h=e._reversed,l=e._alternate,p=e._hasChildren,g=e._delay,v=e._currentTime,_=g+f,S=t-g,y=G(v,-g,o),m=G(S,-g,o),b=S-v,k=m>0,w=m>=o,C=o<=He,M=i===ct.FORCE;let P=0,A=S,E=0;if(d>1){const D=f+(w?0:a),O=~~(m/D);e._currentIteration=G(O,0,d),w&&e._currentIteration--,P=e._currentIteration%2,A=m-O*D||0}const B=h^(l&&P),q=e._ease;let W=w?B?0:o:B?f-A:A;q&&(W=f*q(W/f)||0);const T=(n?n.backwards:S<v)?!B:!!B;if(e._currentTime=S,e._iterationTime=W,e.backwards=T,k&&!e.began?(e.began=!0,!s&&!(n&&(T||!n.began))&&e.onBegin(e)):S<=0&&(e.began=!1),!s&&!p&&k&&e._currentIteration!==u&&e.onLoop(e),M||i===ct.AUTO&&(t>=(n&&g>0?0:g)&&t<=_||t<=g&&y>g||t>=_&&y!==o)||W>=_&&y!==o||W<=g&&y>0&&!w||t<=y&&y===o&&c||w&&!c&&C){if(k&&(e.computeDeltaTime(y),s||e.onBeforeUpdate(e)),!p){const D=M||(T?b*-1:b)>=z.tickThreshold,O=V(e._offset+(n?n._offset:0)+g+W,12);let L=e._head,F,Z,Y,X,J=0;for(;L;){const ne=L._composition,ce=L._currentTime,we=L._changeDuration,me=L._absoluteStartTime+L._changeDuration,te=L._nextRep,Q=L._prevRep,ue=ne!==Ye.none,Pe=Q?Q._absoluteStartTime+Q._changeDuration:0,Ee=Q&&Q.parent!==L.parent,xe=!te||te._isOverridden?me:te.parent===L.parent?me+te._delay:te._absoluteStartTime<te._absoluteUpdateStartTime?te._absoluteStartTime:te._absoluteUpdateStartTime;if((D||(ce!==we||O<=xe||Q&&!Ee&&(!te||te.parent!==L.parent))&&(ce!==0||O>=L._absoluteStartTime||Ee&&!L._hasFromValue&&!Q._isOverridden&&O>=Pe||te&&!te._isOverridden&&te.parent===L.parent&&te._currentTime!==0&&W<te._startTime))&&(!Q||Ee||W>=L._startTime)&&(!ue||!L._isOverridden&&(!L._isOverlapped||O<=me)&&(!te||te._isOverridden||O<=xe)&&(!Q||Q._isOverridden||(Ee?O>=L._absoluteStartTime||!L._hasFromValue&&O>=Pe:O>=Pe+L._delay)))){const Ae=L._currentTime=G(W-L._startTime,0,we),ye=L._ease(Ae/L._updateDuration),Te=L._modifier,ge=L._valueType,Le=L._tweenType,Se=Le===$e.OBJECT,se=ge===ve.NUMBER,be=se&&Se||ye===0||ye===1?-1:z.precision;let ke,Oe;if(se)ke=Oe=Te(V(Wt(L._fromNumber,L._toNumber,ye),be));else if(ge===ve.UNIT)Oe=Te(V(Wt(L._fromNumber,L._toNumber,ye),be)),ke=`${Oe}${L._unit}`;else if(ge===ve.COLOR){const N=L._numbers,oe=L._fromNumbers,fe=L._toNumbers,ae=1-ye,K=oe[0],Ne=oe[1],Ue=oe[2],ft=fe[0],Ct=fe[1],Mt=fe[2];N[0]=Te(Math.sqrt(K*K*ae+ft*ft*ye)),N[1]=Te(Math.sqrt(Ne*Ne*ae+Ct*Ct*ye)),N[2]=Te(Math.sqrt(Ue*Ue*ae+Mt*Mt*ye)),N[3]=Te(Wt(oe[3],fe[3],ye)),(!L._setter||r)&&(ke=`rgba(${V(N[0],0)},${V(N[1],0)},${V(N[2],0)},${N[3]})`)}else ge===ve.COMPLEX&&(ke=Gn(L,ye,be));if(ue&&(L._number=Oe),!r&&ne!==Ye.blend){const N=L.property;F=L.target,L._setter?L._setter(F,Oe,L):Se?F[N]=ke:Le===$e.ATTRIBUTE?F.setAttribute(N,ke):(Z=F.style,Le===$e.TRANSFORM?(F!==Y&&(Y=F,X=F[Os]),X[N]=ke,J=1):Le===$e.CSS?Z[N]=ke:Le===$e.CSS_VAR&&Z.setProperty(N,ke)),k&&(E=1)}else L._value=ke}else ce&&Q&&!Ee&&W<L._startTime&&(L._currentTime=0);J&&L._renderTransforms&&(Z.transform=Vn(X),J=0),L=L._next}!s&&E&&e.onRender(e)}!s&&k&&e.onUpdate(e)}return n&&C?!s&&(n.began&&!T&&S>0&&!c||T&&S<=1e-11&&c)&&(e.onComplete(e),e.completed=!T):k&&w?d===1/0?e._startTime+=e.duration:e._currentIteration>=d-1&&(e.paused=!0,!c&&!p&&(e.completed=!0,!s&&!(n&&(T||!n.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,E},ls=(e,t,s,r,i)=>{const n=e._currentIteration;if(dr(e,t,s,r,i),e._hasChildren){const o=e,c=o.backwards,f=r?t:o._iterationTime,d=Ut();let u=0,a=!0;if(!r&&o._currentIteration!==n){const h=o.iterationDuration;Ce(o,l=>{if(!c)!l.completed&&!l.backwards&&l._currentTime<l.iterationDuration&&dr(l,h,s,1,ct.FORCE),l.began=!1,l.completed=!1;else{const p=l.duration,g=l._offset+l._delay,v=g+p;!s&&p<=1e-11&&(!g||v===h)&&l.onComplete(l)}}),s||o.onLoop(o)}Ce(o,h=>{const l=V((f-h._offset)*h._speed,12);if(c&&l>h._delay+h.duration)return;const p=h._fps<o._fps?h.requestTick(d):i;u+=dr(h,l,s,r,p),!h.completed&&a&&(a=!1)},c),!s&&u&&o.onRender(o),(a||c)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,s||(o.onComplete(o),o._resolve(o))))}},Yn={},gi=(e,t,s)=>{if(s===$e.TRANSFORM){const r=ai.get(e);return r||e}else if(s===$e.CSS||s===$e.ATTRIBUTE&&lr(t)&&e in t.style){const r=Yn[e];if(r)return r;{const i=e&&ar(e);return Yn[e]=i,i}}else return e},fr=(e,t=!1)=>{if(e._hasChildren)Ce(e,s=>fr(s,t),!0);else{const s=e;s.pause(),Ce(s,r=>{const i=r.property,n=r.target,o=r._tweenType,c=r._inlineValue,f=ss(c)||c===\"\";if(r._setter){if(!t&&!f){if(ot(c,Ke),Ke.d){const d=Ke.d,u=r._numbers;for(let a=0,h=d.length;a<h;a++)u[a]=d[a]}else r._number=Ke.n;r._setter(r.target,r._number,r)}}else if(o===$e.OBJECT)!t&&!f&&(n[i]=c);else if(n[es])if(o===$e.ATTRIBUTE)t||(f?n.removeAttribute(i):n.setAttribute(i,c));else{const d=n.style;if(o===$e.TRANSFORM){const u=n[Os];f?delete u[i]:u[i]=c,r._renderTransforms&&(Object.keys(u).length?d.transform=Vn(u):d.removeProperty(\"transform\"))}else f?d.removeProperty(ar(i)):d[i]=c}n[es]&&s._tail===r&&s.targets.forEach(d=>{d.getAttribute&&d.getAttribute(\"style\")===\"\"&&d.removeAttribute(\"style\")})})}return e},jn=e=>fr(e,!0),Zn=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=it/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=+e,s=t<1e-11?He:t,r=it/s;s>Ns.frameRate&&(Ns.frameRate=s),this._fps=s,this._frameDuration=r}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<1e-11?He:t}requestTick(e){const t=this._frameDuration,s=e-this._lastTickTime,r=t*.25;return s+(r<4?r:4)<t?ct.NONE:(this._lastTickTime=s>=t?e-s%t:e,ct.AUTO)}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},_s={animation:null,update:ie},Uc=e=>{let t=_s.animation;return t||(t={duration:He,computeDeltaTime:ie,_offset:0,_delay:0,_head:null,_tail:null},_s.animation=t,_s.update=()=>{e.forEach(s=>{for(let r in s){const i=s[r],n=i._head;if(n){const o=n._valueType,c=o===ve.COMPLEX||o===ve.COLOR?tt(n._fromNumbers):null;let f=n._fromNumber,d=i._tail;for(;d&&d!==n;){if(c)for(let u=0,a=d._numbers.length;u<a;u++)c[u]+=d._numbers[u];else f+=d._number;d=d._prevAdd}n._toNumber=f,n._toNumbers=c}}}),dr(t,1,1,0,ct.FORCE)}),t},Jn=Lt?requestAnimationFrame:setImmediate,Wc=Lt?cancelAnimationFrame:clearImmediate,Xc=class extends Zn{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Ns,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=Ut();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,s=this._fps;let r=this._head;for(;r;){const i=r._next;r.paused?(xt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):ls(r,(e-r._startTime)*r._speed*t,0,0,r._fps<s?r.requestTick(e):ct.AUTO),r=i}_s.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Ut()),this.reqId=Jn(Qn)),this}pause(){if(this.reqId)return this.paused=!0,Gc()}resume(){if(this.paused)return this.paused=!1,Ce(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(z.timeScale===1?1:it)}set speed(e){const t=e*z.timeScale;this._speed!==t&&(this._speed=t,Ce(this,s=>s.speed=s._speed))}get timeUnit(){return z.timeScale===1?\"ms\":\"s\"}set timeUnit(e){const s=e===\"s\",r=s?.001:1;if(z.timeScale!==r){z.timeScale=r,z.tickThreshold=200*r;const i=s?.001:it;this.defaults.duration*=i,this._speed*=i}}get precision(){return z.precision}set precision(e){z.precision=e}},et=(()=>{const e=new Xc(Ut());return Lt&&(Bn.engine=e,j.addEventListener(\"visibilitychange\",()=>{e.pauseOnDocumentHidden&&(j.hidden?e.pause():e.resume())})),e})(),Qn=()=>{et._head?(et.reqId=Jn(Qn),et.update()):et.reqId=0},Gc=()=>(Wc(et.reqId),et.reqId=0,et),pr={_rep:new WeakMap,_add:new Map},mi=(e,t,s=\"_rep\")=>{const r=pr[s];let i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},Yc=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,gr=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=He,e._currentTime=He},Kn=(e,t)=>{const s=e._composition;if(s===Ye.replace){const r=e._absoluteStartTime;Tt(t,e,Yc,\"_prevRep\",\"_nextRep\");const i=e._prevRep;if(i){const n=i.parent,o=i._absoluteEndTime;if(e.parent.id!==n.id&&n.iterationCount>1&&o+(n.duration-n.iterationDuration)>r){gr(i);let d=i._prevRep;for(;d&&d.parent.id===n.id;)gr(d),d=d._prevRep}const c=e._absoluteUpdateStartTime;if(o>c){const d=i._startTime,u=o-(d+i._updateDuration),a=V(c-u-d,12);i._changeDuration=a,i._currentTime=a,i._isOverlapped=1,a<1e-11&&gr(i)}const f=e.parent.parent;if(!f||f!==n.parent){let d=!0;if(Ce(n,u=>{u._isOverlapped||(d=!1)}),d){const u=n.parent;if(u){let a=!0;Ce(u,h=>{h!==n&&Ce(h,l=>{l._isOverlapped||(a=!1)})}),a&&u.cancel()}else n.cancel()}}}}else if(s===Ye.blend){const r=mi(e.target,e.property,\"_add\"),i=Uc(pr._add);let n=r._head;n||(n={...e},n._composition=Ye.replace,n._updateDuration=He,n._startTime=0,n._numbers=tt(e._fromNumbers),n._number=0,n._next=null,n._prev=null,Tt(r,n),Tt(i,n));const o=e._toNumber;if(e._fromNumber=n._fromNumber-o,e._toNumber=0,e._numbers=tt(e._fromNumbers),e._number=0,n._fromNumber=o,e._toNumbers.length){const c=tt(e._toNumbers);c.forEach((f,d)=>{e._fromNumbers[d]=n._fromNumbers[d]-f,e._toNumbers[d]=0}),n._fromNumbers=c}Tt(r,e,null,\"_prevAdd\",\"_nextAdd\")}return e},eo=e=>{const t=e._composition;if(t!==Ye.none){const s=e.target,r=e.property,i=pr._rep.get(s)[r];if(xt(i,e,\"_prevRep\",\"_nextRep\"),t===Ye.blend){const n=pr._add,o=n.get(s);if(!o)return;const c=o[r],f=_s.animation;xt(c,e,\"_prevAdd\",\"_nextAdd\");const d=c._head;if(d&&d===c._tail){xt(c,d,\"_prevAdd\",\"_nextAdd\"),xt(f,d);let u=!0;for(let a in o)if(o[a]._head){u=!1;break}u&&n.delete(s)}}}return e},to=(e,t,s)=>{let r=!1;return Ce(t,i=>{const n=i.target;if(e.includes(n)){const o=i.property,c=i._tweenType,f=gi(s,n,c);(!f||f&&f===o)&&(i.parent._tail===i&&i._tweenType===$e.TRANSFORM&&i._prev&&i._prev._tweenType===$e.TRANSFORM&&(i._prev._renderTransforms=1),xt(t,i),eo(i),r=!0)}},!0),r},Nt=(e,t,s)=>{const r=t||et;let i;if(r._hasChildren){let n=0;Ce(r,o=>{if(!o._hasChildren)if(i=to(e,o,s),i&&!o._head)o.cancel(),xt(r,o);else{const c=o._offset+o._delay+o.duration;c>n&&(n=c)}o._head?Nt(e,o,s):o._hasChildren=!1},!0),$(r.iterationDuration)||(r.iterationDuration=n)}else i=to(e,r,s);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},so=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),vi=e=>(e._cancelled&&(e._hasChildren?Ce(e,vi):Ce(e,t=>{t._composition!==Ye.none&&Kn(t,mi(t.target,t.property))}),e._cancelled=0),e),ro=0,jc=(e,t)=>e._priority>t._priority,ut=class extends Zn{constructor(e={},t=null,s=0){super(0),++ro;const{id:r,delay:i,duration:n,reversed:o,alternate:c,loop:f,loopDelay:d,autoplay:u,frameRate:a,playbackRate:h,priority:l,onComplete:p,onLoop:g,onPause:v,onBegin:_,onBeforeUpdate:S,onUpdate:y}=e;qe.current&&qe.current.register(this);const m=t?0:et._lastTickTime,b=t?t.defaults:z.defaults,k=De(i)||$(i)?b.delay:+i,w=De(n)||$(n)?1/0:+n,C=U(f,b.loop),M=U(d,b.loopDelay);let P=C===!0||C===1/0||C<0?1/0:C+1,A=0;t?A=s:(et.reqId||et.requestTick(Ut()),A=(et._lastTickTime-et._startTime)*z.timeScale),this.id=$(r)?ro:r,this.parent=t,this.duration=hr((w+M)*P-M)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||b.onBegin,this.onBeforeUpdate=S||b.onBeforeUpdate,this.onUpdate=y||b.onUpdate,this.onLoop=g||b.onLoop,this.onPause=v||b.onPause,this.onComplete=p||b.onComplete,this.iterationDuration=w,this.iterationCount=P,this._autoplay=t?!1:U(u,b.autoplay),this._offset=A,this._delay=k,this._loopDelay=M,this._iterationTime=0,this._currentIteration=0,this._resolve=ie,this._running=!1,this._reversed=+U(o,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=U(c,b.alternate),this._prev=null,this._next=null,this._lastTickTime=m,this._startTime=m,this._lastTime=m,this._fps=U(a,b.frameRate),this._speed=U(h,b.playbackRate),this._priority=+U(l,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return G(V(this._currentTime,z.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return G(V(this._iterationTime,z.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return G(V(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return G(V(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*G(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return vi(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,ls(this,0,1,~~e,ct.FORCE),so(this),this._hasChildren&&Ce(this,so),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&ls(this,this.duration,1,~~e,ct.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!$(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*et._speed);return this._startTime=Ut()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?ls(this,He,0,0,ct.FORCE):(this._running||(Tt(et,this,jc),et._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,et.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,s=0){vi(this),this.completed=!1;const r=this.paused;return this.paused=!0,ls(this,e+this._delay,~~t,~~s,ct.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,s=this.iterationDuration,r=t===1/0?ys(wt/s):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(s*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Ce(this,e=>e.cancel(),!0):Ce(this,eo),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,s=bs(e);if(t===s)return this;const r=e/t,i=e<=He;return this.duration=i?He:s,this.iterationDuration=i?He:bs(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){ls(this,0,1,0,ct.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=ie){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ie};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},Zc=e=>new ut(e,null,0).init();function yi(e){const t=Xe(e)?qe.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function ht(e){if(ss(e))return[];if(!Lt)return je(e)&&e.flat(1/0)||[e];if(je(e)){const s=e.flat(1/0),r=[];for(let i=0,n=s.length;i<n;i++){const o=s[i];if(!ss(o)){const c=yi(o);if(c)for(let f=0,d=c.length;f<d;f++){const u=c[f];if(!ss(u)){let a=!1;for(let h=0,l=r.length;h<l;h++)if(r[h]===u){a=!0;break}a||r.push(u)}}else{let f=!1;for(let d=0,u=r.length;d<u;d++)if(r[d]===o){f=!0;break}f||r.push(o)}}}return r}const t=yi(e);return t?Array.from(t):[e]}function Xt(e){const t=ht(e),s=t.length;for(let r=0;r<s;r++){const i=t[r];if(!i[Rn]){i[Rn]=!0;const n=lr(i);(i.nodeType||n)&&(i[es]=!0,i[oi]=n,i[Os]={})}}return t}var bi={deg:1,rad:180/Rt,turn:360},io={},mr=(e,t,s,r=!1)=>{const i=t.u,n=t.n;if(t.t===ve.UNIT&&i===s)return t;const o=n+i+s,c=io[o];if(!$(c)&&!r)t.n=c;else{let f;if(i in bi)f=n*bi[i]/bi[s];else{const u=e.cloneNode(),a=e.parentNode,h=a&&a!==j?a:j.body;h.appendChild(u);const l=u.style;l.width=100+i;const p=u.offsetWidth||100;l.width=100+s;const g=p/(u.offsetWidth||100);h.removeChild(u),f=g*n}t.n=f,io[o]=f}return t.t,ve.UNIT,t.u=s,t},dt=e=>e,Ds=(e=1.68)=>t=>is(t,+e),_i={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},Jc=Rt/2,no=Rt*2,oo={\"\":Ds,Quad:Ds(2),Cubic:Ds(3),Quart:Ds(4),Quint:Ds(5),Sine:e=>1-ci(e*Jc),Circ:e=>1-gt(1-e*e),Expo:e=>e?is(2,10*e-10):0,Bounce:e=>{let t,s=4;for(;e<((t=is(2,--s))-1)/11;);return 1/is(4,3-s)-7.5625*is((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{const s=G(+e,1,10),r=G(+t,He,2),i=r/no*$c(1/s),n=no/r;return o=>o===0||o===1?o:-s*is(2,-10*(1-o))*li((1-o-i)*n)}},Dt=(()=>{const e={linear:dt,none:dt};for(let t in _i)for(let s in oo){const r=oo[s],i=_i[t];e[t+s]=s===\"\"||s===\"Back\"||s===\"Elastic\"?(n,o)=>i(r(n,o)):i(r)}return e})(),vr={linear:dt,none:dt},ao=e=>{if(vr[e])return vr[e];if(e.indexOf(\"(\")<=-1){const t=_i[e]||e.includes(\"Back\")||e.includes(\"Elastic\")?Dt[e]():Dt[e];return t?vr[e]=t:dt}else{const t=e.slice(0,-1).split(\"(\"),s=Dt[t[0]];return s?vr[e]=s(...t[1].split(\",\")):dt}},lo=[\"steps(\",\"irregular(\",\"linear(\",\"cubicBezier(\"],Bt=e=>{if(Xe(e)){for(let t=0,s=lo.length;t<s;t++)if(ze(e,lo[t]))return console.warn(`String syntax for \\`ease: \"${e}\"\\` has been removed from the core and replaced by importing and passing the easing function directly: \\`ease: ${e}\\``),dt}return De(e)?e:Xe(e)?ao(e):dt},re=pi(),de=pi(),Ss={},yr={func:null},br={func:null},_r=[null],ks=[null,null],Sr={to:null},Qc=0,co=0,Gt,It,Kc=(e,t)=>{const s={};if(je(e)){const r=[].concat(...e.map(i=>Object.keys(i))).filter(vs);for(let i=0,n=r.length;i<n;i++){const o=r[i];s[o]=e.map(c=>{const f={};for(let d in c){const u=c[d];vs(d)?d===o&&(f.to=u):f[d]=u}return f})}}else{const r=U(t.duration,z.defaults.duration);Object.keys(e).map(i=>({o:parseFloat(i)/100,p:e[i]})).sort((i,n)=>i.o-n.o).forEach(i=>{const n=i.o,o=i.p;for(let c in o)if(vs(c)){let f=s[c];f||(f=s[c]=[]);const d=n*r;let u=f.length,a=f[u-1];const h={to:o[c]};let l=0;for(let p=0;p<u;p++)l+=f[p].duration;u===1&&(h.from=a.to),o.ease&&(h.ease=o.ease),h.duration=d-(u?l:0),f.push(h)}return i});for(let i in s){const n=s[i];let o;for(let c=0,f=n.length;c<f;c++){const d=n[c],u=d.ease;d.ease=o||void 0,o=u}n[0].duration||n.shift()}}return s},$t=class extends ut{constructor(e,t,s,r,i=!1,n=0,o){super(t,s,r),this._head,this._tail,++co;const c=Xt(e),f=c.length,d=t.keyframes,u=d?vt(Kc(d,t),t):t,{id:a,delay:h,duration:l,ease:p,playbackEase:g,modifier:v,composition:_,onRender:S}=u,y=s?s.defaults:z.defaults,m=U(p,y.ease),b=U(g,y.playbackEase),k=b?Bt(b):null,w=!$(m.ease),C=w?m.ease:U(p,k?\"linear\":y.ease),M=w?m.settlingDuration:U(l,y.duration),P=U(h,y.delay),A=v||y.modifier,E=$(_)&&f>=1e3?Ye.none:$(_)?y.composition:_,B=this._offset+(s?s._offset:0);w&&(m.parent=this);let q=NaN,W=NaN,T=0,D=0;for(let O=0;O<f;O++){const L=c[O],F=n||O,Z=o||c;let Y=NaN,X=NaN;for(let J in u)if(vs(J)){const ne=fi(L,J),ce=zn(L,J),we=gi(J,L,ne);let me=u[J];const te=je(me);if(i&&!te&&(ks[0]=me,ks[1]=me,me=ks),te){const Ae=me.length,ye=!We(me[0]);Ae===2&&ye?(Sr.to=me,_r[0]=Sr,Gt=_r):Ae>2&&ye?(Gt=[],me.forEach((Te,ge)=>{ge?ge===1?(ks[1]=Te,Gt.push(ks)):Gt.push(Te):ks[0]=Te})):Gt=me}else _r[0]=me,Gt=_r;let Q=null,ue=null,Pe=NaN,Ee=0,xe=0;for(let Ae=Gt.length;xe<Ae;xe++){const ye=Gt[xe];We(ye)?It=ye:(Sr.to=ye,It=Sr),yr.func=null,br.func=null;const Te=Ve(U(It.composition,E),L,F,Z,null,null),ge=Qe(Te)?Te:Ye[Te];!Q&&ge!==Ye.none&&(Q=mi(L,we));const Le=Q?Q._tail:null,Se=s&&Le&&Le.parent.parent===s?Le:ue,se=Ve(It.to,L,F,Z,yr,Se);let be;We(se)&&!$(se.to)?(It=se,be=se.to):be=se;const ke=Ve(It.from,L,F,Z,br,Se),Oe=It.ease||C,N=Ve(Oe,L,F,Z,null,Se),oe=De(N)||Xe(N)?N:Oe,fe=!$(oe)&&!$(oe.ease),ae=fe?oe.ease:oe,K=fe?oe.settlingDuration:Ve(U(It.duration,Ae>1?Ve(M,L,F,Z,null,Se)/Ae:M),L,F,Z,null,Se),Ne=Ve(U(It.delay,xe?0:P),L,F,Z,null,Se),Ue=It.modifier||A,ft=!$(ke),Ct=!$(be),Mt=je(be),Hr=Mt||ft&&Ct,qr=ue?Ee:0,Fe=ue?Ee+Ne:Ne,pe=V(B+Fe,12),Be=V(B+qr,12);!D&&(ft||Mt)&&(D=1);let Re=ue;if(ge!==Ye.none){let I=Q._head;for(;I&&I._absoluteStartTime<=pe;)if(I._isOverridden||(Re=I),I=I._nextRep,I&&I._absoluteStartTime>=pe)for(;I;)gr(I),I=I._nextRep}if(Hr){ot(Mt?Ve(be[0],L,F,Z,br,Se):ke,re),ot(Mt?Ve(be[1],L,F,Z,yr,Se):be,de);const I=os(L,we,ne,Ss);re.t===ve.NUMBER&&(Re?Re._valueType===ve.UNIT&&(re.t=ve.UNIT,re.u=Re._unit):(ot(I,Ke),Ke.t===ve.UNIT&&(re.t=ve.UNIT,re.u=Ke.u)))}else Ct?ot(be,de):ue?Xn(ue,de):ot(s&&Re&&Re.parent.parent===s?Re._value:os(L,we,ne,Ss),de),ft?ot(ke,re):ue?Xn(ue,re):ot(s&&Re&&Re.parent.parent===s?Re._value:os(L,we,ne,Ss),re);if(re.o&&(re.n=as(Re?Re._toNumber:ot(os(L,we,ne,Ss),Ke).n,re.n,re.o)),de.o&&(de.n=as(re.n,de.n,de.o)),re.t!==de.t){if(re.t===ve.COMPLEX||de.t===ve.COMPLEX){const I=re.t===ve.COMPLEX?re:de,H=re.t===ve.COMPLEX?de:re;H.t=ve.COMPLEX,H.s=tt(I.s),H.d=I.d.map(()=>H.n)}else if(re.t===ve.UNIT||de.t===ve.UNIT){const I=re.t===ve.UNIT?re:de,H=re.t===ve.UNIT?de:re;H.t=ve.UNIT,H.u=I.u}else if(re.t===ve.COLOR||de.t===ve.COLOR){const I=re.t===ve.COLOR?re:de,H=re.t===ve.COLOR?de:re;H.t=ve.COLOR,H.d=I.d.map(()=>0)}}if(re.u!==de.u){let I=de.u?re:de;I=mr(L,I,de.u?de.u:re.u,!1)}if(de.d&&re.d&&de.d.length!==re.d.length){const I=re.d.length>de.d.length?re:de,H=I===re?de:re;H.d=I.d.map((ee,_e)=>$(H.d[_e])?0:H.d[_e]),H.s=tt(I.s)}const Ts=V(+K||1e-11,12);let Fr=Ss[we];ss(Fr)||(Ss[we]=null);const Xi=ce?ce.set:null;Ee=V(Fe+Ts,12);const cs=re.d,us=de.d,Pt=de.s,x={parent:this,id:Qc++,property:we,target:L,_value:null,_toFunc:yr.func,_fromFunc:br.func,_ease:Bt(ae),_fromNumbers:cs?tt(cs):or,_toNumbers:us?tt(us):or,_strings:Pt?tt(Pt):or,_fromNumber:re.n,_toNumber:de.n,_numbers:cs?tt(cs):or,_number:re.n,_unit:de.u,_modifier:Ue,_currentTime:0,_startTime:Fe,_delay:+Ne,_updateDuration:Ts,_changeDuration:Ts,_absoluteStartTime:pe,_absoluteUpdateStartTime:Be,_absoluteEndTime:V(B+Ee,12),_hasFromValue:ft||Mt?1:0,_tweenType:ne,_setter:Xi,_valueType:de.t,_composition:ge,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:Fr,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};ge!==Ye.none&&Kn(x,Q);const R=x._valueType;if(R===ve.COMPLEX)x._value=Gn(x,1,-1);else if(R===ve.UNIT)x._value=`${Ue(x._toNumber)}${x._unit}`;else if(R===ve.COLOR){const I=de.d;x._value=`rgba(${V(I[0],0)},${V(I[1],0)},${V(I[2],0)},${I[3]})`}else x._value=Ue(x._toNumber);isNaN(Pe)&&(Pe=x._startTime),ue=x,T++,Tt(this,x)}(isNaN(W)||Pe<W)&&(W=Pe),(isNaN(q)||Ee>q)&&(q=Ee),ne===$e.TRANSFORM&&(Y=T-xe,X=T)}if(!isNaN(Y)){let J=0;Ce(this,ne=>{J>=Y&&J<X&&(ne._renderTransforms=1,ne._composition===Ye.blend&&Ce(_s.animation,ce=>{ce.id===ne.id&&(ce._renderTransforms=1)})),J++})}}f||console.warn(\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\"),W?(Ce(this,O=>{O._startTime-O._delay||(O._delay-=W),O._startTime-=W}),q-=W):W=0,q||(q=He,this.iterationCount=0),this.targets=c,this.id=$(a)?co:a,this.duration=q===1e-11?He:hr((q+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=S||y.onRender,this._ease=k,this._delay=W,this.iterationDuration=q,!this._autoplay&&D&&this.onRender(this)}stretch(e){const t=this.duration;if(t===bs(e))return this;const s=e/t;return Ce(this,r=>{r._updateDuration=bs(r._updateDuration*s),r._changeDuration=bs(r._changeDuration*s),r._currentTime*=s,r._delay*=s,r._startTime*=s,r._absoluteStartTime*=s,r._absoluteUpdateStartTime*=s,r._absoluteEndTime*=s}),super.stretch(e)}refresh(){return Ce(this,e=>{const t=e._toFunc,s=e._fromFunc;(t||s)&&(s?(ot(s(),re),re.u!==e._unit&&e.target[es]&&mr(e.target,re,e._unit,!0),e._fromNumbers=tt(re.d),e._fromNumber=re.n):t&&(ot(os(e.target,e.property,e._tweenType),Ke),e._fromNumbers=tt(Ke.d),e._fromNumber=Ke.n),t&&(ot(t(),de),e._toNumbers=tt(de.d),e._strings=tt(de.s),e._toNumber=de.o?as(e._fromNumber,de.n,de.o):de.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),fr(this)}then(e){return super.then(e)}},Bs=(e,t)=>z.editor?z.editor.addAnimation(e,t):new $t(e,t,null,0,!1).init(),eu=(e,t)=>{if(ze(t,\"<\")){const s=t[1]===\"<\",r=e._tail,i=r?r._offset+r._delay:0;return s?i:i+r.duration}},$s=(e,t)=>{let s=e.iterationDuration;if(s===1e-11&&(s=0),$(t))return s;if(Qe(+t))return+t;const r=t,i=e?e.labels:null,n=!ss(i),o=eu(e,r),c=!$(o),f=Dn.exec(r);if(f){const d=f[0],u=r.split(d),a=n&&u[0]?i[u[0]]:s,h=c?o:n?a:s,l=+u[1];return as(h,l,d[0])}else return c?o:n?$(i[r])?s:i[r]:s};function tu(e){return hr((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function Si(e,t,s,r,i,n){const o=Qe(e.duration)&&e.duration<=1e-11?s-He:s;t.composition&&ls(t,o,1,1,ct.AUTO);const c=r?new $t(r,e,t,o,!1,i,n):new ut(e,t,o);return t.composition&&c.init(!0),Tt(t,c),Ce(t,f=>{const d=f._offset+f._delay+f.duration;d>t.iterationDuration&&(t.iterationDuration=d)}),t.duration=tu(t),t}var uo=0,ho=class extends ut{constructor(e={}){super(e,null,0),++uo,this.id=$(e.id)?uo:e.id,this.duration=0,this.labels={};const t=e.defaults,s=z.defaults;this.defaults=t?vt(t,s):s,this.composition=U(e.composition,!0),this.onRender=e.onRender||s.onRender;const r=U(e.playbackEase,s.playbackEase);this._ease=r?Bt(r):null,this.iterationDuration=0}add(e,t,s){const r=We(t),i=We(e);if(r||i){if(this._hasChildren=!0,r){const n=t,o=z.editor&&z.editor.addTimelineChild,c=s&&s.type===\"Stagger\"&&z.editor,f=De(s)?s:null;if(f||c){const d=ht(e),u=this.duration,a=this.iterationDuration,h=n.id;let l=0;const p=d.length,g=o?o(e,n,this.id,s,p):null,v=f||z.editor.resolveStagger(s.defaultValue);d.forEach(_=>{const S={...g||n};this.duration=u,this.iterationDuration=a,$(h)||(S.id=h+\"-\"+l);const y=$s(this,v(_,l,d,null,this));Si(S,this,y,_,l,d),l++})}else{const d=o?o(e,n,this.id,s):n,u=s&&s.type?s.defaultValue:s;Si(d,this,$s(this,u),e)}}else Si(e,this,$s(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if($(e)||e&&$(e.pause))return this;e.pause();const s=+(e.effect?e.effect.getTiming().duration:e.duration);!$(e)&&!$(e.persist)&&(e.persist=!0);const r=z.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);const n=this.add(e,{currentTime:[0,s],duration:s,delay:0,ease:\"linear\",playbackEase:\"linear\"},t);return r&&(r.addTimelineChild=i),n}set(e,t,s){return $(t)?this:(t.duration=He,t.composition=Ye.replace,this.add(e,t,s))}call(e,t){return $(e)||e&&!De(e)?this:(z.editor&&z.editor.addTimelineCall&&(t=z.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return $(e)||e&&!Xe(e)?this:(z.editor&&z.editor.addTimelineLabel&&(t=z.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=$s(this,t),this)}remove(e,t){return Nt(ht(e),this,t),this}stretch(e){const t=this.duration;if(t===bs(e))return this;const s=e/t,r=this.labels;Ce(this,i=>i.stretch(i.duration*s));for(let i in r)r[i]*=s;return super.stretch(e)}refresh(){return Ce(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),Ce(this,e=>e.revert,!0),fr(this)}then(e){return super.then(e)}},fo=e=>z.editor?z.editor.addTimeline(e):new ho(e).init(),ki=class{constructor(e,t){qe.current&&qe.current.register(this);const s=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let c=!0;for(let f in this.animations)if(!this.animations[f].paused&&c){c=!1;break}c&&this.callbacks.complete()},i={onBegin:s,onComplete:r,onPause:r},n={v:1,autoplay:!1},o={};if(this.targets=[],this.animations={},this.callbacks=null,!($(e)||$(t))){for(let c in t){const f=t[c];vs(c)?o[c]=f:ze(c,\"on\")?n[c]=f:i[c]=f}this.callbacks=new $t({v:0},n);for(let c in o){const f=o[c],d=We(f);let u={},a=\"+=0\";if(d){const p=f.unit;Xe(p)&&(a+=p)}else u.duration=f;u[c]=d?vt({to:a},f):a;const h=vt(i,u);h.composition=Ye.replace,h.autoplay=!1;const l=this.animations[c]=new $t(e,h,null,0,!1).init();this.targets.length||this.targets.push(...l.targets),this[c]=(p,g,v)=>{const _=l._head;if($(p)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return Ce(l,S=>{if(je(p))for(let y=0,m=p.length;y<m;y++)$(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=p[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=p;$(v)||(S._ease=Bt(v)),S._currentTime=0}),$(g)||l.stretch(g),l.reset(!0).resume(),this}}}}revert(){for(let e in this.animations)this[e]=ie,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}},su=(e,t)=>new ki(e,t),ru=hs({clamp:()=>G,damp:()=>uu,degToRad:()=>lu,lerp:()=>Wt,mapRange:()=>Hs,padEnd:()=>ou,padStart:()=>nu,radToDeg:()=>cu,round:()=>V,roundPad:()=>iu,snap:()=>ns,wrap:()=>au}),iu=(e,t)=>(+e).toFixed(t),nu=(e,t,s)=>`${e}`.padStart(t,s),ou=(e,t,s)=>`${e}`.padEnd(t,s),au=(e,t,s)=>((e-t)%(s-t)+(s-t))%(s-t)+t,Hs=(e,t,s,r,i)=>r+(e-t)/(s-t)*(i-r),lu=e=>e*Math.PI/180,cu=e=>e*180/Math.PI,uu=(e,t,s,r)=>r?r===1?t:Wt(e,t,1-Math.exp(-r*s*.1)):e,at=it*10,kr=class{constructor(e={}){const t=!$(e.bounce)||!$(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/it,this.maxIterations=this.maxDuration/this.timeStep/it,this.bn=G(U(e.bounce,.5),-1,1),this.pd=G(U(e.duration,628),10*z.timeScale,at*z.timeScale),this.m=G(U(e.mass,1),1,at),this.s=G(U(e.stiffness,100),He,at),this.d=G(U(e.damping,10),He,at),this.v=G(U(e.velocity,0),-at,at),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||ie,t&&this.calculateSDFromBD(),this.compute(),this.ease=s=>{const r=s*this.settlingDuration,i=this.completed,n=this.pd;return r>=n&&!i&&(this.completed=!0,this.onComplete(this.parent)),r<n&&i&&(this.completed=!1),s===0||s===1?s:this.solve(s*this.solverDuration)}}solve(e){const{zeta:t,w0:s,wd:r,b:i}=this;let n=e;return t<1?n=cr(-n*t*s)*(1*ci(r*n)+i*li(r*n)):t===1?n=(1+i*n)*cr(-n*s):n=((1+i)*cr((-t*s+r)*n)+(1-i)*cr((-t*s-r)*n))/2,1-n}calculateSDFromBD(){const e=z.timeScale===1?this.pd/it:this.pd;this.m=1,this.v=0,this.s=is(2*Rt/e,2),this.bn>=0?this.d=(1-this.bn)*4*Rt/e:this.d=4*Rt/(e*(1+this.bn)),this.s=V(G(this.s,He,at),3),this.d=V(G(this.d,He,300),3)}calculateBDFromSD(){const e=2*Rt/gt(this.s);this.pd=e*(z.timeScale===1?it:1),this.d/(2*gt(this.s))<=1?this.bn=1-this.d*e/(4*Rt):this.bn=4*Rt/(this.d*e)-1,this.bn=V(G(this.bn,-1,1),3),this.pd=V(G(this.pd,10*z.timeScale,at*z.timeScale),3)}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:s,timeStep:r,m:i,d:n,s:o,v:c}=this,f=this.w0=G(gt(o/i),He,it),d=this.zeta=n/(2*gt(o*i));d<1?(this.wd=f*gt(1-d*d),this.b=(d*f+-c)/this.wd):d===1?(this.wd=0,this.b=-c+f):(this.wd=f*gt(d*d-1),this.b=(d*f+-c)/this.wd);let u=0,a=0,h=0;for(;a<=e&&h<=t;)mt(1-this.solve(u))<s?a++:a=0,this.solverDuration=u,u+=r,h++;this.settlingDuration=V(this.solverDuration*it,0)*z.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=G(U(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=G(U(e,1),10*z.timeScale,at*z.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=G(U(e,100),He,at),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=G(U(e,10),He,at),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=G(U(e,1),1,at),this.compute()}get velocity(){return this.v}set velocity(e){this.v=G(U(e,0),-at,at),this.compute()}},wr=e=>new kr(e),po=e=>(console.warn(\"createSpring() is deprecated use spring() instead\"),new kr(e)),wi={_head:null,_tail:null},xi=(e,t,s)=>{let r=wi._head,i;for(;r;){const n=r._next,o=r.$el===e,c=!t||r.property===t,f=!s||r.parent===s;if(o&&c&&f){i=r.animation;try{i.commitStyles()}catch{}i.cancel(),xt(wi,r);const d=r.parent;d&&(d._completed++,d.animations.length===d._completed&&(d.completed=!0,d.paused=!0,d.muteCallbacks||(d.onComplete(d),d._resolve(d))))}r=n}return i},go=(e,t,s,r,i)=>{const n=t.animate(r,i),o=i.delay+ +i.duration*i.iterations;n.playbackRate=e._speed,e.paused&&n.pause(),e.duration<o&&(e.duration=o,e.controlAnimation=n),e.animations.push(n),xi(t,s),Tt(wi,{parent:e,animation:n,$el:t,property:s,_next:null,_prev:null});const c=()=>xi(t,s,e);return n.oncancel=c,n.onremove=c,e.persist||(n.onfinish=c),n};function Yt(e,t,s){const r=Xt(e);if(!r.length)return;const[i]=r,n=fi(i,t),o=gi(t,i,n);let c=os(i,o);if($(s))return c;if(ot(c,Ke),Ke.t===ve.NUMBER||Ke.t===ve.UNIT){if(s===!1)return Ke.n;{const f=mr(i,Ke,s,!1);return`${V(f.n,z.precision)}${f.u}`}}}var Ht=(e,t)=>{if(!$(t))return z.editor&&z.editor.addSet?z.editor.addSet(e,t):(t.duration=He,t.composition=U(t.composition,Ye.none),new $t(e,t,null,0,!0).resume())},mo=(e,t,s)=>{const r=ht(e);for(let i=0,n=r.length;i<n;i++)xi(r[i],s,t&&t.controlAnimation&&t);return Nt(r,t,s),r},jt=e=>{e.cancelable&&e.preventDefault()},hu=class{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:ie,remove:ie}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}},du=class{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,s=0;for(;t&&t!==j;)e(t,s),t=t.parentElement,s++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const s=getComputedStyle(t).transform;if(s){const r=new DOMMatrix(s);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform=\"none\"})}revert(){this.traverseUp((e,t)=>{const s=this.inlineTransforms[t];s===\"\"?e.style.removeProperty(\"transform\"):e.style.transform=s})}},nt=(e,t)=>e&&De(e)?e(t):e,xr=0,vo=class{constructor(e,t={}){if(!e)return;qe.current&&qe.current.register(this);const s=t.x,r=t.y,i=t.trigger,n=t.modifier,o=t.releaseEase,c=o&&Bt(o),f=!$(o)&&!$(o.ease),d=We(s)&&!$(s.mapTo)?s.mapTo:\"translateX\",u=We(r)&&!$(r.mapTo)?r.mapTo:\"translateY\",a=nt(t.container,this);this.containerArray=je(a)?a:null,this.$container=a&&!this.containerArray?ht(a)[0]:j.body,this.useWin=this.$container===j.body,this.$scrollContainer=this.useWin?rt:this.$container,this.$target=We(e)?new hu(e):ht(e)[0],this.$trigger=ht(i||e)[0],this.fixed=Yt(this.$target,\"position\")===\"fixed\",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.dragThreshold=3,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=f?o:wr({mass:U(t.releaseMass,1),stiffness:U(t.releaseStiffness,80),damping:U(t.releaseDamping,20)}),this.releaseYSpring=f?o:wr({mass:U(t.releaseMass,1),stiffness:U(t.releaseStiffness,80),damping:U(t.releaseDamping,20)}),this.releaseEase=c||Dt.outQuint,this.hasReleaseSpring=f,this.onGrab=t.onGrab||ie,this.onDrag=t.onDrag||ie,this.onRelease=t.onRelease||ie,this.onUpdate=t.onUpdate||ie,this.onSettle=t.onSettle||ie,this.onSnap=t.onSnap||ie,this.onResize=t.onResize||ie,this.onAfterResize=t.onAfterResize||ie,this.disabled=[0,0];const h={};if(n&&(h.modifier=n),$(s)||s===!0)h[d]=0;else if(We(s)){const l=s,p={};l.modifier&&(p.modifier=l.modifier),l.composition&&(p.composition=l.composition),h[d]=p}else s===!1&&(h[d]=0,this.disabled[0]=1);if($(r)||r===!0)h[u]=0;else if(We(r)){const l=r,p={};l.modifier&&(p.modifier=l.modifier),l.composition&&(p.composition=l.composition),h[u]=p}else r===!1&&(h[u]=0,this.disabled[1]=1);this.animate=new ki(this.$target,h),this.xProp=d,this.yProp=u,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-wt,wt,wt,-wt],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=Ut(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new du(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new ut({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new ut({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!$(a),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?d:u,this.animate.callbacks.onRender=()=>{const l=this.updated,p=!(this.grabbed&&l)&&this.released,g=this.x,v=this.y,_=g-this.coords[2],S=v-this.coords[3];this.deltaX=_,this.deltaY=S,this.coords[2]=g,this.coords[3]=v,l&&(_||S)&&this.onUpdate(this),p?(this.computeVelocity(_,S),this.angle=ur(S,_)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new ut({autoplay:!1,duration:150*z.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),We(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const s=this.velocityTime,r=Ut(),i=r-s;if(i<17)return this.velocity;this.velocityTime=r;const n=this.velocityStack,o=this.velocityMultiplier,c=this.minVelocity,f=this.maxVelocity,d=this.velocityStackIndex;n[d]=V(G(gt(e*e+t*t)/i*o,c,f),5);const u=Fn(n[0],n[1],n[2]);return this.velocity=u,this.velocityStackIndex=(d+1)%3,u}setX(e,t=!1){if(this.disabled[0])return;const s=V(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=s,this.snapped[0]=ns(s,this.snapX),this.animate[this.xProp](s,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const s=V(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=s,this.snapped[1]=ns(s,this.snapY),this.animate[this.yProp](s,0),this.manual=!1,this}get x(){return V(this.animate[this.xProp](),z.precision)}set x(e){this.setX(e,!1)}get y(){return V(this.animate[this.yProp](),z.precision)}set y(e){this.setY(e,!1)}get progressX(){return Hs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(Hs(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return Hs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(Hs(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=V(this.useWin?rt.scrollX:this.$container.scrollLeft,0),t=V(this.useWin?rt.scrollY:this.$container.scrollTop,0),[s,r,i,n]=this.containerPadding,o=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+s-o,this.scrollBounds[1]=e-this.targetBounds[1]-r+o,this.scrollBounds[2]=t-this.targetBounds[2]-i+o,this.scrollBounds[3]=e-this.targetBounds[3]+n-o}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,s=this.y,r=this.coords[2],i=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const n=this.window[0]=rt.innerWidth,o=this.window[1]=rt.innerHeight,c=this.useWin,f=e.scrollWidth,d=e.scrollHeight,u=this.fixed,a=e.getBoundingClientRect(),[h,l,p,g]=this.containerPadding;this.dragArea[0]=c?0:a.left,this.dragArea[1]=c?0:a.top,this.scrollView[0]=c?G(f,n,f):f,this.scrollView[1]=c?G(d,o,d):d,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:m,bottom:b}=e.getBoundingClientRect();this.dragArea[2]=V(c?G(v,n,n):v,0),this.dragArea[3]=V(c?G(_,o,o):_,0);const k=Yt(e,\"overflow\"),w=k===\"visible\",C=k===\"hidden\";if(this.canScroll=u?!1:this.contained&&(e===j.body&&w||!C&&!w)&&(f>this.dragArea[2]+g-l||d>this.dragArea[3]+h-p)&&(!this.containerArray||this.containerArray&&!je(this.containerArray)),this.contained){const M=this.scroll.x,P=this.scroll.y,A=this.canScroll,E=this.$target.getBoundingClientRect(),B=A?c?0:e.scrollLeft:0,q=A?c?0:e.scrollTop:0,W=A?this.scrollView[0]-B-v:0,T=A?this.scrollView[1]-q-_:0;this.targetBounds[0]=V(E.top+P-(c?0:y),0),this.targetBounds[1]=V(E.right+M-(c?n:m),0),this.targetBounds[2]=V(E.bottom+P-(c?o:b),0),this.targetBounds[3]=V(E.left+M-(c?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+h,this.containerBounds[1]=this.containerArray[1]-l,this.containerBounds[2]=this.containerArray[2]-p,this.containerBounds[3]=this.containerArray[3]+g):(this.containerBounds[0]=-V(E.top-(u?G(y,0,o):y)+q-h,0),this.containerBounds[1]=-V(E.right-(u?G(m,0,n):m)-W+l,0),this.containerBounds[2]=-V(E.bottom-(u?G(b,0,o):b)-T+p,0),this.containerBounds[3]=-V(E.left-(u?G(S,0,n):S)+B-g,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=i,this.setX(t,!0),this.setY(s,!0)}isOutOfBounds(e,t,s){if(!this.contained)return 0;const[r,i,n,o]=e,[c,f]=this.disabled,d=!c&&t<o||!c&&t>i,u=!f&&s<r||!f&&s>n;return d&&!u?1:!d&&u?2:d&&u?3:0}refresh(){const e=this.parameters,t=e.x,s=e.y,r=nt(e.container,this),i=nt(e.containerPadding,this)||0,n=je(i)?i:[i,i,i,i],o=this.x,c=this.y,f=nt(e.cursor,this),d={onHover:\"grab\",onGrab:\"grabbing\"};if(f){const{onHover:v,onGrab:_}=f;v&&(d.onHover=v),_&&(d.onGrab=_)}const u=nt(e.dragThreshold,this),a={mouse:3,touch:7};if(Qe(u))a.mouse=u,a.touch=u;else if(u){const{mouse:v,touch:_}=u;$(v)||(a.mouse=v),$(_)||(a.touch=_)}this.containerArray=je(r)?r:null,this.$container=r&&!this.containerArray?ht(r)[0]:j.body,this.useWin=this.$container===j.body,this.$scrollContainer=this.useWin?rt:this.$container,this.isFinePointer=matchMedia(\"(pointer:fine)\").matches,this.containerPadding=U(n,[0,0,0,0]),this.containerFriction=G(U(nt(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=G(U(nt(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=nt(We(t)&&!$(t.snap)?t.snap:e.snap,this),this.snapY=nt(We(s)&&!$(s.snap)?s.snap:e.snap,this),this.scrollSpeed=U(nt(e.scrollSpeed,this),1.5),this.scrollThreshold=U(nt(e.scrollThreshold,this),20),this.dragSpeed=U(nt(e.dragSpeed,this),1),this.dragThreshold=this.isFinePointer?a.mouse:a.touch,this.minVelocity=U(nt(e.minVelocity,this),0),this.maxVelocity=U(nt(e.maxVelocity,this),50),this.velocityMultiplier=U(nt(e.velocityMultiplier,this),1),this.cursor=f===!1?!1:d,this.updateBoundingValues();const[h,l,p,g]=this.containerBounds;this.setX(G(o,g,l),!0),this.setY(G(c,h,p),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,m]=this.containerPadding,[b,k]=this.scrollView,w=this.dragArea[2],C=this.dragArea[3],M=this.scroll.x,P=this.scroll.y,A=this.$container.scrollWidth,E=this.$container.scrollHeight,B=this.useWin?G(A,this.window[0],A):A,q=this.useWin?G(E,this.window[1],E):E,W=b-B,T=k-q;this.dragged&&W>0&&(this.coords[0]-=W,this.scrollView[0]=B),this.dragged&&T>0&&(this.coords[1]-=T,this.scrollView[1]=q);const D=this.scrollSpeed*10,O=this.scrollThreshold,[L,F]=this.coords,[Z,Y,X,J]=this.scrollBounds,ne=V(G((F-Z+_)/O,-1,0)*D,0),ce=V(G((L-Y-S)/O,0,1)*D,0),we=V(G((F-X-y)/O,0,1)*D,0),me=V(G((L-J+m)/O,-1,0)*D,0);if(ne||we||me||ce){const[te,Q]=this.disabled;let ue=M,Pe=P;te||(ue=V(G(M+(me||ce),0,b-w),0),this.coords[0]-=M-ue),Q||(Pe=V(G(P+(ne||we),0,k-C),0),this.coords[1]-=P-Pe),this.useWin?this.$scrollContainer.scrollBy(-(M-ue),-(P-Pe)):this.$scrollContainer.scrollTo(ue,Pe)}}const[e,t,s,r]=this.containerBounds,[i,n,o,c,f,d]=this.pointer;this.coords[0]+=(i-f)*this.dragSpeed,this.coords[1]+=(n-d)*this.dragSpeed,this.pointer[4]=i,this.pointer[5]=n;const[u,a]=this.coords,[h,l]=this.snapped,p=(1-this.containerFriction)*this.dragSpeed;this.setX(u>t?t+(u-t)*p:u<r?r+(u-r)*p:u,!1),this.setY(a>s?s+(a-s)*p:a<e?e+(a-e)*p:a,!1),this.computeVelocity(i-f,n-d),this.angle=ur(n-c,i-o);const[g,v]=this.snapped;(g!==h&&this.snapX||v!==l&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return Nt([this],null,\"x\"),Nt([this],null,\"y\"),Nt([this],null,\"progressX\"),Nt([this],null,\"progressY\"),Nt([this.scroll]),Nt([this.overshootCoords]),this}scrollInView(e,t=0,s=Dt.inOutQuad){this.updateScrollCoords();const r=this.destX,i=this.destY,n=this.scroll,o=this.scrollBounds,c=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(o,r,i)){const[f,d,u,a]=o,h=V(G(i-f,-wt,0),0),l=V(G(r-d,0,wt),0),p=V(G(i-u,0,wt),0),g=V(G(r-a,-wt,0),0);new $t(n,{x:V(n.x+(g?g-t:l?l+t:0),0),y:V(n.y+(h?h-t:p?p+t:0),0),duration:$(e)?350*z.timeScale:e,ease:s,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(n.x,n.y)}}).init().then(()=>{this.canScroll=c})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Ht(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,s=Dt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,i=this.y,[n,o,c,f]=this.containerPadding,d=this.scroll.y-this.targetBounds[0]+n+t,u=this.scroll.x-this.targetBounds[1]-o-t,a=this.scroll.y-this.targetBounds[2]-c-t,h=this.scroll.x-this.targetBounds[3]+f+t,l=this.isOutOfBounds([d,u,a,h],r,i);if(l){const[p,g]=this.disabled,v=G(ns(r,this.snapX),h,u),_=G(ns(i,this.snapY),d,a),S=$(e)?350*z.timeScale:e;!p&&(l===1||l===3)&&this.animate[this.xProp](v,S,s),!g&&(l===2||l===3)&&this.animate[this.yProp](_,S,s)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type===\"range\")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const s=e.changedTouches,r=s?s[0].clientX:e.clientX,i=s?s[0].clientY:e.clientY,{x:n,y:o}=this.transforms.normalizePoint(r,i),[c,f,d,u]=this.containerBounds,a=(1-this.containerFriction)*this.dragSpeed,h=this.x,l=this.y;this.coords[0]=this.coords[2]=a?h>f?f+(h-f)/a:h<u?u+(h-u)/a:h:h,this.coords[1]=this.coords[3]=a?l>d?d+(l-d)/a:l<c?c+(l-c)/a:l:l,this.pointer[0]=n,this.pointer[1]=o,this.pointer[2]=n,this.pointer[3]=o,this.pointer[4]=n,this.pointer[5]=o,this.pointer[6]=n,this.pointer[7]=o,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const p=Yt(this.$target,\"zIndex\",!1);xr=(p>xr?p:xr)+1,this.targetStyles=Ht(this.$target,{zIndex:xr}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Ht(j.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Dt.out(3)),this.onGrab(this),j.addEventListener(\"touchmove\",this),j.addEventListener(\"touchend\",this),j.addEventListener(\"touchcancel\",this),j.addEventListener(\"mousemove\",this),j.addEventListener(\"mouseup\",this),j.addEventListener(\"selectstart\",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,s=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:i,y:n}=this.transforms.normalizePoint(s,r),o=i-this.pointer[6],c=n-this.pointer[7];let f=e.target,d=!1,u=!1,a=!1;for(;t&&f&&f!==this.$trigger;){const h=Yt(f,\"overflow-y\");if(h!==\"hidden\"&&h!==\"visible\"){const{scrollTop:l,scrollHeight:p,clientHeight:g}=f;if(p>g){a=!0,d=l<=3,u=l>=p-g-3;break}}f=f.parentElement}a&&(!d&&!u||d&&c<0||u&&c>0)?(this.pointer[0]=i,this.pointer[1]=n,this.pointer[2]=i,this.pointer[3]=n,this.pointer[4]=i,this.pointer[5]=n,this.pointer[6]=i,this.pointer[7]=n):(jt(e),this.triggerStyles||(this.triggerStyles=Ht(this.$trigger,{pointerEvents:\"none\"})),this.$trigger.addEventListener(\"touchstart\",jt,{passive:!1}),this.$trigger.addEventListener(\"touchmove\",jt,{passive:!1}),this.$trigger.addEventListener(\"touchend\",jt),(this.dragged||!this.disabled[0]&&mt(o)>this.dragThreshold||!this.disabled[1]&&mt(c)>this.dragThreshold)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=i,this.pointer[1]=n,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[e,t]=this.disabled,[s,r,i,n,o,c]=this.pointer,[f,d,u,a]=this.containerBounds,[h,l]=this.snapped,p=this.releaseXSpring,g=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,m=this.y,b=this.computeVelocity(s-o,r-c),k=this.angle=ur(r-n,s-i),w=b*150,C=(1-this.releaseContainerFriction)*this.dragSpeed,M=y+ci(k)*w,P=m+li(k)*w,A=M>d?d+(M-d)*C:M<a?a+(M-a)*C:M,E=P>u?u+(P-u)*C:P<f?f+(P-f)*C:P,B=this.destX=G(V(ns(A,this.snapX),5),a,d),q=this.destY=G(V(ns(E,this.snapY),5),f,u),W=this.isOutOfBounds(this.containerBounds,M,P);let T=0,D=0,O=v,L=v,F=0;if(S.x=y,S.y=m,!e){const Y=B===d?y>d?-1:1:y<a?-1:1,X=V(y-B,0);p.velocity=t&&_?X?w*Y/mt(X):0:b;const{ease:J,settlingDuration:ne,restDuration:ce}=p;T=y===B?0:_?ne:ne-ce*z.timeScale,_&&(O=J),T>F&&(F=T)}if(!t){const Y=q===u?m>u?-1:1:m<f?-1:1,X=V(m-q,0);g.velocity=e&&_?X?w*Y/mt(X):0:b;const{ease:J,settlingDuration:ne,restDuration:ce}=g;D=m===q?0:_?ne:ne-ce*z.timeScale,_&&(L=J),D>F&&(F=D)}if(!_&&W&&C&&(T||D)){const Y=Ye.blend;new $t(S,{x:{to:A,duration:T*.65},y:{to:E,duration:D*.65},ease:v,composition:Y}).init(),new $t(S,{x:{to:B,duration:T},y:{to:q,duration:D},ease:v,composition:Y}).init(),this.overshootTicker.stretch(Fn(T,D)).restart()}else e||this.animate[this.xProp](B,T,O),t||this.animate[this.yProp](q,D,L);this.scrollInView(F,this.scrollThreshold,v);let Z=!1;B!==h&&(this.snapped[0]=B,this.snapX&&(Z=!0)),q!==l&&this.snapY&&(this.snapped[1]=q,this.snapY&&(Z=!0)),Z&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener(\"touchstart\",jt),this.$trigger.removeEventListener(\"touchmove\",jt),this.$trigger.removeEventListener(\"touchend\",jt),j.removeEventListener(\"touchmove\",this),j.removeEventListener(\"touchend\",this),j.removeEventListener(\"touchcancel\",this),j.removeEventListener(\"mousemove\",this),j.removeEventListener(\"mouseup\",this),j.removeEventListener(\"selectstart\",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove(\"is-disabled\"),this.touchActionStyles=Ht(this.$trigger,{touchAction:this.disabled[0]?\"pan-x\":this.disabled[1]?\"pan-y\":\"none\"}),this.$trigger.addEventListener(\"touchstart\",this,{passive:!0}),this.$trigger.addEventListener(\"mousedown\",this,{passive:!0}),this.$trigger.addEventListener(\"mouseenter\",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add(\"is-disabled\"),this.$trigger.removeEventListener(\"touchstart\",this),this.$trigger.removeEventListener(\"mousedown\",this),this.$trigger.removeEventListener(\"mouseenter\",this),j.removeEventListener(\"touchmove\",this),j.removeEventListener(\"touchend\",this),j.removeEventListener(\"touchcancel\",this),j.removeEventListener(\"mousemove\",this),j.removeEventListener(\"mouseup\",this),j.removeEventListener(\"selectstart\",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove(\"is-disabled\"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(e){switch(e.type){case\"mousedown\":this.handleDown(e);break;case\"touchstart\":this.handleDown(e);break;case\"mousemove\":this.handleMove(e);break;case\"touchmove\":this.handleMove(e);break;case\"mouseup\":this.handleUp();break;case\"touchend\":this.handleUp();break;case\"touchcancel\":this.handleUp();break;case\"mouseenter\":this.handleHover();break;case\"selectstart\":jt(e)}}},fu=(e,t)=>new vo(e,t),Ti=(e=ie)=>new ut({duration:1*z.timeScale,onComplete:e},null,0).resume(),Tr=e=>{let t;return((...s)=>{let r,i,n,o,c;t&&(r=t.currentIteration,i=t.iterationProgress,n=t.reversed,o=t._alternate,c=t._startTime,t.revert());const f=e(...s);return f&&!De(f)&&f.revert&&(t=f),$(i)||(t.currentIteration=r,t.iterationProgress=(o&&r%2?!n:n)?1-i:i,t._startTime=c),f||ie})},yo=class{constructor(e={}){qe.current&&qe.current.register(this);const t=e.root;let s=j;t&&(s=t.current||t.nativeElement||ht(t)[0]||j);const r=e.defaults,i=z.defaults,n=e.mediaQueries;if(this.defaults=r?vt(r,i):i,this.root=s,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},n)for(let o in n){const c=rt.matchMedia(n[o]);this.mediaQueryLists[o]=c,c.addEventListener(\"change\",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=qe.current,s=qe.root,r=z.defaults;qe.current=this,qe.root=this.root,z.defaults=this.defaults;const i=this.mediaQueryLists;for(let o in i)this.matches[o]=i[o].matches;const n=e(this);return qe.current=t,qe.root=s,z.defaults=r,n}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(s=>{const r=s(this);De(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,De(e)){const s=e;this.constructors.push(s),this.execute(()=>{const r=s(this);De(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...s)=>this.execute(()=>t(...s));return this}addOnce(e){if(this.once=!0,De(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const s=e;this.constructorsOnce[t]=s,this.execute(()=>{const r=s(this);De(r)&&this.revertConstructorsOnce.push(r)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,s=this.constructorsOnce[t];if(De(s))return s(this);const r=Tr(e);this.constructorsOnce[t]=r;let i;return this.execute(()=>{i=r(this)}),i}handleEvent(e){e.type===\"change\"&&this.refresh()}revert(){const e=this.revertibles,t=this.revertConstructors,s=this.revertiblesOnce,r=this.revertConstructorsOnce,i=this.mediaQueryLists;let n=e.length,o=t.length,c=s.length,f=r.length;for(;n--;)e[n].revert();for(;o--;)t[o](this);for(;c--;)s[c].revert();for(;f--;)r[f](this);for(let d in i)i[d].removeEventListener(\"change\",this);e.length=0,t.length=0,this.constructors.length=0,s.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}},pu=e=>new yo(e),gu=()=>{const e=j.createElement(\"div\");j.body.appendChild(e),e.style.height=\"100lvh\";const t=e.offsetHeight;return j.body.removeChild(e),t},Cr=(e,t)=>e&&De(e)?e(t):e,Pr=new Map,mu=class{constructor(e){this.element=e,this.useWin=this.element===j.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.scale=1,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new ut({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;Ce(this,s=>s.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new ut({autoplay:!1,frameRate:30,onUpdate:t=>{const s=t.deltaTime,r=this.prevScrollX,i=this.prevScrollY,n=this.scrollX,o=this.scrollY,c=r-n,f=i-o;this.prevScrollX=n,this.prevScrollY=o,c&&(this.backwardX=r>n),f&&(this.backwardY=i>o),this.velocity=V(s>0?Math.sqrt(c*c+f*f)/s:0,5)}}).init(),this.resizeTicker=new ut({autoplay:!1,duration:250*z.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new ut({autoplay:!1,duration:500*z.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?rt:this.element).addEventListener(\"scroll\",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=V(e?rt.scrollX:t.scrollLeft,0),this.scrollY=V(e?rt.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=rt.innerWidth,this.winHeight=gu()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let s,r;if(this.useWin)s=this.winWidth,r=this.winHeight;else{const i=t.getBoundingClientRect();s=t.clientWidth,r=t.clientHeight,this.top=i.top,this.left=i.left,this.scale=i.width?s/i.width:i.height?r/i.height:1}this.width=s,this.height=r}refreshScrollObservers(){Ce(this,e=>{e.ready&&e._debug&&e.removeDebug()}),this.updateBounds(),Ce(this,e=>{e.ready&&(e.refresh(),e.onResize(e),e._debug&&e.debug())})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){e.type===\"scroll\"&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?rt:this.element).removeEventListener(\"scroll\",this),Pr.delete(this.element)}},vu=e=>{const t=e&&ht(e)[0]||j.body;let s=Pr.get(t);return s||(s=new mu(t),Pr.set(t,s)),s},qs=(e,t,s,r,i)=>{const n=t===\"min\",o=t===\"max\",{n:c,u:f}=ot(t===\"top\"||t===\"left\"||t===\"start\"||n?0:t===\"bottom\"||t===\"right\"||t===\"end\"||o?\"100%\":t===\"center\"?\"50%\":t,Ke);let d=c;return f===\"%\"?d=c/100*s:f&&(d=mr(e,Ke,\"px\",!0).n),o&&r<0&&(d+=r),n&&i>0&&(d+=i),d},Er=(e,t,s,r,i)=>{let n;if(Xe(t)){const o=Dn.exec(t);if(o){const c=o[0],f=c[0],d=t.split(c),u=d[0]===\"min\",a=d[0]===\"max\",h=qs(e,d[0],s,r,i),l=qs(e,d[1],s,r,i);if(u){const p=as(qs(e,\"min\",s),l,f);n=p<h?h:p}else if(a){const p=as(qs(e,\"max\",s),l,f);n=p>h?h:p}else n=as(h,l,f)}else n=qs(e,t,s,r,i)}else n=t;return V(n,0)},bo=e=>{let t;const s=e.targets;for(let r=0,i=s.length;r<i;r++){const n=s[r];if(n[es]){t=n;break}}return t},yu=0,_o=[\"#FF4B4B\",\"#FF971B\",\"#FFC730\",\"#F9F640\",\"#7AFF5A\",\"#18FF74\",\"#17E09B\",\"#3CFFEC\",\"#05DBE9\",\"#33B3F1\",\"#638CF9\",\"#C563FE\",\"#FF4FCF\",\"#F93F8A\"],So=class{constructor(e={}){qe.current&&qe.current.register(this);const t=U(e.sync,\"play pause\"),s=t?Bt(t):null,r=t&&(t===\"linear\"||t===dt),i=t&&!(s===dt&&!r),n=t&&(Qe(t)||t===!0||r),o=t&&Xe(t)&&!i&&!n,c=o?t.split(\" \").map(d=>()=>{const u=this.linked;return u&&u[d]?u[d]():null}):null,f=o&&c.length>2;this.index=yu++,this.id=$(e.id)?this.index:e.id,this.container=vu(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=i||n||!!c,this.syncEase=i?s:null,this.syncSmooth=n?t===!0||r?1:t:null,this.onSyncEnter=c&&!f&&c[0]?c[0]:ie,this.onSyncLeave=c&&!f&&c[1]?c[1]:ie,this.onSyncEnterForward=c&&f&&c[0]?c[0]:ie,this.onSyncLeaveForward=c&&f&&c[1]?c[1]:ie,this.onSyncEnterBackward=c&&f&&c[2]?c[2]:ie,this.onSyncLeaveBackward=c&&f&&c[3]?c[3]:ie,this.onEnter=e.onEnter||ie,this.onLeave=e.onLeave||ie,this.onEnterForward=e.onEnterForward||ie,this.onLeaveForward=e.onLeaveForward||ie,this.onEnterBackward=e.onEnterBackward||ie,this.onLeaveBackward=e.onLeaveBackward||ie,this.onUpdate=e.onUpdate||ie,this.onResize=e.onResize||ie,this.onSyncComplete=e.onSyncComplete||ie,this.reverted=!1,this.ready=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=[\"start\",\"end\",\"end\",\"start\"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=U(e.debug,!1),this._next=null,this._prev=null,Tt(this.container,this),Ti(()=>{if(!this.reverted){if(!this.target){const d=ht(e.target)[0];this.target=d||j.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!$(e)&&!$(e.persist)&&(e.persist=!0),!this._params.target)){let t;$(e.targets)?Ce(e,s=>{s.targets&&!t&&(t=bo(s))}):t=bo(e),this.target=t||j.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:V(G(e,0,1),6)}refresh(){this.ready=!0,this.reverted=!1;const e=this._params;return this.repeat=U(Cr(e.repeat,this),!0),this.horizontal=U(Cr(e.axis,this),\"y\")===\"x\",this.enter=U(Cr(e.enter,this),\"end start\"),this.leave=U(Cr(e.leave,this),\"start end\"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,s=e.element.querySelector(\":scope > .animejs-onscroll-debug\"),r=j.createElement(\"div\"),i=j.createElement(\"div\"),n=j.createElement(\"div\"),o=_o[this.index%_o.length],c=e.useWin,f=c?e.winWidth:e.width,d=c?e.winHeight:e.height,u=e.scrollWidth,a=e.scrollHeight,h=this.container.width>360?320:260,l=t?0:10,p=t?10:0,g=t?24:h/2,v=t?g:15,_=t?60:g,S=t?_:v,y=t?\"repeat-x\":\"repeat-y\",m=C=>t?\"0px \"+C+\"px\":C+\"px 2px\",b=C=>`linear-gradient(${t?90:0}deg, ${C} 2px, transparent 1px)`,k=(C,M,P,A,E)=>`position:${C};left:${M}px;top:${P}px;width:${A}px;height:${E}px;`;r.style.cssText=`${k(\"absolute\",l,p,t?u:h,t?h:a)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${t?\"column\":\"row\"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,i.style.cssText=`${k(\"sticky\",0,0,t?f:g,t?g:d)}`,s||(i.style.cssText+=`background:\n ${b(\"#FFFF\")}${m(g-10)} / 100px 100px ${y},\n ${b(\"#FFF8\")}${m(g-10)} / 10px 10px ${y};\n `),n.style.cssText=`${k(\"relative\",0,0,t?u:g,t?g:a)}`,s||(n.style.cssText+=`background:\n ${b(\"#FFFF\")}${m(0)} / ${t?\"100px 10px\":\"10px 100px\"} ${y},\n ${b(\"#FFF8\")}${m(0)} / ${t?\"10px 0px\":\"0px 10px\"} ${y};\n `);const w=[\" enter: \",\" leave: \"];this.coords.forEach((C,M)=>{const P=M>1,A=(P?0:this.offset)+C,E=M%2,B=A<S,q=A>(P?t?f:d:t?u:a)-S,W=(P?E&&!B:!E&&!B)||q,T=j.createElement(\"div\"),D=j.createElement(\"div\"),O=t?W?\"right\":\"left\":W?\"bottom\":\"top\",L=W?(t?_:v)+(P?t?-1:q?0:-2:t?-1:-2):t?1:0;D.innerHTML=`${this.id}${w[E]}${this.thresholds[M]}`,T.style.cssText=`${k(\"absolute\",0,0,_,v)}\n display: flex;\n flex-direction: ${t?\"column\":\"row\"};\n justify-content: flex-${P?\"start\":\"end\"};\n align-items: flex-${W?\"end\":\"start\"};\n border-${O}: 2px solid ${o};\n `,D.style.cssText=`\n overflow: hidden;\n max-width: ${h/2-10}px;\n height: ${v};\n margin-${t?W?\"right\":\"left\":W?\"bottom\":\"top\"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${t&&W||!t&&!P?\"right\":\"left\"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${E?o:\"rgba(0,0,0,.75)\"};\n background-color: ${E?\"rgba(0,0,0,.65)\":o};\n border: 2px solid ${E?o:\"transparent\"};\n border-${t?W?\"top-left\":\"top-right\":W?\"top-left\":\"bottom-left\"}-radius: 5px;\n border-${t?W?\"bottom-left\":\"bottom-right\":W?\"top-right\":\"bottom-right\"}-radius: 5px;\n `,T.appendChild(D);let F=A-L+(t?1:0);T.style[t?\"left\":\"top\"]=`${F}px`,(P?i:n).appendChild(T)}),r.appendChild(i),r.appendChild(n),e.element.appendChild(r),s||r.classList.add(\"animejs-onscroll-debug\"),this.$debug=r,Yt(e.element,\"position\")===\"static\"&&(this.debugStyles=Ht(e.element,{position:\"relative \"}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,s=this.container,r=this.horizontal,i=this.linked;let n,o=t;for(i&&(n=i.currentTime,i.seek(0,!0));o&&o!==s.element&&o!==j.body;){const E=Yt(o,\"position\")===\"sticky\"?Ht(o,{position:\"static\"}):!1;o=o.parentElement,E&&(e||(e=[]),e.push(E))}const c=t.getBoundingClientRect(),f=s.scale,d=(r?c.left+s.scrollX-s.left:c.top+s.scrollY-s.top)*f,u=(r?c.width:c.height)*f,a=r?s.width:s.height,h=(r?s.scrollWidth:s.scrollHeight)-a,l=this.enter,p=this.leave;let g=\"start\",v=\"end\",_=\"end\",S=\"start\";if(Xe(l)){const E=l.split(\" \");_=E[0],g=E.length>1?E[1]:g}else if(We(l)){const E=l;$(E.container)||(_=E.container),$(E.target)||(g=E.target)}else Qe(l)&&(_=l);if(Xe(p)){const E=p.split(\" \");S=E[0],v=E.length>1?E[1]:v}else if(We(p)){const E=p;$(E.container)||(S=E.container),$(E.target)||(v=E.target)}else Qe(p)&&(S=p);const y=Er(t,g,u),m=Er(t,v,u),b=y+d-a,k=m+d-h,w=Er(t,_,a,b,k),C=Er(t,S,a,b,k),M=y+d-w,P=m+d-C,A=P-M;this.offset=d,this.offsetStart=M,this.offsetEnd=P,this.distance=A<=0?0:A,this.thresholds=[g,v,_,S],this.coords=[y,m,w,C],e&&e.forEach(E=>E.revert()),i&&i.seek(n,!0),this._debug&&this.debug()}handleScroll(){if(!this.ready)return;const e=this.linked,t=this.sync,s=this.syncEase,r=this.syncSmooth,i=e&&(s||r),n=this.horizontal,o=this.container,c=this.scroll,f=c<=this.offsetStart,d=c>=this.offsetEnd,u=!f&&!d,a=c===this.offsetStart||c===this.offsetEnd,h=!this.hasEntered&&a,l=this._debug&&this.$debug;let p=!1,g=!1,v=this.progress;if(f&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),i){const _=e.progress;if(r&&Qe(r)){if(r<1){const S=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=V(Wt(_,v,Wt(.01,.2,r))+S,6)}}else s&&(v=s(v));p=v!==this.prevProgress,g=_===1,p&&!g&&r&&_&&o.wakeTicker.restart()}if(l){const _=n?o.scrollY:o.scrollX;l.style[n?\"top\":\"left\"]=_+10+\"px\"}(u&&!this.isInView||h&&!this.forceEnter&&!this.hasEntered)&&(u&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(l&&u&&(l.style.zIndex=`${this.container.zIndex++}`),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,h&&(this.forceEnter=!0)):u&&(this.forceEnter=!1)),(u||!u&&this.isInView)&&(p=!0),p&&(i&&e.seek(e.duration*v),this.onUpdate(this)),!u&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(g=!0)),v>=1&&this.began&&!this.completed&&(t&&g||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return xt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this.ready=!1,this}},bu=(e={})=>new So(e),ko=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,_u=(e,t,s)=>{let r=0,i=1,n,o,c=0;do o=r+(i-r)/2,n=ko(o,t,s)-e,n>0?i=o:r=o;while(mt(n)>1e-7&&++c<100);return o},wo=(e=.5,t=0,s=.5,r=1)=>e===t&&s===r?dt:i=>i===0||i===1?i:ko(_u(i,e,s),t,r),xo=(e=10,t)=>{const s=t?Bc:ys;return r=>s(G(r,0,1)*e)*(1/e)},Ci=(...e)=>{const t=e.length;if(!t)return dt;const s=t-1,r=e[0],i=e[s],n=[0],o=[rs(r)];for(let c=1;c<s;c++){const f=e[c],d=Xe(f)?f.trim().split(\" \"):[f],u=d[0],a=d[1];n.push($(a)?c/s:rs(a)/100),o.push(rs(u))}return o.push(rs(i)),n.push(1),function(f){for(let d=1,u=n.length;d<u;d++){const a=n[d];if(f<=a){const h=n[d-1],l=o[d-1];return l+(o[d]-l)*(f-h)/(a-h)}}return o[o.length-1]}},To=(e=10,t=1)=>{const s=[0],r=e-1;for(let i=1;i<r;i++){const n=s[i-1],o=i/r,c=o+((i+1)/r-o)*Math.random(),f=o*(1-t)+c*t;s.push(G(f,n,1))}return s.push(1),Ci(...s)},Su=hs({Spring:()=>kr,createSpring:()=>po,cubicBezier:()=>wo,eases:()=>Dt,irregular:()=>To,linear:()=>Ci,spring:()=>wr,steps:()=>xo}),Ar=(e,t=100)=>{const s=[];for(let r=0;r<=t;r++)s.push(V(e(r/t),4));return`linear(${s.join(\", \")})`},Co={},Po=e=>{let t=Co[e];if(t)return t;if(t=\"linear\",Xe(e)){if(ze(e,\"linear\")||ze(e,\"cubic-\")||ze(e,\"steps\")||ze(e,\"ease\"))t=e;else if(ze(e,\"cubicB\"))t=ar(e);else{const s=ao(e);De(s)&&(t=s===dt?\"linear\":Ar(s))}Co[e]=t}else if(De(e)){const s=Ar(e);s&&(t=s)}else e.ease&&(t=Ar(e.ease));return t},Eo=[\"x\",\"y\",\"z\"],ku=[\"perspective\",\"width\",\"height\",\"margin\",\"padding\",\"top\",\"right\",\"bottom\",\"left\",\"borderWidth\",\"fontSize\",\"borderRadius\",...Eo],wu=[...Eo,...ts.filter(e=>[\"X\",\"Y\",\"Z\"].some(t=>e.endsWith(t)))],Pi=null,Fs=(e,t,s,r,i)=>{let n=Xe(t)?t:Ve(t,s,r,i,null,null);return Qe(n)?ku.includes(e)||ze(e,\"translate\")?`${n}px`:ze(e,\"rotate\")||ze(e,\"skew\")?`${n}deg`:`${n}`:n},Ao=(e,t,s,r,i,n)=>{let o=\"0\";const c=$(r)?getComputedStyle(e)[t]:Fs(t,r,e,i,n);return $(s)?o=je(r)?r.map(f=>Fs(t,f,e,i,n)):c:o=[Fs(t,s,e,i,n),c],o},Lo=class{constructor(e,t){qe.current&&qe.current.register(this),ss(Pi)&&(Lt&&($(CSS)||!Object.hasOwnProperty.call(CSS,\"registerProperty\"))?Pi=!1:(ts.forEach(h=>{const l=ze(h,\"skew\"),p=ze(h,\"scale\"),g=ze(h,\"rotate\"),v=ze(h,\"translate\"),_=g||l,S=_?\"<angle>\":p?\"<number>\":v?\"<length-percentage>\":\"*\";try{CSS.registerProperty({name:\"--\"+h,syntax:S,inherits:!1,initialValue:v?\"0px\":_?\"0deg\":p?\"1\":\"0\"})}catch{}}),Pi=!0));const s=Xt(e);s.length||console.warn(\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\");const r=U(t.autoplay,z.defaults.autoplay),i=r&&r.link?r:!1,n=t.alternate&&t.alternate===!0,o=t.reversed&&t.reversed===!0,c=U(t.loop,z.defaults.loop),f=c===!0||c===1/0?1/0:Qe(c)?c+1:1,d=n?o?\"alternate-reverse\":\"alternate\":o?\"reverse\":\"normal\",u=\"both\",a=z.timeScale===1?1:it;this.targets=s,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||z.defaults.onComplete,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!r||i!==!1,this.reversed=o,this.persist=U(t.persist,z.defaults.persist),this.autoplay=r,this._speed=U(t.playbackRate,z.defaults.playbackRate),this._resolve=ie,this._completed=0,this._inlineStyles=[],s.forEach((h,l)=>{const p=h[Os],g=wu.some(P=>t.hasOwnProperty(P)),v=h.style,_=this._inlineStyles[l]={},S=U(t.ease,z.defaults.ease),y=Ve(S,h,l,s,null,null),m=De(y)||Xe(y)?y:S,b=S.ease&&S,k=Po(m),w=(b?b.settlingDuration:Ve(U(t.duration,z.defaults.duration),h,l,s,null,null))*a,C=Ve(U(t.delay,z.defaults.delay),h,l,s,null,null)*a,M=U(t.composition,\"replace\");for(let P in t){if(!vs(P))continue;const A={},E={iterations:f,direction:d,fill:u,easing:k,duration:w,delay:C,composite:M},B=t[P],q=g?ts.includes(P)?P:ai.get(P):!1,W=q?\"transform\":P;_[W]||(_[W]=v[W]);let T;if(We(B)){const D=B,O=U(D.ease,k),L=O.ease&&O,F=D.to,Z=D.from;if(E.duration=(L?L.settlingDuration:Ve(U(D.duration,w),h,l,s,null,null))*a,E.delay=Ve(U(D.delay,C),h,l,s,null,null)*a,E.composite=U(D.composition,M),E.easing=Po(O),T=Ao(h,P,Z,F,l,s),q?(A[`--${q}`]=T,p[q]=T):A[P]=Ao(h,P,Z,F,l,s),go(this,h,P,A,E),!$(Z))if(!q)v[P]=A[P][0];else{const Y=`--${q}`;v.setProperty(Y,A[Y][0])}}else T=je(B)?B.map(D=>Fs(P,D,h,l,s)):Fs(P,B,h,l,s),q?(A[`--${q}`]=T,p[q]=T):A[P]=T,go(this,h,P,A,E)}if(g){let P=\"\";for(let A in p)P+=`${Mn[A]}var(--${A})) `;v.transform=P}}),i&&this.autoplay.link(this)}forEach(e){try{const t=Xe(e)?s=>s[e]():e;this.animations.forEach(t)}catch{}return this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=z.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(z.timeScale===1?1:it);this.forEach(s=>{!this.persist&&t>=this.duration&&s.play(),s.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach(\"play\")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach(\"pause\"))}alternate(){return this.reversed=!this.reversed,this.forEach(\"reverse\"),this.paused&&this.forEach(\"pause\"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach(\"commitStyles\")}complete(){return this.seek(this.duration)}cancel(){return this.muteCallbacks=!0,this.commitStyles().forEach(\"cancel\"),this.animations.length=0,requestAnimationFrame(()=>{this.targets.forEach(e=>{e.style.transform===\"none\"&&e.style.removeProperty(\"transform\")})}),this}revert(){return this.cancel().targets.forEach((e,t)=>{const s=e.style,r=this._inlineStyles[t];for(let i in r){const n=r[i];$(n)||n===\"\"?s.removeProperty(ar(i)):e.style[i]=n}e.getAttribute(\"style\")===\"\"&&e.removeAttribute(\"style\")}),this}then(e=ie){const t=this.then,s=()=>{this.then=null,e(this),this.then=t,this._resolve=ie};return new Promise(r=>(this._resolve=()=>r(s()),this.completed&&this._resolve(),this))}},Ro={animate:(e,t)=>new Lo(e,t),convertEase:Ar},xu=0,Tu=0,Lr=(e,t)=>!e||!t?!1:e===t||e.contains(t),ws=e=>{if(!e)return null;const t=e.style,s=t.transition||\"\";return t.setProperty(\"transition\",\"none\",\"important\"),s},Rr=(e,t)=>{if(!e)return;const s=e.style;t?s.transition=t:s.removeProperty(\"transition\")},Cu=e=>{const t=e.layout.transitionMuteStore,s=e.$el,r=e.$measure;s&&!t.has(s)&&t.set(s,ws(s)),r&&!t.has(r)&&t.set(r,ws(r))},Ir=e=>{e.forEach((t,s)=>Rr(s,t)),e.clear()},Pu={display:\"none\",visibility:\"hidden\",opacity:\"0\",transform:\"none\",position:\"static\"},Eu=e=>{if(!e)return;const t=e.parentNode;t&&(t._head===e&&(t._head=e._next),t._tail===e&&(t._tail=e._prev),e._prev&&(e._prev._next=e._next),e._next&&(e._next._prev=e._prev),e._prev=null,e._next=null,e.parentNode=null)},Io=(e,t,s,r)=>{let i=e.dataset.layoutId;i||(i=e.dataset.layoutId=`node-${Tu++}`);const n=r||{};return n.$el=e,n.$measure=e,n.id=i,n.index=0,n.targets=null,n.delay=0,n.duration=0,n.ease=null,n.state=s,n.layout=s.layout,n.parentNode=t||null,n.isTarget=!1,n.isEntering=!1,n.isLeaving=!1,n.isInlined=!1,n.hasTransform=!1,n.inlineStyles=[],n.inlineTransforms=null,n.inlineTransition=null,n.branchAdded=!1,n.branchRemoved=!1,n.branchNotRendered=!1,n.sizeChanged=!1,n.hasVisibilitySwap=!1,n.hasDisplayNone=!1,n.hasVisibilityHidden=!1,n.measuredInlineTransform=null,n.measuredInlineTransition=null,n.measuredDisplay=null,n.measuredVisibility=null,n.measuredPosition=null,n.measuredHasDisplayNone=!1,n.measuredHasVisibilityHidden=!1,n.measuredIsVisible=!1,n.measuredIsRemoved=!1,n.measuredIsInsideRoot=!1,n.properties={transform:\"none\",x:0,y:0,left:0,top:0,clientLeft:0,clientTop:0,width:0,height:0},n.layout.properties.forEach(o=>n.properties[o]=0),n._head=null,n._tail=null,n._prev=null,n._next=null,n},Mo=(e,t,s,r)=>{const i=e.$el,n=e.layout.root,o=n===i,c=e.properties,f=e.state.rootNode,d=e.parentNode,u=s.transform,a=i.style.transform,h=d?d.measuredIsRemoved:!1,l=s.position;o&&(e.layout.absoluteCoords=l===\"fixed\"||l===\"absolute\"),e.$measure=t,e.inlineTransforms=a,e.hasTransform=u&&u!==\"none\",e.measuredIsInsideRoot=Lr(n,t),e.measuredInlineTransform=null,e.measuredDisplay=s.display,e.measuredVisibility=s.visibility,e.measuredPosition=l,e.measuredHasDisplayNone=s.display===\"none\",e.measuredHasVisibilityHidden=s.visibility===\"hidden\",e.measuredIsVisible=!(e.measuredHasDisplayNone||e.measuredHasVisibilityHidden),e.measuredIsRemoved=e.measuredHasDisplayNone||e.measuredHasVisibilityHidden||h;let p=!1,g=i.previousSibling;for(;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.previousSibling;if(g&&g.nodeType===Node.TEXT_NODE)p=!0;else{for(g=i.nextSibling;g&&(g.nodeType===Node.COMMENT_NODE||g.nodeType===Node.TEXT_NODE&&!g.textContent.trim());)g=g.nextSibling;p=g!==null&&g.nodeType===Node.TEXT_NODE}if(e.isInlined=p,e.hasTransform&&!r){const k=e.layout.transitionMuteStore;k.get(i)||(e.inlineTransition=ws(i)),t===i?i.style.transform=\"none\":(k.get(t)||(e.measuredInlineTransition=ws(t)),e.measuredInlineTransform=t.style.transform,t.style.transform=\"none\")}let v=0,_=0,S=0,y=0;if(!r){const k=t.getBoundingClientRect();v=k.left,_=k.top,S=k.width,y=k.height}for(let k in c){const w=k===\"transform\"?u:s[k]||s.getPropertyValue&&s.getPropertyValue(k);$(w)||(c[k]=w)}c.left=v,c.top=_,c.clientLeft=r?0:t.clientLeft,c.clientTop=r?0:t.clientTop;let m,b;if(o)e.layout.absoluteCoords?(m=v,b=_):(m=0,b=0);else{const k=d||f,w=k.properties.left,C=k.properties.top,M=k.properties.clientLeft,P=k.properties.clientTop;if(e.layout.absoluteCoords)m=v-w-M,b=_-C-P;else if(k===f){const A=f.properties.left,E=f.properties.top,B=f.properties.clientLeft,q=f.properties.clientTop;m=v-A-B,b=_-E-q}else m=v-w-M,b=_-C-P}return c.x=m,c.y=b,c.width=S,c.height=y,e},Oo=(e,t)=>{if(t)for(let s in t)e.properties[s]=t[s]},Vs=(e,t)=>{const s=Ve(t.ease,e.$el,e.index,e.targets,null,null),r=De(s)?s:t.ease,i=!$(r)&&!$(r.ease);e.ease=i?r.ease:r,e.duration=i?r.settlingDuration:Ve(t.duration,e.$el,e.index,e.targets,null,null),e.delay=Ve(t.delay,e.$el,e.index,e.targets,null,null)},Au=e=>{const t=e.$el.style,s=e.inlineStyles;s.length=0,e.layout.recordedProperties.forEach(r=>{s.push(r,t[r]||\"\")})},No=e=>{const t=e.$el.style,s=e.inlineStyles;for(let r=0,i=s.length;r<i;r+=2){const n=s[r],o=s[r+1];o&&o!==\"\"?t[n]=o:(t[n]=\"\",t.removeProperty(n))}},Lu=e=>{const t=e.inlineTransforms,s=e.$el.style;!e.hasTransform||!t||e.hasTransform&&s.transform===\"none\"||t&&t===\"none\"?s.removeProperty(\"transform\"):t&&(s.transform=t);const r=e.$measure;if(e.hasTransform&&r!==e.$el){const i=r.style,n=e.measuredInlineTransform;n&&n!==\"\"?i.transform=n:i.removeProperty(\"transform\")}e.measuredInlineTransform=null,e.inlineTransition!==null&&(Rr(e.$el,e.inlineTransition),e.inlineTransition=null),r!==e.$el&&e.measuredInlineTransition!==null&&(Rr(r,e.measuredInlineTransition),e.measuredInlineTransition=null)},Do=e=>{(e.measuredIsRemoved||e.hasVisibilitySwap)&&(e.$el.style.removeProperty(\"display\"),e.$el.style.removeProperty(\"visibility\"),e.hasVisibilitySwap&&(e.$measure.style.removeProperty(\"display\"),e.$measure.style.removeProperty(\"visibility\"))),e.layout.pendingRemoval.delete(e.$el)},Ei=(e,t,s)=>(t.properties={...e.properties},t.state=s,t.isTarget=e.isTarget,t.hasTransform=e.hasTransform,t.inlineTransforms=e.inlineTransforms,t.measuredIsVisible=e.measuredIsVisible,t.measuredDisplay=e.measuredDisplay,t.measuredIsRemoved=e.measuredIsRemoved,t.measuredHasDisplayNone=e.measuredHasDisplayNone,t.measuredHasVisibilityHidden=e.measuredHasVisibilityHidden,t.hasDisplayNone=e.hasDisplayNone,t.isInlined=e.isInlined,t.hasVisibilityHidden=e.hasVisibilityHidden,t),Bo=class{constructor(e){this.layout=e,this.rootNode=null,this.rootNodes=new Set,this.nodes=new Map,this.scrollX=0,this.scrollY=0}revert(){return this.forEachNode(e=>{this.layout.pendingRemoval.delete(e.$el),e.$el.removeAttribute(\"data-layout-id\"),e.$measure.removeAttribute(\"data-layout-id\")}),this.rootNode=null,this.rootNodes.clear(),this.nodes.clear(),this}getNode(e){if(!(!e||!e.dataset))return this.nodes.get(e.dataset.layoutId)}getComputedValue(e,t){const s=this.getNode(e);if(s)return s.properties[t]}forEach(e,t){let s=e,r=0;for(;s;)if(t(s,r++),s._head)s=s._head;else if(s._next)s=s._next;else{for(;s&&!s._next;)s=s.parentNode;s&&(s=s._next)}}forEachRootNode(e){this.forEach(this.rootNode,e)}forEachNode(e){for(const t of this.rootNodes)this.forEach(t,e)}registerElement(e,t){if(!e||e.nodeType!==1)return null;this.layout.transitionMuteStore.has(e)||this.layout.transitionMuteStore.set(e,ws(e));const s=[e,t],r=this.layout.root;let i=null;for(;s.length;){const n=s.pop(),o=s.pop();if(!o||o.nodeType!==1||lr(o))continue;const c=n?n.measuredIsRemoved:!1,f=c?Pu:getComputedStyle(o),d=c?!0:f.display===\"none\",u=c?!0:f.visibility===\"hidden\",a=!d&&!u,h=o.dataset.layoutId,l=Lr(r,o);let p=h?this.nodes.get(h):null;if(p&&p.$el!==o){const v=Lr(r,p.$el),_=p.measuredIsVisible,S=!v&&(l||!l&&!_&&a),y=v&&!_&&a;if(S)Eu(p),p=Io(o,n,this,p);else if(y){Mo(p,o,f,c);let m=o.lastElementChild;for(;m;)s.push(m,p),m=m.previousElementSibling;i||(i=p);continue}else{let m=o.lastElementChild;for(;m;)s.push(m,n),m=m.previousElementSibling;i||(i=p);continue}}else p=Io(o,n,this,p);p.branchAdded=!1,p.branchRemoved=!1,p.branchNotRendered=!1,p.isTarget=!1,p.sizeChanged=!1,p.hasVisibilityHidden=u,p.hasDisplayNone=d,p.hasVisibilitySwap=u&&!p.measuredHasVisibilityHidden||d&&!p.measuredHasDisplayNone,this.nodes.set(p.id,p),p.parentNode=n||null,p._prev=null,p._next=null,n?(this.rootNodes.delete(p),n._head?(n._tail._next=p,p._prev=n._tail,n._tail=p):(n._head=p,n._tail=p)):this.rootNodes.add(p),Mo(p,p.$el,f,c);let g=o.lastElementChild;for(;g;)s.push(g,p),g=g.previousElementSibling;i||(i=p)}return i}ensureDetachedNode(e,t){if(!e||e===this.layout.root)return null;const s=e.dataset.layoutId,r=s?this.nodes.get(s):null;if(r&&r.$el===e)return r;let i=null,n=e.parentElement;for(;n&&n!==this.layout.root;){if(t.has(n)){i=this.ensureDetachedNode(n,t);break}n=n.parentElement}return this.registerElement(e,i)}record(){const e=this.layout,t=e.children,s=e.root,r=je(t)?t:[t],i=[],n=t===\"*\"?s:qe.root,o=[];let c=s.parentElement;for(;c&&c.nodeType===1;){const g=getComputedStyle(c);if(g.transform&&g.transform!==\"none\"){const v=c.style.transform||\"\",_=ws(c);o.push(c,v,_),c.style.transform=\"none\"}c=c.parentElement}for(let g=0,v=r.length;g<v;g++){const _=r[g];i[g]=Xe(_)?n.querySelectorAll(_):_}const f=Xt(i);this.nodes.clear(),this.rootNodes.clear();const d=this.registerElement(s,null);d.isTarget=!0,this.rootNode=d;const u=new Set;let a=0;const h=[];this.nodes.forEach(g=>{h.push(g.$el)}),this.nodes.forEach((g,v)=>{g.index=a++,g.targets=h,g&&g.measuredIsInsideRoot&&u.add(v)});const l=new Set,p=[];for(let g=0,v=f.length;g<v;g++){const _=f[g];if(!(!_||_.nodeType!==1||_===s)){if(!Lr(s,_)){const S=_.dataset.layoutId;if(!S||!u.has(S))continue}l.has(_)||(l.add(_),p.push(_))}}for(let g=0,v=p.length;g<v;g++)this.ensureDetachedNode(p[g],l);for(let g=0,v=f.length;g<v;g++){const _=f[g],S=this.getNode(_);if(S){let y=S;for(;y&&!y.isTarget;)y.isTarget=!0,y=y.parentNode}}this.scrollX=window.scrollX,this.scrollY=window.scrollY,this.forEachNode(Lu);for(let g=0,v=o.length;g<v;g+=3){const _=o[g],S=o[g+1],y=o[g+2];S&&S!==\"\"?_.style.transform=S:_.style.removeProperty(\"transform\"),Rr(_,y)}return this}};function xs(e){const t={},s={};for(let r in e){const i=e[r],n=r===\"ease\";r===\"duration\"||r===\"delay\"||n?s[r]=i:t[r]=i}return[t,s]}var $o=class{constructor(e,t={}){qe.current&&qe.current.register(this);const s=xs(t.swapAt),r=xs(t.enterFrom),i=xs(t.leaveTo),n=t.properties;if(t.duration=U(t.duration,350),t.delay=U(t.delay,0),t.ease=U(t.ease,\"inOut(3.5)\"),this.params=t,this.root=Xt(e)[0],this.id=t.id||xu++,this.children=t.children||\"*\",this.absoluteCoords=!1,this.swapAtParams=vt(t.swapAt||{opacity:0},{ease:\"inOut(1.75)\"}),this.enterFromParams=t.enterFrom||{opacity:0},this.leaveToParams=t.leaveTo||{opacity:0},this.properties=new Set([\"opacity\",\"fontSize\",\"color\",\"backgroundColor\",\"borderRadius\",\"border\",\"filter\",\"clipPath\"]),s[0])for(let o in s[0])this.properties.add(o);if(r[0])for(let o in r[0])this.properties.add(o);if(i[0])for(let o in i[0])this.properties.add(o);if(n)for(let o=0,c=n.length;o<c;o++)this.properties.add(n[o]);this.recordedProperties=new Set([\"display\",\"visibility\",\"translate\",\"position\",\"left\",\"top\",\"marginLeft\",\"marginTop\",\"width\",\"height\",\"maxWidth\",\"maxHeight\",\"minWidth\",\"minHeight\"]),this.properties.forEach(o=>this.recordedProperties.add(o)),this.pendingRemoval=new WeakSet,this.transitionMuteStore=new Map,this.oldState=new Bo(this),this.newState=new Bo(this),this.timeline=null,this.transformAnimation=null,this.animating=[],this.swapping=[],this.leaving=[],this.entering=[],this.oldState.record(),Ir(this.transitionMuteStore)}revert(){return this.root.classList.remove(\"is-animated\"),this.timeline&&(this.timeline.complete(),this.timeline=null),this.transformAnimation&&(this.transformAnimation.complete(),this.transformAnimation=null),this.animating.length=this.swapping.length=this.leaving.length=this.entering.length=0,this.oldState.revert(),this.newState.revert(),requestAnimationFrame(()=>Ir(this.transitionMuteStore)),this}record(){return this.transformAnimation&&(this.transformAnimation.cancel(),this.transformAnimation=null),this.oldState.record(),this.timeline&&(this.timeline.cancel(),this.timeline=null),this.newState.forEachRootNode(No),this}animate(e={}){const t={ease:U(e.ease,this.params.ease),delay:U(e.delay,this.params.delay),duration:U(e.duration,this.params.duration)},s={id:this.id},r=U(e.onComplete,this.params.onComplete),i=U(e.onPause,this.params.onPause);for(let T in Ns)T!==\"ease\"&&T!==\"duration\"&&T!==\"delay\"&&($(e[T])?$(this.params[T])||(s[T]=this.params[T]):s[T]=e[T]);s.onComplete=()=>{const T=e.autoplay,D=z.editor;if(T&&T.linked||D&&D.showPanel){r&&r(this.timeline);return}this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(O=>{Do(O),No(O)});for(let O=0,L=w.length;O<L;O++){const F=w[O];F.style.transform=g.getComputedValue(F,\"transform\")}this.root.classList.contains(\"is-animated\")&&(this.root.classList.remove(\"is-animated\"),r&&r(this.timeline)),requestAnimationFrame(()=>{this.root.classList.contains(\"is-animated\")||Ir(this.transitionMuteStore)})},s.onPause=()=>{const T=e.autoplay;if(T&&T.linked){r&&r(this.timeline),i&&i(this.timeline);return}this.root.classList.contains(\"is-animated\")&&(this.transformAnimation&&this.transformAnimation.cancel(),g.forEachRootNode(Do),this.root.classList.remove(\"is-animated\"),r&&r(this.timeline),i&&i(this.timeline))},s.composition=!1;const n=vt(vt(e.swapAt||{},this.swapAtParams),t),o=vt(vt(e.enterFrom||{},this.enterFromParams),t),c=vt(vt(e.leaveTo||{},this.leaveToParams),t),[f,d]=xs(n),[u,a]=xs(o),[h,l]=xs(c),p=this.oldState,g=this.newState,v=this.animating,_=this.swapping,S=this.entering,y=this.leaving,m=this.pendingRemoval;v.length=_.length=S.length=y.length=0,p.forEachRootNode(Cu),g.record(),g.forEachRootNode(Au);const b=[],k=[],w=[],C=[],M=g.rootNode,P=M.$el;g.forEachRootNode(T=>{const D=T.$el,O=T.id,L=T.parentNode,F=L?L.branchAdded:!1,Z=L?L.branchRemoved:!1,Y=L?L.branchNotRendered:!1;let X=p.nodes.get(O);const J=!X;J?(X=Ei(T,{},p),p.nodes.set(O,X),X.measuredIsRemoved=!0):X.measuredIsRemoved&&!T.measuredIsRemoved&&(Ei(T,X,p),X.measuredIsRemoved=!0);const ne=X.parentNode,ce=(ne?ne.id:null)!==(L?L.id:null),we=X.$el!==T.$el,me=X.measuredIsRemoved,te=T.measuredIsRemoved;if(!X.measuredIsRemoved&&!te&&!J&&(ce||we)){const Te=X.properties.left,ge=X.properties.top,Le=L||g.rootNode,Se=Le.id?p.nodes.get(Le.id):null,se=Se?Se.properties.left:Le.properties.left,be=Se?Se.properties.top:Le.properties.top,ke=Se?Se.properties.clientLeft:Le.properties.clientLeft,Oe=Se?Se.properties.clientTop:Le.properties.clientTop;X.properties.x=Te-se-ke,X.properties.y=ge-be-Oe}T.hasVisibilitySwap&&(T.hasVisibilityHidden&&(T.$el.style.visibility=\"visible\",T.$measure.style.visibility=\"hidden\"),T.hasDisplayNone&&(T.$el.style.display=X.measuredDisplay||T.measuredDisplay||\"\",T.$measure.style.visibility=\"hidden\"));const Q=m.has(D),ue=X.measuredIsVisible,Pe=T.measuredIsVisible,Ee=!ue&&Pe&&!Y,xe=!te&&(me||Q)&&!F,Ae=te&&!me&&!Z,ye=Ae||te&&Q&&!Z;T.branchAdded=F||xe,T.branchRemoved=Z||ye,T.branchNotRendered=Y||te,te&&ue&&(T.$el.style.display=X.measuredDisplay,T.$el.style.visibility=\"visible\",Ei(X,T,g)),Ae?(T.isTarget&&(y.push(D),T.isLeaving=!0),m.add(D)):!te&&Q&&m.delete(D),xe&&!Y||Ee?(Oo(X,u),T.isTarget&&(S.push(D),T.isEntering=!0)):ye&&!Y&&Oo(T,h),T!==M&&T.isTarget&&!T.isEntering&&!T.isLeaving&&v.push(D),b.push(D)});let A=0,E=0,B=0;g.forEachRootNode(T=>{const D=T.$el,O=T.parentNode,L=p.nodes.get(T.id),F=T.properties,Z=L.properties;let Y=O!==M&&O;for(;Y&&!Y.isTarget&&Y!==M;)Y=Y.parentNode;T===M?(T.index=0,T.targets=v,Vs(T,t)):T.isEntering?(T.index=Y?Y.index:A,T.targets=Y?v:S,Vs(T,a),A++):T.isLeaving?(T.index=Y?Y.index:E,T.targets=Y?v:y,E++,Vs(T,l)):T.isTarget?(T.index=B++,T.targets=v,Vs(T,t)):(T.index=Y?Y.index:0,T.targets=v,Vs(T,d)),L.index=T.index,L.targets=T.targets;for(let ce in F)F[ce]=Ve(F[ce],D,T.index,T.targets,null,null),Z[ce]=Ve(Z[ce],D,L.index,L.targets,null,null);const X=1,J=Math.abs(F.width-Z.width)>X,ne=Math.abs(F.height-Z.height)>X;if(T.sizeChanged=J||ne,T.isTarget&&(!T.measuredIsRemoved&&L.measuredIsVisible||T.measuredIsRemoved&&T.measuredIsVisible)){(F.transform!==\"none\"||Z.transform!==\"none\")&&(T.hasTransform=!0,w.push(D));for(let ce in F)if(ce!==\"transform\"&&F[ce]!==Z[ce]){k.push(D);break}}T.isTarget||(_.push(D),T.sizeChanged&&O&&O.isTarget&&O.sizeChanged&&(f.transform&&(T.hasTransform=!0,w.push(D)),C.push(D)))});const q={delay:T=>g.getNode(T).delay,duration:T=>g.getNode(T).duration,ease:T=>g.getNode(T).ease};if(s.defaults=q,this.timeline=fo(s),!k.length&&!w.length&&!_.length)return Ir(this.transitionMuteStore),this.timeline.complete();if(b.length){this.root.classList.add(\"is-animated\");for(let T=0,D=b.length;T<D;T++){const O=b[T],L=O.dataset.layoutId,F=p.nodes.get(L),Z=g.nodes.get(L),Y=F.properties;Z.isInlined||((F.measuredDisplay===\"grid\"||Z.measuredDisplay===\"grid\")&&O.style.setProperty(\"display\",\"block\",\"important\"),(O!==P||this.absoluteCoords)&&(O.style.position=this.absoluteCoords?\"fixed\":\"absolute\",O.style.left=\"0px\",O.style.top=\"0px\",O.style.marginLeft=\"0px\",O.style.marginTop=\"0px\",O.style.translate=`${Y.x}px ${Y.y}px`),O===P&&Z.measuredPosition===\"static\"&&(O.style.position=\"relative\",O.style.left=\"0px\",O.style.top=\"0px\")),O.style.width=`${Y.width}px`,O.style.height=`${Y.height}px`,O.style.minWidth=\"auto\",O.style.minHeight=\"auto\",O.style.maxWidth=\"none\",O.style.maxHeight=\"none\"}(p.scrollX!==window.scrollX||p.scrollY!==window.scrollY)&&requestAnimationFrame(()=>window.scrollTo(p.scrollX,p.scrollY));for(let T=0,D=k.length;T<D;T++){const O=k[T],L=O.dataset.layoutId,F=p.nodes.get(L),Z=g.nodes.get(L),Y=F.properties,X=Z.properties;let J=!1;const ne={composition:\"none\"};Y.width!==X.width&&(ne.width=[Y.width,X.width],J=!0),Y.height!==X.height&&(ne.height=[Y.height,X.height],J=!0),!Z.hasTransform&&!Z.isInlined&&(ne.translate=[`${Y.x}px ${Y.y}px`,`${X.x}px ${X.y}px`],J=!0),this.properties.forEach(ce=>{const we=Y[ce],me=X[ce];ce!==\"transform\"&&we!==me&&(ne[ce]=[we,me],J=!0)}),J&&this.timeline.add(O,ne,0)}}if(_.length){for(let T=0,D=_.length;T<D;T++){const O=_[T],L=p.getNode(O),F=L.properties;O.style.width=`${F.width}px`,O.style.height=`${F.height}px`,O.style.minWidth=\"auto\",O.style.minHeight=\"auto\",O.style.maxWidth=\"none\",O.style.maxHeight=\"none\",L.isInlined||(O.style.translate=`${F.x}px ${F.y}px`),this.properties.forEach(Z=>{Z!==\"transform\"&&(O.style[Z]=`${p.getComputedValue(O,Z)}`)})}for(let T=0,D=_.length;T<D;T++){const O=_[T],L=g.getNode(O),F=L.properties;this.timeline.call(()=>{O.style.width=`${F.width}px`,O.style.height=`${F.height}px`,O.style.minWidth=\"auto\",O.style.minHeight=\"auto\",O.style.maxWidth=\"none\",O.style.maxHeight=\"none\",L.isInlined||(O.style.translate=`${F.x}px ${F.y}px`),this.properties.forEach(Z=>{Z!==\"transform\"&&(O.style[Z]=`${g.getComputedValue(O,Z)}`)})},L.delay+L.duration/2)}if(C.length){const T=Bt(g.nodes.get(C[0].dataset.layoutId).ease),D=L=>1-T(1-L),O={};if(f)for(let L in f)L!==\"transform\"&&(O[L]=[{from:F=>p.getComputedValue(F,L),to:f[L]},{from:f[L],to:F=>g.getComputedValue(F,L),ease:D}]);this.timeline.add(C,O,0)}}const W=w.length;if(W){for(let T=0;T<W;T++){const D=w[T],O=g.getNode(D);O.isInlined||(D.style.translate=`${p.getComputedValue(D,\"x\")}px ${p.getComputedValue(D,\"y\")}px`),D.style.transform=p.getComputedValue(D,\"transform\"),C.includes(D)&&(O.ease=Ve(n.ease,D,O.index,O.targets,null,null),O.duration=Ve(n.duration,D,O.index,O.targets,null,null))}this.transformAnimation=Ro.animate(w,{translate:T=>g.getNode(T).isInlined?\"0px 0px\":`${g.getComputedValue(T,\"x\")}px ${g.getComputedValue(T,\"y\")}px`,transform:T=>{const D=g.getComputedValue(T,\"transform\");if(!C.includes(T))return D;const O=p.getComputedValue(T,\"transform\"),L=g.getNode(T);return[O,Ve(f.transform,T,L.index,L.targets,null,null),D]},autoplay:!1,...q}),this.timeline.sync(this.transformAnimation,0)}return this.timeline.init()}update(e,t={}){return this.record(),e(this),this.animate(t)}},Ru=(e,t)=>new $o(e,t),yt=ru,Mr={},Iu=(e,t=0)=>(...s)=>t?r=>e(...s,r):r=>e(r,...s),Ho=e=>(...t)=>{const s=e(...t);return new Proxy(ie,{apply:(r,i,[n])=>s(n),get:(r,i)=>{if(Mr[i])return Ho((...n)=>{const o=Mr[i](...n);return c=>o(s(c))})}})},bt=(e,t,s=0)=>{const r=(...i)=>(i.length<t.length?Ho(Iu(t,s)):t)(...i);return Mr[e]||(Mr[e]=r),r},qo=bt(\"roundPad\",yt.roundPad),Fo=bt(\"padStart\",yt.padStart),Vo=bt(\"padEnd\",yt.padEnd),zo=bt(\"wrap\",yt.wrap),Uo=bt(\"mapRange\",yt.mapRange),Wo=bt(\"degToRad\",yt.degToRad),Xo=bt(\"radToDeg\",yt.radToDeg),Go=bt(\"snap\",yt.snap),Yo=bt(\"clamp\",yt.clamp),jo=bt(\"round\",yt.round),Zo=bt(\"lerp\",yt.lerp,1),Jo=bt(\"damp\",yt.damp,1),zs=(e=0,t=1,s=0)=>{const r=10**s;return Math.floor((Math.random()*(t-e+1/r)+e)*r)/r},Mu=0,Us=(e,t=0,s=1,r=0)=>{let i=e===void 0?Mu++:e;return(n=t,o=s,c=r)=>{i+=1831565813,i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61);const f=10**c;return Math.floor((((i^i>>>14)>>>0)/4294967296*(o-n+1/f)+n)*f)/f}},Qo=e=>e[zs(0,e.length-1)],Ai=(e,t=zs)=>{let s=e.length,r,i;for(;s;)i=t(0,--s),r=e[s],e[s]=e[i],e[i]=r;return e},Ws=(e,t={})=>{let s=[],r=0,i,n=null;const o=t.from,c=t.reversed,f=t.ease,d=!$(f),u=d&&!$(f.ease)?f.ease:d?Bt(f):null,a=t.grid,h=a===!0,l=t.axis,p=t.total,g=$(o)||o===0||o===\"first\",v=o===\"center\",_=o===\"last\",S=o===\"random\",y=je(o),m=je(e),b=t.use,k=rs(m?e[0]:e),w=m?rs(e[1]):0,C=Nn.exec((m?e[1]:e)+\"\"),M=t.start||0+(m?k:0),P=t.seed,A=!$(P)&&P!==!1?Us(P===!0?0:P):zs,E=t.jitter,B=!$(E),q=je(E),W=q?E[0]:E||0,T=q?E[1]:E||0;let D=g?0:Qe(o)?o:0;return(O,L,F,Z,Y)=>{const[X]=Xt(O),J=$(p)?F.length:p,ne=$(b)?!1:De(b)?b(X,L,J):os(X,b),ce=Qe(ne)||Xe(ne)&&Qe(+ne)?+ne:L,we=ce>=0&&ce<J?ce:L;if(v&&(D=(J-1)/2),_&&(D=J-1),!s.length){if(h){let Q=!0,ue=!1,Pe=1/0,Ee=1/0,xe=1/0,Ae=-1/0,ye=-1/0,Te=-1/0;const ge=[],Le=[],Se=[];for(let se=0;se<J;se++){const be=F[se];let ke=0,Oe=0,N=0,oe=!1;if(be&&De(be.getBoundingClientRect)){const fe=be.getBoundingClientRect();ke=fe.left+fe.width/2,Oe=fe.top+fe.height/2,oe=!0}else{const fe=be;fe&&Qe(fe.x)&&Qe(fe.y)&&(ke=fe.x,Oe=fe.y,Qe(fe.z)&&(N=fe.z,ue=!0),oe=!0)}if(!oe){Q=!1;break}ge.push(ke),Le.push(Oe),Se.push(N),ke<Pe&&(Pe=ke),Oe<Ee&&(Ee=Oe),N<xe&&(xe=N),ke>Ae&&(Ae=ke),Oe>ye&&(ye=Oe),N>Te&&(Te=N)}if(Q){let se=ge[0],be=Le[0],ke=Se[0];y?(se=Pe+o[0]*(Ae-Pe),be=Ee+o[1]*(ye-Ee),ke=ue?xe+(o.length>=3?o[2]:.5)*(Te-xe):0):v?(se=(Pe+Ae)/2,be=(Ee+ye)/2,ke=(xe+Te)/2):_?(se=ge[J-1],be=Le[J-1],ke=Se[J-1]):Qe(o)&&(se=ge[o],be=Le[o],ke=Se[o]);for(let N=0;N<J;N++){const oe=se-ge[N],fe=be-Le[N],ae=ke-Se[N];let K=gt(oe*oe+fe*fe+(ue?ae*ae:0));l===\"x\"&&(K=-oe),l===\"y\"&&(K=-fe),l===\"z\"&&(K=-ae),s.push(K)}let Oe=1/0;for(let N=0;N<J;N++){const oe=mt(s[N]);oe>0&&oe<Oe&&(Oe=oe)}if(Oe>0&&Oe<1/0)for(let N=0;N<J;N++)s[N]=s[N]/Oe}else for(let se=0;se<J;se++)s.push(mt(D-se))}else for(let Q=0;Q<J;Q++)if(!a)s.push(mt(D-Q));else{const ue=a.length,Pe=a[0]*a[1];let Ee,xe,Ae;y?(Ee=o[0]*(a[0]-1),xe=o[1]*(a[1]-1),Ae=ue===3?(o.length>=3?o[2]:.5)*(a[2]-1):0):v?(Ee=(a[0]-1)/2,xe=(a[1]-1)/2,Ae=ue===3?(a[2]-1)/2:0):(Ee=D%a[0],xe=ys(D/a[0])%a[1],Ae=ue===3?ys(D/Pe):0);const ye=Q%a[0],Te=ys(Q/a[0])%a[1],ge=ue===3?ys(Q/Pe):0,Le=Ee-ye,Se=xe-Te,se=Ae-ge;let be=gt(Le*Le+Se*Se+(ue===3?se*se:0));l===\"x\"&&(be=-Le),l===\"y\"&&(be=-Se),l===\"z\"&&(be=-se),s.push(be)}r=s[0];for(let Q=1;Q<J;Q++)s[Q]>r&&(r=s[Q]);if(u||c)for(let Q=0;Q<J;Q++){let ue=s[Q];u&&(ue=u(ue/r)*r),c&&(ue=l?-ue:mt(r-ue)),s[Q]=ue}if(B){n=new Array(J);for(let Q=0;Q<J;Q++)n[Q]=A(-1,1,4)}S&&(s=Ai(s,A))}const me=m?(w-k)/r:k;$(i)&&(i=Y?$s(Y,$(t.start)?Y.iterationDuration:M):M);let te=i+(me*V(s[we],2)||0);if(B){const Q=r?s[we]/r:0,ue=W+(T-W)*Q;te=te+n[we]*ue}return t.modifier&&(te=t.modifier(te)),C&&(te=`${te}${C[2]}`),te}},Ou=hs({$:()=>Xt,addChild:()=>Tt,clamp:()=>Yo,cleanInlineStyles:()=>jn,createSeededRandom:()=>Us,damp:()=>Jo,degToRad:()=>Wo,forEachChildren:()=>Ce,get:()=>Yt,keepTime:()=>Tr,lerp:()=>Zo,mapRange:()=>Uo,padEnd:()=>Vo,padStart:()=>Fo,radToDeg:()=>Xo,random:()=>zs,randomPick:()=>Qo,remove:()=>mo,removeChild:()=>xt,round:()=>jo,roundPad:()=>qo,set:()=>Ht,shuffle:()=>Ai,snap:()=>Go,stagger:()=>Ws,sync:()=>Ti,wrap:()=>zo}),Ko=e=>{const t=ht(e)[0];return!t||!lr(t)?console.warn(`${e} is not a valid SVGGeometryElement`):t},Li=(e,t,s,r,i)=>{const n=s+r,o=i?Math.max(0,Math.min(n,t)):(n%t+t)%t;return e.getPointAtLength(o)},Ri=(e,t,s=0)=>r=>{const i=+e.getTotalLength(),n=r[oi],o=e.getCTM(),c=s===0;return{from:0,to:i,modifier:f=>{const d=f+s*i;if(t===\"a\"){const u=Li(e,i,d,-1,c),a=Li(e,i,d,1,c);return ur(a.y-u.y,a.x-u.x)*180/Rt}else{const u=Li(e,i,d,0,c);return t===\"x\"?n||!o?u.x:u.x*o.a+u.y*o.c+o.e:n||!o?u.y:u.x*o.b+u.y*o.d+o.f}}}},ea=(e,t=0)=>{const s=Ko(e);if(s)return{translateX:Ri(s,\"x\",t),translateY:Ri(s,\"y\",t),rotate:Ri(s,\"a\",t)}},Nu=e=>{let t=1;if(e&&e.getCTM){const s=e.getCTM();s&&(t=(gt(s.a*s.a+s.b*s.b)+gt(s.c*s.c+s.d*s.d))/2)}return t},Du=(e,t,s)=>{const r=it,i=getComputedStyle(e),n=i.strokeLinecap,o=i.vectorEffect===\"non-scaling-stroke\"?e:null;let c=n;const f=new Proxy(e,{get(d,u){const a=d[u];return u===In?d:u===\"setAttribute\"?(...h)=>{if(h[0]===\"draw\"){const l=h[1].split(\" \"),p=+l[0],g=+l[1],v=Nu(o),_=p*-r*v,S=g*r*v+_,y=r*v+(p===0&&g===1||p===1&&g===0?0:10*v)-S;if(n!==\"butt\"){const m=p===g?\"butt\":n;c!==m&&(d.style.strokeLinecap=`${m}`,c=m)}d.setAttribute(\"stroke-dashoffset\",`${_}`),d.setAttribute(\"stroke-dasharray\",`${S} ${y}`)}return Reflect.apply(a,d,h)}:De(a)?(...h)=>Reflect.apply(a,d,h):a}});return e.getAttribute(\"pathLength\")!==`${r}`&&(e.setAttribute(\"pathLength\",`${r}`),f.setAttribute(\"draw\",`${t} ${s}`)),f},ta=(e,t=0,s=0)=>ht(e).map(r=>Du(r,t,s)),sa=(e,t=.33)=>(s,r,i,n)=>{if(!(s.tagName||\"\").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${s.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const o=Ko(e);if(!o)throw new Error(\"Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.\");if(!(o.tagName||\"\").toLowerCase().match(/^(path|polygon|polyline)$/))throw new Error(`Can't morph a <${o.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);const c=s.tagName===\"path\",f=c?\" \":\",\",d=n?n._value:null;d&&s.setAttribute(c?\"d\":\"points\",d);let u=\"\",a=\"\";if(!t)u=s.getAttribute(c?\"d\":\"points\"),a=o.getAttribute(c?\"d\":\"points\");else{const h=s.getTotalLength(),l=o.getTotalLength(),p=Math.max(Math.ceil(h*t),Math.ceil(l*t));for(let g=0;g<p;g++){const v=g/(p-1),_=s.getPointAtLength(h*v),S=o.getPointAtLength(l*v),y=c?g===0?\"M\":\"L\":\"\";u+=y+V(_.x,3)+f+_.y+\" \",a+=y+V(S.x,3)+f+S.y+\" \"}}return[u,a]},Bu=hs({createDrawable:()=>ta,createMotionPath:()=>ea,morphTo:()=>sa}),Or=typeof Intl<\"u\"&&Intl.Segmenter,$u=/\\{value\\}/g,Hu=/\\{i\\}/g,Ii=/(\\s+)/,Mi=/^\\s+$/,Oi=\"line\",Xs=\"word\",Gs=\"char\",Ys=\"data-line\",Ni=null,Di=null,Nr=null,ra=e=>e.isWordLike||e.segment===\" \"||Qe(+e.segment),Bi=e=>e.setAttribute(\"aria-hidden\",\"true\"),Dr=(e,t)=>[...e.querySelectorAll(`[data-${t}]:not([data-${t}] [data-${t}])`)],qu={line:\"#00D672\",word:\"#FF4B4B\",char:\"#5A87FF\"},ia=e=>{if(!e.childElementCount&&!e.textContent.trim()){const t=e.parentElement;e.remove(),t&&ia(t)}},na=(e,t,s)=>{const r=e.getAttribute(Ys);if(r!==null&&+r!==t||e.tagName===\"BR\"){s.add(e);const n=e.previousSibling,o=e.nextSibling;n&&n.nodeType===3&&Mi.test(n.textContent)&&s.add(n),o&&o.nodeType===3&&Mi.test(o.textContent)&&s.add(o)}let i=e.childElementCount;for(;i--;)na(e.children[i],t,s);return s},$i=(e,t={})=>{let s=\"\";t||(t={});const r=Xe(t.class)?` class=\"${t.class}\"`:\"\",i=U(t.clone,!1),n=U(t.wrap,!1),o=n?n===!0?\"clip\":n:i?\"clip\":!1;if(n&&(s+=`<span${o?` style=\"overflow:${o};\"`:\"\"}>`),s+=`<span${r}${i?' style=\"position:relative;\"':\"\"} data-${e}=\"{i}\">`,i){const c=i===\"left\"?\"-100%\":i===\"right\"?\"100%\":\"0\",f=i===\"top\"?\"-100%\":i===\"bottom\"?\"100%\":\"0\";s+=\"<span>{value}</span>\",s+=`<span inert style=\"position:absolute;top:${f};left:${c};white-space:nowrap;\">{value}</span>`}else s+=\"{value}\";return s+=\"</span>\",n&&(s+=\"</span>\"),s},Hi=(e,t,s,r,i,n,o,c,f)=>{const d=i===Oi,u=i===Gs,a=`_${i}_`,h=De(e)?e(s):e,l=d?\"block\":\"inline-block\";Nr.innerHTML=h.replace($u,`<i class=\"${a}\"></i>`).replace(Hu,`${u?f:d?o:c}`);const p=Nr.content,g=p.firstElementChild,v=p.querySelector(`[data-${i}]`)||g,_=p.querySelectorAll(`i.${a}`),S=_.length;if(S){g.style.display=l,v.style.display=l,v.setAttribute(Ys,`${o}`),d||(v.setAttribute(\"data-word\",`${c}`),u&&v.setAttribute(\"data-char\",`${f}`));let y=S;for(;y--;){const m=_[y],b=m.parentElement;b.style.display=l,d?b.innerHTML=s.innerHTML:b.replaceChild(s.cloneNode(!0),m)}t.push(v),r.appendChild(p)}else console.warn('The expression \"{value}\" is missing from the provided template.');return n&&(g.style.outline=`1px dotted ${qu[i]}`),g},Br=class{constructor(e,t={}){Ni||(Ni=Or?new Or([],{granularity:Xs}):{segment:l=>{const p=[],g=l.split(Ii);for(let v=0,_=g.length;v<_;v++){const S=g[v];p.push({segment:S,isWordLike:!Mi.test(S)})}return p}}),Di||(Di=Or?new Or([],{granularity:\"grapheme\"}):{segment:l=>[...l].map(p=>({segment:p}))}),!Nr&&Lt&&(Nr=j.createElement(\"template\")),qe.current&&qe.current.register(this);const{words:s,chars:r,lines:i,accessible:n,includeSpaces:o,debug:c}=t,f=(e=je(e)?e[0]:e)&&e.nodeType?e:(yi(e)||[])[0],d=i===!0?{}:i,u=s===!0||$(s)?{}:s,a=r===!0?{}:r;this.debug=U(c,!1),this.includeSpaces=U(o,!1),this.accessible=U(n,!0),this.linesOnly=d&&!u&&!a,this.lineTemplate=We(d)?$i(Oi,d):d,this.wordTemplate=We(u)||this.linesOnly?$i(Xs,u):u,this.charTemplate=We(a)?$i(Gs,a):a,this.$target=f,this.html=f&&f.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const h=()=>this.html&&(d||u||a)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const l=f.offsetWidth;l!==this.width&&(this.width=l,h())},150)}),this.lineTemplate&&!this.ready?j.fonts.ready.then(h):h(),f?this.resizeObserver.observe(f):console.warn(\"No Text Splitter target found.\")}addEffect(e){if(!De(e))return console.warn(\"Effect must return a function.\"),this;const t=Tr(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>De(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,s=this.charTemplate,r=this.includeSpaces,i=this.debug,n=e.nodeType;if(n===3){const o=e.nodeValue;if(o.trim()){const c=[],f=this.words,d=this.chars,u=Ni.segment(o),a=j.createDocumentFragment();let h=null;for(const l of u){const p=l.segment,g=ra(l);if(!h||g&&h&&ra(h))c.push(p);else{const v=c.length-1,_=c[v];!Ii.test(_)&&!Ii.test(p)?c[v]+=p:c.push(p)}h=l}for(let l=0,p=c.length;l<p;l++){const g=c[l];if(g.trim()){const v=c[l+1],_=r&&v&&!v.trim(),S=g,y=s?Di.segment(S):null,m=s?j.createDocumentFragment():j.createTextNode(_?g+\" \":g);if(s){const b=[...y];for(let k=0,w=b.length;k<w;k++){const C=b[k],M=k===w-1&&_?C.segment+\" \":C.segment,P=j.createTextNode(M);Hi(s,d,P,m,Gs,i,-1,f.length,d.length)}}t?Hi(t,f,m,a,Xs,i,-1,f.length,d.length):s?a.appendChild(m):a.appendChild(j.createTextNode(g)),_&&l++}else{if(l&&r)continue;a.appendChild(j.createTextNode(g))}}e.parentNode.replaceChild(a,e)}}else if(n===1){const o=[...e.childNodes];for(let c=0,f=o.length;c<f;c++)this.splitNode(o[c])}}split(e=!1){const t=this.$target,s=!!this.cache&&!e,r=this.lineTemplate,i=this.wordTemplate,n=this.charTemplate,o=j.fonts.status!==\"loading\",c=r&&o;this.ready=!r||o,(c||e)&&this.effectsCleanups.forEach(a=>De(a)&&a(this)),s||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),c&&(s&&(t.innerHTML=this.cache),this.lines.length=0,i&&(this.words=Dr(t,Xs))),n&&(c||i)&&(this.chars=Dr(t,Gs));const f=this.words.length?this.words:this.chars;let d,u=0;for(let a=0,h=f.length;a<h;a++){const l=f[a],{top:p,height:g}=l.getBoundingClientRect();!$(d)&&p-d>g*.5&&u++,l.setAttribute(Ys,`${u}`);const v=l.querySelectorAll(`[${Ys}]`);let _=v.length;for(;_--;)v[_].setAttribute(Ys,`${u}`);d=p}if(c){const a=j.createDocumentFragment(),h=new Set,l=[];for(let p=0;p<u+1;p++){const g=t.cloneNode(!0);na(g,p,new Set).forEach(v=>{const _=v.parentNode;_&&(v.nodeType===1&&h.add(_),_.removeChild(v))}),l.push(g)}h.forEach(ia);for(let p=0,g=l.length;p<g;p++)Hi(r,this.lines,l[p],a,Oi,this.debug,p);t.innerHTML=\"\",t.appendChild(a),i&&(this.words=Dr(t,Xs)),n&&(this.chars=Dr(t,Gs))}if(this.linesOnly){const a=this.words;let h=a.length;for(;h--;){const l=a[h];l.replaceWith(l.textContent)}a.length=0}if(this.accessible&&(c||!s)){const a=j.createElement(\"span\");a.style.cssText=\"position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;\",a.innerHTML=this.html,t.insertBefore(a,t.firstChild),this.lines.forEach(Bi),this.words.forEach(Bi),this.chars.forEach(Bi)}return this.width=t.offsetWidth,(c||e)&&this.effects.forEach((a,h)=>this.effectsCleanups[h]=a(this)),this}refresh(){this.split(!0)}},oa=(e,t)=>new Br(e,t),js=(e,t)=>(console.warn(\"text.split() is deprecated, import splitText() directly, or text.splitText()\"),new Br(e,t)),aa=e=>{let t=\"\";for(let s=0,r=e.length;s<r;s++)if(s+2<r&&e[s+1]===\"-\"&&e.charCodeAt(s)<e.charCodeAt(s+2)){const i=e.charCodeAt(s),n=e.charCodeAt(s+2);for(let o=i;o<=n;o++)t+=String.fromCharCode(o);s+=2}else t+=e[s];return t},la={lowercase:\"a-z\",uppercase:\"A-Z\",numbers:\"0-9\",symbols:\"!%#_|*+=\",braille:\"⠀-⣿\",blocks:\"▀-▟\",shades:\"░-▓\"},qi=new WeakMap,ca=(e={})=>{e||(e={});const t=e.chars,s=Bt(e.ease||\"linear\"),r=e.text,i=e.from,n=e.reversed||!1,o=e.perturbation||0,c=e.cursor,f=c===!0?\"_\":typeof c==\"number\"?String.fromCharCode(c):typeof c==\"string\"?c:\"\",d=f.length,u=e.seed||0,a=e.override!==void 0?e.override:!0,h=e.revealRate||60,l=1e3*z.timeScale/h,p=e.settleDuration||300*z.timeScale,g=e.settleRate||30,v=e.duration,_=e.revealDelay,S=e.delay,y=e.onChange||ie;return(m,b,k,w)=>{const C=typeof t==\"function\"?t(m,b,k):t||\"a-zA-Z0-9!%#_\",M=aa(la[C]||C),P=M.length-1,A=typeof v==\"function\"?v(m,b,k):v,E=typeof _==\"function\"?_(m,b,k):_||0,B=typeof S==\"function\"?S(m,b,k):S||0,q=u?Us(u):Us();qi.has(m)||qi.set(m,m.textContent);const W=w?w._value:m.textContent,T=r!==void 0?typeof r==\"function\"?r(m,b,k):r:w?w._value:qi.get(m),D=T===\" \"||T===\"&nbsp;\"?\" \":T,O=W===\" \"?0:W.length,L=D.length,F=a===!0?M:typeof a==\"string\"&&a.length>0?aa(la[a]||a):null,Z=F?F.length-1:0,Y=a===\" \"?\" \":null,X=a===\"\"?L:Math.max(O,L),J=A>0?A:(X-1)*l+p,ne=V((J+E)/z.timeScale,0)*z.timeScale,ce=E>0?V(E/ne,12):0,we=i===void 0||i===\"auto\"?L<O?\"right\":\"left\":i,me=new Int32Array(X);if(we===\"random\"){for(let N=0;N<X;N++)me[N]=N;for(let N=X-1;N>0;N--){const oe=q(0,N),fe=me[N];me[N]=me[oe],me[oe]=fe}}else{const N=we===\"right\"?(a===\"\"||!O?X:O)-1:we===\"center\"?((a===\"\"||!O?X:O)-1)/2:typeof we==\"number\"?we:0,oe=Math.abs,fe=new Array(X);for(let ae=0;ae<X;ae++)fe[ae]=ae;fe.sort((ae,K)=>oe(ae-N)-oe(K-N));for(let ae=0;ae<X;ae++)me[fe[ae]]=ae}if(n){const N=X-1;for(let oe=0;oe<X;oe++)me[oe]=N-me[oe]}const te=V(p/J,12),Q=V((1-te)/X,12),ue=d*Q,Pe=V(1e3*z.timeScale/(g*ne),12),Ee=new Float32Array(X),xe=new Float32Array(X),Ae=o>0?o*te:0;for(let N=0;N<X;N++){const oe=Ae>0?(q(0,2e3)-1e3)/1e3*Ae:0,fe=Ae>0?(q(0,2e3)-1e3)/1e3*Ae:0;Ee[N]=me[N]*Q+oe,xe[N]=Math.ceil((Ee[N]+te+fe)/Pe)*Pe}if(L<X&&we!==\"left\"&&we!==\"right\"&&we!==\"random\"){let N=0;for(let ae=L;ae<X;ae++)xe[ae]>N&&(N=xe[ae]);const oe=new Array(L);for(let ae=0;ae<L;ae++)oe[ae]=ae;oe.sort((ae,K)=>me[ae]-me[K]);const fe=(1-N)/L;for(let ae=0;ae<L;ae++){const K=N+ae*fe;K>xe[oe[ae]]&&(xe[oe[ae]]=K)}}const ye=new Array(X);for(let N=0;N<X;N++)ye[N]=M[q(0,P)];const Te=F?F===M?ye:new Array(X):null;if(Te&&Te!==ye)for(let N=0;N<X;N++)Te[N]=Y||F[q(0,F.length-1)];let ge=W;if(!w){if(a===\"\")ge=\"\";else if(F){ge=\"\";for(let N=0;N<O;N++)ge+=W[N]===\" \"?\" \":Te[N]}}let Le=-1,Se=-1,se=\"\";const be=a!==\"\",ke=!!F,Oe=d>0;return{from:0,to:1,duration:ne,delay:B,ease:\"linear\",modifier:N=>{if(N===Le)return se;if(Le=N,B>0&&N<=0)return se=W,W;if(N<=0)return se=ge,ge;if(N>=1)return se=D,D;se=\"\";const oe=N/Pe|0,fe=oe!==Se;fe&&(Se=oe);const ae=ce>0?(N-ce)/(1-ce):N,K=ae>0?s(ae):0;for(let Ne=0;Ne<X;Ne++){const Ue=Ee[Ne];if(K>=xe[Ne]){Ne<L&&(se+=D[Ne]);continue}if(K<=0||K<Ue){be&&Ne<O&&(ke?W[Ne]===\" \"?se+=\" \":(fe&&(Te[Ne]=Y||F[q(0,Z)]),se+=Te[Ne]):se+=W[Ne]);continue}Ne<L&&D[Ne]===\" \"||Ne<O&&W[Ne]===\" \"?se+=\" \":Oe&&K-Ue<ue?se+=f[d-1-((K-Ue)/Q|0)]:(fe&&(ye[Ne]=M[q(0,P)]),se+=ye[Ne])}return fe&&y(se,K),se}}}},Fu=hs({TextSplitter:()=>Br,scrambleText:()=>ca,split:()=>js,splitText:()=>oa}),Vu=hs({$:()=>Xt,Animatable:()=>ki,AutoLayout:()=>$o,Draggable:()=>vo,JSAnimation:()=>$t,Scope:()=>yo,ScrollObserver:()=>So,Spring:()=>kr,TextSplitter:()=>Br,Timeline:()=>ho,Timer:()=>ut,WAAPIAnimation:()=>Lo,addChild:()=>Tt,animate:()=>Bs,clamp:()=>Yo,cleanInlineStyles:()=>jn,createAnimatable:()=>su,createDraggable:()=>fu,createDrawable:()=>ta,createLayout:()=>Ru,createMotionPath:()=>ea,createScope:()=>pu,createSeededRandom:()=>Us,createSpring:()=>po,createTimeline:()=>fo,createTimer:()=>Zc,cubicBezier:()=>wo,damp:()=>Jo,degToRad:()=>Wo,eases:()=>Dt,easings:()=>Su,engine:()=>et,forEachChildren:()=>Ce,get:()=>Yt,globals:()=>z,irregular:()=>To,keepTime:()=>Tr,lerp:()=>Zo,linear:()=>Ci,mapRange:()=>Uo,morphTo:()=>sa,onScroll:()=>bu,padEnd:()=>Vo,padStart:()=>Fo,radToDeg:()=>Xo,random:()=>zs,randomPick:()=>Qo,remove:()=>mo,removeChild:()=>xt,round:()=>jo,roundPad:()=>qo,scrambleText:()=>ca,scrollContainers:()=>Pr,set:()=>Ht,shuffle:()=>Ai,snap:()=>Go,split:()=>js,splitText:()=>oa,spring:()=>wr,stagger:()=>Ws,steps:()=>xo,svg:()=>Bu,sync:()=>Ti,text:()=>Fu,utils:()=>Ou,waapi:()=>Ro,wrap:()=>zo}),zu=class{registerAnimation(e,t,s={}){this.animations[e]={handler:t,options:s}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,s,r,i){const n=this.animations[e];n?n.handler(t,s,r,i):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}removeLinkAnimation(e){this.linkAnimations.delete(e)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation(\"typewriter\",function(e,t,s,r){const{chars:i}=js(e,{words:!1,chars:!0}),n=t.fadeDuration||100,o=t.interval||100;Bs(i,{opacity:[0,1],easing:\"linear\",duration:n,delay:Ws(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation(\"toast\",function(e,t,s,r){const{words:i}=js(e,{words:!0,chars:!1}),n=t.fadeDuration||100,o=t.interval||200;Bs(i,{opacity:[0,1],y:[{to:[\"100%\",\"0%\"]}],easing:\"linear\",duration:n,delay:Ws(o,{start:t.start||0}),loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation(\"fadeIn\",function(e,t,s,r){const i=t.duration||500;Bs(e,{opacity:[0,1],easing:t.easing||\"easeOutQuad\",duration:i,delay:t.start||0,loop:r,onComplete:s})},{initiallyHidden:!0}),this.registerAnimation(\"continue\",function(e,t,s){e.classList.add(\"squiffy-continue\");const r=t.style||\"pulse\";let i=null,n=null;r===\"wave\"?(e.classList.add(\"squiffy-continue-wave\"),n=js(e,{words:!1,chars:!0}).chars,i=Bs(n,{opacity:[1,.3,1],easing:\"easeInOutSine\",duration:1200,delay:Ws(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const o=()=>{if(e.classList.remove(\"squiffy-continue\",\"squiffy-continue-wave\",`squiffy-continue-${r}`),e.removeEventListener(\"click\",o),i&&(i.pause(),n))for(const c of n)c.style.opacity=\"1\";s()};e.addEventListener(\"click\",o)})}},Uu={animejs:Vu},ua=\"input:not([disabled]), textarea:not([disabled]), select:not([disabled])\",Wu=\"a.squiffy-link[data-section], a.squiffy-link[data-passage]\";function ha(e){if(!e)return!0;const t=e.querySelectorAll(ua);for(const s of t)if(!s.checkValidity())return!1;return!0}function Fi(e){if(!e)return;const t=ha(e),s=e.querySelectorAll(Wu);for(const r of s)t?(r.classList.remove(\"validation-disabled\"),r.removeAttribute(\"aria-disabled\")):(r.classList.add(\"validation-disabled\"),r.setAttribute(\"aria-disabled\",\"true\"))}function Zs(e){if(!e)return;const t=e.querySelectorAll(ua);for(const s of t)s.addEventListener(\"input\",()=>Fi(e)),s.addEventListener(\"change\",()=>Fi(e)),s.addEventListener(\"invalid\",r=>{r.preventDefault(),s.classList.add(\"squiffy-invalid\")}),s.addEventListener(\"input\",()=>{s.checkValidity()&&s.classList.remove(\"squiffy-invalid\")});Fi(e)}var da=[\"src\",\"poster\"],Xu=\"data-squiffy-asset-\",Gu=[...da,\"srcset\",\"style\"].map(e=>`[${e}]`).join(\",\"),Yu=e=>/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(\"//\")||e.startsWith(\"#\"),Vi=(e,t)=>{const s=e.trim();if(!s||Yu(s))return e;let r=s;try{r=decodeURI(s)}catch{}return t(r)},ju=(e,t)=>e.split(\",\").map(s=>{const r=s.match(/^(\\s*)(\\S+)(.*)$/s);return r?r[1]+Vi(r[2],t)+r[3]:s}).join(\",\"),Zu=(e,t)=>e.replace(/url\\(\\s*(['\"]?)(.*?)\\1\\s*\\)/gi,(s,r,i)=>{const n=Vi(i,t);return n===i?s:`url(\"${n.replace(/[\"\\\\\\n]/g,o=>\"\\\\\"+(o===`\n`?\"a \":o))}\")`}),Ju=(e,t,s)=>{const r=Xu+t,i=e.getAttribute(r)??e.getAttribute(t);if(i===null)return;let n;t===\"srcset\"?n=ju(i,s):t===\"style\"?n=Zu(i,s):n=Vi(i,s),n===i?e.removeAttribute(r):e.setAttribute(r,i),e.setAttribute(t,n)},Qu=e=>t=>{if(!e||!/\\b(src|srcset|poster|style)\\s*=/i.test(t))return t;const s=document.createElement(\"template\");s.innerHTML=t;for(const r of s.content.querySelectorAll(Gu))for(const i of[...da,\"srcset\",\"style\"])r.hasAttribute(i)&&Ju(r,i,e);return s.innerHTML},Ku=[\"bag\",\"person\",\"map\",\"help\",\"info\",\"list\",\"book\",\"star\",\"heart\"],eh='<path d=\"M18 6 6 18M6 6l12 12\"/>',th={bag:'<path d=\"M4 10a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z\"/><path d=\"M8 10h8\"/><path d=\"M8 18h8\"/><path d=\"M8 22v-6a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v6\"/><path d=\"M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2\"/>',person:'<path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/>',map:'<path d=\"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z\"/><path d=\"M15 5.764v15\"/><path d=\"M9 3.236v15\"/>',help:'<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\"/><path d=\"M12 17h.01\"/>',info:'<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/>',list:'<path d=\"M3 6h.01M3 12h.01M3 18h.01M8 6h13M8 12h13M8 18h13\"/>',book:'<path d=\"M12 7v14\"/><path d=\"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z\"/>',star:'<path d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\"/>',heart:'<path d=\"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z\"/>'},fa=e=>`<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">${e}</svg>`,sh=0;function rh(e,t){const s=typeof t.strings?.close==\"string\"?t.strings.close:\"Close\",r=`squiffy-panel-${++sh}`,i=[],n=document.createElement(\"dialog\");n.className=\"squiffy-panel-dialog\",n.setAttribute(\"aria-labelledby\",`${r}-heading`),n.innerHTML=`\n <div class=\"squiffy-panel-dialog-header\">\n <h2 id=\"${r}-heading\"></h2>\n <button type=\"button\" class=\"squiffy-panel-dialog-close\">${fa(eh)}</button>\n </div>\n <div class=\"squiffy-panel squiffy-panel-dialog-content\"></div>`;const o=n.querySelector(\"h2\"),c=n.querySelector(\".squiffy-panel-dialog-close\");c.title=s,c.setAttribute(\"aria-label\",s),c.addEventListener(\"click\",()=>n.close());const f=n.querySelector(\".squiffy-panel-dialog-content\");n.addEventListener(\"click\",m=>{m.target===n&&n.close()}),(t.container??document.body).appendChild(n),i.push(()=>n.remove());let d=null;const u=t.panels.filter(m=>m&&typeof m.passage==\"string\"),a=t.side?u.filter(m=>m.position==\"side\"):[],h=new Map;let l=null;if(a.length&&t.side){l=document.createElement(\"aside\"),l.className=\"squiffy-panels-side\";for(const b of a){const k=document.createElement(\"section\");k.className=\"squiffy-panel\",k.dataset.passage=b.passage,k.setAttribute(\"aria-label\",b.label||b.passage),l.appendChild(k),h.set(b,k)}const m=t.side;m.appendChild(l),m.classList.add(\"squiffy-has-side\"),i.push(()=>{l.remove(),m.classList.remove(\"squiffy-has-side\")})}const p=t.buttons.firstChild;for(const m of u){const b=m.label||m.passage,k=document.createElement(\"button\");k.type=\"button\",k.className=\"squiffy-header-button squiffy-panel-button\",m.position==\"side\"&&h.has(m)&&k.classList.add(\"squiffy-panel-side-button\"),k.dataset.passage=m.passage,k.setAttribute(\"aria-haspopup\",\"dialog\");const w=m.icon&&Ku.includes(m.icon)?th[m.icon]:null;w?(k.innerHTML=fa(w),k.title=b,k.setAttribute(\"aria-label\",b)):(k.classList.add(\"squiffy-panel-text-button\"),k.textContent=b),k.addEventListener(\"click\",()=>g(m)),t.buttons.insertBefore(k,p),i.push(()=>k.remove())}function g(m){d=m,o.textContent=m.label||m.passage,f.innerHTML=e.renderPassage(m.passage),n.open||n.showModal()}function v(){for(const[m,b]of h)b.innerHTML=e.renderPassage(m.passage),b.hidden=!b.textContent?.trim()&&!b.querySelector(\"img, svg, video, canvas, iframe\");l&&(l.hidden=[...h.values()].every(m=>m.hidden)),n.open&&d&&(f.innerHTML=e.renderPassage(d.passage))}let _=!1;const S=()=>{_||(_=!0,queueMicrotask(()=>{_=!1,y||v()}))};for(const m of[\"set\",\"navigated\",\"storyUpdated\"])i.push(e.on(m,S));n.addEventListener(\"close\",()=>{d=null});let y=!1;return v(),{refresh:v,open(m){const b=u.find(k=>k.passage==m);b&&g(b)},dispose(){y=!0,n.open&&n.close();for(const m of i.splice(0))m()}}}var ih=async e=>{let t,s,r,i,n,o=0,c=!1;const f=[],d=new gc,u=[];let a=!1,h,l=0;const p=100;async function g(x){if(a||x.closest(\".squiffy-output-section\")!==r||x.classList.contains(\"disabled\")||!ha(r))return!1;const R=x.getAttribute(\"data-passage\"),I=x.getAttribute(\"data-section\");if((R!==null||I!==null)&&(l=0,Be(\"turns\",(pe(\"turns\")||0)+1)),R!==null)return _(R)||(S(x),Be(\"_turncount\",pe(\"_turncount\")+1)),await A(x),R&&(n=null,await Z(R)),d.emit(\"linkClick\",{linkType:\"passage\"}),!0;if(I!==null)return await A(x),I&&await T(I),d.emit(\"linkClick\",{linkType:\"section\"}),!0;const[H,ee,_e]=Ts.handleLink(x);return H?(_e?.disableLink&&S(x),J(),d.emit(\"linkClick\",{linkType:ee}),!0):!1}async function v(x){const R=x.target;R.classList.contains(\"squiffy-link\")&&await g(R)}function _(x){if(!x)return!1;const R=s?.passages;if(R&&x in R)return!!R[x].repeat;const I=t.sections[\"\"]?.passages;return!!(I&&x in I&&I[x].repeat)}function S(x){x.classList.add(\"disabled\"),x.setAttribute(\"tabindex\",\"-1\")}function y(x){x.classList.remove(\"disabled\"),x.removeAttribute(\"tabindex\")}async function m(x){if(x&&x.section in t.sections){await T(x.section),x.passage!==void 0&&pe(\"_section\")==x.section&&await Z(x.passage);return}if(!ne()){await T(t.start);return}await b()}async function b(){const x=i??r,R=x?.getAttribute(\"data-goto\");R&&R in t.sections&&await P({section:R,after:Number(x.getAttribute(\"data-goto-after\")||0)})}function k(){clearTimeout(h),h=void 0,Re.goto=null,Re.deactivate.clear()}function w(x){const R=Re.deactivate;if(R.size==0)return;const I=String((pe(\"_deactivations\")||0)+1);Be(\"_deactivations\",Number(I)),x.setAttribute(\"data-deactivates\",I);for(const H of r.querySelectorAll(\"a.squiffy-link[data-passage]\"))R.has(H.getAttribute(\"data-passage\"))&&!H.classList.contains(\"disabled\")&&(S(H),H.setAttribute(\"data-deactivated-by\",I));R.clear()}function C(x){const R=x.getAttribute(\"data-deactivates\");if(R)for(const I of r.querySelectorAll(`a.squiffy-link[data-deactivated-by=\"${R}\"]`))y(I),I.removeAttribute(\"data-deactivated-by\")}function M(x){const R=Re.goto;return Re.goto=null,R&&(x.setAttribute(\"data-goto\",R.section),R.after&&x.setAttribute(\"data-goto-after\",String(R.after))),R}async function P(x){if(x){if(x.after>0){h=setTimeout(()=>{h=void 0,l=0,T(x.section)},x.after);return}if(++l>p){l=0;const R=i??r;R.removeAttribute(\"data-goto\");const I=`stopped after ${p} in a row without the player clicking anything, going to \"${x.section}\". Is there a loop?`;console.error(\"Squiffy error in {{goto}}:\",I),R.insertAdjacentHTML(\"beforeend\",zt(\"Error in {{goto}}:\",I)),J();return}await T(x.section)}}async function A(x){us.runLinkAnimation(x),await F();const R=x.getAttribute(\"data-set\");if(R){const I=JSON.parse(R);for(const H of I)E(H)}}function E(x){try{t.expressions?q(x):W(x)}catch(R){const I=R instanceof Error?R.message:String(R);console.error(`Squiffy error in \"${x}\":`,I),f.push(zt(`Error in \"${x}\":`,I))}}function B(x,R,I){const H=R+\"=\",ee=Vt(H,I);let _e=Vt(H,pe(x));R==\"+\"&&(_e+=ee),R==\"-\"&&(_e-=ee),R==\"*\"&&(_e*=ee),R==\"/\"&&(_e/=ee),Be(x,_e)}function q(x){const R=/^(\\w+)\\s*:=(.*)$/.exec(x);if(R){Be(R[1],ge.processText(R[2],!0));return}const I=/^(\\w+)\\s*([+\\-*/]?)=(?!=)(.*)$/.exec(x);if(I){const[,ee,_e,Et]=I,qt=Re.evaluate(Et);_e?B(ee,_e,qt):Be(ee,qt);return}const H=/^(not\\s+)?(\\w+)$/.exec(x.trim());if(!H)throw new Error(\"expected an attribute name, e.g. gold = 10, gold += 5, has_key or not has_key\");Be(H[2],!H[1])}function W(x){x=x.replace(/^(\\w*\\s*):=(.*)$/,(I,H,ee)=>H+\"=\"+ge.processText(ee,!0));const R=/^([\\w]*)\\s*=\\s*(.*)$/.exec(x);if(R){const I=R[1];let H=R[2];H===\"true\"?Be(I,!0):H===\"false\"?Be(I,!1):isNaN(H)?(H.startsWith(\"@\")&&(H=pe(H.substring(1))),Be(I,H)):Be(I,parseFloat(H))}else{const I=/^([\\w]*)\\s*([+\\-*/])=\\s*(.*)$/.exec(x);if(I){const H=I[1],ee=I[2],_e=I[3].trim();B(H,ee,_e.startsWith(\"@\")?pe(_e.substring(1)):_e)}else{let H=!0;x.startsWith(\"not \")&&(x=x.substring(4),H=!1),Be(x,H)}}}async function T(x){k();const R=N();if(s=t.sections[x],!s)return;const I=pe(\"_section\");I!==null&&(Be(\"previous\",pe(\"_passage\")??I),Be(\"previous_section\",I)),pe(\"_passage\")!==null&&Be(\"_passage\",null),Be(\"_section\",x),pe(\"turns\")===null&&Fe.setInternal(\"turns\",0,!1),Fe.setSeen(x);const H=t.sections[\"\"];(H?.clear||s.clear)&&ye(),Ee(x);const ee=r;if(H&&(await L(H,\"[[]]\"),pe(\"_section\")!==x)){ee.remove();return}if(await L(s,`[[${x}]]`),pe(\"_section\")!==x){ee.remove();return}Zs(r),Be(\"_turncount\",0),w(r);const _e=M(r);Hr(),J();const Et=N();Et!=R&&d.emit(\"canGoBackChanged\",{canGoBack:Et}),d.emit(\"navigated\",{section:x}),await P(_e)}let D=!1;function O(x,R=null,I){const H={get:pe,set:Be,ui:{transition:cs,write:ge.write,scrollToEnd:ge.scrollToEnd,afterWrite:ee=>{if(!I)throw new Error(\"squiffy.ui.afterWrite can only be used in a section or passage's JavaScript\");I.push(ee)}},story:{go:ee=>D?(Re.goto??(Re.goto={section:ee,after:0}),Promise.resolve()):T(ee),seen:ee=>Fe.getSeen(ee),visits:ee=>Fe.getVisits(ee)},element:ae,import:Uu,...R};t.js[x](H,pe,Be)}async function L(x,R){x.attributes&&await Y(x.attributes);const I=[];if(x.jsIndex!==void 0){const H=pe(\"_section\");if(O(x.jsIndex,null,I),pe(\"_section\")!==H)return}ge.write(x.text||\"\",R),D=!0;try{for(const H of I)H()}finally{D=!1}await F()}async function F(){a=!0,r.classList.add(\"links-disabled\");for(const x of u)await x();u.length=0,a=!1,r.classList.remove(\"links-disabled\")}async function Z(x){k();const R=N();let I=s.passages&&s.passages[x];const H=t.sections[\"\"];if(!I&&H&&H.passages&&(I=H.passages[x]),!I)throw`No passage named ${x} in the current section or master section`;Be(\"previous\",pe(\"_passage\")??pe(\"_section\")),Be(\"_passage\",x),Fe.setSeen(x);const ee=[],_e=[];if(H&&H.passages){const pt=H.passages[\"\"];pt&&(ee.push(pt),_e.push(()=>L(pt,\"[[]][]\")))}const Et=s.passages&&s.passages[\"\"];Et&&(ee.push(Et),_e.push(()=>L(Et,`[[${pe(\"_section\")}]][]`))),ee.push(I),_e.push(()=>L(I,`[[${pe(\"_section\")}]][${x}]`));const qt=\"@\"+pe(\"_turncount\");if(s.passages&&!I.repeat){if(qt in s.passages){const pt=s.passages[qt];ee.push(pt),_e.push(()=>L(pt,`[[${pe(\"_section\")}]][${qt}]`))}if(\"@last\"in s.passages&&pe(\"_turncount\")>=(s.passageCount||0)){const pt=s.passages[\"@last\"];ee.push(pt),_e.push(()=>L(pt,`[[${pe(\"_section\")}]][${qt}]`))}}ee.some(pt=>pt.clear)&&(ye(),xe()),i=document.createElement(\"div\"),i.classList.add(\"squiffy-output-passage\"),i.setAttribute(\"data-passage\",`${x}`),r.appendChild(i);for(const pt of _e)await pt();Zs(r),w(i);const dh=M(i);Hr(),J();const pa=N();pa!=R&&d.emit(\"canGoBackChanged\",{canGoBack:pa}),d.emit(\"navigated\",{section:pe(\"_section\"),passage:x}),await P(dh)}async function Y(x){for(const R of x)E(R)}function X(){k(),Fe.reset(),Ue.scroll===\"element\"||Ue.scroll===\"none\"?(K.innerHTML=\"\",m()):location.reload()}function J(){Be(\"_output\",K.innerHTML)}function ne(){const x=()=>{t.uiJsIndex!==void 0&&O(t.uiJsIndex,{registerAnimation:us.registerAnimation.bind(us),registerHelper:Re.handlebars.registerHelper.bind(Re.handlebars),SafeString:Re.handlebars.SafeString})};Fe.load();const R=pe(\"_output\");return R?(ce(R),x(),Pt.onLoad(),Zs(r),!0):(x(),!1)}function ce(x){K.innerHTML=Ne(x),se(),be(),n=K.querySelector(\".squiffy-output-block:last-child\"),s=t.sections[pe(\"_section\")]}function we(){return{format:\"squiffy-save\",version:1,storyId:t.projectId??null,section:pe(\"_section\"),passage:pe(\"_passage\"),summary:me(),savedAt:new Date().toISOString(),state:structuredClone(Fe.store)}}function me(){const R=r?.querySelectorAll(\".squiffy-output-block\")??[];for(const I of R){const H=te(I);if(!H)continue;const ee=[...I.querySelectorAll(\"h1, h2, h3, h4, h5, h6, p, li\")].find(qt=>te(qt));if(ee&&/^H[1-6]$/.test(ee.tagName)&&te(I).startsWith(te(ee)))return te(ee).substring(0,100);if(H.length<=100)return H;const _e=H.substring(0,100),Et=_e.lastIndexOf(\" \");return(Et>100/2?_e.substring(0,Et):_e)+\"…\"}return\"\"}function te(x){const R=x.cloneNode(!0);return R.querySelectorAll(\"p, h1, h2, h3, h4, h5, h6, li, div, br, tr, blockquote\").forEach(I=>I.after(\" \")),(R.textContent??\"\").replace(/\\s+/g,\" \").trim()}function Q(x){if(!x||typeof x!=\"object\")return!1;const R=x;return R.format===\"squiffy-save\"&&R.version===1&&!!R.state&&typeof R.state==\"object\"&&!Array.isArray(R.state)&&typeof R.state._output==\"string\"}async function ue(x){if(!Q(x))return{success:!1,error:\"notASave\"};if(x.storyId&&t.projectId&&x.storyId!==t.projectId)return{success:!1,error:\"wrongStory\"};for(;a;)await new Promise(I=>setTimeout(I,50));k(),f.length=0,Fe.reset();for(const[I,H]of Object.entries(x.state))Fe.setInternal(I,H,!1);if(Ct={},o=0,c=!1,ce(x.state._output),!s)return K.innerHTML=\"\",await T(t.start),d.emit(\"canGoBackChanged\",{canGoBack:N()}),{success:!0};Pt.onLoad(),Zs(r),d.emit(\"canGoBackChanged\",{canGoBack:N()});const R=pe(\"_passage\");return d.emit(\"navigated\",R?{section:pe(\"_section\"),passage:R}:{section:pe(\"_section\")}),await b(),{success:!0}}function Pe(){n=document.createElement(\"div\"),n.classList.add(\"squiffy-output-block\"),(i||r)?.appendChild(n)}function Ee(x){r&&(r.querySelectorAll(\"input, textarea, select\").forEach(R=>{const I=R,H=I.getAttribute(\"data-attribute\")||I.id;H&&Be(H,I.value),I.disabled||(I.disabled=!0,I.setAttribute(\"data-squiffy-disabled\",\"\"))}),r.querySelectorAll(\"[contenteditable]\").forEach(R=>{const I=R.getAttribute(\"data-attribute\")||R.id;I&&Be(I,R.innerHTML),R.getAttribute(\"contenteditable\")!==\"false\"&&(R.setAttribute(\"contenteditable\",\"false\"),R.setAttribute(\"data-squiffy-disabled\",\"\"))})),i=null,xe(x),Pe()}function xe(x){r=document.createElement(\"div\"),r.classList.add(\"squiffy-output-section\"),r.setAttribute(\"data-section\",x??pe(\"_section\")),x||r.setAttribute(\"data-clear\",\"true\"),K.appendChild(r)}function Ae(){return K.querySelector(\".squiffy-clear-stack\")}function ye(){let x=Ae();x||(x=document.createElement(\"div\"),x.classList.add(\"squiffy-clear-stack\"),x.style.display=\"none\",K.prepend(x));const R=document.createElement(\"div\");x.appendChild(R),c=!0;for(const I of[...K.children])I!==x&&R.appendChild(I)}function Te(){const x=Ae();if(!x)return;for(const I of[...K.children])I!==x&&I.remove();const R=x.children[x.children.length-1];for(const I of[...R.children])K.appendChild(I);R.remove()}const ge={write:(x,R)=>{o=K.scrollHeight;const I=f.splice(0).join(\"\")+ge.renderHtml(x,!1).trim();n||Pe();const H=document.createElement(\"div\");R&&H.setAttribute(\"data-source\",R),H.innerHTML=I,Pt.onWrite(H),n.appendChild(H),Zs(r),ge.scrollToEnd()},clearScreen:()=>{ye(),xe()},scrollToEnd:()=>{if(Ue.scroll!==\"none\")if(c)if(c=!1,Ue.scroll===\"element\")r.scrollIntoView({block:\"start\",inline:\"nearest\",behavior:\"smooth\"});else{const x=Math.max(document.body.scrollTop,document.documentElement.scrollTop),R=K.getBoundingClientRect().top+x;R<x&&window.scrollTo({top:R,behavior:\"smooth\"})}else if(Ue.scroll===\"element\")K.lastElementChild?.scrollIntoView({block:\"end\",inline:\"nearest\",behavior:\"smooth\"});else{let x=o;const R=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(x>R){const I=document.documentElement.scrollHeight-window.innerHeight;x>I&&(x=I),window.scrollTo({top:x,behavior:\"smooth\"})}}},processText:(x,R)=>Re.process(x,R),renderHtml:(x,R)=>Ne(ge.processText(x,R))};function Le(x){if(x.start!=t.start){t=x,Fe.reset(),K.innerHTML=\"\",T(t.start);return}const R=t;t=x,vc(R,x,K,(H,ee)=>{const _e=s;s=ee;try{return ge.renderHtml(H,!1)}finally{s=_e}},S,H=>Y(H)),se(),be(),d.emit(\"storyUpdated\",{})}function Se(x){const R=t.sections[\"\"]?.passages?.[x];if(!R)return zt(\"Error in panel:\",`there is no passage called \"${x}\" in the master section [[]]`);const I=Re.goto,H=[...Re.deactivate];Fe.readOnly=!0;let ee;try{ee=ge.renderHtml(R.text||\"\",!1)}finally{Fe.readOnly=!1,Re.goto=I,Re.deactivate=new Set(H)}const _e=document.createElement(\"template\");return _e.innerHTML=ee,_e.content.querySelectorAll(\"a.squiffy-link\").forEach(S),_e.innerHTML}function se(){const x=K.querySelectorAll(\".squiffy-output-section:last-child\");r=x[x.length-1];const R=r.getAttribute(\"data-section\");s=t.sections[R]}function be(){i=r.querySelector(\".squiffy-output-passage:last-child\")}function ke(){const x=Ae(),R=K.querySelectorAll(\".squiffy-output-section\").length+K.querySelectorAll(\".squiffy-output-passage\").length;return x?R+x.children.length:R}function Oe(x){x.querySelectorAll(\"[data-squiffy-disabled]\").forEach(R=>{R.hasAttribute(\"contenteditable\")?R.setAttribute(\"contenteditable\",\"true\"):R.disabled=!1,R.removeAttribute(\"data-squiffy-disabled\")})}function N(){const x=i??r,R=[...K.querySelectorAll(\"[data-goto]\")].filter(I=>I!==x).length;return ke()-R>1}function oe(){if(a||!N())return;k();do fe();while((i??r).hasAttribute(\"data-goto\")&&ke()>1);J(),N()||d.emit(\"canGoBackChanged\",{canGoBack:!1});const x=i?.getAttribute(\"data-passage\");d.emit(\"navigated\",x?{section:pe(\"_section\"),passage:x}:{section:pe(\"_section\")})}function fe(){const x=Ae();if(i){const R=i.getAttribute(\"data-passage\");qr(i.getAttribute(\"data-undo\")),C(i),i.remove();let I=!1,H=!1;for(const ee of K.children)if(ee!==x){if(ee.getAttribute(\"data-clear\")==\"true\"&&ee.children.length==0){I=!0;continue}H=!0;break}I&&!H&&(Te(),se());for(const ee of r.querySelectorAll(\"a.squiffy-link[data-passage]\"))ee.getAttribute(\"data-passage\")==R&&y(ee);be()}else{qr(r.getAttribute(\"data-undo\")),r.remove();let R=!1;for(const I of[...K.children])if(I!==x){R=!0;break}R||Te(),se(),be(),Oe(r)}}const ae=e.element,K=document.createElement(\"div\");ae.appendChild(K),t=e.story;const Ne=Qu(e.resolveAssetUrl),Ue={scroll:e.scroll||\"body\",persist:e.persist===void 0?!0:e.persist,onSet:e.onSet||(()=>{})};let ft=\"\";Ue.persist&&(e.storyId!==void 0?ft=e.storyId:window.location.protocol===\"file:\"?ft=t.id||\"\":ft=window.location.pathname,ft||(console.warn(\"Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled.\"),Ue.persist=!1)),Ue.scroll===\"element\"&&(K.style.overflowY=\"auto\"),K.addEventListener(\"click\",v),K.addEventListener(\"keypress\",async function(x){x.key===\"Enter\"&&await v(x)});let Ct={};const Mt=function(x,R){x!=\"_output\"&&(x in Ct||(Ct[x]=R))},Hr=function(){(i??r).setAttribute(\"data-undo\",JSON.stringify(Ct)),Ct={}},qr=function(x){if(!x)return;const R=JSON.parse(x);if(R)for(const I of Object.keys(R))Fe.setInternal(I,R[I],!1)},Fe=new mc(Ue.persist,ft,Ue.onSet,d,Mt),pe=Fe.get.bind(Fe),Be=Fe.set.bind(Fe),Re=new pc(()=>t,Fe,()=>s),Ts=new xc,Fr=x=>x in t.sections&&t.sections[x].text||null,Xi=x=>s.passages&&x in s.passages?s.passages[x].text||null:\"passages\"in t.sections[\"\"]&&t.sections[\"\"].passages&&x in t.sections[\"\"].passages&&t.sections[\"\"].passages[x].text||null,cs=x=>{u.push(x)},us=new zu,Pt=new yc(K,Re,Fe,Ts,Fr,Xi,ge.renderHtml,cs,us,d,Ne);return Pt.add(Ms.ReplaceLabel()),Pt.add(Ms.RotateSequencePlugin()),Pt.add(Ms.RandomPlugin()),Pt.add(Ms.LivePlugin()),Pt.add(Ms.AnimatePlugin()),{begin:m,restart:X,get:pe,set:Be,clickLink:g,update:Le,goBack:oe,canGoBack:N,getSave:we,loadSave:ue,renderPassage:Se,on:(x,R)=>d.on(x,R),off:(x,R)=>d.off(x,R),once:(x,R)=>d.once(x,R)}},nh={png:\"image/png\",jpg:\"image/jpeg\",jpeg:\"image/jpeg\",gif:\"image/gif\",webp:\"image/webp\",avif:\"image/avif\",svg:\"image/svg+xml\",ico:\"image/x-icon\",bmp:\"image/bmp\",mp3:\"audio/mpeg\",ogg:\"audio/ogg\",oga:\"audio/ogg\",wav:\"audio/wav\",m4a:\"audio/mp4\",flac:\"audio/flac\",mp4:\"video/mp4\",webm:\"video/webm\",ogv:\"video/ogg\",woff:\"font/woff\",woff2:\"font/woff2\",ttf:\"font/ttf\",otf:\"font/otf\",pdf:\"application/pdf\",vtt:\"text/vtt\"},oh=e=>nh[e.substring(e.lastIndexOf(\".\")+1).toLowerCase()]??\"\",zi=e=>e.replace(/^(\\.\\/)+/,\"\");async function ah(e){const t=URL.createObjectURL(new Blob([e],{type:\"text/javascript\"}));try{return await import(t)}finally{URL.revokeObjectURL(t)}}function Ui(e){return e instanceof Error?{type:\"runtimeError\",message:e.message,...e.stack?{stack:e.stack}:{}}:{type:\"runtimeError\",message:String(e)}}function lh(e){const t=e.loadModule??ah;let s,r,i=\"\",n,o,c=0;const f=new Map,d=[];let u=[],a=[];const h=document.createElement(\"style\");document.head.appendChild(h);const l=k=>{try{e.send(k)}catch{k.type==\"attributeSet\"&&e.send({...k,value:String(k.value)})}};function p(){const k=h.textContent,w=M=>(h.textContent=`:root { color-scheme: ${M}; }`,getComputedStyle(document.documentElement).getPropertyValue(\"color-scheme\")),C=w(\"light\")==w(\"dark\");return h.textContent=k,C}const g=k=>f.get(zi(k))??k;function v(k){for(const w of d.splice(0))URL.revokeObjectURL(w);f.clear();for(const[w,C]of Object.entries(k.urls??{}))f.set(zi(w),C);for(const[w,C]of Object.entries(k.files??{})){const M=C instanceof Blob?C:new Blob([C],{type:oh(w)}),P=URL.createObjectURL(M);d.push(P),f.set(zi(w),P)}}function _(k){if(k.length==u.length&&k.every((M,P)=>u[P].textContent==M))return!1;const w=u[0]??a[0]??null,C=k.map(M=>{const P=document.createElement(\"style\");return P.textContent=M,document.head.insertBefore(P,w),P});for(const M of u)M.remove();return u=C,!0}async function S(k){for(const w of[...u,...a])w.remove();u=[],a=[],_(k.css??[]);for(const w of k.scripts??[]){const C=document.createElement(\"script\"),M=URL.createObjectURL(new Blob([w],{type:\"text/javascript\"}));await new Promise(P=>{C.onload=C.onerror=()=>P(),C.src=M,document.head.appendChild(C)}),URL.revokeObjectURL(M),a.push(C)}}async function y(k){const w=++c;s=void 0,e.element.innerHTML=\"\",await S(k.story);const{story:C}=await t(k.story.js);if(w!=c)return;l({type:\"themeFixed\",fixed:p()}),r?.dispose(),r=void 0,i=\"\",n=document.createElement(\"div\"),n.className=\"squiffy-preview-header\",o=document.createElement(\"div\"),o.className=\"squiffy-preview-body\";const M=document.createElement(\"div\");M.className=\"squiffy-preview-story\",o.appendChild(M),e.element.append(n,o);const P=await ih({element:M,story:C,persist:!1,scroll:\"element\",resolveAssetUrl:g,onSet:(A,E)=>{w==c&&!A.startsWith(\"_\")&&l({type:\"attributeSet\",name:A,value:E})}});P.on(\"canGoBackChanged\",A=>{w==c&&l({type:\"canGoBackChanged\",canGoBack:A.canGoBack})}),P.on(\"navigated\",A=>{w==c&&l({type:\"navigated\",...A})}),s=P,m(C.panels),l({type:\"canGoBackChanged\",canGoBack:!1}),await P.begin(k.startAt),w==c&&l({type:\"loaded\"})}function m(k){const w=JSON.stringify(k??[]);!s||!n||w==i||(i=w,r?.dispose(),r=k?.length?rh(s,{panels:k,buttons:n,side:o}):void 0)}async function b(k){try{switch(k.type){case\"load\":await y(k);break;case\"update\":if(!s)break;k.css&&_(k.css)&&l({type:\"themeFixed\",fixed:p()});{const{story:w}=await t(k.js);s.update(w),m(w.panels)}break;case\"restart\":s?.restart();break;case\"back\":s?.goBack();break;case\"assets\":v(k.assets);break;case\"theme\":h.textContent=k.theme==\"system\"?\"\":`:root { color-scheme: ${k.theme}; }`}}catch(w){l(Ui(w))}}return{receive:b}}var ch=\"squiffy-preview\",uh=e=>typeof e==\"object\"&&e!==null&&e.channel===\"squiffy-preview\"&&typeof e.type==\"string\",Wi=typeof acquireVsCodeApi==\"function\"?acquireVsCodeApi():void 0,$r=e=>{const t={channel:ch,...e};Wi?Wi.postMessage(t):window.parent.postMessage(t,\"*\")},hh=lh({element:document.getElementById(\"squiffy\"),send:$r});window.addEventListener(\"message\",e=>{!Wi&&e.source!==window.parent||uh(e.data)&&hh.receive(e.data)}),window.addEventListener(\"error\",e=>$r(Ui(e.error??e.message))),window.addEventListener(\"unhandledrejection\",e=>$r(Ui(e.reason))),$r({type:\"ready\"})})();\n\n</script>\n</body>\n</html>\n";